Update XML_Items.cpp

reworking r9343

- part about food system was obsolete, that was already a thing prior to r9343 (see IsItemLegal)

- disease changed because instead of flag now boolean is used
This commit is contained in:
kitty624
2024-04-15 01:26:50 +02:00
parent e386a66f03
commit 71667aba27
+4 -9
View File
@@ -1515,17 +1515,10 @@ itemEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curItem.fProvidesRobotLaserBonus = (BOOLEAN)atol(pData->szCharData);
}
else if (strcmp(name, "FoodSystemExclusive") == 0)
{
pData->curElement = ELEMENT;
if (atol(pData->szCharData))
pData->curItem.usLimitedToSystem|= FOOD_SYSTEM_FLAG;
}
else if (strcmp(name, "DiseaseSystemExclusive") == 0)
{
pData->curElement = ELEMENT;
if (atol(pData->szCharData))
pData->curItem.usLimitedToSystem|= DISEASE_SYSTEM_FLAG;
pData->curElement = ELEMENT;
pData->curItem.DiseaseSystemExclusive = (BOOLEAN)atol(pData->szCharData);
}
else if (strcmp(name, "TransportGroupMinProgress") == 0)
{
@@ -2194,6 +2187,8 @@ BOOLEAN WriteItemStats()
FilePrintf(hFile,"\t\t<ProvidesRobotNightVision>%d</ProvidesRobotNightVision>\r\n", Item[cnt].fProvidesRobotNightVision );
FilePrintf(hFile,"\t\t<ProvidesRobotLaserBonus>%d</ProvidesRobotLaserBonus>\r\n", Item[cnt].fProvidesRobotLaserBonus );
FilePrintf(hFile, "\t\t<DiseaseSystemExclusive>%d</DiseaseSystemExclusive>\r\n", Item[cnt].DiseaseSystemExclusive);
FilePrintf(hFile,"\t</ITEM>\r\n");
}
FilePrintf(hFile,"</ITEMLIST>\r\n");