diff --git a/GameSettings.cpp b/GameSettings.cpp index 22a95b6ca..eb94680b0 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -2445,9 +2445,9 @@ void LoadGameAPBPConstants() APBPConstants[AP_FILL_SANDBAG] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_FILL_SANDBAG", 200), 200); APBPConstants[AP_EAT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_EAT",80),80); APBPConstants[AP_CLEANINGKIT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_CLEANINGKIT",80),80); - APBPConstants[AP_INVENTORY_EXPLOSIVE_ACTIVATE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INVENTORY_EXPLOSIVE_ACTIVATE",20),20); APBPConstants[AP_DISGUISE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_DISGUISE",80),80); APBPConstants[AP_HANDCUFF] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_HANDCUFF",50),50); + APBPConstants[AP_INVENTORY_ARM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INVENTORY_ARM",50),50); APBPConstants[DEFAULT_APS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","DEFAULT_APS",80),80); APBPConstants[DEFAULT_AIMSKILL] = iniReader.ReadInteger("APConstants","DEFAULT_AIMSKILL",80); @@ -2505,6 +2505,7 @@ void LoadGameAPBPConstants() APBPConstants[BP_REMOVE_FORTIFICATION] = iniReader.ReadInteger("BPConstants","BP_REMOVE_FORTIFICATION", 400); APBPConstants[BP_FILL_SANDBAG] = iniReader.ReadInteger("BPConstants","BP_FILL_SANDBAG", 500); APBPConstants[BP_HANDCUFF] = iniReader.ReadInteger("BPConstants","BP_HANDCUFF", 100); + APBPConstants[BP_INVENTORY_ARM] = iniReader.ReadInteger("BPConstants","BP_INVENTORY_ARM", 10); SetupMaxActionPointsAnimation(); #undef ReadInteger diff --git a/Init.h b/Init.h index 20f4025f9..633afa735 100644 --- a/Init.h +++ b/Init.h @@ -150,9 +150,9 @@ AP_REMOVE_FORTIFICATION, AP_FILL_SANDBAG, AP_EAT, AP_CLEANINGKIT, -AP_INVENTORY_EXPLOSIVE_ACTIVATE, AP_DISGUISE, AP_HANDCUFF, +AP_INVENTORY_ARM, DEFAULT_APS, DEFAULT_AIMSKILL, @@ -209,6 +209,7 @@ BP_FORTIFICATION, BP_REMOVE_FORTIFICATION, BP_FILL_SANDBAG, BP_HANDCUFF, +BP_INVENTORY_ARM, TOTAL_APBP_VALUES }; #endif diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index cc83f3d39..8255da914 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -12765,7 +12765,7 @@ void ItemDescTransformRegionCallback( MOUSE_REGION *pRegion, INT32 reason ) { iTransformIndex++; - UINT16 apcost = APBPConstants[AP_INVENTORY_EXPLOSIVE_ACTIVATE]; + UINT16 usAPCost = APBPConstants[AP_INVENTORY_ARM]; // test wether item is already armed INT8 detonatortype; @@ -12779,24 +12779,24 @@ void ItemDescTransformRegionCallback( MOUSE_REGION *pRegion, INT32 reason ) { fHaveToDisarm = TRUE; - if ( apcost > 0 && gTacticalStatus.uiFlags & INCOMBAT && gTacticalStatus.uiFlags & TURNBASED ) + if ( usAPCost > 0 && gTacticalStatus.uiFlags & INCOMBAT && gTacticalStatus.uiFlags & TURNBASED ) { - swprintf (MenuRowText, L"Disarm (%d AP)", apcost ); + swprintf (MenuRowText, szInventoryArmTextStr[STR_INV_ARM_DISARM_AP], usAPCost ); } else { - swprintf (MenuRowText, L"Disarm"); + swprintf (MenuRowText, szInventoryArmTextStr[STR_INV_ARM_DISARM]); } } else { - if ( apcost > 0 && gTacticalStatus.uiFlags & INCOMBAT && gTacticalStatus.uiFlags & TURNBASED ) + if ( usAPCost > 0 && gTacticalStatus.uiFlags & INCOMBAT && gTacticalStatus.uiFlags & TURNBASED ) { - swprintf (MenuRowText, L"Arm (%d AP)", apcost ); + swprintf (MenuRowText, szInventoryArmTextStr[STR_INV_ARM_ARM_AP], usAPCost ); } else { - swprintf (MenuRowText, L"Arm"); + swprintf (MenuRowText, szInventoryArmTextStr[STR_INV_ARM_ARM]); } } @@ -12813,17 +12813,17 @@ void ItemDescTransformRegionCallback( MOUSE_REGION *pRegion, INT32 reason ) { iTransformIndex++; - UINT16 apcost = 20; + UINT16 usAPCost = APBPConstants[AP_INVENTORY_ARM]; CHAR16 MenuRowText[300]; - if ( apcost > 0 && gTacticalStatus.uiFlags & INCOMBAT && gTacticalStatus.uiFlags & TURNBASED ) + if ( usAPCost > 0 && gTacticalStatus.uiFlags & INCOMBAT && gTacticalStatus.uiFlags & TURNBASED ) { - swprintf (MenuRowText, L"Blow up (%d AP)", apcost ); + swprintf (MenuRowText, szInventoryArmTextStr[STR_INV_ARM_BLOWUP_AP], usAPCost ); } else { - swprintf (MenuRowText, L"Blow up"); + swprintf (MenuRowText, szInventoryArmTextStr[STR_INV_ARM_BLOWUP]); } // Generate a new option for the menu @@ -13019,6 +13019,21 @@ void TransformationMenuPopup_Arm( OBJECTTYPE* pObj ) // if this is grenade, blow it up, no dialogue settings here if ( Item[pObj->usItem].usItemClass == IC_GRENADE ) { + // Start reading transformation data with APBP costs. + UINT16 usAPCost = APBPConstants[AP_INVENTORY_ARM]; + INT32 iBPCost = APBPConstants[BP_INVENTORY_ARM]; + + // Check whether our soldier can afford this transformation! + if (!EnoughPoints( gpItemDescSoldier, (INT16)usAPCost, iBPCost, true )) + { + return; + } + else + { + // Soldier can afford the transformation. Deduct APBP as necessary. + DeductPoints( gpItemDescSoldier, (INT16)usAPCost, iBPCost, false ); + } + INT8 screen = guiCurrentScreen; if ( screen == GAME_SCREEN ) { diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 8c01d40df..75dc86760 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -6723,7 +6723,7 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue ) CHAR16 wString[ 64 ]; GetShortSectorString( SECTORX(usSectorID), SECTORY(usSectorID), wString ); - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], wString ); + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], prisonerstobemoved, wString ); } } } @@ -6747,7 +6747,7 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue ) CHAR16 wString[ 64 ]; GetShortSectorString( SECTORX(usSectorID), SECTORY(usSectorID), wString ); - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], wString ); + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], prisonerstobemoved, wString ); } } } diff --git a/Utils/Text.h b/Utils/Text.h index 4e38ba4d7..b1834d04d 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -763,6 +763,20 @@ enum extern STR16 szMTATextStr[]; +enum +{ + STR_INV_ARM_BLOWUP_AP, + STR_INV_ARM_BLOWUP, + STR_INV_ARM_ARM_AP, + STR_INV_ARM_ARM, + STR_INV_ARM_DISARM_AP, + STR_INV_ARM_DISARM, + + TEXT_NUM_INV_ARM_STR +}; + +extern STR16 szInventoryArmTextStr[]; + enum { AIR_RAID_TURN_STR, diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 83d26edb5..01810c2c0 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -7521,7 +7521,7 @@ STR16 szPrisonerTextStr[]= L"%d 名俘虏已供出同伙位置", //L"%d prisoners revealed enemy positions.", L"%d 名俘虏已加入我方阵营", //L"%d prisoners joined our cause.", L"俘虏掀起大规模暴动!在 %s 监狱!", //L"Prisoners start a massive riot in %s!", - L"俘虏被押送前往 %s 监狱", //L"Prisoners were sent to %s!", + L"%d 俘虏被押送前往 %s 监狱", //L"Prisoners were sent to %s!", L"俘虏已被释放!", //L"Prisoners have been released!", L"军队已占领 %s 监狱,俘虏已被释放!", //L"The army now occupies the prison in %s, the prisoners were freed!", L"这敌人丫宁死不从!",//L"The enemy refuses to surrender!", @@ -7538,4 +7538,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //CHINESE diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index e0c2b55b4..600edd911 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -7519,7 +7519,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7536,4 +7536,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //DUTCH diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index cd54657d2..d5687f787 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -7506,7 +7506,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7523,4 +7523,14 @@ STR16 szMTATextStr[]= L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //ENGLISH diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index cc7f7c7db..5d701bdc8 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -7503,7 +7503,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7520,4 +7520,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //FRENCH diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index de0bb5def..77034755b 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -7330,7 +7330,7 @@ STR16 szPrisonerTextStr[]= L"%d Gefangene haben uns Truppenstandorte verraten.", L"%d Gefangene schliessen sich uns an.", L"Gefangenenaufstand in %s!", - L"Gefangene wurden nach %s geschickt!", + L"%d Gefangene wurden nach %s geschickt!", L"Gefangene freigelassen!", L"Die Armee hat das Gefängnis in %s besetzt, die Gefangenen wurden befreit!", L"Der Gegner weigert sich aufzugeben!", @@ -7347,4 +7347,14 @@ STR16 szMTATextStr[]= L"%s musste %s stoppen.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //GERMAN diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 4d75563a4..ec2580522 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -7506,7 +7506,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7523,4 +7523,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //ITALIAN diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 2db7d9318..4bbde1449 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -7525,7 +7525,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7542,4 +7542,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //POLISH diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 60a07965e..198723bf1 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -7506,7 +7506,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7523,4 +7523,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //RUSSIAN diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index c57abb8c4..30b7b3b48 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -7523,7 +7523,7 @@ STR16 szPrisonerTextStr[]= L"%d prisoners revealed enemy positions.", L"%d prisoners joined our cause.", L"Prisoners start a massive riot in %s!", - L"Prisoners were sent to %s!", + L"%d prisoners were sent to %s!", L"Prisoners have been released!", L"The army now occupies the prison in %s, the prisoners were freed!", L"The enemy refuses to surrender!", @@ -7540,4 +7540,14 @@ STR16 szMTATextStr[]= // TODO.Translate L"%s had to stop %s.", }; +STR16 szInventoryArmTextStr[]= // TODO.Translate +{ + L"Blow up (%d AP)", + L"Blow up", + L"Arm (%d AP)", + L"Arm", + L"Disarm (%d AP)", + L"Disarm", +}; + #endif //TAIWANESE