Add new landscape variable for ground density and snow presence
This commit is contained in:
@@ -157,6 +157,7 @@ extern const GRFVariableMapDefinition _grf_action2_remappable_variables[] = {
|
||||
GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x42, "newlandscape_tile_height"),
|
||||
GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x43, "newlandscape_tile_hash"),
|
||||
GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x44, "newlandscape_landscape_type"),
|
||||
GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x45, "newlandscape_ground_info"),
|
||||
GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x60, "newlandscape_land_info_nearby_tiles"),
|
||||
GRFVariableMapDefinition(),
|
||||
};
|
||||
|
||||
@@ -49,6 +49,9 @@ std::vector<const GRFFile *> _new_landscape_rocks_grfs;
|
||||
case 0x44:
|
||||
return this->landscape_type;
|
||||
|
||||
case 0x45:
|
||||
return GetClearDensity(this->ti->tile) | (IsSnowTile(this->ti->tile) ? 0x10 : 0);
|
||||
|
||||
case 0x60: {
|
||||
TileIndex tile = this->ti->tile;
|
||||
if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required
|
||||
|
||||
@@ -1762,6 +1762,7 @@ static const NIVariable _niv_newlandscape[] = {
|
||||
NIV(0x42, "tile height"),
|
||||
NIV(0x43, "tile hash"),
|
||||
NIV(0x44, "landscape type"),
|
||||
NIV(0x45, "ground info"),
|
||||
NIV(0x60, "land info of nearby tiles"),
|
||||
NIV_END(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user