- new feature: load screen hints can now be defined in TableData/LoadScreenHints.xml. This feature requires GameDir revision >= 1655

- added safety checks for automatic feeding of POWs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6022 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-04-24 21:10:36 +00:00
parent 79874daf97
commit 1e69c3a964
12 changed files with 140 additions and 3 deletions
+2 -2
View File
@@ -535,8 +535,8 @@ void HourlyFoodAutoDigestion( SOLDIERTYPE *pSoldier )
// if we're a prisoner, we can't feed ourself, and the player can't do that either. Instead the army provides food (not much and of bad quality)
if (pSoldier->bAssignment == ASSIGNMENT_POW)
{
INT16 powwater = gGameExternalOptions.usFoodDigestionHourlyBaseDrink * FOOD_POW_MULTIPLICATOR;
INT16 powfoodadd = powwater * gGameExternalOptions.usFoodDigestionHourlyBaseFood / gGameExternalOptions.usFoodDigestionHourlyBaseDrink;
INT16 powwater = gGameExternalOptions.usFoodDigestionHourlyBaseDrink * gGameExternalOptions.sFoodDigestionAssignment * FOOD_POW_MULTIPLICATOR;
INT16 powfoodadd = powwater * gGameExternalOptions.usFoodDigestionHourlyBaseFood / max(1, gGameExternalOptions.usFoodDigestionHourlyBaseDrink);
// if we're thirsty or hungry, and this is nutritious, consume it
if ( pSoldier->bDrinkLevel < FoodMoraleMods[FOOD_VERY_LOW].bThreshold )
+4
View File
@@ -1112,6 +1112,10 @@
RelativePath=".\XML_LoadBearingEquipment.cpp"
>
</File>
<File
RelativePath=".\XML_LoadScreenHints.cpp"
>
</File>
<File
RelativePath=".\XML_Magazine.cpp"
>
+3
View File
@@ -1113,6 +1113,9 @@
<File
RelativePath="XML_LoadBearingEquipment.cpp"
>
<File
RelativePath="XML_LoadScreenHints.cpp"
>
</File>
<File
RelativePath="XML_Magazine.cpp"
+1
View File
@@ -217,6 +217,7 @@
<ClCompile Include="XML_LBEPocket.cpp" />
<ClCompile Include="XML_LBEPocketPopup.cpp" />
<ClCompile Include="XML_LoadBearingEquipment.cpp" />
<ClCompile Include="XML_LoadScreenHints.cpp" />
<ClCompile Include="XML_Magazine.cpp" />
<ClCompile Include="XML_Merchants.cpp" />
<ClCompile Include="XML_MercStartingGear.cpp" />
+3
View File
@@ -638,5 +638,8 @@
<ClCompile Include="XML_Merchants.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_LoadScreenHints.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+5
View File
@@ -218,6 +218,7 @@ typedef PARSE_STAGE;
#define MERCAVAILABILITY "MercAvailability.xml"
#define MERCOPINIONSFILENAME "MercOpinions.xml"
#define MERCPROFILESFILENAME "MercProfiles.xml"
#define LOADSCREENHINTSFILENAME "LoadScreenHints.xml"
#ifdef JA2UB
#define MERCPROFILESFILENAME25 "MercProfiles25.xml"
@@ -302,6 +303,10 @@ extern BOOLEAN WriteRandomItemStats();
extern BOOLEAN ReadInSquadNamesStats(STR fileName);
extern BOOLEAN WriteSquadNamesStats();
// Flugente: loadscreen hints
extern BOOLEAN ReadInLoadScreenHints(STR fileName);
extern BOOLEAN WriteLoadScreenHints();
extern BOOLEAN ReadInAmmoStats(STR fileName);
extern BOOLEAN WriteAmmoStats();