These additions MAY also be present in other patchpacks. They MAY be removed or moved in future, if necessary.
Scripts which use any of these features SHOULD check whether the feature is present and if not, fallback to not using it and/or emitting a clear and end-user friendly error message.
Testing for the presence of methods may be done using the "in" operator.
Additional Static Public Member Functions:
static int32 GetDayLengthFactor ()
Get current day length factor.
static bool IsTimeShownInMinutes ()
Get whether time is shown in minutes in the game settings.
This ignores the "Use client time settings instead of savegame time settings" setting.
static int32 GetTicksPerMinute ()
Get the ticks per minutes in the game settings.
This ignores the "Use client time settings instead of savegame time settings" setting.
static DateTicksScaled GetCurrentScaledDateTicks ()
Get the current scaled date ticks.
This increments at the same rate regardless of the day length factor.
Changing the day length factor will also change this value.
static int32 GetHour (DateTicksScaled ticks)
Get the hour of the given scaled date ticks value.
This ignores the "Use client time settings instead of savegame time settings" setting.
static int32 GetMinute (DateTicksScaled ticks)
Get the minute of the given scaled date ticks value.
This ignores the "Use client time settings instead of savegame time settings" setting.
Additional Static Public Member Functions:
static bool HasRoadTramType(TileIndex tile, RoadTramTypes road_tram_type)
Check if a tile has the given road tram type.
static RoadType GetRoadType(TileIndex tile, RoadTramTypes road_tram_type)
Get the RoadType that is used on a tile.
static bool IsCatenaryRoadType(RoadType roadtype)
Checks whether the given road type uses a catenary.
static bool IsNonLevelCrossingRoadType(RoadType roadtype)
Checks whether the given road type disallows level crossings.
static bool IsNoTownHousesRoadType(RoadType roadtype)
Checks whether the given road type cannot be used by towns to build houses.
static bool IsTownBuildableRoadType(RoadType roadtype)
Checks whether the given road type is buildable by towns.
Additional Static Public Member Functions:
static bool GetAnnualExpenseValue (CompanyID company, uint32 year_offset, ExpensesType expenses_type)
Get the annual expense value for the given company.
year_offset is relative to the current year and must be either: 0, 1, or 2.
Additional Enum Values:
ExpensesType
Additional value: EXPENSES_SHARING_COST
Infrastructure sharing costs.
Additional value: EXPENSES_SHARING_INC
Infrastructure sharing income.
ExpensesType is additionally available via AICompany.
Static Public Member Functions:
static int64 GetPriceFactor ()
Get the inflation factor for prices.
Returns the inflation factor as a fixed point value (16 bits).
static int64 GetPaymentFactor ()
Get the inflation factor for payments.
Returns the inflation factor as a fixed point value (16 bits).
static bool SetPriceFactor (int64 factor)
Set the inflation factor for prices (GS only).
The inflation factor is a fixed point value (16 bits).
static bool SetPaymentFactor (int64 factor)
Set the inflation factor for payments (GS only).
The inflation factor is a fixed point value (16 bits).