OpenTTD Source: src/newgrf_callbacks.h Source File

OpenTTD Source 15.3

newgrf_callbacks.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef NEWGRF_CALLBACKS_H
11#define NEWGRF_CALLBACKS_H
12
13#include "core/enum_type.hpp"
14
22 enum CallbackID : uint16_t {
24 CBID_NO_CALLBACK = 0x00,
25
27 CBID_RANDOM_TRIGGER = 0x01,
28
29 /* There are no callbacks 0x02 - 0x0F. */
30
32 CBID_VEHICLE_VISUAL_EFFECT = 0x10, // 8 bit callback
33
35 CBID_VEHICLE_LENGTH = 0x11,
36
38 CBID_VEHICLE_LOAD_AMOUNT = 0x12, // 8 bit callback
39
41 CBID_STATION_AVAILABILITY = 0x13, // 8 bit callback
42
44 CBID_STATION_DRAW_TILE_LAYOUT = 0x14,
45
50 CBID_VEHICLE_REFIT_CAPACITY = 0x15, // 15 bit callback
51
53 CBID_VEHICLE_ARTIC_ENGINE = 0x16, // 8 bit callback for grf version < 8
54
56 CBID_HOUSE_ALLOW_CONSTRUCTION = 0x17, // 8 bit callback
57
59 CBID_GENERIC_AI_PURCHASE_SELECTION = 0x18, // 8 bit callback, implemented for stations only
60
62 CBID_VEHICLE_CARGO_SUFFIX = 0x19,
63
65 CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A, // 15 bit callback
66
68 CBID_HOUSE_ANIMATION_TRIGGER_TILE_LOOP = 0x1B, // 15 bit callback
69
71 CBID_HOUSE_ANIMATION_TRIGGER_CONSTRUCTION_STAGE_CHANGED = 0x1C, // 15 bit callback
72
74 CBID_TRAIN_ALLOW_WAGON_ATTACH = 0x1D,
75
77 CBID_HOUSE_COLOUR = 0x1E, // 15 bit callback
78
80 CBID_HOUSE_CARGO_ACCEPTANCE = 0x1F, // 15 bit callback
81
83 CBID_HOUSE_ANIMATION_SPEED = 0x20, // 8 bit callback
84
86 CBID_HOUSE_DESTRUCTION = 0x21, // 8 bit callback
87
89 CBID_INDUSTRY_PROBABILITY = 0x22, // 15 bit callback
90
95 CBID_VEHICLE_ADDITIONAL_TEXT = 0x23,
96
98 CBID_STATION_BUILD_TILE_LAYOUT = 0x24, // 15 bit callback
99
101 CBID_INDTILE_ANIMATION_TRIGGER = 0x25, // 15 bit callback
102
104 CBID_INDTILE_ANIMATION_NEXT_FRAME = 0x26, // 15 bit callback
105
107 CBID_INDTILE_ANIMATION_SPEED = 0x27, // 8 bit callback
108
110 CBID_INDUSTRY_LOCATION = 0x28, // 15 bit callback
111
113 CBID_INDUSTRY_PRODUCTION_CHANGE = 0x29, // 15 bit callback
114
116 CBID_HOUSE_ACCEPT_CARGO = 0x2A, // 15 bit callback
117
119 CBID_INDTILE_CARGO_ACCEPTANCE = 0x2B, // 15 bit callback
120
122 CBID_INDTILE_ACCEPT_CARGO = 0x2C, // 15 bit callback
123
128 CBID_VEHICLE_COLOUR_MAPPING = 0x2D, // 15 bit callback
129
131 CBID_HOUSE_PRODUCE_CARGO = 0x2E, // 15 bit callback
132
134 CBID_INDTILE_SHAPE_CHECK = 0x2F, // 15 bit callback
135
137 CBID_INDTILE_DRAW_FOUNDATIONS = 0x30, // 15 bit callback
138
143 CBID_VEHICLE_START_STOP_CHECK = 0x31, // 15 bit callback, but 0xFF test is done with 8 bit
144
146 CBID_VEHICLE_32DAY_CALLBACK = 0x32, // 2 bit callback
147
149 CBID_VEHICLE_SOUND_EFFECT = 0x33, // 15 bit callback
150
152 CBID_VEHICLE_AUTOREPLACE_SELECTION = 0x34, // 15 bit callback, not implemented
153
155 CBID_INDUSTRY_MONTHLYPROD_CHANGE = 0x35, // 15 bit callback
156
161 CBID_VEHICLE_MODIFY_PROPERTY = 0x36, // 8/15 bit depends on queried property
162
164 CBID_INDUSTRY_CARGO_SUFFIX = 0x37, // 15 bit callback, but 0xFF test is done with 8 bit
165
167 CBID_INDUSTRY_FUND_MORE_TEXT = 0x38, // 15 bit callback
168
170 CBID_CARGO_PROFIT_CALC = 0x39, // 15 bit callback
171
173 CBID_INDUSTRY_WINDOW_MORE_TEXT = 0x3A, // 15 bit callback
174
176 CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B, // 15 bit callback
177
179 CBID_INDTILE_AUTOSLOPE = 0x3C, // 15 bit callback
180
182 CBID_INDUSTRY_REFUSE_CARGO = 0x3D, // 15 bit callback
183
184 /* There are no callbacks 0x3E - 0x13F */
185
187 CBID_STATION_ANIMATION_TRIGGER = 0x140, // 15 bit callback
188
190 CBID_STATION_ANIMATION_NEXT_FRAME = 0x141, // 15 bit callback
191
193 CBID_STATION_ANIMATION_SPEED = 0x142, // 8 bit callback
194
196 CBID_HOUSE_DENY_DESTRUCTION = 0x143, // 15 bit callback
197
199 CBID_SOUNDS_AMBIENT_EFFECT = 0x144, // 15 bit callback
200
202 CBID_CARGO_STATION_RATING_CALC = 0x145, // 15 bit callback
203
205 CBID_NEW_SIGNALS_SPRITE_DRAW = 0x146, // 15 bit callback, not implemented
206
208 CBID_CANALS_SPRITE_OFFSET = 0x147, // 15 bit callback
209
211 CBID_HOUSE_ANIMATION_TRIGGER_WATCHED_CARGO_ACCEPTED = 0x148, // 15 bit callback
212
214 CBID_STATION_LAND_SLOPE_CHECK = 0x149, // 15 bit callback
215
217 CBID_INDUSTRY_DECIDE_COLOUR = 0x14A, // 4 bit callback
218
220 CBID_INDUSTRY_INPUT_CARGO_TYPES = 0x14B, // 8 bit callback
221
223 CBID_INDUSTRY_OUTPUT_CARGO_TYPES = 0x14C, // 8 bit callback
224
226 CBID_HOUSE_CUSTOM_NAME = 0x14D, // 15 bit callback
227
229 CBID_HOUSE_DRAW_FOUNDATIONS = 0x14E, // 15 bit callback
230
232 CBID_HOUSE_AUTOSLOPE = 0x14F, // 15 bit callback
233
235 CBID_AIRPTILE_DRAW_FOUNDATIONS = 0x150, // 15 bit callback
236
238 CBID_AIRPTILE_ANIMATION_TRIGGER = 0x152, // 15 bit callback
239
241 CBID_AIRPTILE_ANIMATION_NEXT_FRAME = 0x153, // 15 bit callback
242
244 CBID_AIRPTILE_ANIMATION_SPEED = 0x154, // 8 bit callback
245
250 CBID_AIRPORT_ADDITIONAL_TEXT = 0x155, // 15 bit callback
251
253 CBID_AIRPORT_LAYOUT_NAME = 0x156, // 15 bit callback
254
256 CBID_OBJECT_LAND_SLOPE_CHECK = 0x157, // 15 bit callback
257
259 CBID_OBJECT_ANIMATION_NEXT_FRAME = 0x158, // 15 bit callback
260
262 CBID_OBJECT_ANIMATION_TRIGGER = 0x159, // 15 bit callback
263
265 CBID_OBJECT_ANIMATION_SPEED = 0x15A, // 8 bit callback
266
268 CBID_OBJECT_COLOUR = 0x15B, // 15 bit callback
269
271 CBID_OBJECT_FUND_MORE_TEXT = 0x15C, // 15 bit callback
272
274 CBID_OBJECT_AUTOSLOPE = 0x15D, // 15 bit callback
275
277 CBID_VEHICLE_REFIT_COST = 0x15E, // 15 bit callback
278
280 CBID_INDUSTRY_PROD_CHANGE_BUILD = 0x15F, // 15 bit callback
281
283 CBID_VEHICLE_SPAWN_VISUAL_EFFECT = 0x160, // 15 bit callback
284
286 CBID_VEHICLE_NAME = 0x161, // 15 bit callback
287
289 CBID_VEHICLE_BUILD_PROBABILITY = 0x162, // 15 bit callback
290
295 CBID_VEHICLE_CUSTOM_REFIT = 0x0163, // 15 bit callback
296};
297
302 enum class VehicleCallbackMask : uint8_t {
303 VisualEffect = 0,
304 Length = 1,
305 LoadAmount = 2,
306 RefitCapacity = 3,
307 ArticEngine = 4,
308 CargoSuffix = 5,
309 ColourRemap = 6,
310 SoundEffect = 7,
311 Name = 8,
312 CustomRefit = 9,
313};
314using VehicleCallbackMasks = EnumBitSet<VehicleCallbackMask, uint16_t>;
315
319 enum class StationCallbackMask : uint8_t {
320 Avail = 0,
321 DrawTileLayout = 1,
322 AnimationNextFrame = 2,
323 AnimationSpeed = 3,
324 SlopeCheck = 4,
325};
326using StationCallbackMasks = EnumBitSet<StationCallbackMask, uint16_t>;
327
331 enum class RoadStopCallbackMask : uint8_t {
332 Avail = 0,
333 AnimationNextFrame = 1,
334 AnimationSpeed = 2,
335};
336using RoadStopCallbackMasks = EnumBitSet<RoadStopCallbackMask, uint8_t>;
337
341 enum class HouseCallbackMask : uint8_t {
342 AllowConstruction = 0,
343 AnimationNextFrame = 1,
344 AnimationTriggerTileLoop = 2,
345 AnimationTriggerConstructionStageChanged = 3,
346 Colour = 4,
347 CargoAcceptance = 5,
348 AnimationSpeed = 6,
349 Destruction = 7,
350 AcceptCargo = 8,
351 ProduceCargo = 9,
352 DenyDestruction = 10,
353 DrawFoundations = 11,
354 Autoslope = 12,
355};
356using HouseCallbackMasks = EnumBitSet<HouseCallbackMask, uint16_t>;
357
361 enum class CanalCallbackMask : uint8_t {
362 SpriteOffset = 0,
363};
364using CanalCallbackMasks = EnumBitSet<CanalCallbackMask, uint8_t>;
365
369 enum class CargoCallbackMask : uint8_t {
370 ProfitCalc = 0,
371 StationRatingCalc = 1,
372};
373using CargoCallbackMasks = EnumBitSet<CargoCallbackMask, uint8_t>;
374
378 enum class IndustryCallbackMask : uint8_t {
379 Probability = 0,
380 ProductionCargoArrival = 1,
381 Production256Ticks = 2,
382 Location = 3,
383 ProductionChange = 4,
384 MonthlyProdChange = 5,
385 CargoSuffix = 6,
386 FundMoreText = 7,
387 WindowMoreText = 8,
388 SpecialEffect = 9,
389 RefuseCargo = 10,
390 DecideColour = 11,
391 InputCargoTypes = 12,
392 OutputCargoTypes = 13,
393 ProdChangeBuild = 14,
394};
395using IndustryCallbackMasks = EnumBitSet<IndustryCallbackMask, uint16_t>;
396
400 enum class IndustryTileCallbackMask : uint8_t {
401 AnimationNextFrame = 0,
402 AnimationSpeed = 1,
403 CargoAcceptance = 2,
404 AcceptCargo = 3,
405 ShapeCheck = 4,
406 DrawFoundations = 5,
407 Autoslope = 6,
408};
409using IndustryTileCallbackMasks = EnumBitSet<IndustryTileCallbackMask, uint8_t>;
410
414 enum class ObjectCallbackMask : uint8_t {
415 SlopeCheck = 0,
416 AnimationNextFrame = 1,
417 AnimationSpeed = 2,
418 Colour = 3,
419 FundMoreText = 4,
420 Autoslope = 5,
421};
422using ObjectCallbackMasks = EnumBitSet<ObjectCallbackMask, uint8_t>;
423
427 enum class AirportTileCallbackMask : uint8_t {
428 AnimationNextFrame = 0,
429 AnimationSpeed = 1,
430 ShapeCheck = 4,
431 DrawFoundations = 5,
432 Autoslope = 6,
433};
434using AirportTileCallbackMasks = EnumBitSet<AirportTileCallbackMask, uint8_t>;
435
439 static const uint CALLBACK_FAILED = 0xFFFF;
440 static const uint CALLBACK_HOUSEPRODCARGO_END = 0x20FF;
441
442#endif /* NEWGRF_CALLBACKS_H */
EnumBitSet< VehicleCallbackMask, uint16_t >
VisualEffect
VisualEffect
Meaning of the various bits of the visual effect.
Definition engine_type.h:54
enum_type.hpp
Type (helpers) for enums.
AirportTileCallbackMask
AirportTileCallbackMask
Callback masks for airport tiles.
Definition newgrf_callbacks.h:427
StationCallbackMask
StationCallbackMask
Callback masks for stations.
Definition newgrf_callbacks.h:319
StationCallbackMask::DrawTileLayout
@ DrawTileLayout
Use callback to select a tile layout to use when drawing.
StationCallbackMask::Avail
@ Avail
Availability of station in construction window.
StationCallbackMask::AnimationNextFrame
@ AnimationNextFrame
Use a custom next frame callback.
StationCallbackMask::AnimationSpeed
@ AnimationSpeed
Customize the animation speed of the station.
StationCallbackMask::SlopeCheck
@ SlopeCheck
Check slope of new station tiles.
VehicleCallbackMask
VehicleCallbackMask
Callback masks for vehicles, indicates which callbacks are used by a vehicle.
Definition newgrf_callbacks.h:302
VehicleCallbackMask::SoundEffect
@ SoundEffect
Vehicle uses custom sound effects.
VehicleCallbackMask::Name
@ Name
Engine name.
VehicleCallbackMask::RefitCapacity
@ RefitCapacity
Cargo capacity after refit.
VehicleCallbackMask::ArticEngine
@ ArticEngine
Add articulated engines (trains and road vehicles)
VehicleCallbackMask::Length
@ Length
Vehicle length (trains and road vehicles)
VehicleCallbackMask::ColourRemap
@ ColourRemap
Change colour mapping of vehicle.
VehicleCallbackMask::LoadAmount
@ LoadAmount
Load amount.
VehicleCallbackMask::CustomRefit
@ CustomRefit
Custom refit mask.
CargoCallbackMask
CargoCallbackMask
Callback masks for cargoes.
Definition newgrf_callbacks.h:369
CargoCallbackMask::StationRatingCalc
@ StationRatingCalc
custom station rating for this cargo type
CargoCallbackMask::ProfitCalc
@ ProfitCalc
custom profit calculation
IndustryCallbackMask
IndustryCallbackMask
Callback masks for Industries.
Definition newgrf_callbacks.h:378
IndustryCallbackMask::Probability
@ Probability
industry availability/probability callback
IndustryCallbackMask::WindowMoreText
@ WindowMoreText
additional text in industry window
IndustryCallbackMask::FundMoreText
@ FundMoreText
additional text in fund window
IndustryCallbackMask::InputCargoTypes
@ InputCargoTypes
customize the cargoes the industry requires
IndustryCallbackMask::ProductionChange
@ ProductionChange
controls random production change
IndustryCallbackMask::DecideColour
@ DecideColour
give a custom colour to newly build industries
IndustryCallbackMask::SpecialEffect
@ SpecialEffect
control special effects
IndustryCallbackMask::ProdChangeBuild
@ ProdChangeBuild
initialise production level on construction
IndustryCallbackMask::Production256Ticks
@ Production256Ticks
call production callback every 256 ticks
IndustryCallbackMask::Location
@ Location
check industry construction on given area
IndustryCallbackMask::MonthlyProdChange
@ MonthlyProdChange
controls monthly random production change
IndustryCallbackMask::ProductionCargoArrival
@ ProductionCargoArrival
call production callback when cargo arrives at the industry
IndustryCallbackMask::RefuseCargo
@ RefuseCargo
option out of accepting cargo
IndustryCallbackMask::OutputCargoTypes
@ OutputCargoTypes
customize the cargoes the industry produces
CallbackID
CallbackID
List of implemented NewGRF callbacks.
Definition newgrf_callbacks.h:22
CBID_HOUSE_ANIMATION_TRIGGER_WATCHED_CARGO_ACCEPTED
@ CBID_HOUSE_ANIMATION_TRIGGER_WATCHED_CARGO_ACCEPTED
Called when a cargo type specified in property 20 is accepted.
Definition newgrf_callbacks.h:211
CBID_INDUSTRY_OUTPUT_CARGO_TYPES
@ CBID_INDUSTRY_OUTPUT_CARGO_TYPES
Customize the output cargo types of a newly build industry.
Definition newgrf_callbacks.h:223
CBID_HOUSE_ANIMATION_TRIGGER_TILE_LOOP
@ CBID_HOUSE_ANIMATION_TRIGGER_TILE_LOOP
Called for periodically starting or stopping the animation.
Definition newgrf_callbacks.h:68
CBID_VEHICLE_SOUND_EFFECT
@ CBID_VEHICLE_SOUND_EFFECT
Called to play a special sound effect.
Definition newgrf_callbacks.h:149
CBID_VEHICLE_BUILD_PROBABILITY
@ CBID_VEHICLE_BUILD_PROBABILITY
Called to determine probability during build.
Definition newgrf_callbacks.h:289
CBID_INDTILE_ANIMATION_SPEED
@ CBID_INDTILE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition newgrf_callbacks.h:107
CBID_OBJECT_FUND_MORE_TEXT
@ CBID_OBJECT_FUND_MORE_TEXT
Called to determine more text in the fund object window.
Definition newgrf_callbacks.h:271
CBID_INDUSTRY_SPECIAL_EFFECT
@ CBID_INDUSTRY_SPECIAL_EFFECT
Called to determine industry special effects.
Definition newgrf_callbacks.h:176
CBID_VEHICLE_SPAWN_VISUAL_EFFECT
@ CBID_VEHICLE_SPAWN_VISUAL_EFFECT
Called to spawn visual effects for vehicles.
Definition newgrf_callbacks.h:283
CBID_VEHICLE_REFIT_COST
@ CBID_VEHICLE_REFIT_COST
Called to determine the cost factor for refitting a vehicle.
Definition newgrf_callbacks.h:277
CBID_INDUSTRY_PROBABILITY
@ CBID_INDUSTRY_PROBABILITY
Called to determine if the given industry type is available.
Definition newgrf_callbacks.h:89
CBID_AIRPORT_ADDITIONAL_TEXT
@ CBID_AIRPORT_ADDITIONAL_TEXT
This callback is called from airport list.
Definition newgrf_callbacks.h:250
CBID_INDTILE_SHAPE_CHECK
@ CBID_INDTILE_SHAPE_CHECK
Called to determine if the given industry tile can be built on specific tile.
Definition newgrf_callbacks.h:134
CBID_AIRPTILE_DRAW_FOUNDATIONS
@ CBID_AIRPTILE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for an airport tile.
Definition newgrf_callbacks.h:235
CBID_STATION_ANIMATION_TRIGGER
@ CBID_STATION_ANIMATION_TRIGGER
Called for periodically starting or stopping the animation.
Definition newgrf_callbacks.h:187
CBID_INDTILE_AUTOSLOPE
@ CBID_INDTILE_AUTOSLOPE
Called to determine if industry can alter the ground below industry tile.
Definition newgrf_callbacks.h:179
CBID_VEHICLE_AUTOREPLACE_SELECTION
@ CBID_VEHICLE_AUTOREPLACE_SELECTION
Return the vehicles this given vehicle can be "upgraded" to.
Definition newgrf_callbacks.h:152
CBID_VEHICLE_CUSTOM_REFIT
@ CBID_VEHICLE_CUSTOM_REFIT
Called to get custom engine refit mask.
Definition newgrf_callbacks.h:295
CBID_STATION_BUILD_TILE_LAYOUT
@ CBID_STATION_BUILD_TILE_LAYOUT
Called when building a station to customize the tile layout.
Definition newgrf_callbacks.h:98
CBID_SOUNDS_AMBIENT_EFFECT
@ CBID_SOUNDS_AMBIENT_EFFECT
Select an ambient sound to play for a given type of tile.
Definition newgrf_callbacks.h:199
CBID_VEHICLE_COLOUR_MAPPING
@ CBID_VEHICLE_COLOUR_MAPPING
Called to determine if a specific colour map should be used for a vehicle instead of the default live...
Definition newgrf_callbacks.h:128
CBID_INDUSTRY_DECIDE_COLOUR
@ CBID_INDUSTRY_DECIDE_COLOUR
Called to determine the colour of an industry.
Definition newgrf_callbacks.h:217
CBID_INDUSTRY_WINDOW_MORE_TEXT
@ CBID_INDUSTRY_WINDOW_MORE_TEXT
Called to determine more text in the industry window.
Definition newgrf_callbacks.h:173
CBID_VEHICLE_32DAY_CALLBACK
@ CBID_VEHICLE_32DAY_CALLBACK
Called for every vehicle every 32 days (not all on same date though).
Definition newgrf_callbacks.h:146
CBID_OBJECT_LAND_SLOPE_CHECK
@ CBID_OBJECT_LAND_SLOPE_CHECK
Callback done for each tile of an object to check the slope.
Definition newgrf_callbacks.h:256
CBID_VEHICLE_NAME
@ CBID_VEHICLE_NAME
Called to determine the engine name to show.
Definition newgrf_callbacks.h:286
CBID_STATION_DRAW_TILE_LAYOUT
@ CBID_STATION_DRAW_TILE_LAYOUT
Choose a tile layout to draw, instead of the standard range.
Definition newgrf_callbacks.h:44
CBID_VEHICLE_CARGO_SUFFIX
@ CBID_VEHICLE_CARGO_SUFFIX
Determine the cargo "suffixes" for each refit possibility of a cargo.
Definition newgrf_callbacks.h:62
CBID_HOUSE_COLOUR
@ CBID_HOUSE_COLOUR
Called to determine the colour of a town building.
Definition newgrf_callbacks.h:77
CBID_HOUSE_DRAW_FOUNDATIONS
@ CBID_HOUSE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for house tile.
Definition newgrf_callbacks.h:229
CBID_AIRPTILE_ANIMATION_TRIGGER
@ CBID_AIRPTILE_ANIMATION_TRIGGER
Called for periodically starting or stopping the animation.
Definition newgrf_callbacks.h:238
CBID_INDTILE_DRAW_FOUNDATIONS
@ CBID_INDTILE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for industry tile.
Definition newgrf_callbacks.h:137
CBID_INDUSTRY_PRODUCTION_CHANGE
@ CBID_INDUSTRY_PRODUCTION_CHANGE
Called on production changes, so it can be adjusted.
Definition newgrf_callbacks.h:113
CBID_INDUSTRY_CARGO_SUFFIX
@ CBID_INDUSTRY_CARGO_SUFFIX
Called to determine text to display after cargo name.
Definition newgrf_callbacks.h:164
CBID_OBJECT_AUTOSLOPE
@ CBID_OBJECT_AUTOSLOPE
Called to determine if one can alter the ground below an object tile.
Definition newgrf_callbacks.h:274
CBID_CARGO_STATION_RATING_CALC
@ CBID_CARGO_STATION_RATING_CALC
Called to calculate part of a station rating.
Definition newgrf_callbacks.h:202
CBID_NO_CALLBACK
@ CBID_NO_CALLBACK
Set when using the callback resolve system, but not to resolve a callback.
Definition newgrf_callbacks.h:24
CBID_HOUSE_CARGO_ACCEPTANCE
@ CBID_HOUSE_CARGO_ACCEPTANCE
Called to decide how much cargo a town building can accept.
Definition newgrf_callbacks.h:80
CBID_VEHICLE_LENGTH
@ CBID_VEHICLE_LENGTH
Vehicle length, returns the amount of 1/8's the vehicle is shorter for trains and RVs.
Definition newgrf_callbacks.h:35
CBID_HOUSE_ANIMATION_SPEED
@ CBID_HOUSE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition newgrf_callbacks.h:83
CBID_HOUSE_AUTOSLOPE
@ CBID_HOUSE_AUTOSLOPE
Called to determine if one can alter the ground below a house tile.
Definition newgrf_callbacks.h:232
CBID_GENERIC_AI_PURCHASE_SELECTION
@ CBID_GENERIC_AI_PURCHASE_SELECTION
AI construction/purchase selection.
Definition newgrf_callbacks.h:59
CBID_AIRPTILE_ANIMATION_SPEED
@ CBID_AIRPTILE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition newgrf_callbacks.h:244
CBID_INDUSTRY_REFUSE_CARGO
@ CBID_INDUSTRY_REFUSE_CARGO
Called to determine if the industry can still accept or refuse more cargo arrival.
Definition newgrf_callbacks.h:182
CBID_CARGO_PROFIT_CALC
@ CBID_CARGO_PROFIT_CALC
Called to calculate the income of delivered cargo.
Definition newgrf_callbacks.h:170
CBID_STATION_AVAILABILITY
@ CBID_STATION_AVAILABILITY
Determine whether a newstation should be made available to build.
Definition newgrf_callbacks.h:41
CBID_HOUSE_ANIMATION_NEXT_FRAME
@ CBID_HOUSE_ANIMATION_NEXT_FRAME
Determine the next animation frame for a house.
Definition newgrf_callbacks.h:65
CBID_HOUSE_CUSTOM_NAME
@ CBID_HOUSE_CUSTOM_NAME
Called on the Get Tile Description for an house tile.
Definition newgrf_callbacks.h:226
CBID_INDUSTRY_MONTHLYPROD_CHANGE
@ CBID_INDUSTRY_MONTHLYPROD_CHANGE
Called monthly on production changes, so it can be adjusted more frequently.
Definition newgrf_callbacks.h:155
CBID_HOUSE_DENY_DESTRUCTION
@ CBID_HOUSE_DENY_DESTRUCTION
Called to determine whether a town building can be destroyed.
Definition newgrf_callbacks.h:196
CBID_OBJECT_ANIMATION_TRIGGER
@ CBID_OBJECT_ANIMATION_TRIGGER
Called for periodically starting or stopping the animation.
Definition newgrf_callbacks.h:262
CBID_VEHICLE_START_STOP_CHECK
@ CBID_VEHICLE_START_STOP_CHECK
Called when the company (or AI) tries to start or stop a vehicle.
Definition newgrf_callbacks.h:143
CBID_STATION_ANIMATION_NEXT_FRAME
@ CBID_STATION_ANIMATION_NEXT_FRAME
Called to determine station tile next animation frame.
Definition newgrf_callbacks.h:190
CBID_STATION_ANIMATION_SPEED
@ CBID_STATION_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition newgrf_callbacks.h:193
CBID_HOUSE_ALLOW_CONSTRUCTION
@ CBID_HOUSE_ALLOW_CONSTRUCTION
Determine whether the house can be built on the specified tile.
Definition newgrf_callbacks.h:56
CBID_INDUSTRY_FUND_MORE_TEXT
@ CBID_INDUSTRY_FUND_MORE_TEXT
Called to determine more text in the fund industry window.
Definition newgrf_callbacks.h:167
CBID_RANDOM_TRIGGER
@ CBID_RANDOM_TRIGGER
Set when calling a randomizing trigger (almost undocumented).
Definition newgrf_callbacks.h:27
CBID_HOUSE_ACCEPT_CARGO
@ CBID_HOUSE_ACCEPT_CARGO
Called to determine which cargoes a town building should accept.
Definition newgrf_callbacks.h:116
CBID_OBJECT_ANIMATION_NEXT_FRAME
@ CBID_OBJECT_ANIMATION_NEXT_FRAME
Determine the next animation frame for a house.
Definition newgrf_callbacks.h:259
CBID_TRAIN_ALLOW_WAGON_ATTACH
@ CBID_TRAIN_ALLOW_WAGON_ATTACH
Determine whether a wagon can be attached to an already existing train.
Definition newgrf_callbacks.h:74
CBID_HOUSE_PRODUCE_CARGO
@ CBID_HOUSE_PRODUCE_CARGO
Called to determine how much cargo a town building produces.
Definition newgrf_callbacks.h:131
CBID_INDTILE_ANIMATION_TRIGGER
@ CBID_INDTILE_ANIMATION_TRIGGER
Called for periodically starting or stopping the animation.
Definition newgrf_callbacks.h:101
CBID_VEHICLE_MODIFY_PROPERTY
@ CBID_VEHICLE_MODIFY_PROPERTY
Called to modify various vehicle properties.
Definition newgrf_callbacks.h:161
CBID_OBJECT_COLOUR
@ CBID_OBJECT_COLOUR
Called to determine the colour of a town building.
Definition newgrf_callbacks.h:268
CBID_VEHICLE_ADDITIONAL_TEXT
@ CBID_VEHICLE_ADDITIONAL_TEXT
This callback is called from vehicle purchase lists.
Definition newgrf_callbacks.h:95
CBID_HOUSE_ANIMATION_TRIGGER_CONSTRUCTION_STAGE_CHANGED
@ CBID_HOUSE_ANIMATION_TRIGGER_CONSTRUCTION_STAGE_CHANGED
Called whenever the construction stage of a house changes.
Definition newgrf_callbacks.h:71
CBID_VEHICLE_REFIT_CAPACITY
@ CBID_VEHICLE_REFIT_CAPACITY
Refit capacity, the passed vehicle needs to have its ->cargo_type set to the cargo we are refitting t...
Definition newgrf_callbacks.h:50
CBID_OBJECT_ANIMATION_SPEED
@ CBID_OBJECT_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition newgrf_callbacks.h:265
CBID_STATION_LAND_SLOPE_CHECK
@ CBID_STATION_LAND_SLOPE_CHECK
Callback done for each tile of a station to check the slope.
Definition newgrf_callbacks.h:214
CBID_VEHICLE_LOAD_AMOUNT
@ CBID_VEHICLE_LOAD_AMOUNT
Determine the amount of cargo to load per unit of time when using gradual loading.
Definition newgrf_callbacks.h:38
CBID_HOUSE_DESTRUCTION
@ CBID_HOUSE_DESTRUCTION
Called periodically to determine if a house should be destroyed.
Definition newgrf_callbacks.h:86
CBID_VEHICLE_VISUAL_EFFECT
@ CBID_VEHICLE_VISUAL_EFFECT
Visual effects and wagon power.
Definition newgrf_callbacks.h:32
CBID_INDUSTRY_PROD_CHANGE_BUILD
@ CBID_INDUSTRY_PROD_CHANGE_BUILD
Called when industry is built to set initial production level.
Definition newgrf_callbacks.h:280
CBID_INDTILE_CARGO_ACCEPTANCE
@ CBID_INDTILE_CARGO_ACCEPTANCE
Called to query the cargo acceptance of the industry tile.
Definition newgrf_callbacks.h:119
CBID_INDUSTRY_LOCATION
@ CBID_INDUSTRY_LOCATION
Called to determine if the given industry can be built on specific area.
Definition newgrf_callbacks.h:110
CBID_NEW_SIGNALS_SPRITE_DRAW
@ CBID_NEW_SIGNALS_SPRITE_DRAW
Allow signal sprites to be replaced dynamically.
Definition newgrf_callbacks.h:205
CBID_INDTILE_ACCEPT_CARGO
@ CBID_INDTILE_ACCEPT_CARGO
Called to determine which cargoes an industry should accept.
Definition newgrf_callbacks.h:122
CBID_AIRPORT_LAYOUT_NAME
@ CBID_AIRPORT_LAYOUT_NAME
Called to determine text to show as airport layout name.
Definition newgrf_callbacks.h:253
CBID_VEHICLE_ARTIC_ENGINE
@ CBID_VEHICLE_ARTIC_ENGINE
Builds articulated engines for trains and RVs.
Definition newgrf_callbacks.h:53
CBID_AIRPTILE_ANIMATION_NEXT_FRAME
@ CBID_AIRPTILE_ANIMATION_NEXT_FRAME
Called to determine airport tile next animation frame.
Definition newgrf_callbacks.h:241
CBID_INDTILE_ANIMATION_NEXT_FRAME
@ CBID_INDTILE_ANIMATION_NEXT_FRAME
Called to determine industry tile next animation frame.
Definition newgrf_callbacks.h:104
CBID_CANALS_SPRITE_OFFSET
@ CBID_CANALS_SPRITE_OFFSET
Add an offset to the default sprite numbers to show another sprite.
Definition newgrf_callbacks.h:208
CBID_INDUSTRY_INPUT_CARGO_TYPES
@ CBID_INDUSTRY_INPUT_CARGO_TYPES
Customize the input cargo types of a newly build industry.
Definition newgrf_callbacks.h:220
CanalCallbackMask
CanalCallbackMask
Callback masks for canals.
Definition newgrf_callbacks.h:361
CanalCallbackMask::SpriteOffset
@ SpriteOffset
Enable add sprite offset callback.
ObjectCallbackMask
ObjectCallbackMask
Callback masks for objects.
Definition newgrf_callbacks.h:414
CALLBACK_FAILED
static const uint CALLBACK_FAILED
Different values for Callback result evaluations.
Definition newgrf_callbacks.h:439
RoadStopCallbackMask
RoadStopCallbackMask
Callback masks for road stops.
Definition newgrf_callbacks.h:331
IndustryTileCallbackMask
IndustryTileCallbackMask
Callback masks for industry tiles.
Definition newgrf_callbacks.h:400
IndustryTileCallbackMask::ShapeCheck
@ ShapeCheck
decides slope suitability
HouseCallbackMask
HouseCallbackMask
Callback masks for houses.
Definition newgrf_callbacks.h:341
HouseCallbackMask::AllowConstruction
@ AllowConstruction
decide whether the house can be built on a given tile
HouseCallbackMask::AcceptCargo
@ AcceptCargo
decides accepted types
HouseCallbackMask::Destruction
@ Destruction
trigger destruction of building
HouseCallbackMask::CargoAcceptance
@ CargoAcceptance
decides amount of cargo acceptance
HouseCallbackMask::DrawFoundations
@ DrawFoundations
decides if default foundations need to be drawn
HouseCallbackMask::ProduceCargo
@ ProduceCargo
custom cargo production
HouseCallbackMask::Autoslope
@ Autoslope
decides allowance of autosloping
HouseCallbackMask::DenyDestruction
@ DenyDestruction
conditional protection
HouseCallbackMask::AnimationTriggerConstructionStageChanged
@ AnimationTriggerConstructionStageChanged
change animation when construction stage changes
HouseCallbackMask::AnimationTriggerTileLoop
@ AnimationTriggerTileLoop
periodically start/stop the animation
CALLBACK_HOUSEPRODCARGO_END
static const uint CALLBACK_HOUSEPRODCARGO_END
Sentinel indicating that the loop for CBID_HOUSE_PRODUCE_CARGO has ended.
Definition newgrf_callbacks.h:440
CargoSuffix
Transfer storage of cargo suffix information.
Definition industry_gui.cpp:80