Fix chinese golden pill bug
This commit is contained in:
1 parent
0883d8e19a
commit
2d7d2d3c3e
1 file changed
+4
-3
+4
-3
@@ -506,9 +506,10 @@ function EID:getObjectName(Type, Variant, SubType)
|
|||||||
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][2] or vanillaName
|
||||||
elseif tableName == "pills" or tableName == "horsepills" then
|
elseif tableName == "pills" or tableName == "horsepills" then
|
||||||
local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType)
|
local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType)
|
||||||
local vanillaName = nil
|
local vanillaName = ""
|
||||||
-- fix Gold Pill bug
|
if adjustedSubtype == 9999 then
|
||||||
if EID.itemConfig:GetPillEffect(adjustedSubtype - 1) then
|
vanillaName = "Golden Pill" -- only used for languages that haven't defined a Golden Pill name
|
||||||
|
else
|
||||||
vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
||||||
end
|
end
|
||||||
name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][adjustedSubtype][2] or vanillaName
|
name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][adjustedSubtype][2] or vanillaName
|
||||||
|
|||||||
Reference in new issue
Block a user