- added second weapon cleaning operation to clean all guns

- added missing texts
- cleaned up tripwire-related code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5538 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-08-27 20:25:50 +00:00
parent 2ebe96ca59
commit 6a05d44d85
14 changed files with 68 additions and 41 deletions
+7 -6
View File
@@ -14346,8 +14346,8 @@ OBJECTTYPE* SOLDIERTYPE::GetCleaningKit()
return( pObj );
}
// use any cleaning kits to clean weapons in inventory
void SOLDIERTYPE::CleanWeapon()
// use cleaning kits to clean weapons in inventory. fCleanAll = TRUE: clean all eapons found, otherwise just the first one
void SOLDIERTYPE::CleanWeapon( BOOLEAN fCleanAll )
{
// in turnbased, this action costs APs. remove them if possible, otherwise, return
INT16 apcost = APBPConstants[AP_CLEANINGKIT];
@@ -14396,12 +14396,13 @@ void SOLDIERTYPE::CleanWeapon()
// use up APs
DeductPoints( this, apcost, 0, AFTERACTION_INTERRUPT );
// only clean one weapon, we don't want to clean weapons if we didn't plan to
return;
// if fCleanAll is false, only clean one weapon
if (!fCleanAll )
return;
// get out of here if we dont have enough APs for another cleaning operation
//if ( !EnoughPoints( this, apcost, 0, TRUE ) )
//return;
if ( !EnoughPoints( this, apcost, 0, TRUE ) )
return;
}
}
}