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.