## Additions to AI/GS Script Specifications in JGR's Patchpack

This document describes non-standard additions to the Official OpenTTD AI and GS Specifications which are present in this patchpack.

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.

### Date: GSDate Class and AIDate Class

#### 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.

### Marine: GSMarine Class and AIMarine Class

#### Additional Static Public Member Functions:

static bool BuildRiver (TileIndex tile)
Builds a river on tile (subject to permissions/settings).
All other details are the same as BuildCanal.