(Repentogon) Improved EID:GlyphOfBalancePrediction() by using Repentogon features
This commit is contained in:
1 parent
1f5e62b1de
commit
c672871ee6
2 files changed
+17
-1
No files matched your search
@@ -408,7 +408,6 @@ function EID:GlyphOfBalancePrediction(player)
|
||||
fullID = "5.10.3"
|
||||
end
|
||||
|
||||
--todo: in REPENTOGON, replace this whole function (in the eid_repentogon lua style)
|
||||
local pickupNames = EID:getDescriptionEntry("PickupNames") or {}
|
||||
return pickupNames[fullID] or EID:GetEntityXMLNameByString(fullID) or fullID
|
||||
end
|
||||
|
||||
@@ -229,3 +229,20 @@ local function RepentogonModifierConditions(descObj)
|
||||
return false
|
||||
end
|
||||
EID:addDescriptionModifier("EID Repentogon", RepentogonModifierConditions, nil)
|
||||
|
||||
--------------------- Predictions ---------------------
|
||||
|
||||
-- Glyph of Balance --
|
||||
-- Override existing function with one that uses Repentogon features
|
||||
function EID:GlyphOfBalancePrediction(player)
|
||||
local dropIDTable = player:GetGlyphOfBalanceDrop(Variant, SubType)
|
||||
|
||||
-- build item string based on return value. Only add SubType, if its not equal 0
|
||||
local fullID = "5.0"
|
||||
if dropIDTable[1] ~= -1 then
|
||||
fullID = "5." .. dropIDTable[1] .. (dropIDTable[2] ~= 0 and ("." .. dropIDTable[2]) or "")
|
||||
end
|
||||
local pickupNames = EID:getDescriptionEntry("PickupNames") or {}
|
||||
return pickupNames[fullID] or EID:GetEntityXMLNameByString(fullID) or fullID
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user