|
OpenTTD Source 20261112-master-gbcbec5e63f
|
Implementation of the town part of NewGRF houses. More...
#include "stdafx.h"#include "debug.h"#include "town.h"#include "newgrf_town.h"#include "newgrf_cargo.h"#include "timer/timer_game_tick.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| static uint16_t | TownProductionHistoryHelper (const Town *t, CargoLabel label, uint period, auto proj) |
| Get cargo production/transport history for a town via cargo label. | |
| static uint32_t | TownProductionHistoryHelperCargoID (const Town *t, uint32_t parameter, const GRFFile *grffile, uint period, auto proj) |
| Get cargo production/transport history for a town via cargo translation table. | |
| static uint32_t | TownAcceptanceHistoryHelperCargoID (const Town *t, uint32_t parameter, const GRFFile *grffile, uint period, auto proj) |
| Get cargo acceptance history for a town via cargo translation table. | |
| static uint32_t | GetNearbyTileInformation (uint8_t parameter, TileIndex tile, bool grf_version8) |
| Get information about a nearby tile. | |
Implementation of the town part of NewGRF houses.
Definition in file newgrf_town.cpp.
|
static |
Get information about a nearby tile.
| parameter | Pair of coordinates from callback. |
| tile | TileIndex from which the callback was initiated. |
| grf_version8 | True, if we are dealing with a new NewGRF which uses GRF version >= 8. |
Definition at line 82 of file newgrf_town.cpp.
References GetNearbyTile(), and GetNearbyTileInformation().
Referenced by GetNearbyTileInformation().
|
static |
Get cargo acceptance history for a town via cargo translation table.
| t | Town to query. |
| parameter | Cargo ID from callback. |
| grffile | GRF file to use for cargo translation. |
| period | Period to query. |
| proj | Projection to apply on the history data. |
Definition at line 64 of file newgrf_town.cpp.
References Town::accepted, ClampTo(), Town::GetCargoAccepted(), GetCargoTranslation(), and IsValidCargoType().
Referenced by TownScopeResolver::GetVariable().
|
static |
Get cargo production/transport history for a town via cargo label.
| t | Town to query. |
| label | Cargo label from callback. |
| period | Period to query. |
| proj | Projection to apply on the history data. |
Definition at line 27 of file newgrf_town.cpp.
References ClampTo(), GetCargoTypeByLabel(), and Town::supplied.
Referenced by TownScopeResolver::GetVariable().
|
static |
Get cargo production/transport history for a town via cargo translation table.
| t | Town to query. |
| parameter | Cargo ID from callback. |
| grffile | GRF file to use for cargo translation. |
| period | Period to query. |
| proj | Projection to apply on the history data. |
Definition at line 44 of file newgrf_town.cpp.
References ClampTo(), GetCargoTranslation(), IsValidCargoType(), and Town::supplied.
Referenced by TownScopeResolver::GetVariable().