diff --git a/docs/newgrf-newlandscape-nml.html b/docs/newgrf-newlandscape-nml.html
index ac19b415bc..a3bfddfbc9 100644
--- a/docs/newgrf-newlandscape-nml.html
+++ b/docs/newgrf-newlandscape-nml.html
@@ -81,6 +81,8 @@
tile_height | 0..255 | Height of the lowest corner of the tile |
tile_hash | 0..4294967295 | Hash value derived from the coordinates of the tile, suitable for pseudo-randomising graphics |
landscape_type | NEW_LANDSCAPE_TYPE_XXX | Landscape type XXX = ROCKS |
+ snow_present | 0 or 1 | Snow is present on this tile, at any density.This requires new_landscape, version 2. |
+ ground_density | 0..3 | Ground density (if snow_present is 1, this is the snow density).This requires new_landscape, version 2. |
Variables that require one or more parameters:
diff --git a/docs/newgrf-newlandscape.html b/docs/newgrf-newlandscape.html
index e21e81f712..ed9b2367cc 100644
--- a/docs/newgrf-newlandscape.html
+++ b/docs/newgrf-newlandscape.html
@@ -84,6 +84,7 @@
42 | newlandscape_tile_height | Tile Height |
43 | newlandscape_tile_hash | Tile Hash |
44 | newlandscape_landscape_type | Landscape Type |
+ 45 | newlandscape_ground_info | Ground info |
60 | newlandscape_land_info_nearby_tiles | Land info of nearby tiles |
@@ -110,6 +111,18 @@
Landscape type (44, or mappable variable: newlandscape_landscape_type)
The landscape type, this currently only has the value 0: rocky tiles.
+ Ground info (45, or mappable variable: newlandscape_ground_info)
+ Miscellaneous ground info
+
+ Bits | Values | Meaning |
+ 0 - 3 | 0..3 | Ground density (if snow is present, this is the snow density) |
+ 4 | 0 or 1 | Snow is present on this tile, at any density |
+
+
+ The remaining bits are reserved for future use and should be masked.
+ This requires new_landscape, version 2.
+
+
Land info of nearby tile (60, or mappable variable: newlandscape_land_info_nearby_tiles)
This has the same value as industry tile (feature 9) variable 60.
diff --git a/src/newgrf_extension.cpp b/src/newgrf_extension.cpp
index fde7c3a597..161c3ba8e1 100644
--- a/src/newgrf_extension.cpp
+++ b/src/newgrf_extension.cpp
@@ -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(),
};
diff --git a/src/newgrf_newlandscape.cpp b/src/newgrf_newlandscape.cpp
index 2301c01f2f..b394487368 100644
--- a/src/newgrf_newlandscape.cpp
+++ b/src/newgrf_newlandscape.cpp
@@ -49,6 +49,9 @@ std::vector _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
diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h
index c886a0c253..623fb7bf00 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -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(),
};