Simplified rework foodsystem allowed items

simplified the previous commit, now no more need for a tag
when checking IsItemLegal for Food System, ontop of checking for foodpoints, now also check if is drug
as a result, as previously, all eatable food will be excluded without food system, but now only if it isn't a drug at the same time
and no more tag to check for that in items.xml needed
This commit is contained in:
kitty624
2024-12-17 13:13:37 +01:00
parent 28a51e0e7b
commit 0bd932f20f
4 changed files with 7 additions and 18 deletions
-7
View File
@@ -1592,12 +1592,6 @@ itemEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curItem.iTransportGroupMaxProgress = (INT8)atoi(pData->szCharData);
}
else if (strcmp(name, "FoodSystemExclusive") == 0)
{
pData->curElement = ELEMENT;
if ((BOOLEAN)atol(pData->szCharData))
pData->curItem.usItemFlag2 |= ITEM_FoodSystemExclusive;
}
--pData->maxReadDepth;
}
@@ -2231,7 +2225,6 @@ BOOLEAN WriteItemStats()
if (ItemProvidesRobotNightvision(cnt)) FilePrintf(hFile, "\t\t<ProvidesRobotNightVision>%d</ProvidesRobotNightVision>\r\n", 1);
if (ItemProvidesRobotLaserBonus(cnt)) FilePrintf(hFile, "\t\t<ProvidesRobotLaserBonus>%d</ProvidesRobotLaserBonus>\r\n", 1);
if (ItemIsOnlyInDisease(cnt)) FilePrintf(hFile, "\t\t<DiseaseSystemExclusive>%d</DiseaseSystemExclusive>\r\n", 1);
if (ItemIsOnlyInFood(cnt)) FilePrintf(hFile, "\t\t<FoodSystemExclusive>%d</FoodSystemExclusive>\r\n", 1);
FilePrintf(hFile,"\t</ITEM>\r\n");
}