Difference between revisions of "NML:IndustryCommonVariables"
From GRFSpecs
Jump to navigationJump to search (split from industry page) |
(→Common variables: returns -1 if belongs to another *industry*, not "another grf") |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
The following variables are available to both industries and industry tiles. All of them require an x, y offset. For industries, this offset is unsigned and relative to the northernmost tile. For industry tiles, it is signed and relative to the current tile. |
The following variables are available to both industries and industry tiles. All of them require an x, y offset. For industries, this offset is unsigned and relative to the northernmost tile. For industry tiles, it is signed and relative to the current tile. |
||
− | {| class=" |
+ | {| class="wikitable sortable" |
! name |
! name |
||
! value range |
! value range |
||
Line 40: | Line 40: | ||
| nearby_tile_industrytile_id |
| nearby_tile_industrytile_id |
||
| 0x00aa, 0xFFbb, 0xFFFE or 0xFFFF |
| 0x00aa, 0xFFbb, 0xFFFE or 0xFFFF |
||
− | | 0x00aa: The tile is an industry tile |
+ | | 0x00aa: The tile is an industry tile defined in this GRF with tile id aa.<br /> 0xFFbb: The tile is an original industry tile with id bb.<br /> 0xFFFE: The tile is an industry tile defined in another GRF.<br /> 0xFFFF: The tile is not an industry tile or it belongs to another industry. |
|} |
|} |
Latest revision as of 01:31, 24 September 2023
Common variables
The following variables are available to both industries and industry tiles. All of them require an x, y offset. For industries, this offset is unsigned and relative to the northernmost tile. For industry tiles, it is signed and relative to the current tile.
name | value range | comment |
---|---|---|
nearby_tile_slope | SLOPE_XXX |
See tile slopes for an overview of possible values |
nearby_tile_is_water | 1 if the tile is water, 0 otherwise | |
nearby_tile_terrain_type | TILETYPE_XX | TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW |
nearby_tile_water_class | WATER_CLASS_XXX | XXX = [NONE | SEA | CANAL | RIVER] Note that tiles for which nearby_tile_is_water is 0 may still have a water class, e.g. industry tiles with water beneath them.
|
nearby_tile_height | 0..120 | The height of the lowest corner of the given tile. |
nearby_tile_class | ||
nearby_tile_animation_frame | 0..255 | Animation frame of the given tile |
nearby_tile_industrytile_id | 0x00aa, 0xFFbb, 0xFFFE or 0xFFFF | 0x00aa: The tile is an industry tile defined in this GRF with tile id aa. 0xFFbb: The tile is an original industry tile with id bb. 0xFFFE: The tile is an industry tile defined in another GRF. 0xFFFF: The tile is not an industry tile or it belongs to another industry. |