diff --git a/docs/newgrf-additions.html b/docs/newgrf-additions.html index 0e76cf7813..10bcc4c4d9 100644 --- a/docs/newgrf-additions.html +++ b/docs/newgrf-additions.html @@ -139,10 +139,10 @@

Action 0 - Stations

-

Minimum bridge height (1B)

+

Minimum bridge height (1B, or mappable property: station_min_bridge_height)

This is indicated by the feature name: action0_station_prop1B, version 1

Action 0 - Bridges

-

Menu icons (14)

+

Menu icons (14, or mappable property: bridge_menu_icon)

This is indicated by the feature name: action0_bridge_prop14, version 1

More bridges (16 instead of 13)

This is indicated by the feature name: more_bridge_types, version 1

diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 91be1f8f67..bfa57b1e40 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -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(), }; diff --git a/src/newgrf.h b/src/newgrf.h index 797aba5f1c..1a088a7fba 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -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 {