Road stops: Remove 0x6B as alias of roadstop_road_info_nearby_tiles

This commit is contained in:
Jonathan G Rennison
2024-02-03 17:48:50 +00:00
parent 28b156d95c
commit 728971ddbc
6 changed files with 7 additions and 5 deletions

View File

@@ -170,7 +170,7 @@ extern const GRFVariableMapDefinition _grf_action2_remappable_variables[] = {
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x67, "roadstop_land_info_nearby_tiles"),
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x68, "roadstop_road_stop_info_nearby_tiles"),
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x6A, "roadstop_road_stop_grfid_nearby_tiles"),
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x6B, "roadstop_road_info_nearby_tiles"),
GRFVariableMapDefinition(GSF_ROADSTOPS, A2VRI_ROADSTOP_ROAD_INFO_NEARBY_TILES, "roadstop_road_info_nearby_tiles"),
GRFVariableMapDefinition(GSF_ROADSTOPS, A2VRI_ROADSTOP_INFO_NEARBY_TILES_V2, "roadstop_road_stop_info_nearby_tiles_v2"),
GRFVariableMapDefinition(GSF_RAILTYPES, A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO, "railtype_signal_restriction_info"),
GRFVariableMapDefinition(GSF_RAILTYPES, A2VRI_RAILTYPE_SIGNAL_CONTEXT, "railtype_signal_context"),

View File

@@ -82,6 +82,7 @@ enum Action2VariableRemapIds {
A2VRI_VEHICLE_CURRENT_SPEED_SCALED,
A2VRI_ROADSTOP_INFO_NEARBY_TILES_EXT,
A2VRI_ROADSTOP_INFO_NEARBY_TILES_V2,
A2VRI_ROADSTOP_ROAD_INFO_NEARBY_TILES,
A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO,
A2VRI_RAILTYPE_SIGNAL_CONTEXT,
A2VRI_RAILTYPE_SIGNAL_SIDE,

View File

@@ -97,6 +97,7 @@ static bool IsExpensiveRoadStopsVariable(uint16_t variable)
case 0x6B:
case A2VRI_ROADSTOP_INFO_NEARBY_TILES_EXT:
case A2VRI_ROADSTOP_INFO_NEARBY_TILES_V2:
case A2VRI_ROADSTOP_ROAD_INFO_NEARBY_TILES:
return true;
default:

View File

@@ -220,7 +220,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t paramete
}
/* Road info of nearby tiles */
case 0x6B: {
case A2VRI_ROADSTOP_ROAD_INFO_NEARBY_TILES: {
if (this->tile == INVALID_TILE) return 0xFFFFFFFF;
TileIndex nearby_tile = GetNearbyTile(parameter, this->tile);

View File

@@ -2389,9 +2389,9 @@ static const NIVariable _nif_roadstops[] = {
NIV(0x68, "road stop info of nearby tiles"),
NIV(0x69, "information about cargo accepted in the past"),
NIV(0x6A, "GRFID of nearby road stop tiles"),
NIV(0x6B, "Road info of nearby plain road tiles"),
NIVF(A2VRI_ROADSTOP_INFO_NEARBY_TILES_EXT, "road stop info of nearby tiles ext", NIVF_SHOW_PARAMS),
NIVF(A2VRI_ROADSTOP_INFO_NEARBY_TILES_V2, "road stop info of nearby tiles v2", NIVF_SHOW_PARAMS),
NIVF(A2VRI_ROADSTOP_ROAD_INFO_NEARBY_TILES, "Road info of nearby plain road tiles", NIVF_SHOW_PARAMS),
NIV_END(),
};