Add airport tile variables to get airport type local ID and layout

This commit is contained in:
Jonathan G Rennison
2023-08-26 15:01:10 +01:00
parent e72744cc77
commit a0e3885acc
6 changed files with 47 additions and 1 deletions

View File

@@ -45,6 +45,7 @@
<li><a href="#object-ids">Object IDs</a></li>
<li><a href="#object-properties">Object properties</a></li>
<li><a href="#object-variables">Object variables</a></li>
<li><a href="#airport-tile-variables">Airport tile variables</a></li>
<li><a href="#global-variable-properties">Global variables properties</a></li>
<li><a href="#replace-new-sprites">Replace new sprites</a></li>
<li><a href="#signal-graphics">Signal graphics using switches</a></li>
@@ -382,6 +383,17 @@
This is useful for xoring with the tile_slope variable, because if this variable is unavailable then the result is still the underlying tile slope.
</td></tr>
</table>
<h3 id="airport-tile-variables"><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Airports#Airport_tile_variables">Airport tile variables</a></h3>
<p>Variables in the table below which are not supported by the version of OpenTTD being used return a value of 0.</p>
<table>
<tr><th>Variable</th><th>Value range</th><th>Comment</th></tr>
<tr><td>airport_id</td><td>0..255</td><td>
Local GRF ID of the airport type.
</td></tr>
<tr><td>airport_layout</td><td>0..255</td><td>
Airport layout number (as defined in layouts).
</td></tr>
</table>
<h3 id="global-variable-properties">Global variables properties</h3>
<p>The variables listed below should set inside an item and property block of the form:<pre class="code">
item (FEAT_GLOBALVARS) {