Update Items.cpp

reworking r9343

- the part about Food System is obsolete, already was happening in code prior to r9343

- the flags got removed and a boolean is used instead, allowing a simpler function for the remaining disease

- wether an item is considered exclusive to disease feature or not is decided by usage of tag in items.xml
This commit is contained in:
kitty624
2024-04-15 01:33:47 +02:00
parent 71667aba27
commit b13bcaac71
+3 -2
View File
@@ -1279,8 +1279,9 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
return FALSE;
}
//shadooow: exclude also any item that is limited to specific system and this system isn't enabled
if (((Item[usItemIndex].usLimitedToSystem & FOOD_SYSTEM_FLAG) && !UsingFoodSystem()) || ((Item[usItemIndex].usLimitedToSystem & DISEASE_SYSTEM_FLAG) && !gGameExternalOptions.fDisease))
// kitty: no disease items if the disease system is off
// whether the item is exclusive is defined by tag
if (!gGameExternalOptions.fDisease && Item[usItemIndex].DiseaseSystemExclusive)
{
return FALSE;
}