mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -98,6 +98,8 @@ void InitAssignmentDataArray( facilitytypeParseData *pData )
|
||||
pData->curAssignmentData.usMineIncomeModifier = 100;
|
||||
pData->curAssignmentData.fOnlyLocalMineAffected = 0;
|
||||
|
||||
pData->curAssignmentData.sCantinaFoodModifier = 100;
|
||||
|
||||
pData->curAssignmentData.ubMaximumBreath = 100;
|
||||
pData->curAssignmentData.ubMaximumMorale = 100;
|
||||
|
||||
@@ -217,7 +219,8 @@ facilitytypeStartElementHandle(void *userData, const XML_Char *name, const XML_C
|
||||
strcmp(name, "fCountEnemiesInCities") == 0 ||
|
||||
strcmp(name, "sSkyriderCostModifier") == 0 ||
|
||||
strcmp(name, "usMineIncomeModifier") == 0 ||
|
||||
strcmp(name, "fOnlyLocalMineAffected") == 0 ))
|
||||
strcmp(name, "fOnlyLocalMineAffected") == 0 ||
|
||||
strcmp(name, "sCantinaFoodModifier") == 0 ))
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_ASSIGNMENT_ELEMENT;
|
||||
|
||||
@@ -449,6 +452,8 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
gFacilityTypes[pData->curIndex].AssignmentData[cnt].usMineIncomeModifier = pData->curFacilityTypeData.AssignmentData[cnt].usMineIncomeModifier;
|
||||
gFacilityTypes[pData->curIndex].AssignmentData[cnt].fOnlyLocalMineAffected = pData->curFacilityTypeData.AssignmentData[cnt].fOnlyLocalMineAffected;
|
||||
|
||||
gFacilityTypes[pData->curIndex].AssignmentData[cnt].sCantinaFoodModifier = pData->curFacilityTypeData.AssignmentData[cnt].sCantinaFoodModifier;
|
||||
|
||||
// Conditions
|
||||
gFacilityTypes[pData->curIndex].AssignmentData[cnt].ubMinimumStrength = pData->curFacilityTypeData.AssignmentData[cnt].ubMinimumStrength;
|
||||
gFacilityTypes[pData->curIndex].AssignmentData[cnt].ubMinimumAgility = pData->curFacilityTypeData.AssignmentData[cnt].ubMinimumAgility;
|
||||
@@ -587,6 +592,8 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curFacilityTypeData.AssignmentData[pData->curAssignmentType].usMineIncomeModifier = pData->curAssignmentData.usMineIncomeModifier;
|
||||
pData->curFacilityTypeData.AssignmentData[pData->curAssignmentType].fOnlyLocalMineAffected = pData->curAssignmentData.fOnlyLocalMineAffected;
|
||||
|
||||
pData->curFacilityTypeData.AssignmentData[pData->curAssignmentType].sCantinaFoodModifier = pData->curAssignmentData.sCantinaFoodModifier;
|
||||
|
||||
pData->curFacilityTypeData.AssignmentData[pData->curAssignmentType].ubMaximumBreath = pData->curAssignmentData.ubMaximumBreath;
|
||||
pData->curFacilityTypeData.AssignmentData[pData->curAssignmentType].ubMaximumMorale = pData->curAssignmentData.ubMaximumMorale;
|
||||
|
||||
@@ -648,6 +655,11 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
//pData->curAssignmentType = (INT16) atol(pData->szCharData);
|
||||
pData->curAssignmentType = FAC_STAFF;
|
||||
}
|
||||
else if (strcmp(pData->szCharData, "FACILITY_EAT") == 0)
|
||||
{
|
||||
//pData->curAssignmentType = (INT16) atol(pData->szCharData);
|
||||
pData->curAssignmentType = FAC_FOOD;
|
||||
}
|
||||
else if (strcmp(pData->szCharData, "REST") == 0)
|
||||
{
|
||||
//pData->curAssignmentType = (INT16) atol(pData->szCharData);
|
||||
@@ -811,7 +823,7 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
{
|
||||
//pData->curAssignmentType = (INT16) atol(pData->szCharData);
|
||||
pData->curAssignmentType = FAC_STUDENT_EXPLOSIVES;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CHAR16 sErrorString[256];
|
||||
@@ -930,6 +942,12 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curAssignmentData.fOnlyLocalMineAffected = (BOOLEAN) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
else if(strcmp(name, "sCantinaFoodModifier") == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_ASSIGNMENT;
|
||||
pData->curAssignmentData.sCantinaFoodModifier = (UINT16) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Conditions for assignment
|
||||
|
||||
|
||||
Reference in New Issue
Block a user