Road stops: Add tile slope to varact2 variable 0x42

pull/607/head
Jonathan G Rennison 7 months ago
parent b9654985ad
commit 39247b0120

@ -261,13 +261,17 @@
</p>
<h4 id="roadstop_terrain_type">Road stop tile terrain type (42, or mappable variable: roadstop_terrain_type)</h4>
<p>This has the same value as bits 0 - 7 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects#Tile_information_.2841.29">object (feature F) variable 41</a>.
<p>This has the same value as bits 0 - 15 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects#Tile_information_.2841.29">object (feature F) variable 41</a>.
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0</td><td>Normal</td></tr>
<tr><td>1</td><td>Desert</td></tr>
<tr><td>2</td><td>Rainforest</td></tr>
<tr><td>4</td><td>On or above snowline</td></tr>
<tr><td>8 - 15</td><td>
Tile slope<br />
This requires <font face="monospace">road_stops</font>, version 10.
</td></tr>
</table>
</p>

@ -62,7 +62,7 @@ extern const GRFFeatureInfo _grf_feature_list[] = {
GRFFeatureInfo("action0_object_flood_resistant", 1),
GRFFeatureInfo("action0_object_viewport_map_tile_type", 1),
GRFFeatureInfo("varaction2_airporttiles_airport_info", 1),
GRFFeatureInfo("road_stops", 9, GFTOF_ROAD_STOPS),
GRFFeatureInfo("road_stops", 10, GFTOF_ROAD_STOPS),
GRFFeatureInfo("new_landscape", 2),
GRFFeatureInfo("more_objects_per_grf", 1),
GRFFeatureInfo("more_action2_ids", 1, GFTOF_MORE_ACTION2_IDS),

@ -130,7 +130,7 @@ uint32 RoadStopScopeResolver::GetVariable(uint16 variable, uint32 parameter, Get
return 2;
/* Terrain type */
case 0x42: return this->tile == INVALID_TILE ? 0 : GetTerrainType(this->tile, TCX_NORMAL); // terrain_type
case 0x42: return this->tile == INVALID_TILE ? 0 : (GetTileSlope(this->tile) << 8 | GetTerrainType(this->tile, TCX_NORMAL));
/* Road type */
case 0x43: return get_road_type_variable(RTT_ROAD);

Loading…
Cancel
Save