Add remappable properties for station min bridge height and bridge menu icon
This commit is contained in:
@@ -139,10 +139,10 @@
|
||||
</pre>
|
||||
<br />
|
||||
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations">Action 0 - Stations</a></h3>
|
||||
<h4><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations#Minimum_bridge_height_.281B.29">Minimum bridge height (1B)</a></h4>
|
||||
<h4><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations#Minimum_bridge_height_.281B.29">Minimum bridge height (1B, or mappable property: station_min_bridge_height)</a></h4>
|
||||
<p>This is indicated by the feature name: <font face="monospace">action0_station_prop1B</font>, version 1</p>
|
||||
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Bridges">Action 0 - Bridges</a></h3>
|
||||
<h4>Menu icons (14)</h4>
|
||||
<h4>Menu icons (14, or mappable property: bridge_menu_icon)</h4>
|
||||
<p>This is indicated by the feature name: <font face="monospace">action0_bridge_prop14</font>, version 1</p>
|
||||
<h4>More bridges (16 instead of 13)</h4>
|
||||
<p>This is indicated by the feature name: <font face="monospace">more_bridge_types</font>, version 1</p>
|
||||
|
@@ -2105,6 +2105,7 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, Byte
|
||||
break;
|
||||
|
||||
case 0x1B: // Minimum height for a bridge above
|
||||
case A0RPI_STATION_MIN_BRIDGE_HEIGHT:
|
||||
SetBit(statspec->internal_flags, SSIF_BRIDGE_HEIGHTS_SET);
|
||||
for (uint i = 0; i < 8; i++) {
|
||||
statspec->bridge_height[i] = buf->ReadByte();
|
||||
@@ -2262,6 +2263,7 @@ static ChangeInfoResult BridgeChangeInfo(uint brid, int numinfo, int prop, ByteR
|
||||
break;
|
||||
|
||||
case 0x14: // purchase sprite
|
||||
case A0RPI_BRIDGE_MENU_ICON:
|
||||
bridge->sprite = buf->ReadWord();
|
||||
bridge->pal = buf->ReadWord();
|
||||
break;
|
||||
@@ -8062,6 +8064,8 @@ static bool HandleFeatureTestInfo(ByteReader *buf)
|
||||
|
||||
/** Action14 Action0 remappable property list */
|
||||
static const GRFPropertyMapDefinition _grf_action0_remappable_properties[] = {
|
||||
GRFPropertyMapDefinition(GSF_STATIONS, A0RPI_STATION_MIN_BRIDGE_HEIGHT, "station_min_bridge_height", 8),
|
||||
GRFPropertyMapDefinition(GSF_BRIDGES, A0RPI_BRIDGE_MENU_ICON, "bridge_menu_icon", 4),
|
||||
GRFPropertyMapDefinition(),
|
||||
};
|
||||
|
||||
|
@@ -108,6 +108,9 @@ enum Action0RemapPropertyIds {
|
||||
A0RPI_UNKNOWN_IGNORE = 0x200,
|
||||
A0RPI_UNKNOWN_ERROR,
|
||||
A0RPI_SKIPPED_IGNORE,
|
||||
|
||||
A0RPI_STATION_MIN_BRIDGE_HEIGHT,
|
||||
A0RPI_BRIDGE_MENU_ICON,
|
||||
};
|
||||
|
||||
enum Action0RemapFallbackMode {
|
||||
|
Reference in New Issue
Block a user