annotate src/newgrf_callbacks.h @ 7481:a811420eaa26 draft

(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.
author rubidium <rubidium@openttd.org>
date Mon, 27 Aug 2007 21:33:26 +0000
parents 0ab2820a1e52
children e77bd387f449
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
1 /* $Id$ */
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
2
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
3 /** @file newgrf_callbacks.h
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
4 */
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
5
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
6 #ifndef NEWGRF_CALLBACKS_H
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
7 #define NEWGRF_CALLBACKS_H
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
8
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
9
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
10 /**
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
11 * List of implemented NewGRF callbacks.
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
12 * Most of these callbacks are only triggered when the corresponding
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
13 * bit is set in the callback flags/trigger for a vehicle, house,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
14 * industry, etc.
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
15 * Names are formatted as CBID_<CLASS>_<CALLBACK>
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
16 */
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
17 enum CallbackID {
7327
0ab2820a1e52 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium <rubidium@openttd.org>
parents: 7283
diff changeset
18 /** Set when using the callback resolve system, but not to resolve a callback. */
0ab2820a1e52 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium <rubidium@openttd.org>
parents: 7283
diff changeset
19 CBID_NO_CALLBACK = 0x00,
0ab2820a1e52 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium <rubidium@openttd.org>
parents: 7283
diff changeset
20
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
21 /** Set when calling a randomizing trigger (almost undocumented). */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
22 CBID_RANDOM_TRIGGER = 0x01,
7169
bb0d45d67816 (svn r10443) -Fix: randomizing triggers should be called with callback type set to 1
peter1138 <peter1138@openttd.org>
parents: 6490
diff changeset
23
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
24 /** Powered wagons, if the result is lower as 0x40 then the wagon is powered
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
25 * @todo : interpret the rest of the result, aka "visual effects". */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
26 CBID_TRAIN_WAGON_POWER = 0x10,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
27
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
28 /** Vehicle length, returns the amount of 1/8's the vehicle is shorter for trains and RVs. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
29 CBID_VEHICLE_LENGTH = 0x11,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
30
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
31 /** Determine the amount of cargo to load per unit of time when using gradual loading. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
32 CBID_VEHICLE_LOAD_AMOUNT = 0x12,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
33
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
34 /** Determine whether a newstation should be made available to build. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
35 CBID_STATION_AVAILABILITY = 0x13,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
36
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
37 /** Choose a sprite layout to draw, instead of the standard 0-7 range. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
38 CBID_STATION_SPRITE_LAYOUT = 0x14,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
39
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
40 /** Refit capacity, the passed vehicle needs to have its ->cargo_type set to
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
41 * the cargo we are refitting to, returns the new cargo capacity. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
42 CBID_VEHICLE_REFIT_CAPACITY = 0x15,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
43
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
44 /** Builds articulated engines for trains and RVs. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
45 CBID_VEHICLE_ARTIC_ENGINE = 0x16,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
46
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
47 /** Determine whether the house can be built on the specified tile. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
48 CBID_HOUSE_ALLOW_CONSTRUCTION = 0x17,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
49
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
50 /** AI construction/purchase selection */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
51 CBID_GENERIC_AI_PURCHASE_SELECTION = 0x18, // not implemented
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
52
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
53 /** Determine the cargo "suffixes" for each refit possibility of a cargo. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
54 CBID_VEHICLE_CARGO_SUFFIX = 0x19,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
55
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
56 /** Determine the next animation frame for a house. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
57 CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
58
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
59 /** Called for periodically starting or stopping the animation. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
60 CBID_HOUSE_ANIMATION_START_STOP = 0x1B,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
61
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
62 /** Called whenever the construction state of a house changes. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
63 CBID_HOUSE_CONSTRUCTION_STATE_CHANGE = 0x1C,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
64
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
65 /** Determine whether a wagon can be attached to an already existing train. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
66 CBID_TRAIN_ALLOW_WAGON_ATTACH = 0x1D,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
67
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
68 /** Called to determine the colour of a town building. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
69 CBID_BUILDING_COLOUR = 0x1E,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
70
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
71 /** Called to decide how much cargo a town building can accept. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
72 CBID_HOUSE_CARGO_ACCEPTANCE = 0x1F,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
73
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
74 /** Called to indicate how long the current animation frame should last. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
75 CBID_HOUSE_ANIMATION_SPEED = 0x20,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
76
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
77 /** Called periodically to determine if a house should be destroyed. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
78 CBID_HOUSE_DESTRUCTION = 0x21,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
79
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
80 /** Called to determine if the given industry type is available */
7283
3a2f5f6aa1c1 (svn r10622) -Feature: Introduction of the CBID_INDUSTRY_AVAILABLE's handling, in fund industry window.
belugas <belugas@openttd.org>
parents: 7229
diff changeset
81 CBID_INDUSTRY_AVAILABLE = 0x22,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
82
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
83 /** This callback is called from vehicle purchase lists. It returns a value to be
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
84 * used as a custom string ID in the 0xD000 range. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
85 CBID_VEHICLE_ADDITIONAL_TEXT = 0x23,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
86
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
87 /** Called when building a station to customize the tile layout */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
88 CBID_STATION_TILE_LAYOUT = 0x24,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
89
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
90 /** Called for periodically starting or stopping the animation. */
7229
39b4e2291424 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium <rubidium@openttd.org>
parents: 7224
diff changeset
91 CBID_INDTILE_ANIM_START_STOP = 0x25,
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
92
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
93 /** Called to determine industry tile next animation frame. */
7229
39b4e2291424 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium <rubidium@openttd.org>
parents: 7224
diff changeset
94 CBID_INDTILE_ANIM_NEXT_FRAME = 0x26,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
95
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
96 /** Called to indicate how long the current animation frame should last. */
7229
39b4e2291424 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium <rubidium@openttd.org>
parents: 7224
diff changeset
97 CBID_INDTILE_ANIMATION_SPEED = 0x27,
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
98
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
99 /** Called to determine if the given industry can be built on specific area. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
100 CBID_INDUSTRY_LOCATION = 0x28,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
101
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
102 /** Called on production changes, so it can be adjusted. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
103 CBID_INDUSTRY_PRODUCTION_CHANGE = 0x29, // not implemented
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
104
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
105 /** Called to determine which cargoes a town building should accept. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
106 CBID_HOUSE_ACCEPT_CARGO = 0x2A,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
107
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
108 /** Called to query the cargo acceptance of the industry tile */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
109 CBID_INDTILE_CARGO_ACCEPTANCE = 0x2B,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
110
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
111 /** Called to determine which cargoes an industry should accept. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
112 CBID_INDTILE_ACCEPT_CARGO = 0x2C,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
113
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
114 /** Called to determine if a specific colour map should be used for a vehicle
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
115 * instead of the default livery. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
116 CBID_VEHICLE_COLOUR_MAPPING = 0x2D,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
117
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
118 /** Called to determine how much cargo a town building produces. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
119 CBID_HOUSE_PRODUCE_CARGO = 0x2E,
5717
5e23e918212d (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138 <peter1138@openttd.org>
parents: 5475
diff changeset
120
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
121 /** Called to determine if the given industry tile can be built on specific tile. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
122 CBID_INDTILE_SHAPE_CHECK = 0x2F,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
123
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
124 /** Called to determine the type (if any) of foundation to draw for industry tile. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
125 CBID_INDUSTRY_DRAW_FOUNDATIONS = 0x30,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
126
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
127 /** Called when the player (or AI) tries to start or stop a vehicle. Mainly
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
128 * used for preventing a vehicle from leaving the depot. */
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
129 CBID_VEHICLE_START_STOP_CHECK = 0x31,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
130
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
131 /** Called for every vehicle every 32 days (not all on same date though). */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
132 CBID_VEHICLE_32DAY_CALLBACK = 0x32, // not implemented
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
133
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
134 /** Called to play a special sound effect */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
135 CBID_VEHICLE_SOUND_EFFECT = 0x33,
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
136
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
137 /** Return the vehicles this given vehicle can be "upgraded" to. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
138 CBID_VEHICLE_AUTOREPLACE_SELECTION = 0x34,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
139
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
140 /** Called monthly on production changes, so it can be adjusted more frequently */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
141 CBID_INDUSTRY_MONTHLYPROD_CHANGE = 0x35, // not implemented
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
142
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
143 /** Called to modify various vehicle properties. Callback parameter 1
6490
fcc1843c68c6 (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
peter1138 <peter1138@openttd.org>
parents: 6413
diff changeset
144 * specifies the property index, as used in Action 0, to change. */
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
145 CBID_VEHICLE_MODIFY_PROPERTY = 0x36,
6490
fcc1843c68c6 (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
peter1138 <peter1138@openttd.org>
parents: 6413
diff changeset
146
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
147 /** Called to determine text to display after cargo name */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
148 CBID_INDUSTRY_CARGO_SUFFIX = 0x37, // not implemented
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
149
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
150 /** Called to determine more text in the fund industry window */
7224
7528b35be069 (svn r10503) -Codechange: Mark Callback CBID_INDUSTRY_FUND_MORE_TEXT (cb38) as implemented.
belugas <belugas@openttd.org>
parents: 7215
diff changeset
151 CBID_INDUSTRY_FUND_MORE_TEXT = 0x38,
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
152
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
153 /** Called to calculate the income of delivered cargo */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
154 CBID_CARGO_PROFIT_CALC = 0x39,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
155
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
156 /** Called to determine more text in the industry window */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
157 CBID_INDUSTRY_WINDOW_MORE_TEXT = 0x3A,
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
158
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
159 /** Called to determine industry special effects */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
160 CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B,
6359
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
161
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
162 /** Called to determine if industry can alter the ground below industry tile */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
163 CBID_INDUSTRY_AUTOSLOPE = 0x3C, // not implemented
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
164
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
165 /** Called to determine if the industry can still accept or refuse more cargo arrival */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
166 CBID_INDUSTRY_REFUSE_CARGO = 0x3D,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
167
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
168 /** Called to determine whether a town building can be destroyed. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
169 CBID_HOUSE_DENY_DESTRUCTION = 0x143,
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
170
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
171 /** Select an ambient sound to play for a given type of tile. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
172 CBID_SOUNDS_AMBIENT_EFFECT = 0x144, // not implemented
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
173
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
174 /** Called to calculate part of a station rating. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
175 CBID_CARGO_STATION_RATING_CALC = 0x145,
6359
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
176
7215
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
177 /** Allow signal sprites to be replaced dynamically. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
178 CBID_NEW_SIGNALS_SPRITE_DRAW = 0x146, // not implemented
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
179
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
180 /** Add an offset to the default sprite numbers to show another sprite. */
ba8faf180ec2 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium <rubidium@openttd.org>
parents: 7212
diff changeset
181 CBID_CANALS_SPRITE_OFFSET = 0x147, // not implemented
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
182 };
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
183
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
184 /**
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
185 * Callback masks for vehicles, indicates which callbacks are used by a vehicle.
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
186 * Some callbacks are always used and don't have a mask.
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
187 */
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
188 enum VehicleCallbackMask {
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
189 CBM_WAGON_POWER = 0, ///< Powered wagons (trains only)
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
190 CBM_VEHICLE_LENGTH = 1, ///< Vehicle length (trains only)
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
191 CBM_LOAD_AMOUNT = 2, ///< Load amount
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
192 CBM_REFIT_CAPACITY = 3, ///< Cargo capacity after refit
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
193 CBM_ARTIC_ENGINE = 4, ///< Add articulated engines (trains only)
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
194 CBM_CARGO_SUFFIX = 5, ///< Show suffix after cargo name
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
195 CBM_COLOUR_REMAP = 6, ///< Change colour mapping of vehicle
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
196 CBM_SOUND_EFFECT = 7, ///< Vehicle uses custom sound effects
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
197 };
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
198
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
199 /**
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
200 * Callback masks for stations.
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
201 */
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
202 enum StationCallbackMask {
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
203 CBM_STATION_AVAIL = 0, ///< Availability of station in construction window
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
204 CBM_CUSTOM_LAYOUT = 1, ///< Use callback to select a tile layout to use
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
205 };
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
206
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
207 /**
6332
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
208 * Callback masks for houses.
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
209 */
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
210 enum HouseCallbackMask {
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
211 CBM_HOUSE_ALLOW_CONSTRUCTION = 0,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
212 CBM_ANIMATION_NEXT_FRAME = 1,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
213 CBM_ANIMATION_START_STOP = 2,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
214 CBM_CONSTRUCTION_STATE_CHANGE = 3,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
215 CBM_BUILDING_COLOUR = 4,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
216 CBM_CARGO_ACCEPTANCE = 5,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
217 CBM_ANIMATION_SPEED = 6,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
218 CBM_HOUSE_DESTRUCTION = 7,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
219 CBM_HOUSE_ACCEPT_CARGO = 8,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
220 CBM_HOUSE_PRODUCE_CARGO = 9,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
221 CBM_HOUSE_DENY_DESTRUCTION = 10,
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
222 };
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
223
60486b0b3e39 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros <maedhros@openttd.org>
parents: 6310
diff changeset
224 /**
6359
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
225 * Callback masks for cargos.
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
226 */
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
227 enum CargoCallbackMask {
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
228 CBM_CARGO_PROFIT_CALC = 0,
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
229 CBM_CARGO_STATION_RATING_CALC = 1,
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
230 };
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
231
21fea0b1dca7 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138 <peter1138@openttd.org>
parents: 6332
diff changeset
232 /**
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
233 * Callback masks for Industries
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
234 */
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
235 enum IndustryCallbackMask {
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
236 CBM_IND_AVAILABLE = 0, ///< industry availability callback
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
237 CBM_IND_PRODUCTION_CARGO_ARRIVAL = 1, ///< call production callback when cargo arrives at the industry
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
238 CBM_IND_PRODUCTION_256_TICKS = 2, ///< call production callback every 256 ticks
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
239 CBM_IND_LOCATION = 3, ///< check industry construction on given area
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
240 CBM_IND_PRODUCTION_CHANGE = 4, ///< controls random production change
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
241 CBM_IND_MONTHLYPROD_CHANGE = 5, ///< controls monthly random production change
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
242 CBM_IND_CARGO_SUFFIX = 6, ///< cargo sub-type display
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
243 CBM_IND_FUND_MORE_TEXT = 7, ///< additional text in fund window
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
244 CBM_IND_WINDOW_MORE_TEXT = 8, ///< additional text in industry window
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
245 CBM_IND_SPECIAL_EFFECT = 9, ///< control special effects
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
246 CBM_IND_REFUSE_CARGO = 10, ///< option out of accepting cargo
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
247 };
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
248
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
249 /**
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
250 * Callback masks for industry tiles
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
251 */
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
252 enum IndustryTileCallbackMask {
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
253 CBM_INDT_ANIM_NEXT_FRAME = 0, ///< decides next animation frame
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
254 CBM_INDT_ANIM_SPEED = 1, ///< decides animation speed
7199
0814b1155c40 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium <rubidium@openttd.org>
parents: 7198
diff changeset
255 CBM_INDT_CARGO_ACCEPTANCE = 2, ///< decides amount of cargo acceptance
6413
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
256 CBM_INDT_ACCEPT_CARGO = 3, ///< decides accepted types
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
257 CBM_INDT_SHAPE_CHECK = 4, ///< decides slope suitability
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
258 CBM_INDT_DRAW_FOUNDATIONS = 5, ///< decides if default foundations need to be drawn
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
259 CBM_INDT_AUTOSLOPE = 6, ///< decides allowance of autosloping
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
260 };
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
261
087adf9081fc (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas <belugas@openttd.org>
parents: 6359
diff changeset
262 /**
5475
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
263 * Result of a failed callback.
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
264 */
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
265 enum {
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
266 CALLBACK_FAILED = 0xFFFF
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
267 };
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
268
eabf4b86aed6 (svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff changeset
269 #endif /* NEWGRF_CALLBACKS_H */