diff options
author | peter1138 <peter1138@openttd.org> | 2013-01-11 07:39:25 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2013-01-11 07:39:25 +0000 |
commit | c00a400cc7e7626a430ed65d29a47c02a7a14eaa (patch) | |
tree | 0936d13989bc82bcc8bf50026d2ba55f7afed7ee /src/newgrf_station.h | |
parent | 4ebbfc3de4a50b6cf73a7fe50dd17ac1e42efb92 (diff) | |
download | openttd-c00a400cc7e7626a430ed65d29a47c02a7a14eaa.tar.xz |
(svn r24905) -Feature(ish): Implement station randomisation triggers.
Diffstat (limited to 'src/newgrf_station.h')
-rw-r--r-- | src/newgrf_station.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/newgrf_station.h b/src/newgrf_station.h index 111a4dd00..62bb940a4 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -90,6 +90,16 @@ enum StationSpecFlags { SSF_EXTENDED_FOUNDATIONS, ///< Extended foundation block instead of simple. }; +/** Randomisation triggers for stations */ +enum StationRandomTrigger { + SRT_NEW_CARGO, ///< Trigger station on new cargo arrival. + SRT_CARGO_TAKEN, ///< Trigger station when cargo is completely taken. + SRT_TRAIN_ARRIVES, ///< Trigger platform when train arrives. + SRT_TRAIN_DEPARTS, ///< Trigger platform when train leaves. + SRT_TRAIN_LOADS, ///< Trigger platform when train loads/unloads. + SRT_PATH_RESERVATION, ///< Trigger platform when train reserves path. +}; + /* Station layout for given dimensions - it is a two-dimensional array * where index is computed as (x * platforms) + platform. */ typedef byte *StationLayout; @@ -176,6 +186,7 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID void AnimateStationTile(TileIndex tile); void TriggerStationAnimation(BaseStation *st, TileIndex tile, StationAnimationTrigger trigger, CargoID cargo_type = CT_INVALID); -void StationUpdateAnimTriggers(BaseStation *st); +void TriggerStationRandomisation(Station *st, TileIndex tile, StationRandomTrigger trigger, CargoID cargo_type = CT_INVALID); +void StationUpdateCachedTriggers(BaseStation *st); #endif /* NEWGRF_STATION_H */ |