GRF: Allow railtype custom signal sprites for programmable pre-signals

This commit is contained in:
Jonathan G Rennison
2020-09-26 11:21:49 +01:00
parent 3cb1327012
commit d32672a325
8 changed files with 61 additions and 20 deletions

View File

@@ -4349,6 +4349,11 @@ static ChangeInfoResult RailTypeChangeInfo(uint id, int numinfo, int prop, const
for (int j = buf->ReadByte(); j != 0; j--) buf->ReadDWord();
break;
case A0RPI_RAILTYPE_ENABLE_PROGRAMMABLE_SIGNALS:
if (MappedPropertyLengthMismatch(buf, 1, mapping_entry)) break;
SB(rti->ctrl_flags, RTCF_PROGSIG, 1, (buf->ReadByte() != 0 ? 1 : 0));
break;
default:
ret = HandleAction0PropertyDefault(buf, prop);
break;
@@ -8360,6 +8365,7 @@ static const GRFFeatureInfo _grf_feature_list[] = {
GRFFeatureInfo("action0_bridge_prop14", 1),
GRFFeatureInfo("action0_bridge_pillar_flags", 1),
GRFFeatureInfo("action5_programmable_signals", 1),
GRFFeatureInfo("action0_railtype_programmable_signals", 1),
GRFFeatureInfo(),
};
@@ -8475,6 +8481,7 @@ static const GRFPropertyMapDefinition _grf_action0_remappable_properties[] = {
GRFPropertyMapDefinition(GSF_STATIONS, A0RPI_STATION_DISALLOWED_BRIDGE_PILLARS, "station_disallowed_bridge_pillars"),
GRFPropertyMapDefinition(GSF_BRIDGES, A0RPI_BRIDGE_MENU_ICON, "bridge_menu_icon"),
GRFPropertyMapDefinition(GSF_BRIDGES, A0RPI_BRIDGE_PILLAR_FLAGS, "bridge_pillar_flags"),
GRFPropertyMapDefinition(GSF_RAILTYPES, A0RPI_RAILTYPE_ENABLE_PROGRAMMABLE_SIGNALS, "railtype_enable_programmable_signals"),
GRFPropertyMapDefinition(),
};