1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 22:49:09 +00:00

Change: "setting" console command now shows default value (#14061)

This commit is contained in:
Loïc Guilloux
2025-04-21 16:00:37 +02:00
committed by GitHub
parent 788845f731
commit 305c892b3a

View File

@@ -1974,8 +1974,9 @@ void IConsoleGetSetting(const char *name, bool force_newgame)
std::string value = sd->FormatValue(object);
const IntSettingDesc *int_setting = sd->AsIntSetting();
auto [min_val, max_val] = int_setting->GetRange();
IConsolePrint(CC_INFO, "Current value for '{}' is '{}' (min: {}{}, max: {}).",
sd->GetName(), value, sd->flags.Test(SettingFlag::GuiZeroIsSpecial) ? "(0) " : "", min_val, max_val);
auto def_val = int_setting->GetDefaultValue();
IConsolePrint(CC_INFO, "Current value for '{}' is '{}' (min: {}{}, max: {}, def: {}).",
sd->GetName(), value, sd->flags.Test(SettingFlag::GuiZeroIsSpecial) ? "(0) " : "", min_val, max_val, def_val);
}
}