From b13bcaac7153b99c9157ee4891d18b518ddee679 Mon Sep 17 00:00:00 2001 From: kitty624 <58940527+kitty624@users.noreply.github.com> Date: Mon, 15 Apr 2024 01:33:47 +0200 Subject: [PATCH] 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 --- Tactical/Items.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 6e353552..6e154a04 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -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; }