Prevent mod items starting with # breaking things

This commit is contained in:
Buurazu authored and GitHub committed 2022-05-31 23:07:31 -04:00
1 parent dba6ce374b
commit 06c6d81cb5
1 file changed
+1 -1
+1 -1
View File
@@ -500,7 +500,7 @@ function EID:getObjectName(Type, Variant, SubType)
if tableName == "collectibles" then
if EID.itemConfig:GetCollectible(SubType) == nil then return Type.."."..Variant.."."..SubType end
local vanillaName = EID.itemConfig:GetCollectible(SubType).Name
return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName
return name or (not string.find(vanillaName, "^#") and vanillaName) or (EID.descriptions["en_us"][tableName][SubType] and EID.descriptions["en_us"][tableName][SubType][2]) or vanillaName
elseif tableName == "trinkets" then
local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType)
local vanillaName = EID.itemConfig:GetTrinket(adjustedSubtype).Name