OpenTTD Source: src/subsidy_func.h Source File

OpenTTD Source 15.3

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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef SUBSIDY_FUNC_H
11#define SUBSIDY_FUNC_H
12
13#include "source_type.h"
14#include "station_type.h"
15#include "company_type.h"
16#include "cargo_type.h"
17
18void DeleteSubsidyWith(Source src);
19bool CheckSubsidised(CargoType cargo_type, CompanyID company, Source src, const Station *st);
20void RebuildSubsidisedSourceAndDestinationCache();
21
22#endif /* SUBSIDY_FUNC_H */
cargo_type.h
Types related to cargoes...
CargoType
uint8_t CargoType
Cargo slots to indicate a cargo type within a game.
Definition cargo_type.h:21
company_type.h
Types related to companies.
source_type.h
Type for the source of cargo.
station_type.h
Types related to stations.
PoolID< uint8_t, struct CompanyIDTag, 0xF, 0xFF >
Source
A location from where cargo can come from (or go to).
Definition source_type.h:32
Station
Station data structure.
Definition station_base.h:520
RebuildSubsidisedSourceAndDestinationCache
void RebuildSubsidisedSourceAndDestinationCache()
Perform a full rebuild of the subsidies cache.
Definition subsidy.cpp:103
DeleteSubsidyWith
void DeleteSubsidyWith(Source src)
Delete the subsidies associated with a given cargo source type and id.
Definition subsidy.cpp:119
CheckSubsidised
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