From 34b7c2a8dcc22ce694e27c67f16abe320d324fcc Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 8 Oct 2023 15:59:57 +0200 Subject: [PATCH] Fixed custom pickups with subtype 0 be allowed to have a description --- eid_api.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eid_api.lua b/eid_api.lua index e0b2f799..1436bc7b 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -665,6 +665,10 @@ function EID:hasDescription(entity) isAllowed = isAllowed or entity:GetData() and type(entity:GetData()["EID_Description"]) ~= type(nil) end if entity.Type == EntityType.ENTITY_PICKUP then + if entity.SubType == 0 and EID:getDescriptionData(entity.Type, entity.Variant, entity.SubType) ~= nil then + -- allow pickups with subtype 0 to have a description, if its explictly defined + return true + end isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE and EID.Config["DisplayItemInfo"]) isAllowed = isAllowed or (entity.Variant == 110 and entity:GetSprite():IsPlaying("Idle") and EID.Config["DisplayItemInfo"]) -- Broken Shovel isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TRINKET and EID.Config["DisplayTrinketInfo"])