mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New feature: food system requires mercs to eat and drink in order to survive
- food and water levels are lowered every hour, eat food to survive - not doing so leads to various penalties and ultimately death - added food items for that purpose. Food can degrade over time. Rotten food poisons. - Mercs automatically consume food if hungry/thirsty and food is in their inventories - for more info, see http://www.bears-pit.com/board/ubbthreads.php/topics/307396/Re_Mercs_need_food_and_water_t.html#Post307396 - this feature requires new STI files from the GameDir trunk. - added a bunch of filler variable to the soldier type, so hopefully savegame compatibility can be maintained easier in the future. WARNING: This will break savegame compatibility git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5411 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include "Air Raid.h"
|
||||
#include "Queen Command.h"
|
||||
#include "Render Fun.h"
|
||||
#include "Food.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
@@ -1973,21 +1974,47 @@ void UpdateCharRegionHelpText( void )
|
||||
// person (health/energy/morale)
|
||||
GetMoraleString( pSoldier, pMoraleStr );
|
||||
|
||||
if ( pSoldier->bPoisonSum )
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
{
|
||||
INT8 bPoisonBandaged = pSoldier->bPoisonSum - pSoldier->bPoisonBleeding - pSoldier->bPoisonLife;
|
||||
swprintf( sString, L"%s: %d/%d, %s: %d/%d/%d - %d, %s: %d/%d, %s: %s",
|
||||
pMapScreenStatusStrings[ 0 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax,
|
||||
pMapScreenStatusStrings[ 5 ], pSoldier->bPoisonBleeding, bPoisonBandaged, pSoldier->bPoisonLife, pSoldier->bPoisonSum,
|
||||
pMapScreenStatusStrings[ 1 ], pSoldier->bBreath, pSoldier->bBreathMax,
|
||||
pMapScreenStatusStrings[ 2 ], pMoraleStr );
|
||||
if ( pSoldier->bPoisonSum )
|
||||
{
|
||||
INT8 bPoisonBandaged = pSoldier->bPoisonSum - pSoldier->bPoisonBleeding - pSoldier->bPoisonLife;
|
||||
swprintf( sString, L"%s: %d/%d, %s: %d/%d/%d - %d, %s: %d/%d, %s: %s, %s: %d%s, %s: %d%s",
|
||||
pMapScreenStatusStrings[ 0 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax,
|
||||
pMapScreenStatusStrings[ 5 ], pSoldier->bPoisonBleeding, bPoisonBandaged, pSoldier->bPoisonLife, pSoldier->bPoisonSum,
|
||||
pMapScreenStatusStrings[ 1 ], pSoldier->bBreath, pSoldier->bBreathMax,
|
||||
pMapScreenStatusStrings[ 2 ], pMoraleStr,
|
||||
pMapScreenStatusStrings[ 6 ], (INT32)(100*pSoldier->bDrinkLevel/FOOD_MAX), L"%",
|
||||
pMapScreenStatusStrings[ 7 ], (INT32)(100*pSoldier->bFoodLevel/FOOD_MAX), L"%" );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, L"%s: %d/%d, %s: %d/%d, %s: %s, %s: %d%s, %s: %d%s",
|
||||
pMapScreenStatusStrings[ 0 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax,
|
||||
pMapScreenStatusStrings[ 1 ], pSoldier->bBreath, pSoldier->bBreathMax,
|
||||
pMapScreenStatusStrings[ 2 ], pMoraleStr,
|
||||
pMapScreenStatusStrings[ 6 ], (INT32)(100*pSoldier->bDrinkLevel/FOOD_MAX), L"%",
|
||||
pMapScreenStatusStrings[ 7 ], (INT32)(100*pSoldier->bFoodLevel/FOOD_MAX), L"%" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, L"%s: %d/%d, %s: %d/%d, %s: %s",
|
||||
pMapScreenStatusStrings[ 0 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax,
|
||||
pMapScreenStatusStrings[ 1 ], pSoldier->bBreath, pSoldier->bBreathMax,
|
||||
pMapScreenStatusStrings[ 2 ], pMoraleStr );
|
||||
if ( pSoldier->bPoisonSum )
|
||||
{
|
||||
INT8 bPoisonBandaged = pSoldier->bPoisonSum - pSoldier->bPoisonBleeding - pSoldier->bPoisonLife;
|
||||
swprintf( sString, L"%s: %d/%d, %s: %d/%d/%d - %d, %s: %d/%d, %s: %s",
|
||||
pMapScreenStatusStrings[ 0 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax,
|
||||
pMapScreenStatusStrings[ 5 ], pSoldier->bPoisonBleeding, bPoisonBandaged, pSoldier->bPoisonLife, pSoldier->bPoisonSum,
|
||||
pMapScreenStatusStrings[ 1 ], pSoldier->bBreath, pSoldier->bBreathMax,
|
||||
pMapScreenStatusStrings[ 2 ], pMoraleStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, L"%s: %d/%d, %s: %d/%d, %s: %s",
|
||||
pMapScreenStatusStrings[ 0 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax,
|
||||
pMapScreenStatusStrings[ 1 ], pSoldier->bBreath, pSoldier->bBreathMax,
|
||||
pMapScreenStatusStrings[ 2 ], pMoraleStr );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user