From 9310876d9f6e44c2ed5509c5c1ea6fdf56cb3895 Mon Sep 17 00:00:00 2001 From: CCHyper <73803386+CCHyper@users.noreply.github.com> Date: Wed, 22 Mar 2023 01:03:25 +0000 Subject: [PATCH] Write to the log when changing the default value of IsNewTheater for NARADR. --- src/extensions/rules/rulesext.cpp | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/extensions/rules/rulesext.cpp b/src/extensions/rules/rulesext.cpp index 1915899f1..7a9389ea6 100644 --- a/src/extensions/rules/rulesext.cpp +++ b/src/extensions/rules/rulesext.cpp @@ -241,17 +241,23 @@ void RulesClassExtension::Process(CCINIClass &ini) This()->IQ(ini); This()->General(ini); - /** - * This is a edge case issue we exposed in the original RULES.INI where the - * Nod Radar (NARADR) has "IsNewTheater" set to false, and as a result, the - * new theater system ends up making this build show in the wrong drawing - * palette. To fix this, just before Read_INI() is called on all the - * BuildingTypes (see RulesClass::Objects()), we make sure NARADR has the - * default value of "IsNewTheater" set to true. - */ for (int index = 0; index < BuildingTypes.Count(); ++index) { + BuildingTypeClass *btype = BuildingTypes[index]; - if (!strcmpi(btype->Name(), "NARADR")) { + Wstring name = btype->Name(); + Wstring graphic_name = btype->Graphic_Name(); + + /** + * This is a edge case issue we exposed in the original RULES.INI where the + * Nod Radar (NARADR) has "IsNewTheater" set to false, and as a result, the + * new theater system ends up making this build show in the wrong drawing + * palette. To fix this, just before Read_INI() is called on all the + * BuildingTypes (see RulesClass::Objects()), we make sure NARADR has the + * default value of "IsNewTheater" set to true. + */ + if (name == "NARADR" && btype->IsNewTheater == false) { + DEBUG_WARNING("Rules: Changing the default value of IsNewTheater for NARADR to 'true'!\n"); + DEBUG_WARNING("Rules: Please consider changing NewTheater on NARADR to 'yes'!\n"); btype->IsNewTheater = true; } } @@ -684,5 +690,9 @@ void RulesClassExtension::Fixups(CCINIClass &ini) } } + if (is_ruleini) { + + } + DEBUG_INFO("Rules::Fixups(exit)\n"); }