From a0aa58f9e55d086ec067b0fcfbad24a62e460e7a Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Mon, 15 May 2023 00:51:37 -0700 Subject: [PATCH] Update disease flags (hand and face) so that they can be used on the same item (#143) * Allow an item to have both disease flags enabled * Remove extra line break for disease hand protection helptext --- Tactical/Interface Enhanced.cpp | 4 ++-- Tactical/Soldier Control.cpp | 2 +- Utils/_ChineseText.cpp | 2 +- Utils/_DutchText.cpp | 2 +- Utils/_EnglishText.cpp | 2 +- Utils/_FrenchText.cpp | 2 +- Utils/_GermanText.cpp | 2 +- Utils/_ItalianText.cpp | 2 +- Utils/_PolishText.cpp | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index 871f9e02..ac30c305 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -2728,7 +2728,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr MSYS_EnableRegion( &gUDBFasthelpRegions[iFirstDataRegion + cnt] ); cnt++; } - else if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) ) + if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) ) { swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[39], szUDBGenSecondaryStatsExplanationsTooltipText[39] ); SetRegionFastHelpText( &(gUDBFasthelpRegions[iFirstDataRegion + cnt]), pStr ); @@ -6420,7 +6420,7 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject ) BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 37, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); ++cnt; } - else if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) && !fComparisonMode) || + if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) && !fComparisonMode) || (fComparisonMode && HasItemFlag( gpComparedItemDescObject->usItem, DISEASEPROTECTION_2 )) ) { BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 37, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 51fb7278..8f7f38c5 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -19923,7 +19923,7 @@ FLOAT SOLDIERTYPE::GetDiseaseContactProtection( ) { bestfacegear = max( bestfacegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) ); } - else if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_2 ) ) + if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_2 ) ) { bestprotectivegear = max( bestprotectivegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) ); } diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 68d32c8b..f83c5ed1 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -8730,7 +8730,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \n这个物品会挡住准心,你无法再使\n用准心瞄准。", //L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \n这种弹药可以破坏发光的墙。\n或者其它不同种类的物品。", //L"\n \nThis ammo can destroy light walls\nand various other objects.", L"\n \n如果你脸上带了这个,这就将降低\n传播给其他人的几率。", //L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \n如果保存在物品栏\n降低\n传染给其他人的几率。", //L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \n如果保存在物品栏降低\n传染给其他人的几率。", //L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", L"\n \n拿在手里,就可以抵挡前方的伤害。", //L"\n \nIf equipped in a hand, this will block incoming damage.", L"\n \n你可以使用它拍照。", //L"\n \nYou can take photos with this.", L"\n \n这个物品能让你更有效地掩埋尸体。", //L"\n \nThis item makes you more effective at burying corpses.", diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 77e4cba5..db1d6907 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -8740,7 +8740,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index bc75fc67..2d775e57 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -8730,7 +8730,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", L"\n \nYou can take photos with this.", L"\n \nThis item makes you more effective at burying corpses.", diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index dc183be9..1b495017 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -8727,7 +8727,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nCet Objet bloquera votre viseur\nde ce fait vous ne pouvez pas l'utiliser.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index d2d6009a..3db0fd14 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -8583,7 +8583,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nDieser Gegenstand verhindert die Verwendung von Kimme und Korn.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 9a346394..6727f801 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -8730,7 +8730,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 187348df..917505fd 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -8742,7 +8742,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.",