fix Golden Pill issues
This commit is contained in:
1 parent
cf99778d5f
commit
58cf71bafc
1 file changed
+6
-2
+6
-2
@@ -371,7 +371,7 @@ function EID:getAdjustedSubtype(Type, Variant, SubType)
|
|||||||
return SubType - 32768
|
return SubType - 32768
|
||||||
end
|
end
|
||||||
elseif tableName == "pills" or tableName == "horsepills" then
|
elseif tableName == "pills" or tableName == "horsepills" then
|
||||||
if SubType == 14 then
|
if SubType % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then
|
||||||
return 9999
|
return 9999
|
||||||
end
|
end
|
||||||
local pool = game:GetItemPool()
|
local pool = game:GetItemPool()
|
||||||
@@ -451,7 +451,11 @@ 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 = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
local vanillaName = nil
|
||||||
|
-- fix Gold Pill bug
|
||||||
|
if EID.itemConfig:GetPillEffect(adjustedSubtype - 1) then
|
||||||
|
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
|
name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][adjustedSubtype][2] or vanillaName
|
||||||
return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger
|
return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger
|
||||||
elseif tableName == "sacrifice" then
|
elseif tableName == "sacrifice" then
|
||||||
|
|||||||
Reference in new issue
Block a user