From fda47080fae45ac2dd294cde8d85f6e3e13f5fd3 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Mon, 19 Jan 2026 22:18:22 +0800 Subject: [PATCH 1/5] initial --- src/Ext/SWType/Body.cpp | 1 + src/Ext/TechnoType/Body.cpp | 3 +++ src/Ext/WarheadType/Body.cpp | 10 ++++++++++ src/New/Type/Affiliated/TypeConvertGroup.cpp | 3 +++ src/New/Type/AttachEffectTypeClass.cpp | 3 +++ 5 files changed, 20 insertions(+) diff --git a/src/Ext/SWType/Body.cpp b/src/Ext/SWType/Body.cpp index c23b601b90..7380157463 100644 --- a/src/Ext/SWType/Body.cpp +++ b/src/Ext/SWType/Body.cpp @@ -141,6 +141,7 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->LimboDelivery_Types.Read(exINI, pSection, "LimboDelivery.Types"); this->LimboDelivery_IDs.Read(exINI, pSection, "LimboDelivery.IDs"); this->LimboDelivery_RollChances.Read(exINI, pSection, "LimboDelivery.RollChances"); + this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.Affected"); this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.AffectsHouse"); this->LimboKill_IDs.Read(exINI, pSection, "LimboKill.IDs"); this->SW_Next.Read(exINI, pSection, "SW.Next"); diff --git a/src/Ext/TechnoType/Body.cpp b/src/Ext/TechnoType/Body.cpp index 39560cc224..5a621dfed0 100644 --- a/src/Ext/TechnoType/Body.cpp +++ b/src/Ext/TechnoType/Body.cpp @@ -861,7 +861,9 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->OpenTransport_RangeBonus.Read(exINI, pSection, "OpenTransport.RangeBonus"); this->OpenTransport_DamageMultiplier.Read(exINI, pSection, "OpenTransport.DamageMultiplier"); + this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoFire"); this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoTargetOwnPosition"); + this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoFire.TargetSelf"); this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoTargetOwnPosition.Self"); this->NoSecondaryWeaponFallback.Read(exINI, pSection, "NoSecondaryWeaponFallback"); @@ -1004,6 +1006,7 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Tint_VisibleToHouses.Read(exINI, pSection, "Tint.VisibleToHouses"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); + this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RecountBurst.Read(exINI, pSection, "RecountBurst"); diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 15f335d1bc..f65e582f3b 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -162,14 +162,18 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_ExtraDamage_ApplyFirepowerMult.Read(exINI, pSection, "Crit.ExtraDamage.ApplyFirepowerMult"); this->Crit_Warhead.Read(exINI, pSection, "Crit.Warhead"); this->Crit_Warhead_FullDetonation.Read(exINI, pSection, "Crit.Warhead.FullDetonation"); + this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.Affects"); this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.AffectsTarget"); + this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouses"); this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouse"); this->Crit_AnimList.Read(exINI, pSection, "Crit.AnimList"); this->Crit_AnimList_PickRandom.Read(exINI, pSection, "Crit.AnimList.PickRandom"); this->Crit_AnimList_CreateAll.Read(exINI, pSection, "Crit.AnimList.CreateAll"); this->Crit_ActiveChanceAnims.Read(exINI, pSection, "Crit.ActiveChanceAnims"); this->Crit_AnimOnAffectedTargets.Read(exINI, pSection, "Crit.AnimOnAffectedTargets"); + this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectBelowPercent"); this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectsBelowPercent"); + this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); this->Crit_AffectsAbovePercent.Read(exINI, pSection, "Crit.AffectsAbovePercent"); this->Crit_SuppressWhenIntercepted.Read(exINI, pSection, "Crit.SuppressWhenIntercepted"); @@ -249,7 +253,9 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->DetonateOnAllMapObjects.Read(exINI, pSection, "DetonateOnAllMapObjects"); this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full"); this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses"); + this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsTarget"); + this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectHouses"); this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouse"); this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes"); this->DetonateOnAllMapObjects_IgnoreTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.IgnoreTypes"); @@ -292,9 +298,13 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->KillWeapon.Read(exINI, pSection, "KillWeapon"); this->KillWeapon_OnFirer.Read(exINI, pSection, "KillWeapon.OnFirer"); + this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouses"); this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouse"); + this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouses"); this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouse"); + this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.Affects"); this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.AffectsTarget"); + this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.Affects"); this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsTarget"); this->ElectricAssaultLevel.Read(exINI, pSection, "ElectricAssaultLevel"); diff --git a/src/New/Type/Affiliated/TypeConvertGroup.cpp b/src/New/Type/Affiliated/TypeConvertGroup.cpp index 94c611179c..fbd3242864 100644 --- a/src/New/Type/Affiliated/TypeConvertGroup.cpp +++ b/src/New/Type/Affiliated/TypeConvertGroup.cpp @@ -56,6 +56,8 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, convertFrom.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.To", i); convertTo.Read(exINI, pSection, tempBuffer); + _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectedHouses", i); + convertAffectsHouse.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectsHouse", i); convertAffectsHouse.Read(exINI, pSection, tempBuffer); @@ -72,6 +74,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, Nullable convertAffectsHouse; convertFrom.Read(exINI, pSection, "Convert.From"); convertTo.Read(exINI, pSection, "Convert.To"); + convertAffectsHouse.Read(exINI, pSection, "Convert.AffectedHouses"); convertAffectsHouse.Read(exINI, pSection, "Convert.AffectsHouse"); if (convertTo.isset()) { diff --git a/src/New/Type/AttachEffectTypeClass.cpp b/src/New/Type/AttachEffectTypeClass.cpp index 02bc5abb9e..b38192a100 100644 --- a/src/New/Type/AttachEffectTypeClass.cpp +++ b/src/New/Type/AttachEffectTypeClass.cpp @@ -105,6 +105,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->PenetratesForceShield.Read(exINI, pSection, "PenetratesForceShield"); this->AffectTypes.Read(exINI, pSection, "AffectTypes"); this->IgnoreTypes.Read(exINI, pSection, "IgnoreTypes"); + this->AffectsTarget.Read(exINI, pSection, "AffectTargets"); this->AffectsTarget.Read(exINI, pSection, "AffectsTarget"); this->Animation.Read(exINI, pSection, "Animation"); @@ -147,6 +148,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->Crit_DisallowWarheads.Read(exINI, pSection, "Crit.DisallowWarheads"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); + this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RevengeWeapon_UseInvokerAsOwner.Read(exINI, pSection, "RevengeWeapon.UseInvokerAsOwner"); @@ -154,6 +156,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->ReflectDamage_Warhead.Read(exINI, pSection, "ReflectDamage.Warhead"); this->ReflectDamage_Warhead_Detonate.Read(exINI, pSection, "ReflectDamage.Warhead.Detonate"); this->ReflectDamage_Multiplier.Read(exINI, pSection, "ReflectDamage.Multiplier"); + this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouses"); this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouse"); this->ReflectDamage_Chance.Read(exINI, pSection, "ReflectDamage.Chance"); this->ReflectDamage_Override.Read(exINI, pSection, "ReflectDamage.Override"); From b0496b45b4a506b6bf1f0faf19e6688b5de2469b Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Sat, 7 Feb 2026 18:30:26 +0800 Subject: [PATCH 2/5] Annotate temporary solutions --- src/Ext/SWType/Body.cpp | 2 +- src/Ext/TechnoType/Body.cpp | 6 +++--- src/Ext/WarheadType/Body.cpp | 20 ++++++++++---------- src/New/Type/Affiliated/TypeConvertGroup.cpp | 4 ++-- src/New/Type/AttachEffectTypeClass.cpp | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Ext/SWType/Body.cpp b/src/Ext/SWType/Body.cpp index 7380157463..d0c909e3af 100644 --- a/src/Ext/SWType/Body.cpp +++ b/src/Ext/SWType/Body.cpp @@ -141,7 +141,7 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->LimboDelivery_Types.Read(exINI, pSection, "LimboDelivery.Types"); this->LimboDelivery_IDs.Read(exINI, pSection, "LimboDelivery.IDs"); this->LimboDelivery_RollChances.Read(exINI, pSection, "LimboDelivery.RollChances"); - this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.Affected"); + this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.Affected"); // Temporary solution for the INI tags renaming issue, see #2093 this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.AffectsHouse"); this->LimboKill_IDs.Read(exINI, pSection, "LimboKill.IDs"); this->SW_Next.Read(exINI, pSection, "SW.Next"); diff --git a/src/Ext/TechnoType/Body.cpp b/src/Ext/TechnoType/Body.cpp index 5a621dfed0..66af3818a0 100644 --- a/src/Ext/TechnoType/Body.cpp +++ b/src/Ext/TechnoType/Body.cpp @@ -861,9 +861,9 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->OpenTransport_RangeBonus.Read(exINI, pSection, "OpenTransport.RangeBonus"); this->OpenTransport_DamageMultiplier.Read(exINI, pSection, "OpenTransport.DamageMultiplier"); - this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoFire"); + this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoFire"); // Temporary solution for the INI tags renaming issue, see #2093 this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoTargetOwnPosition"); - this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoFire.TargetSelf"); + this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoFire.TargetSelf"); // Temporary solution for the INI tags renaming issue, see #2093 this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoTargetOwnPosition.Self"); this->NoSecondaryWeaponFallback.Read(exINI, pSection, "NoSecondaryWeaponFallback"); @@ -1006,7 +1006,7 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Tint_VisibleToHouses.Read(exINI, pSection, "Tint.VisibleToHouses"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); - this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); + this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RecountBurst.Read(exINI, pSection, "RecountBurst"); diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index f65e582f3b..294458dc30 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -162,18 +162,18 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_ExtraDamage_ApplyFirepowerMult.Read(exINI, pSection, "Crit.ExtraDamage.ApplyFirepowerMult"); this->Crit_Warhead.Read(exINI, pSection, "Crit.Warhead"); this->Crit_Warhead_FullDetonation.Read(exINI, pSection, "Crit.Warhead.FullDetonation"); - this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.Affects"); + this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.Affects"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.AffectsTarget"); - this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouses"); + this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouse"); this->Crit_AnimList.Read(exINI, pSection, "Crit.AnimList"); this->Crit_AnimList_PickRandom.Read(exINI, pSection, "Crit.AnimList.PickRandom"); this->Crit_AnimList_CreateAll.Read(exINI, pSection, "Crit.AnimList.CreateAll"); this->Crit_ActiveChanceAnims.Read(exINI, pSection, "Crit.ActiveChanceAnims"); this->Crit_AnimOnAffectedTargets.Read(exINI, pSection, "Crit.AnimOnAffectedTargets"); - this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectBelowPercent"); + this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectBelowPercent"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectsBelowPercent"); - this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); + this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsAbovePercent.Read(exINI, pSection, "Crit.AffectsAbovePercent"); this->Crit_SuppressWhenIntercepted.Read(exINI, pSection, "Crit.SuppressWhenIntercepted"); @@ -253,9 +253,9 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->DetonateOnAllMapObjects.Read(exINI, pSection, "DetonateOnAllMapObjects"); this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full"); this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses"); - this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); + this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); // Temporary solution for the INI tags renaming issue, see #2093 this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsTarget"); - this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectHouses"); + this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouse"); this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes"); this->DetonateOnAllMapObjects_IgnoreTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.IgnoreTypes"); @@ -298,13 +298,13 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->KillWeapon.Read(exINI, pSection, "KillWeapon"); this->KillWeapon_OnFirer.Read(exINI, pSection, "KillWeapon.OnFirer"); - this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouses"); + this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouse"); - this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouses"); + this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouse"); - this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.Affects"); + this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.Affects"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.AffectsTarget"); - this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.Affects"); + this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.Affects"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsTarget"); this->ElectricAssaultLevel.Read(exINI, pSection, "ElectricAssaultLevel"); diff --git a/src/New/Type/Affiliated/TypeConvertGroup.cpp b/src/New/Type/Affiliated/TypeConvertGroup.cpp index fbd3242864..3f9346904a 100644 --- a/src/New/Type/Affiliated/TypeConvertGroup.cpp +++ b/src/New/Type/Affiliated/TypeConvertGroup.cpp @@ -56,7 +56,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, convertFrom.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.To", i); convertTo.Read(exINI, pSection, tempBuffer); - _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectedHouses", i); + _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectedHouses", i); // Temporary solution for the INI tags renaming issue, see #2093 convertAffectsHouse.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectsHouse", i); convertAffectsHouse.Read(exINI, pSection, tempBuffer); @@ -74,7 +74,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, Nullable convertAffectsHouse; convertFrom.Read(exINI, pSection, "Convert.From"); convertTo.Read(exINI, pSection, "Convert.To"); - convertAffectsHouse.Read(exINI, pSection, "Convert.AffectedHouses"); + convertAffectsHouse.Read(exINI, pSection, "Convert.AffectedHouses"); // Temporary solution for the INI tags renaming issue, see #2093 convertAffectsHouse.Read(exINI, pSection, "Convert.AffectsHouse"); if (convertTo.isset()) { diff --git a/src/New/Type/AttachEffectTypeClass.cpp b/src/New/Type/AttachEffectTypeClass.cpp index b38192a100..a3eb1e180e 100644 --- a/src/New/Type/AttachEffectTypeClass.cpp +++ b/src/New/Type/AttachEffectTypeClass.cpp @@ -105,7 +105,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->PenetratesForceShield.Read(exINI, pSection, "PenetratesForceShield"); this->AffectTypes.Read(exINI, pSection, "AffectTypes"); this->IgnoreTypes.Read(exINI, pSection, "IgnoreTypes"); - this->AffectsTarget.Read(exINI, pSection, "AffectTargets"); + this->AffectsTarget.Read(exINI, pSection, "AffectTargets"); // Temporary solution for the INI tags renaming issue, see #2093 this->AffectsTarget.Read(exINI, pSection, "AffectsTarget"); this->Animation.Read(exINI, pSection, "Animation"); @@ -148,7 +148,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->Crit_DisallowWarheads.Read(exINI, pSection, "Crit.DisallowWarheads"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); - this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); + this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RevengeWeapon_UseInvokerAsOwner.Read(exINI, pSection, "RevengeWeapon.UseInvokerAsOwner"); @@ -156,7 +156,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->ReflectDamage_Warhead.Read(exINI, pSection, "ReflectDamage.Warhead"); this->ReflectDamage_Warhead_Detonate.Read(exINI, pSection, "ReflectDamage.Warhead.Detonate"); this->ReflectDamage_Multiplier.Read(exINI, pSection, "ReflectDamage.Multiplier"); - this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouses"); + this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouse"); this->ReflectDamage_Chance.Read(exINI, pSection, "ReflectDamage.Chance"); this->ReflectDamage_Override.Read(exINI, pSection, "ReflectDamage.Override"); From cfaa3b6c92d820070dc9691b240c110420b3439f Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Tue, 10 Feb 2026 17:57:53 +0800 Subject: [PATCH 3/5] fix `Crit.AffectAbovePercent` --- src/Ext/WarheadType/Body.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 1f159ee05d..6213c2ed87 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -173,7 +173,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_AnimOnAffectedTargets.Read(exINI, pSection, "Crit.AnimOnAffectedTargets"); this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectBelowPercent"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectsBelowPercent"); - this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); // Temporary solution for the INI tags renaming issue, see #2093 + this->Crit_AffectsAbovePercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsAbovePercent.Read(exINI, pSection, "Crit.AffectsAbovePercent"); this->Crit_SuppressWhenIntercepted.Read(exINI, pSection, "Crit.SuppressWhenIntercepted"); From 196d4f51208fc2e5801f1a549ecde2253d6622f5 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Thu, 5 Mar 2026 02:25:24 +0800 Subject: [PATCH 4/5] add log --- src/Ext/SWType/Body.cpp | 4 ++ src/Ext/TechnoType/Body.cpp | 12 ++++++ src/Ext/WarheadType/Body.cpp | 40 ++++++++++++++++++++ src/New/Type/Affiliated/TypeConvertGroup.cpp | 9 +++++ src/New/Type/AttachEffectTypeClass.cpp | 12 ++++++ 5 files changed, 77 insertions(+) diff --git a/src/Ext/SWType/Body.cpp b/src/Ext/SWType/Body.cpp index f26c31ed3f..a8eeedbd50 100644 --- a/src/Ext/SWType/Body.cpp +++ b/src/Ext/SWType/Body.cpp @@ -143,6 +143,10 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->LimboDelivery_Types.Read(exINI, pSection, "LimboDelivery.Types"); this->LimboDelivery_IDs.Read(exINI, pSection, "LimboDelivery.IDs"); this->LimboDelivery_RollChances.Read(exINI, pSection, "LimboDelivery.RollChances"); + if (exINI.ReadString(pSection, "LimboKill.Affected") > 0) + { + Debug::Log("[Developer warning][%s] LimboKill.Affected is deprecated and has been replaced by LimboKill.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.Affected"); // Temporary solution for the INI tags renaming issue, see #2093 this->LimboKill_AffectsHouse.Read(exINI, pSection, "LimboKill.AffectsHouse"); this->LimboKill_IDs.Read(exINI, pSection, "LimboKill.IDs"); diff --git a/src/Ext/TechnoType/Body.cpp b/src/Ext/TechnoType/Body.cpp index b97b1408c4..87e2d8119a 100644 --- a/src/Ext/TechnoType/Body.cpp +++ b/src/Ext/TechnoType/Body.cpp @@ -861,8 +861,16 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->OpenTransport_RangeBonus.Read(exINI, pSection, "OpenTransport.RangeBonus"); this->OpenTransport_DamageMultiplier.Read(exINI, pSection, "OpenTransport.DamageMultiplier"); + if (exINI.ReadString(pSection, "AutoFire") > 0) + { + Debug::Log("[Developer warning][%s] AutoFire is deprecated and has been replaced by AutoTargetOwnPosition! If both are set, the latter will be used.\n", pSection); + } this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoFire"); // Temporary solution for the INI tags renaming issue, see #2093 this->AutoTargetOwnPosition.Read(exINI, pSection, "AutoTargetOwnPosition"); + if (exINI.ReadString(pSection, "AutoFire.TargetSelf") > 0) + { + Debug::Log("[Developer warning][%s] AutoFire.TargetSelf is deprecated and has been replaced by AutoTargetOwnPosition.Self! If both are set, the latter will be used.\n", pSection); + } this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoFire.TargetSelf"); // Temporary solution for the INI tags renaming issue, see #2093 this->AutoTargetOwnPosition_Self.Read(exINI, pSection, "AutoTargetOwnPosition.Self"); @@ -1009,6 +1017,10 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Tint_VisibleToHouses.Read(exINI, pSection, "Tint.VisibleToHouses"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); + if (exINI.ReadString(pSection, "RevengeWeapon.AffectsHouses") > 0) + { + Debug::Log("[Developer warning][%s] RevengeWeapon.AffectsHouses is deprecated and has been replaced by RevengeWeapon.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 567af0c111..6125fb9e68 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -162,8 +162,16 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_ExtraDamage_ApplyFirepowerMult.Read(exINI, pSection, "Crit.ExtraDamage.ApplyFirepowerMult"); this->Crit_Warhead.Read(exINI, pSection, "Crit.Warhead"); this->Crit_Warhead_FullDetonation.Read(exINI, pSection, "Crit.Warhead.FullDetonation"); + if (exINI.ReadString(pSection, "Crit.Affects") > 0) + { + Debug::Log("[Developer warning][%s] Crit.Affects is deprecated and has been replaced by Crit.AffectsTarget! If both are set, the latter will be used.\n", pSection); + } this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.Affects"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsTarget.Read(exINI, pSection, "Crit.AffectsTarget"); + if (exINI.ReadString(pSection, "Crit.AffectsHouses") > 0) + { + Debug::Log("[Developer warning][%s] Crit.AffectsHouses is deprecated and has been replaced by Crit.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsHouse.Read(exINI, pSection, "Crit.AffectsHouse"); this->Crit_AnimList.Read(exINI, pSection, "Crit.AnimList"); @@ -171,8 +179,16 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_AnimList_CreateAll.Read(exINI, pSection, "Crit.AnimList.CreateAll"); this->Crit_ActiveChanceAnims.Read(exINI, pSection, "Crit.ActiveChanceAnims"); this->Crit_AnimOnAffectedTargets.Read(exINI, pSection, "Crit.AnimOnAffectedTargets"); + if (exINI.ReadString(pSection, "Crit.AffectBelowPercent") > 0) + { + Debug::Log("[Developer warning][%s] Crit.AffectBelowPercent is deprecated and has been replaced by Crit.AffectsBelowPercent! If both are set, the latter will be used.\n", pSection); + } this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectBelowPercent"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsBelowPercent.Read(exINI, pSection, "Crit.AffectsBelowPercent"); + if (exINI.ReadString(pSection, "Crit.AffectAbovePercent") > 0) + { + Debug::Log("[Developer warning][%s] Crit.AffectAbovePercent is deprecated and has been replaced by Crit.AffectsAbovePercent! If both are set, the latter will be used.\n", pSection); + } this->Crit_AffectsAbovePercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); // Temporary solution for the INI tags renaming issue, see #2093 this->Crit_AffectsAbovePercent.Read(exINI, pSection, "Crit.AffectsAbovePercent"); this->Crit_SuppressWhenIntercepted.Read(exINI, pSection, "Crit.SuppressWhenIntercepted"); @@ -253,8 +269,16 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->DetonateOnAllMapObjects.Read(exINI, pSection, "DetonateOnAllMapObjects"); this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full"); this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses"); + if (exINI.ReadString(pSection, "DetonateOnAllMapObjects.AffectTargets") > 0) + { + Debug::Log("[Developer warning][%s] DetonateOnAllMapObjects.AffectTargets is deprecated and has been replaced by DetonateOnAllMapObjects.AffectsTarget! If both are set, the latter will be used.\n", pSection); + } this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); // Temporary solution for the INI tags renaming issue, see #2093 this->DetonateOnAllMapObjects_AffectsTarget.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsTarget"); + if (exINI.ReadString(pSection, "DetonateOnAllMapObjects.AffectHouses") > 0) + { + Debug::Log("[Developer warning][%s] DetonateOnAllMapObjects.AffectHouses is deprecated and has been replaced by DetonateOnAllMapObjects.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->DetonateOnAllMapObjects_AffectsHouse.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouse"); this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes"); @@ -300,12 +324,28 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->KillWeapon.Read(exINI, pSection, "KillWeapon"); this->KillWeapon_OnFirer.Read(exINI, pSection, "KillWeapon.OnFirer"); + if (exINI.ReadString(pSection, "KillWeapon.AffectsHouses") > 0) + { + Debug::Log("[Developer warning][%s] KillWeapon.AffectsHouses is deprecated and has been replaced by KillWeapon.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_AffectsHouse.Read(exINI, pSection, "KillWeapon.AffectsHouse"); + if (exINI.ReadString(pSection, "KillWeapon.OnFirer.AffectsHouses") > 0) + { + Debug::Log("[Developer warning][%s] KillWeapon.OnFirer.AffectsHouses is deprecated and has been replaced by KillWeapon.OnFirer.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_OnFirer_AffectsHouse.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouse"); + if (exINI.ReadString(pSection, "KillWeapon.Affects") > 0) + { + Debug::Log("[Developer warning][%s] KillWeapon.Affects is deprecated and has been replaced by KillWeapon.AffectsTarget! If both are set, the latter will be used.\n", pSection); + } this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.Affects"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_AffectsTarget.Read(exINI, pSection, "KillWeapon.AffectsTarget"); + if (exINI.ReadString(pSection, "KillWeapon.OnFirer.Affects") > 0) + { + Debug::Log("[Developer warning][%s] KillWeapon.OnFirer.Affects is deprecated and has been replaced by KillWeapon.OnFirer.AffectsTarget! If both are set, the latter will be used.\n", pSection); + } this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.Affects"); // Temporary solution for the INI tags renaming issue, see #2093 this->KillWeapon_OnFirer_AffectsTarget.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsTarget"); diff --git a/src/New/Type/Affiliated/TypeConvertGroup.cpp b/src/New/Type/Affiliated/TypeConvertGroup.cpp index 3f9346904a..4b23557cf0 100644 --- a/src/New/Type/Affiliated/TypeConvertGroup.cpp +++ b/src/New/Type/Affiliated/TypeConvertGroup.cpp @@ -58,6 +58,11 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, convertTo.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectedHouses", i); // Temporary solution for the INI tags renaming issue, see #2093 convertAffectsHouse.Read(exINI, pSection, tempBuffer); + if (convertAffectsHouse.isset()) + { + Debug::Log("[Developer warning][%s] %s is deprecated and has been replaced by Convert%d.AffectsHouse! If both are set, the latter will be used.\n", + pSection, tempBuffer, i); + } _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectsHouse", i); convertAffectsHouse.Read(exINI, pSection, tempBuffer); @@ -75,6 +80,10 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, convertFrom.Read(exINI, pSection, "Convert.From"); convertTo.Read(exINI, pSection, "Convert.To"); convertAffectsHouse.Read(exINI, pSection, "Convert.AffectedHouses"); // Temporary solution for the INI tags renaming issue, see #2093 + if (convertAffectsHouse.isset()) + { + Debug::Log("[Developer warning][%s] Convert.AffectedHouses is deprecated and has been replaced by Convert.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } convertAffectsHouse.Read(exINI, pSection, "Convert.AffectsHouse"); if (convertTo.isset()) { diff --git a/src/New/Type/AttachEffectTypeClass.cpp b/src/New/Type/AttachEffectTypeClass.cpp index a3eb1e180e..5216d3744a 100644 --- a/src/New/Type/AttachEffectTypeClass.cpp +++ b/src/New/Type/AttachEffectTypeClass.cpp @@ -105,6 +105,10 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->PenetratesForceShield.Read(exINI, pSection, "PenetratesForceShield"); this->AffectTypes.Read(exINI, pSection, "AffectTypes"); this->IgnoreTypes.Read(exINI, pSection, "IgnoreTypes"); + if (exINI.ReadString(pSection, "AffectTargets") > 0) + { + Debug::Log("[Developer warning][%s] AffectTargets is deprecated and has been replaced by AffectsTarget! If both are set, the latter will be used.\n", pSection); + } this->AffectsTarget.Read(exINI, pSection, "AffectTargets"); // Temporary solution for the INI tags renaming issue, see #2093 this->AffectsTarget.Read(exINI, pSection, "AffectsTarget"); @@ -148,6 +152,10 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->Crit_DisallowWarheads.Read(exINI, pSection, "Crit.DisallowWarheads"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); + if (exINI.ReadString(pSection, "RevengeWeapon.AffectsHouses") > 0) + { + Debug::Log("[Developer warning][%s] RevengeWeapon.AffectsHouses is deprecated and has been replaced by RevengeWeapon.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->RevengeWeapon_AffectsHouse.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RevengeWeapon_UseInvokerAsOwner.Read(exINI, pSection, "RevengeWeapon.UseInvokerAsOwner"); @@ -156,6 +164,10 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->ReflectDamage_Warhead.Read(exINI, pSection, "ReflectDamage.Warhead"); this->ReflectDamage_Warhead_Detonate.Read(exINI, pSection, "ReflectDamage.Warhead.Detonate"); this->ReflectDamage_Multiplier.Read(exINI, pSection, "ReflectDamage.Multiplier"); + if (exINI.ReadString(pSection, "ReflectDamage.AffectsHouses") > 0) + { + Debug::Log("[Developer warning][%s] ReflectDamage.AffectsHouses is deprecated and has been replaced by ReflectDamage.AffectsHouse! If both are set, the latter will be used.\n", pSection); + } this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouses"); // Temporary solution for the INI tags renaming issue, see #2093 this->ReflectDamage_AffectsHouse.Read(exINI, pSection, "ReflectDamage.AffectsHouse"); this->ReflectDamage_Chance.Read(exINI, pSection, "ReflectDamage.Chance"); From d25dde6c38973b498387ca367d568e5d3d86406f Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Thu, 5 Mar 2026 06:00:13 +0800 Subject: [PATCH 5/5] Prevent old flags on the warhead from outputting duplicate logs --- src/Ext/WarheadType/Body.cpp | 3 +++ src/Ext/WarheadType/Body.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 6125fb9e68..9c741ef1e0 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -119,6 +119,9 @@ DamageAreaResult WarheadTypeExt::ExtData::DamageAreaWithTarget(const CoordStruct void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) { + if (lastLoadedINI == reinterpret_cast(pINI)) + return; + lastLoadedINI = reinterpret_cast(pINI); auto pThis = this->OwnerObject(); const char* pSection = pThis->ID; INI_EX exINI(pINI); diff --git a/src/Ext/WarheadType/Body.h b/src/Ext/WarheadType/Body.h index 41acdffa76..bad037f0ea 100644 --- a/src/Ext/WarheadType/Body.h +++ b/src/Ext/WarheadType/Body.h @@ -259,6 +259,7 @@ class WarheadTypeExt private: Valueable Shield_Respawn_Rate_InMinutes; Valueable Shield_SelfHealing_Rate_InMinutes; + uintptr_t lastLoadedINI; public: ExtData(WarheadTypeClass* OwnerObject) : Extension(OwnerObject) @@ -496,6 +497,8 @@ class WarheadTypeExt , ApplyPerTargetEffectsOnDetonate {} , Taunt { false } + + , lastLoadedINI { 0 } { } void ApplyConvert(HouseClass* pHouse, TechnoClass* pTarget);