mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user