10 #ifndef NEWGRF_CALLBACKS_H
11 #define NEWGRF_CALLBACKS_H
StationCallbackMask
Callback masks for stations.
@ CBM_STATION_DRAW_TILE_LAYOUT
Use callback to select a tile layout to use when drawing.
@ CBM_STATION_ANIMATION_SPEED
Customize the animation speed of the station.
@ CBM_STATION_SLOPE_CHECK
Check slope of new station tiles.
@ CBM_STATION_AVAIL
Availability of station in construction window.
@ CBM_STATION_ANIMATION_NEXT_FRAME
Use a custom next frame callback.
IndustryTileCallbackMask
Callback masks for industry tiles.
@ CBM_INDT_ANIM_SPEED
decides animation speed
@ CBM_INDT_ACCEPT_CARGO
decides accepted types
@ CBM_INDT_AUTOSLOPE
decides allowance of autosloping
@ CBM_INDT_CARGO_ACCEPTANCE
decides amount of cargo acceptance
@ CBM_INDT_ANIM_NEXT_FRAME
decides next animation frame
@ CBM_INDT_SHAPE_CHECK
decides slope suitability
@ CBM_INDT_DRAW_FOUNDATIONS
decides if default foundations need to be drawn
AirportTileCallbackMask
Callback masks for airport tiles.
@ CBM_AIRT_AUTOSLOPE
decides allowance of autosloping
@ CBM_AIRT_SHAPE_CHECK
decides slope suitability
@ CBM_AIRT_ANIM_SPEED
decides animation speed
@ CBM_AIRT_DRAW_FOUNDATIONS
decides if default foundations need to be drawn
@ CBM_AIRT_ANIM_NEXT_FRAME
decides next animation frame
IndustryCallbackMask
Callback masks for Industries.
@ CBM_IND_PROD_CHANGE_BUILD
initialise production level on construction
@ CBM_IND_PRODUCTION_CHANGE
controls random production change
@ CBM_IND_LOCATION
check industry construction on given area
@ CBM_IND_DECIDE_COLOUR
give a custom colour to newly build industries
@ CBM_IND_FUND_MORE_TEXT
additional text in fund window
@ CBM_IND_PROBABILITY
industry availability/probability callback
@ CBM_IND_SPECIAL_EFFECT
control special effects
@ CBM_IND_INPUT_CARGO_TYPES
customize the cargoes the industry requires
@ CBM_IND_REFUSE_CARGO
option out of accepting cargo
@ CBM_IND_WINDOW_MORE_TEXT
additional text in industry window
@ CBM_IND_MONTHLYPROD_CHANGE
controls monthly random production change
@ CBM_IND_PRODUCTION_CARGO_ARRIVAL
call production callback when cargo arrives at the industry
@ CBM_IND_CARGO_SUFFIX
cargo sub-type display
@ CBM_IND_OUTPUT_CARGO_TYPES
customize the cargoes the industry produces
@ CBM_IND_PRODUCTION_256_TICKS
call production callback every 256 ticks
CallbackID
List of implemented NewGRF callbacks.
@ CBID_HOUSE_ANIMATION_START_STOP
Called for periodically starting or stopping the animation.
@ CBID_INDUSTRY_OUTPUT_CARGO_TYPES
Customize the output cargo types of a newly build industry.
@ CBID_VEHICLE_SOUND_EFFECT
Called to play a special sound effect.
@ CBID_VEHICLE_BUILD_PROBABILITY
Called to determine probability during build.
@ CBID_INDTILE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
@ CBID_INDTILE_ANIM_START_STOP
Called for periodically starting or stopping the animation.
@ CBID_OBJECT_FUND_MORE_TEXT
Called to determine more text in the fund object window.
@ CBID_INDUSTRY_SPECIAL_EFFECT
Called to determine industry special effects.
@ CBID_INDTILE_ANIM_NEXT_FRAME
Called to determine industry tile next animation frame.
@ CBID_VEHICLE_SPAWN_VISUAL_EFFECT
Called to spawn visual effects for vehicles.
@ CBID_VEHICLE_REFIT_COST
Called to determine the cost factor for refitting a vehicle.
@ CBID_INDUSTRY_PROBABILITY
Called to determine if the given industry type is available.
@ CBID_AIRPORT_ADDITIONAL_TEXT
This callback is called from airport list.
@ CBID_INDTILE_SHAPE_CHECK
Called to determine if the given industry tile can be built on specific tile.
@ CBID_AIRPTILE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for an airport tile.
@ CBID_INDTILE_AUTOSLOPE
Called to determine if industry can alter the ground below industry tile.
@ CBID_VEHICLE_AUTOREPLACE_SELECTION
Return the vehicles this given vehicle can be "upgraded" to.
@ CBID_VEHICLE_CUSTOM_REFIT
Called to get custom engine refit mask.
@ CBID_STATION_BUILD_TILE_LAYOUT
Called when building a station to customize the tile layout.
@ CBID_SOUNDS_AMBIENT_EFFECT
Select an ambient sound to play for a given type of tile.
@ CBID_HOUSE_CONSTRUCTION_STATE_CHANGE
Called whenever the construction state of a house changes.
@ CBID_VEHICLE_COLOUR_MAPPING
Called to determine if a specific colour map should be used for a vehicle instead of the default live...
@ CBID_INDUSTRY_DECIDE_COLOUR
Called to determine the colour of an industry.
@ CBID_INDUSTRY_WINDOW_MORE_TEXT
Called to determine more text in the industry window.
@ CBID_VEHICLE_32DAY_CALLBACK
Called for every vehicle every 32 days (not all on same date though).
@ CBID_OBJECT_LAND_SLOPE_CHECK
Callback done for each tile of an object to check the slope.
@ CBID_VEHICLE_NAME
Called to determine the engine name to show.
@ CBID_STATION_DRAW_TILE_LAYOUT
Choose a tile layout to draw, instead of the standard range.
@ CBID_VEHICLE_CARGO_SUFFIX
Determine the cargo "suffixes" for each refit possibility of a cargo.
@ CBID_HOUSE_COLOUR
Called to determine the colour of a town building.
@ CBID_HOUSE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for house tile.
@ CBID_AIRPTILE_ANIM_START_STOP
Called for periodically starting or stopping the animation.
@ CBID_INDTILE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for industry tile.
@ CBID_INDUSTRY_PRODUCTION_CHANGE
Called on production changes, so it can be adjusted.
@ CBID_INDUSTRY_CARGO_SUFFIX
Called to determine text to display after cargo name.
@ CBID_OBJECT_AUTOSLOPE
Called to determine if one can alter the ground below an object tile.
@ CBID_CARGO_STATION_RATING_CALC
Called to calculate part of a station rating.
@ CBID_NO_CALLBACK
Set when using the callback resolve system, but not to resolve a callback.
@ CBID_HOUSE_CARGO_ACCEPTANCE
Called to decide how much cargo a town building can accept.
@ CBID_VEHICLE_LENGTH
Vehicle length, returns the amount of 1/8's the vehicle is shorter for trains and RVs.
@ CBID_HOUSE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
@ CBID_HOUSE_AUTOSLOPE
Called to determine if one can alter the ground below a house tile.
@ CBID_GENERIC_AI_PURCHASE_SELECTION
AI construction/purchase selection.
@ CBID_AIRPTILE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
@ CBID_OBJECT_ANIMATION_START_STOP
Called for periodically starting or stopping the animation.
@ CBID_INDUSTRY_REFUSE_CARGO
Called to determine if the industry can still accept or refuse more cargo arrival.
@ CBID_CARGO_PROFIT_CALC
Called to calculate the income of delivered cargo.
@ CBID_STATION_AVAILABILITY
Determine whether a newstation should be made available to build.
@ CBID_HOUSE_ANIMATION_NEXT_FRAME
Determine the next animation frame for a house.
@ CBID_HOUSE_CUSTOM_NAME
Called on the Get Tile Description for an house tile.
@ CBID_INDUSTRY_MONTHLYPROD_CHANGE
Called monthly on production changes, so it can be adjusted more frequently.
@ CBID_HOUSE_DENY_DESTRUCTION
Called to determine whether a town building can be destroyed.
@ CBID_VEHICLE_START_STOP_CHECK
Called when the company (or AI) tries to start or stop a vehicle.
@ CBID_STATION_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
@ CBID_HOUSE_ALLOW_CONSTRUCTION
Determine whether the house can be built on the specified tile.
@ CBID_INDUSTRY_FUND_MORE_TEXT
Called to determine more text in the fund industry window.
@ CBID_HOUSE_WATCHED_CARGO_ACCEPTED
Called when a cargo type specified in property 20 is accepted.
@ CBID_RANDOM_TRIGGER
Set when calling a randomizing trigger (almost undocumented).
@ CBID_HOUSE_ACCEPT_CARGO
Called to determine which cargoes a town building should accept.
@ CBID_OBJECT_ANIMATION_NEXT_FRAME
Determine the next animation frame for a house.
@ CBID_TRAIN_ALLOW_WAGON_ATTACH
Determine whether a wagon can be attached to an already existing train.
@ CBID_HOUSE_PRODUCE_CARGO
Called to determine how much cargo a town building produces.
@ CBID_VEHICLE_MODIFY_PROPERTY
Called to modify various vehicle properties.
@ CBID_OBJECT_COLOUR
Called to determine the colour of a town building.
@ CBID_STATION_ANIM_START_STOP
Called for periodically starting or stopping the animation.
@ CBID_VEHICLE_ADDITIONAL_TEXT
This callback is called from vehicle purchase lists.
@ CBID_VEHICLE_REFIT_CAPACITY
Refit capacity, the passed vehicle needs to have its ->cargo_type set to the cargo we are refitting t...
@ CBID_OBJECT_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
@ CBID_STATION_LAND_SLOPE_CHECK
Callback done for each tile of a station to check the slope.
@ CBID_VEHICLE_LOAD_AMOUNT
Determine the amount of cargo to load per unit of time when using gradual loading.
@ CBID_HOUSE_DESTRUCTION
Called periodically to determine if a house should be destroyed.
@ CBID_VEHICLE_VISUAL_EFFECT
Visual effects and wagon power.
@ CBID_INDUSTRY_PROD_CHANGE_BUILD
Called when industry is built to set initial production level.
@ CBID_INDTILE_CARGO_ACCEPTANCE
Called to query the cargo acceptance of the industry tile.
@ CBID_INDUSTRY_LOCATION
Called to determine if the given industry can be built on specific area.
@ CBID_NEW_SIGNALS_SPRITE_DRAW
Allow signal sprites to be replaced dynamically.
@ CBID_INDTILE_ACCEPT_CARGO
Called to determine which cargoes an industry should accept.
@ CBID_STATION_ANIM_NEXT_FRAME
Called to determine station tile next animation frame.
@ CBID_AIRPORT_LAYOUT_NAME
Called to determine text to show as airport layout name.
@ CBID_VEHICLE_ARTIC_ENGINE
Builds articulated engines for trains and RVs.
@ CBID_AIRPTILE_ANIM_NEXT_FRAME
Called to determine airport tile next animation frame.
@ CBID_CANALS_SPRITE_OFFSET
Add an offset to the default sprite numbers to show another sprite.
@ CBID_INDUSTRY_INPUT_CARGO_TYPES
Customize the input cargo types of a newly build industry.
VehicleCallbackMask
Callback masks for vehicles, indicates which callbacks are used by a vehicle.
@ CBM_VEHICLE_CARGO_SUFFIX
Show suffix after cargo name.
@ CBM_VEHICLE_NAME
Engine name.
@ CBM_VEHICLE_CUSTOM_REFIT
Custom refit mask.
@ CBM_VEHICLE_COLOUR_REMAP
Change colour mapping of vehicle.
@ CBM_VEHICLE_SOUND_EFFECT
Vehicle uses custom sound effects.
@ CBM_VEHICLE_LENGTH
Vehicle length (trains and road vehicles)
@ CBM_VEHICLE_VISUAL_EFFECT
Visual effects and wagon power (trains, road vehicles and ships)
@ CBM_VEHICLE_LOAD_AMOUNT
Load amount.
@ CBM_VEHICLE_REFIT_CAPACITY
Cargo capacity after refit.
@ CBM_VEHICLE_ARTIC_ENGINE
Add articulated engines (trains and road vehicles)
RoadStopCallbackMask
Callback masks for road stops.
@ CBM_ROAD_STOP_AVAIL
Availability of road stop in construction window.
@ CBM_ROAD_STOP_ANIMATION_SPEED
Customize the animation speed of the road stop.
@ CBM_ROAD_STOP_ANIMATION_NEXT_FRAME
Use a custom next frame callback.
static const uint CALLBACK_FAILED
Different values for Callback result evaluations.
CargoCallbackMask
Callback masks for cargoes.
@ CBM_CARGO_PROFIT_CALC
custom profit calculation
@ CBM_CARGO_STATION_RATING_CALC
custom station rating for this cargo type
CanalCallbackMask
Callback masks for canals.
@ CBM_CANAL_SPRITE_OFFSET
Enable add sprite offset callback.
ObjectCallbackMask
Callback masks for objects.
@ CBM_OBJ_COLOUR
decide the colour of the building
@ CBM_OBJ_ANIMATION_NEXT_FRAME
decides next animation frame
@ CBM_OBJ_ANIMATION_SPEED
decides animation speed
@ CBM_OBJ_FUND_MORE_TEXT
additional text in fund window
@ CBM_OBJ_SLOPE_CHECK
decides slope suitability
@ CBM_OBJ_AUTOSLOPE
decides allowance of autosloping
static const uint CALLBACK_HOUSEPRODCARGO_END
Sentinel indicating that the loop for CBID_HOUSE_PRODUCE_CARGO has ended.
HouseCallbackMask
Callback masks for houses.
@ CBM_HOUSE_COLOUR
decide the colour of the building
@ CBM_HOUSE_ANIMATION_SPEED
decides animation speed
@ CBM_HOUSE_PRODUCE_CARGO
custom cargo production
@ CBM_HOUSE_ALLOW_CONSTRUCTION
decide whether the house can be built on a given tile
@ CBM_HOUSE_ANIMATION_NEXT_FRAME
decides next animation frame
@ CBM_HOUSE_ANIMATION_START_STOP
periodically start/stop the animation
@ CBM_HOUSE_CONSTRUCTION_STATE_CHANGE
change animation when construction state changes
@ CBM_HOUSE_CARGO_ACCEPTANCE
decides amount of cargo acceptance
@ CBM_HOUSE_AUTOSLOPE
decides allowance of autosloping
@ CBM_HOUSE_DESTRUCTION
trigger destruction of building
@ CBM_HOUSE_ACCEPT_CARGO
decides accepted types
@ CBM_HOUSE_DRAW_FOUNDATIONS
decides if default foundations need to be drawn
@ CBM_HOUSE_DENY_DESTRUCTION
conditional protection