NML:IndustryCommonVariables

From GRFSpecs
Jump to navigationJump to search

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

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.