From 305c892b3aced32e04a02e50652095a67f16f2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Mon, 21 Apr 2025 16:00:37 +0200 Subject: [PATCH] Change: "setting" console command now shows default value (#14061) --- src/settings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/settings.cpp b/src/settings.cpp index c04cde0a46..e8c3eb78aa 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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); } }