From 2d7d2d3c3eb254b5f2489f936efe9769bb15efb7 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 13 Mar 2022 01:24:50 -0500 Subject: [PATCH] Fix chinese golden pill bug --- eid_api.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index 8397a190..6f01325e 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -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 elseif tableName == "pills" or tableName == "horsepills" then local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType) - local vanillaName = nil - -- fix Gold Pill bug - if EID.itemConfig:GetPillEffect(adjustedSubtype - 1) then + local vanillaName = "" + if adjustedSubtype == 9999 then + vanillaName = "Golden Pill" -- only used for languages that haven't defined a Golden Pill name + else vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name end name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][adjustedSubtype][2] or vanillaName