OpenTTD Source 20250312-master-gcdcc6b491d
subsidy_func.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10#ifndef SUBSIDY_FUNC_H
11#define SUBSIDY_FUNC_H
12
13#include "station_type.h"
14#include "company_type.h"
15#include "cargo_type.h"
16
18bool CheckSubsidised(CargoType cargo_type, CompanyID company, Source src, const Station *st);
20
21#endif /* SUBSIDY_FUNC_H */
Types related to cargoes...
uint8_t CargoType
Cargo slots to indicate a cargo type within a game.
Definition cargo_type.h:23
Types related to companies.
Types related to stations.
A location from where cargo can come from (or go to).
Definition source_type.h:32
Station data structure.
void RebuildSubsidisedSourceAndDestinationCache()
Perform a full rebuild of the subsidies cache.
Definition subsidy.cpp:103
void DeleteSubsidyWith(Source src)
Delete the subsidies associated with a given cargo source type and id.
Definition subsidy.cpp:119
bool CheckSubsidised(CargoType cargo_type, CompanyID company, Source src, const Station *st)
Tests whether given delivery is subsidised and possibly awards the subsidy to delivering company.
Definition subsidy.cpp:507