Update to 12.2

This commit is contained in:
dP
2022-04-02 17:32:19 +03:00
87 changed files with 1718 additions and 580 deletions

View File

@@ -278,7 +278,7 @@ static void GenericPlaceSignals(TileIndex tile)
} else {
SB(p1, 3, 1, citymania::_fn_mod);
SB(p1, 4, 1, (_cur_year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC));
SB(p1, 5, 3, SIGTYPE_PBS_ONEWAY);
SB(p1, 5, 3, _settings_client.gui.default_signal_type);
SB(p1, 8, 1, 0);
SB(p1, 9, 6, cycle_types);
}
@@ -567,7 +567,7 @@ static void HandleAutoSignalPlacement()
SB(p2, 3, 1, 0);
SB(p2, 4, 1, (_cur_year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC));
SB(p2, 6, 1, citymania::_fn_mod);
SB(p2, 7, 3, SIGTYPE_PBS_ONEWAY);
SB(p2, 7, 3, _settings_client.gui.default_signal_type);
SB(p2, 24, 8, _settings_client.gui.drag_signals_density);
SB(p2, 10, 1, !_settings_client.gui.drag_signals_fixed_distance);
}
@@ -2155,6 +2155,9 @@ public:
_cur_signal_type = (SignalType)((uint)((widget - WID_BS_SEMAPHORE_NORM) % (SIGTYPE_LAST + 1)));
_cur_signal_variant = widget >= WID_BS_ELECTRIC_NORM ? SIG_ELECTRIC : SIG_SEMAPHORE;
/* Update default (last-used) signal type in config file. */
_settings_client.gui.default_signal_type = _cur_signal_type;
/* If 'remove' button of rail build toolbar is active, disable it. */
if (_remove_button_clicked) {
Window *w = FindWindowById(WC_BUILD_TOOLBAR, TRANSPORT_RAIL);
@@ -2433,6 +2436,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
this->FinishInitNested(TRANSPORT_RAIL);
matrix->SetCount(_waypoint_count);
if (_cur_waypoint_type >= _waypoint_count) _cur_waypoint_type = 0;
matrix->SetClicked(_cur_waypoint_type);
}
@@ -2621,7 +2625,7 @@ void InitializeRailGUI()
SetDefaultRailGui();
_convert_signal_button = false;
_cur_signal_type = SIGTYPE_PBS_ONEWAY;
_cur_signal_type = _settings_client.gui.default_signal_type;
ResetSignalVariant();
}