1
0
Fork 0

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

pull/14060/head
Loïc Guilloux 2025-04-21 16:00:37 +02:00 committed by GitHub
parent 788845f731
commit 305c892b3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

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);
}
}