From c00a400cc7e7626a430ed65d29a47c02a7a14eaa Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 11 Jan 2013 07:39:25 +0000 Subject: (svn r24905) -Feature(ish): Implement station randomisation triggers. --- src/newgrf_station.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/newgrf_station.h') 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 */ -- cgit v1.2.3-54-g00ecf