From e1c8bee1d159f526f758594412af3fc870e6ffa6 Mon Sep 17 00:00:00 2001 From: Greysa <52637570+Greysa@users.noreply.github.com> Date: Sun, 22 Mar 2026 11:19:49 +1100 Subject: [PATCH] Message strings added to language files. --- Tactical/Items.cpp | 30 ++++++++++-------------------- i18n/_ChineseText.cpp | 5 +++++ i18n/_DutchText.cpp | 5 +++++ i18n/_EnglishText.cpp | 5 +++++ i18n/_FrenchText.cpp | 5 +++++ i18n/_GermanText.cpp | 5 +++++ i18n/_ItalianText.cpp | 5 +++++ i18n/_PolishText.cpp | 5 +++++ i18n/_RussianText.cpp | 5 +++++ i18n/include/Text.h | 4 ++++ 10 files changed, 54 insertions(+), 20 deletions(-) diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 104ecda7..8a29b266 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -3879,7 +3879,7 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier, bool aReloadEvenIfNotEmpty ) // Flugente: check for underbarrel weapons and use that object if necessary pObj = pSoldier->GetUsedWeapon( &(pSoldier->inv[HANDPOS]) ); - if (pSoldier->IsValidSecondHandShotForReloadingPurposes()) //check for valid second hand weapon for reloading purposes (ie, not a launcher or something that doesn't use ammo) + if (pSoldier->IsValidSecondHandShotForReloadingPurposes()) //check for valid second hand weapon for reloading purposes (something that doesn't use ammo) { pObj2 = pSoldier->GetUsedWeapon( &(pSoldier->inv[SECONDHANDPOS]) ); } @@ -3888,7 +3888,6 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier, bool aReloadEvenIfNotEmpty ) pObj2 = NULL; } // Greysa: Check if weapon is jammed and unjam it first - // Greysa: need to implement and test duel wield unjamming if ((*pObj)[0]->data.gun.bGunAmmoStatus < 0 || ((pObj2 != NULL) && (*pObj2)[0]->data.gun.bGunAmmoStatus < 0)) { if ((*pObj)[0]->data.gun.bGunAmmoStatus < 0) @@ -3907,9 +3906,7 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier, bool aReloadEvenIfNotEmpty ) int iResult = SkillCheck(pSoldier, UNJAM_GUN_CHECK, bChanceMod); - // sevenfm: AI always unjams successfully - // Greysa: no AI check required here - if (iResult > 0)// || !(pSoldier->flags.uiStatusFlags & SOLDIER_PC)) + if (iResult > 0) { // yay! unjammed the gun (*pObj)[0]->data.gun.bGunAmmoStatus *= -1; @@ -3926,19 +3923,15 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier, bool aReloadEvenIfNotEmpty ) PlayJA2Sample(Weapon[Item[pObj->usItem].ubClassIndex].ManualReloadSound, RATE_11025, SoundVolume(HIGHVOLUME, pSoldier->sGridNo), 1, SoundDir(pSoldier->sGridNo)); ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s unjammed %s.", pSoldier->GetName(), ItemNames[pObj->usItem]); // merc voice feedback? - // Greysa: We want to skip reloading if we attempted to unjam, regardless of outcome - //return FALSE; // Greysa: Do we return false or true here to skip rest of reload? I think true, but test this! Also, need to figure out animation } else { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s failed to unjam %s.", pSoldier->GetName(), ItemNames[pObj->usItem]); - //return FALSE; } } else { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s does not have enough APs to unjam %s.", pSoldier->GetName(), ItemNames[pObj->usItem]); - //return FALSE; } } if ((pObj2 != NULL) && (*pObj2)[0]->data.gun.bGunAmmoStatus < 0) @@ -3956,9 +3949,7 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier, bool aReloadEvenIfNotEmpty ) int iResult = SkillCheck(pSoldier, UNJAM_GUN_CHECK, bChanceMod); - // sevenfm: AI always unjams successfully - // Greysa: no AI check required here - if (iResult > 0)// || !(pSoldier->flags.uiStatusFlags & SOLDIER_PC)) + if (iResult > 0) { // yay! unjammed the gun (*pObj2)[0]->data.gun.bGunAmmoStatus *= -1; @@ -3973,24 +3964,23 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier, bool aReloadEvenIfNotEmpty ) DirtyMercPanelInterface(pSoldier, DIRTYLEVEL2); // Greysa: what does this do? PlayJA2Sample(Weapon[Item[pObj2->usItem].ubClassIndex].ManualReloadSound, RATE_11025, SoundVolume(HIGHVOLUME, pSoldier->sGridNo), 1, SoundDir(pSoldier->sGridNo)); - ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s unjammed %s.", pSoldier->GetName(), ItemNames[pObj2->usItem]); + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_UNJAMMED], pSoldier->GetName(), ItemNames[pObj2->usItem]); // merc voice feedback? - // Greysa: We want to skip reloading if we attempted to unjam, regardless of outcome - return FALSE; // Greysa: Do we return false or true here to skip rest of reload? I think true, but test this! Also, need to figure out animation + return FALSE; //do I need this? } else { - ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s failed to unjam %s.", pSoldier->GetName(), ItemNames[pObj2->usItem]); - return FALSE; + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_FAILED_UNJAM], pSoldier->GetName(), ItemNames[pObj2->usItem]); + return FALSE; //do I need this? } } else { - ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s does not have enough APs to unjam %s.", pSoldier->GetName(), ItemNames[pObj2->usItem]); - return FALSE; + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_NO_AP_NO_UNJAM], pSoldier->GetName(), ItemNames[pObj2->usItem]); + return FALSE; //do I need this? } } - return FALSE; + return FALSE; // Greysa: We want to skip reloading if we attempted to unjam, regardless of outcome. Return value doesn't seem to matter as there doesn't seem to be any actual checks on the returned value } // manual recharge diff --git a/i18n/_ChineseText.cpp b/i18n/_ChineseText.cpp index ff4b97c7..209208ab 100644 --- a/i18n/_ChineseText.cpp +++ b/i18n/_ChineseText.cpp @@ -2361,6 +2361,11 @@ CHAR16 Message[][STRING_LENGTH] = L"没有能够训练的民兵。", //L"No militia that can be drilled present.", L"%s 已经完全的探索了 %s。", //L"%s has fully explored %s." + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/_DutchText.cpp b/i18n/_DutchText.cpp index 509040f7..56283c9b 100644 --- a/i18n/_DutchText.cpp +++ b/i18n/_DutchText.cpp @@ -2360,6 +2360,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s has fully explored %s.", // TODO.Translate + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/_EnglishText.cpp b/i18n/_EnglishText.cpp index f3284709..a93dc98c 100644 --- a/i18n/_EnglishText.cpp +++ b/i18n/_EnglishText.cpp @@ -2361,6 +2361,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s has fully explored %s.", + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/_FrenchText.cpp b/i18n/_FrenchText.cpp index a859908d..7d47cf68 100644 --- a/i18n/_FrenchText.cpp +++ b/i18n/_FrenchText.cpp @@ -2369,6 +2369,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s has fully explored %s.", // TODO.Translate + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game // TODO.Translate diff --git a/i18n/_GermanText.cpp b/i18n/_GermanText.cpp index cfd6a7ed..5fbec512 100644 --- a/i18n/_GermanText.cpp +++ b/i18n/_GermanText.cpp @@ -2403,6 +2403,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s hat %s vollständig erkundet.", + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/_ItalianText.cpp b/i18n/_ItalianText.cpp index a8da7833..5411245d 100644 --- a/i18n/_ItalianText.cpp +++ b/i18n/_ItalianText.cpp @@ -2355,6 +2355,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s has fully explored %s.", // TODO.Translate + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/_PolishText.cpp b/i18n/_PolishText.cpp index 52620637..46dd6b53 100644 --- a/i18n/_PolishText.cpp +++ b/i18n/_PolishText.cpp @@ -2367,6 +2367,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s has fully explored %s.", // TODO.Translate + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/_RussianText.cpp b/i18n/_RussianText.cpp index ae91c312..4a4e8c46 100644 --- a/i18n/_RussianText.cpp +++ b/i18n/_RussianText.cpp @@ -2361,6 +2361,11 @@ CHAR16 Message[][STRING_LENGTH] = L"No militia that can be drilled present.", L"%s has fully explored %s.", // TODO.Translate + + // The first %s is a merc name and the second %s is an item name + L"%s unjammed %s.", + L"%s failed to unjam %s.", + L"%s does not have enough APs to unjam %s." }; // the country and its noun in the game diff --git a/i18n/include/Text.h b/i18n/include/Text.h index 47039847..0c890d6b 100644 --- a/i18n/include/Text.h +++ b/i18n/include/Text.h @@ -612,6 +612,10 @@ enum STR_ASSIGNMENT_EXPLORATION_DONE, + STR_UNJAMMED, + STR_FAILED_UNJAM, + STR_NO_AP_NO_UNJAM, + TEXT_NUM_STR_MESSAGE, };