src/newgrf_industries.h
changeset 8709 4187ad809fe7
parent 8118 644c9acc640c
child 8932 989fe2280933
equal deleted inserted replaced
8708:0c29fbc79be4 8709:4187ad809fe7
     3 /** @file newgrf_industries.h */
     3 /** @file newgrf_industries.h */
     4 
     4 
     5 #ifndef NEWGRF_INDUSTRIES_H
     5 #ifndef NEWGRF_INDUSTRIES_H
     6 #define NEWGRF_INDUSTRIES_H
     6 #define NEWGRF_INDUSTRIES_H
     7 
     7 
     8 #include "industry.h"
     8 #include "industry_type.h"
     9 #include "newgrf_spritegroup.h"
     9 #include "newgrf_spritegroup.h"
    10 
    10 
    11 /** When should the industry(tile) be triggered for random bits? */
    11 /** When should the industry(tile) be triggered for random bits? */
    12 enum IndustryTrigger {
    12 enum IndustryTrigger {
    13 	/** Triggered each tile loop */
    13 	/** Triggered each tile loop */
    14 	INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
    14 	INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
    15 	/** Triggered (whole industry) each 256 ticks */
    15 	/** Triggered (whole industry) each 256 ticks */
    16 	INDUSTRY_TRIGGER_256_TICKS        = 2,
    16 	INDUSTRY_TRIGGER_256_TICKS        = 2,
    17 	/** Triggered on cargo delivery */
    17 	/** Triggered on cargo delivery */
    18 	INDUSTRY_TRIGGER_CARGO_DELIVERY   = 4,
    18 	INDUSTRY_TRIGGER_CARGO_DELIVERY   = 4,
       
    19 };
       
    20 
       
    21 /** From where is callback CBID_INDUSTRY_AVAILABLE been called */
       
    22 enum IndustryAvailabilityCallType {
       
    23 	IACT_MAPGENERATION,   ///< during random map generation
       
    24 	IACT_RANDOMCREATION,  ///< during creation of random ingame industry
       
    25 	IACT_USERCREATION,    ///< from the Fund/build window
    19 };
    26 };
    20 
    27 
    21 /* in newgrf_industry.cpp */
    28 /* in newgrf_industry.cpp */
    22 uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available);
    29 uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available);
    23 uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);
    30 uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);