Codechange: use separate pre and post callbacks for int settings

This commit is contained in:
rubidium42
2021-05-24 11:47:37 +02:00
committed by rubidium42
parent e2f5d9e561
commit 08308d808c
16 changed files with 272 additions and 416 deletions

View File

@@ -2130,10 +2130,9 @@ static void SetDefaultRailGui()
/**
* Updates the current signal variant used in the signal GUI
* to the one adequate to current year.
* @param p needed to be called when a setting changes
* @return success, needed for settings
* @param new_value needed to be called when a setting changes
*/
bool ResetSignalVariant(int32 p)
void ResetSignalVariant(int32 new_value)
{
SignalVariant new_variant = (_cur_year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC);
@@ -2145,8 +2144,6 @@ bool ResetSignalVariant(int32 p)
}
_cur_signal_variant = new_variant;
}
return true;
}
/**