mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Reworked foodsystem exclusive items:
no food items if the food system is off whether the item is exclusive is defined by tag in items.xml replaced previous way of decision, which used Item[usItemIndex].foodtype > 0 as criteria that also restricted dual use items (i.e. drugs that also have a foodtype, like coffee, etc.)
This commit is contained in:
@@ -1592,6 +1592,12 @@ 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;
|
||||
}
|
||||
@@ -2225,6 +2231,7 @@ 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