Merged revision(s) 7024 from branches/ja2_source_official_2014:

- If a merc repairs up to a threshold below 100, display a slightly different message
- Due to radio operator jamming, AI red alert can fail (intentional part of the trait). In that case, forbid the soldier from using radio again this turn, as this would be a fruitless waste of APs.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7025 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-03-04 22:20:32 +00:00
parent f03bc8ef23
commit 12d45fcfa2
15 changed files with 62 additions and 17 deletions
+14 -2
View File
@@ -4531,7 +4531,6 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
UINT8 ubLoop, ubItemsInPocket, lbeLoop, ubBeforeRepair; // added by SANDRO
BOOLEAN fSomethingWasRepaired = FALSE;
ubItemsInPocket = pObj->ubNumberOfObjects;
for ( ubLoop = 0; ubLoop < ubItemsInPocket; ubLoop++ )
@@ -4595,12 +4594,25 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzLateLocalizedString[ 35 ], pSoldier->GetName(), pOwner->GetName(), ItemNames[ pObj->usItem ] );
}
}
// Flugente: if we repaired as much as possible, but the threshold is below 100, display a slightly different message
else if ( (*pObj)[ubLoop]->data.objectStatus == threshold )
{
// report it as fixed
if ( pSoldier == pOwner )
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[ STR_REPAIRED_PARTIAL ], pSoldier->GetName(), ItemNames[ pObj->usItem ] );
}
else
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[ STR_REPAIRED_PARTIAL_FOR_OWNER ], pSoldier->GetName(), pOwner->GetName(), ItemNames[ pObj->usItem ] );
}
}
if ( *pubRepairPtsLeft == 0 )
{
// we're out of points!
return true;
}
}
// now check for attachments after