2007-06-09 03:05:51 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/** @file newgrf_industries.h */
|
|
|
|
|
|
|
|
#ifndef NEWGRF_INDUSTRIES_H
|
|
|
|
#define NEWGRF_INDUSTRIES_H
|
|
|
|
|
|
|
|
#include "industry.h"
|
|
|
|
#include "newgrf_spritegroup.h"
|
|
|
|
|
2007-09-23 20:27:35 +01:00
|
|
|
/** When should the industry(tile) be triggered for random bits? */
|
|
|
|
enum IndustryTrigger {
|
|
|
|
/** Triggered each tile loop */
|
|
|
|
INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
|
|
|
|
/** Triggered (whole industry) each 256 ticks */
|
|
|
|
INDUSTRY_TRIGGER_256_TICKS = 2,
|
|
|
|
/** Triggered on cargo delivery */
|
|
|
|
INDUSTRY_TRIGGER_CARGO_DELIVERY = 4,
|
|
|
|
};
|
|
|
|
|
2007-06-13 03:29:08 +01:00
|
|
|
/* in newgrf_industry.cpp */
|
2007-06-09 03:05:51 +01:00
|
|
|
uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available);
|
2007-07-25 20:06:29 +01:00
|
|
|
uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);
|
2007-06-12 01:49:50 +01:00
|
|
|
uint32 GetIndustryIDAtOffset(TileIndex new_tile, TileIndex old_tile, const Industry *i);
|
2007-07-05 06:41:56 +01:00
|
|
|
void IndustryProductionCallback(Industry *ind, int reason);
|
2007-07-09 14:21:49 +01:00
|
|
|
bool CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint itspec_index);
|
2007-07-15 01:19:40 +01:00
|
|
|
bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCallType creation_type);
|
2007-06-09 03:05:51 +01:00
|
|
|
|
2007-07-11 23:57:47 +01:00
|
|
|
IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id);
|
|
|
|
|
2007-06-13 03:29:08 +01:00
|
|
|
/* in newgrf_industrytiles.cpp*/
|
2007-07-12 00:10:22 +01:00
|
|
|
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index);
|
|
|
|
|
2007-06-09 03:05:51 +01:00
|
|
|
#endif /* NEWGRF_INDUSTRIES_H */
|