- food system: auto consumption now starts at -10% instead of -25%

- Moved key commands: 'Ctrl' + '.' now opens a message box. The commands to fill canteens and to clean weapons can be called from there. In the future, similar commands can be placed here

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5485 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-08-20 20:57:07 +00:00
parent a64d8a9323
commit 20b40ed761
17 changed files with 138 additions and 55 deletions
+4 -45
View File
@@ -122,7 +122,6 @@
#include "IMP Skill Trait.h" // added by Flugente
#include "Food.h" // added by Flugente
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
@@ -225,7 +224,6 @@ void ToggleZBuffer();
void TogglePlanningMode();
void SetBurstMode();
void SetScopeMode( INT32 usMapPos );
void CleanWeapons();
void ObliterateSector();
void RandomizeMercProfile();
void CreateNextCivType();
@@ -4459,12 +4457,13 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
case '.':
if ( fCtrl )
{
SectorFillCanteens();
if ( gusSelectedSoldier != NOBODY )
{
HandleTacticalFunctionSelection(MercPtrs[ gusSelectedSoldier ], usMapPos );
}
}
else if ( fAlt )
{
CleanWeapons();
/*// Flugente: spawn items while debugging
if ( gusSelectedSoldier != NOBODY )
{
@@ -5279,46 +5278,6 @@ void SetScopeMode( INT32 usMapPos )
}
}
void CleanWeapons()
{
if ( !gGameExternalOptions.fDirtSystem )
return;
// no functionality if not in tactical or in combat, or nobody is here
if ( guiCurrentScreen != GAME_SCREEN || (gTacticalStatus.uiFlags & INCOMBAT) )
return;
// if in turnbased mode, perform this action only for the selected merc, and use up APs
if ( gTacticalStatus.uiFlags & TURNBASED )
{
if ( gusSelectedSoldier == NOBODY )
return;
SOLDIERTYPE* pSoldier = MercPtrs[ gusSelectedSoldier ];
if ( pSoldier->bActive )
pSoldier->CleanWeapon();
}
else // peform action for every merc in this sector
{
UINT8 bMercID, bLastTeamID;
SOLDIERTYPE* pSoldier = NULL;
bMercID = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
// loop through all mercs
for ( pSoldier = MercPtrs[ bMercID ]; bMercID <= bLastTeamID; ++bMercID, ++pSoldier )
{
//if the merc is in this sector
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE && pSoldier->bInSector && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
{
pSoldier->CleanWeapon();
}
}
}
}
void ObliterateSector()
{
INT32 cnt;