VariationalAction2/Road Stops
Introduction
Variables
Variable | Size | Version | Description |
---|---|---|---|
40 | B | 14 | View/rotation |
41 | B | 14 | Stop type |
42 | W | 14 | Tile information, see below |
43 | D | 14 | Road type |
44 | D | 14 | Tram type |
45 | D | 14 | Get town zone and Manhattan distance of closest town |
46 | D | 14 | Get square of Euclidian distance of closest town |
47 | B | 14 | Player (company) information |
48 | See Base Stations. | ||
49 | B | 14 | Current animation frame |
60-65 | See Base Stations. | ||
66 | D | 14 | Animation counter of nearby tile |
67 | D | 14 | Land info of nearby tiles |
68 | D | 14 | Road stop info of nearby tiles |
6A | D | 14 | GRFID of nearby tiles |
69 | See Base Stations. |
Description
Animation counter of nearby tile (66)
The parameter of this variable is a signed offset from the current tile.
If the selected tile is a road stop tile that belongs to the current station, its animation state is returned. Otherwise, FFFFFFFFh is returned.
Land info of nearby tiles (67)
The parameter of this variable is a signed offset from the current tile.
Returns the same values as industry tile var60.
Road stop info of nearby tiles (68)
The parameter of this variable is a signed offset from the current tile.
The returned value is FFFFFFFFh if the selected tile isn't a road stop tile. Otherwise, the returned value can be separated to the following parts:
Bits | Meaning |
---|---|
0..7 | If the tile is defined in the current GRF, this is the setID used in the definition. Otherwise, the content is undefined.
Note that this field is clamped to the range 0..255. Therefore if the current GRF has more than 256 road stops, this field may only be used to check for road stops in the range 0..254. |
8..9 | 0 - The tile uses original TTD graphics
1 - The tile is defined in the current GRF 2 - The tile is defined in another GRF |
10 | Set if the selected tile belongs to the current station, clear otherwise |
11 | Set if the selected tile has a different view/rotation, cleat if the same view/rotation |
12..15 | View/rotation of the selected tile |
16..19 | 0 - Passenger/bus stop
1 - Freight/lorry stop |
20 | Set if the stop type (passenger/bus or freight/lorry) is the same as the current tile |
21..31 | Undefined, reserved for future use |
GRFID of nearby road stop tile (6A)
The parameter of this variable is a signed offset from the current tile.
The returned value is one of the following:
- FFFFFFFFh if the selected tile isn't a road stop tile
- 00000000h if the selected station is a default road stop (not a NewGRF road stop)
- otherwise, the GRFID of the GRF which defined the type of the selected road stop tile