GRF: Add road stops variable for road info of nearby plain road tile

See: #464
This commit is contained in:
Jonathan G Rennison
2022-12-24 18:52:57 +00:00
parent 6b8f799a1c
commit 8af4ac8a4c
6 changed files with 61 additions and 2 deletions

View File

@@ -228,6 +228,7 @@
<tr><td><a href="#roadstop_road_stop_info_nearby_tiles">68</a></td><td><a href="#roadstop_road_stop_info_nearby_tiles">roadstop_road_stop_info_nearby_tiles</a></td><td>Road stop info of nearby tiles</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">69</a></td><td></td><td>Information about cargo accepted in the past (BaseStation)</td></tr>
<tr><td><a href="#roadstop_road_stop_grfid_nearby_tiles">6A</a></td><td><a href="#roadstop_road_stop_grfid_nearby_tiles">roadstop_road_stop_grfid_nearby_tiles</a></td><td>GRFID of nearby road stop tiles</td></tr>
<tr><td><a href="#roadstop_road_info_nearby_tiles">6B</a></td><td><a href="#roadstop_road_info_nearby_tiles">roadstop_road_info_nearby_tiles</a></td><td>Road info of nearby plain road tiles</td></tr>
</table>
<h4 id="roadstop_view">Road stop view/rotation (40, or mappable variable: roadstop_view)</h4>
@@ -342,6 +343,39 @@
<h4 id="roadstop_road_stop_grfid_nearby_tiles">GRFID of nearby road stop tile (6A, or mappable variable: roadstop_road_stop_grfid_nearby_tiles)</h4>
<p>This has the same value as <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Stations#GRFID_of_nearby_station_tile_.286A.29">station (feature 4) variable 6A</a>.</p>
<h4 id="roadstop_road_info_nearby_tiles">Road info of nearby plain road tiles (6B, or mappable variable: roadstop_road_info_nearby_tiles)</h4>
The returned value is 0xFFFFFFFF if the selected tile isn't a plain road tile.<br /><br />
<table>
<tr><th>Bits</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>01</td><td>North-west road piece is present</td></tr>
<tr><td>1</td><td>02</td><td>South-west road piece is present</td></tr>
<tr><td>2</td><td>04</td><td>South-east road piece is present</td></tr>
<tr><td>3</td><td>08</td><td>North-east road piece is present</td></tr>
<tr><td>4</td><td>10</td><td>North-west tram piece is present</td></tr>
<tr><td>5</td><td>20</td><td>South-west tram piece is present</td></tr>
<tr><td>6</td><td>40</td><td>South-east tram piece is present</td></tr>
<tr><td>7</td><td>80</td><td>North-east tram piece is present</td></tr>
<tr><td>8 - 15</td><td></td><td>
Road piece and slope:<br />
(Same order as <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Roadtypes#Road_underlay_.2802.29">road sprites</a>).<br />
0 - 18: As above<br />
0xFF: No road present
</td></tr>
<tr><td>16 - 23</td><td></td><td>
Tram piece and slope:<br />
(Same order as <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Roadtypes#Road_underlay_.2802.29">road sprites</a>).<br />
0 - 18: As above<br />
0xFF: No tram present
</td></tr>
</table>
<br />
The remaining bits are reserved for future use and should be masked.
<br />
This requires <font face="monospace">road_stops</font>, version 5.
</p>
<br />
<h3 id="randomaction2roadstops">Random Action 2 - Road Stops</h3>