Remove tunnel/bridge spacing setting, use usual signal drag spacing

This commit is contained in:
Jonathan G Rennison
2022-06-19 18:32:47 +01:00
parent 191f710c40
commit 92723d4f5c
9 changed files with 24 additions and 20 deletions

View File

@@ -3652,7 +3652,7 @@ bool AfterLoadGame()
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 7)) {
/* spacing setting moved to company settings */
for (Company *c : Company::Iterate()) {
c->settings.simulated_wormhole_signals = _settings_game.construction.old_simulated_wormhole_signals;
c->settings.old_simulated_wormhole_signals = _settings_game.construction.old_simulated_wormhole_signals;
}
}
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 8)) {
@@ -3662,7 +3662,14 @@ bool AfterLoadGame()
DiagDirection dir = GetTunnelBridgeDirection(t);
if (dir == DIAGDIR_NE || dir == DIAGDIR_SE) {
TileIndex other = GetOtherTunnelBridgeEnd(t);
uint spacing = GetBestTunnelBridgeSignalSimulationSpacing(GetTileOwner(t), t, other);
Owner owner = GetTileOwner(t);
int target;
if (Company::IsValidID(owner)) {
target = Company::Get(owner)->settings.old_simulated_wormhole_signals;
} else {
target = 4;
}
uint spacing = GetBestTunnelBridgeSignalSimulationSpacing(t, other, target);
SetTunnelBridgeSignalSimulationSpacing(t, spacing);
SetTunnelBridgeSignalSimulationSpacing(other, spacing);
}

View File

@@ -89,7 +89,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
{ XSLFI_DEPARTURE_BOARDS, XSCF_IGNORABLE_UNKNOWN, 1, 1, "departure_boards", nullptr, nullptr, nullptr },
{ XSLFI_TIMETABLES_START_TICKS, XSCF_NULL, 2, 2, "timetable_start_ticks", nullptr, nullptr, nullptr },
{ XSLFI_TOWN_CARGO_ADJ, XSCF_IGNORABLE_UNKNOWN, 2, 2, "town_cargo_adj", nullptr, nullptr, nullptr },
{ XSLFI_SIG_TUNNEL_BRIDGE, XSCF_NULL, 9, 9, "signal_tunnel_bridge", nullptr, nullptr, "XBSS" },
{ XSLFI_SIG_TUNNEL_BRIDGE, XSCF_NULL, 10, 10, "signal_tunnel_bridge", nullptr, nullptr, "XBSS" },
{ XSLFI_IMPROVED_BREAKDOWNS, XSCF_NULL, 8, 8, "improved_breakdowns", nullptr, nullptr, nullptr },
{ XSLFI_CONSIST_BREAKDOWN_FLAG, XSCF_NULL, 1, 1, "consist_breakdown_flag", nullptr, nullptr, nullptr },
{ XSLFI_TT_WAIT_IN_DEPOT, XSCF_NULL, 1, 1, "tt_wait_in_depot", nullptr, nullptr, nullptr },