From af5c2a785f11cc6c56813285fe0d1b09369b0acb Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 11 Nov 2007 17:56:37 +0000 Subject: (svn r11410) -Codechange: implement random triggers for industries. --- src/newgrf_industrytiles.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/newgrf_industrytiles.h') diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h index 4a7794c62..b7394f284 100644 --- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -21,4 +21,16 @@ void AnimateNewIndustryTile(TileIndex tile); bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random()); bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat); + +enum IndustryTileTrigger { + /* The tile of the industry has been triggered during the tileloop. */ + INDTILE_TRIGGER_TILE_LOOP = 0x01, + /* The industry has been triggered via it's tick. */ + INDUSTRY_TRIGGER_INDUSTRY_TICK = 0x02, + /* Cargo has been delivered. */ + INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04, +}; +void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger); +void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger); + #endif /* NEWGRF_INDUSTRYTILES_H */ -- cgit v1.2.3-54-g00ecf