Fixed custom pickups with subtype 0 be allowed to have a description
This commit is contained in:
1 parent
edaf20a48d
commit
34b7c2a8dc
1 file changed
+4
@@ -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"])
|
||||
|
||||
Reference in new issue
Block a user