Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef NEWGRF_INDUSTRIES_H
00013 #define NEWGRF_INDUSTRIES_H
00014
00015 #include "newgrf_spritegroup.h"
00016
00018 enum IndustryTrigger {
00020 INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
00022 INDUSTRY_TRIGGER_256_TICKS = 2,
00024 INDUSTRY_TRIGGER_CARGO_DELIVERY = 4,
00025 };
00026
00028 enum IndustryAvailabilityCallType {
00029 IACT_MAPGENERATION,
00030 IACT_RANDOMCREATION,
00031 IACT_USERCREATION,
00032 IACT_PROSPECTCREATION,
00033 };
00034
00035
00036 uint32 IndustryGetVariable(const ResolverObject *object, byte variable, uint32 parameter, bool *available);
00037 uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);
00038 uint32 GetIndustryIDAtOffset(TileIndex new_tile, const Industry *i, uint32 cur_grfid);
00039 void IndustryProductionCallback(Industry *ind, int reason);
00040 CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint layout, uint32 seed, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type);
00041 uint32 GetIndustryProbabilityCallback(IndustryType type, IndustryAvailabilityCallType creation_type, uint32 default_prob);
00042 bool IndustryTemporarilyRefusesCargo(Industry *ind, CargoID cargo_type);
00043
00044 IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id);
00045
00046
00047 uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index, bool signed_offsets, bool grf_version8);
00048
00049 #endif