The following options have been moved from the campaign the campaign start screen to JA2_Options.ini:

- Maximum number of IMPs (now MAX_IMP_CHARACTERS (Default: 10))
- Enemies drop all items (now DROP_ALL (Default: FALSE))
- Merc Story Backgrounds (now BACKGROUNDS (Default: TRUE))
- Food System (now FOOD (Default: FALSE))
- Improved Interrupt System (now IMPROVED_INTERRUPT_SYSTEM (Default: TRUE))
- Inventory Manipulation Costs AP (now INVENTORY_MANIPULATION_COSTS_AP (Default: FALSE))

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23855&goto=354656&#msg_354656

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-09-02 15:14:01 +00:00
parent 83e00b0480
commit 2dbacd32de
35 changed files with 177 additions and 1196 deletions
+10 -10
View File
@@ -1485,7 +1485,7 @@ BOOLEAN CanCharacterPatient( SOLDIERTYPE *pSoldier )
return ( TRUE );
// Flugente: stats can also be damaged
if ( !gGameOptions.fFoodSystem || ( gGameOptions.fFoodSystem && pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold ) )
if ( !UsingFoodSystem() || ( pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold ) )
{
if ( pSoldier->usStarveDamageHealth > 0 || pSoldier->usStarveDamageStrength > 0 )
return ( TRUE );
@@ -3134,7 +3134,7 @@ UINT16 CalculateHealingPointsForDoctor(SOLDIERTYPE *pDoctor, UINT16 *pusMaxPts,
ReducePointsForFatigue( pDoctor, &usHealPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pDoctor, &usHealPts );
// count how much medical supplies we have
@@ -3228,7 +3228,7 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts
ReducePointsForFatigue( pSoldier, &usRepairPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pSoldier, &usRepairPts );
// figure out what shape his "equipment" is in ("coming" in JA3: Viagra - improves the "shape" your "equipment" is in)
@@ -3313,7 +3313,7 @@ UINT8 CalculateCleaningPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxP
ReducePointsForFatigue( pSoldier, &usCleaningPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pSoldier, &usCleaningPts );
// return current cleaning pts
@@ -4047,7 +4047,7 @@ void UpdatePatientsWhoAreDoneHealing( void )
if ( IS_PATIENT(pTeamSoldier->bAssignment) && !IS_DOCTOR(pTeamSoldier->bAssignment) && (pTeamSoldier->stats.bLife == pTeamSoldier->stats.bLifeMax) && pTeamSoldier->HasDisease(TRUE, TRUE) )
{
// Flugente: stats can also be damaged
if ( !gGameOptions.fFoodSystem || (gGameOptions.fFoodSystem && pTeamSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pTeamSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
if ( !UsingFoodSystem() || ( pTeamSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pTeamSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
{
if ( pTeamSoldier->usStarveDamageHealth > 0 || pTeamSoldier->usStarveDamageStrength > 0 )
fHasDamagedStat = TRUE;
@@ -7068,7 +7068,7 @@ INT16 GetBonusTrainingPtsDueToInstructor( SOLDIERTYPE *pInstructor, SOLDIERTYPE
ReducePointsForFatigue( pInstructor, &uiTrainingPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pInstructor, &uiTrainingPts );
sTrainingPts = (INT16)uiTrainingPts;
@@ -7187,7 +7187,7 @@ INT16 GetSoldierTrainingPts( SOLDIERTYPE *pSoldier, INT8 bTrainStat, UINT16 *pus
ReducePointsForFatigue( pSoldier, &uiTrainingPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pSoldier, &uiTrainingPts );
sTrainingPts = (INT16)uiTrainingPts;
@@ -7311,7 +7311,7 @@ INT16 GetSoldierStudentPts( SOLDIERTYPE *pSoldier, INT8 bTrainStat, UINT16 *pusM
ReducePointsForFatigue( pSoldier, &uiTrainingPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pSoldier, &uiTrainingPts );
sTrainingPts = (INT16)uiTrainingPts;
@@ -8763,7 +8763,7 @@ INT16 GetTownTrainPtsForCharacter( SOLDIERTYPE *pTrainer, UINT16 *pusMaxPts )
ReducePointsForFatigue( pTrainer, &uiTrainingPts );
// Flugente: our food situation influences our effectiveness
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
ReducePointsForHunger( pTrainer, &uiTrainingPts );
sTotalTrainingPts = (INT16)uiTrainingPts;
@@ -18578,7 +18578,7 @@ UINT8 CalcSoldierNeedForSleep( SOLDIERTYPE *pSoldier )
}
// Flugente: ubNeedForSleep can now be influenced by our food situation
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
FoodNeedForSleepModifiy(pSoldier, &ubNeedForSleep);
return( ubNeedForSleep );
+1 -1
View File
@@ -87,7 +87,7 @@ CHAR16 zString[128];
HandleTownLoyalty();
// Flugente: food update
if ( gGameOptions.fFoodSystem )
if ( UsingFoodSystem() )
HourlyFoodUpdate();
// hourly update of team assignments
+1 -3
View File
@@ -606,9 +606,7 @@ void IniGlobalGameSetting(lua_State *L)
lua_pushboolean(L, gGameUBOptions.fRandomManuelText);
lua_setglobal(L, "UB_RandomManuelText");
#endif
#ifdef JA2UB
//Old
lua_pushinteger(L, BARRETT_UB);
lua_setglobal(L, "itemBARRETT_UB");
@@ -6137,7 +6137,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
INT32 tickspassed = deltaSeconds / NUM_SEC_PER_TACTICAL_TURN;//1 tick is 5 seconds
if ( tickspassed == 0 || !itemStack->exists() ||
!( gGameExternalOptions.fWeaponOverheating || gGameOptions.fFoodSystem ) )
!( gGameExternalOptions.fWeaponOverheating || UsingFoodSystem() ) )
return;
@@ -6188,7 +6188,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
}//end overheating
// ... if it is food and the food system is active ...
if ( gGameOptions.fFoodSystem && Item[ itemStack->usItem ].foodtype > 0 )
if ( UsingFoodSystem() && Item[ itemStack->usItem ].foodtype > 0 )
{
if ( Food[ Item[ itemStack->usItem ].foodtype ].usDecayRate > 0.0f ) // ... if the food can decay...
{
@@ -6210,7 +6210,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
void HandleSectorCooldownFunctions( INT16 sMapX, INT16 sMapY, INT8 sMapZ, std::vector<WORLDITEM>& pWorldItem, UINT32 size, BOOLEAN fWithMinutes, BOOLEAN fUndo )//dnl ch75 271013
{
// if not using overheating or food system, no point in all this
if ( !gGameExternalOptions.fWeaponOverheating && !gGameOptions.fFoodSystem )
if ( !gGameExternalOptions.fWeaponOverheating && !UsingFoodSystem() )
return;
UINT32 tickspassed = 1;
+2 -2
View File
@@ -2360,7 +2360,7 @@ void DrawCharStats( INT16 sCharNum )
swprintf( sString, L"%d", pSoldier->stats.bStrength + pSoldier->bExtraStrength );
// SANDRO - if damaged stat we could regain, show in red until repaired
if ( ( gGameOptions.fNewTraitSystem && ( pSoldier->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0 )) || (gGameOptions.fFoodSystem && pSoldier->usStarveDamageStrength > 0) )
if ( ( gGameOptions.fNewTraitSystem && ( pSoldier->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0 )) || ( UsingFoodSystem() && pSoldier->usStarveDamageStrength > 0) )
{
SetFontForeground( FONT_RED );
}
@@ -9628,7 +9628,7 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
return;
}
if(gGameOptions.fInventoryCostsAP && (gTacticalStatus.uiFlags & INCOMBAT))//dnl ch66 070913 if fInventoryCostsAP is set and we are in combat then moving equipment in strategic screen is not allowed
if ( UsingInventoryCostsAPSystem() && (gTacticalStatus.uiFlags & INCOMBAT))//dnl ch66 070913 if fInventoryCostsAP is set and we are in combat then moving equipment in strategic screen is not allowed
return;
// make sure we're here legally