Improved code readability, descObj variable names and added a function to append to descriptions
This commit is contained in:
1 parent
bd641cb1cc
commit
fb5ef9080a
4 files changed
+71
-58
No files matched your search
+26
-16
@@ -259,7 +259,7 @@ end
|
|||||||
|
|
||||||
-- returns the current text position
|
-- returns the current text position
|
||||||
function EID:getTextPosition()
|
function EID:getTextPosition()
|
||||||
local posVector = Vector(EID.UsedPosition.X,EID.UsedPosition.Y)
|
local posVector = Vector(EID.UsedPosition.X, EID.UsedPosition.Y)
|
||||||
for a,modifier in pairs(EID.PositionModifiers) do
|
for a,modifier in pairs(EID.PositionModifiers) do
|
||||||
posVector = posVector + modifier
|
posVector = posVector + modifier
|
||||||
end
|
end
|
||||||
@@ -289,20 +289,25 @@ function EID:getLastDescribedEntity()
|
|||||||
return EID.lastDescriptionEntity
|
return EID.lastDescriptionEntity
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Appends a given string to the description of a given Description object
|
||||||
|
function EID:appendToDescription(descObj, appendString)
|
||||||
|
descObj.Description = descObj.Description..appendString
|
||||||
|
end
|
||||||
|
|
||||||
-- returns the description object of the specified entity
|
-- returns the description object of the specified entity
|
||||||
-- falls back to english if the objID isnt available
|
-- falls back to english if the objID isnt available
|
||||||
function EID:getDescriptionObj(Type, Variant, SubType)
|
function EID:getDescriptionObj(Type, Variant, SubType)
|
||||||
local description = {}
|
local description = {}
|
||||||
description.ItemType = Type
|
description.ObjType = Type
|
||||||
description.ItemVariant = Variant
|
description.ObjVariant = Variant
|
||||||
description.ID = SubType
|
description.ObjSubType = SubType
|
||||||
description.fullItemString = Type.."."..Variant.."."..description.ID
|
description.fullItemString = Type.."."..Variant.."."..description.ObjSubType
|
||||||
description.Name = EID:getObjectName(Type, Variant, description.ID)
|
description.Name = EID:getObjectName(Type, Variant, description.ObjSubType)
|
||||||
|
|
||||||
local tableEntry = EID:getDescriptionData(Type, Variant, description.ID)
|
local tableEntry = EID:getDescriptionData(Type, Variant, description.ObjSubType)
|
||||||
description.Description = tableEntry and tableEntry[3] or EID:getXMLDescription(Type, Variant, description.ID)
|
description.Description = tableEntry and tableEntry[3] or EID:getXMLDescription(Type, Variant, description.ObjSubType)
|
||||||
|
|
||||||
description.Transformation = EID:getTransformation(Type, Variant, description.ID)
|
description.Transformation = EID:getTransformation(Type, Variant, description.ObjSubType)
|
||||||
|
|
||||||
for k,modifier in pairs(EID.DescModifiers) do
|
for k,modifier in pairs(EID.DescModifiers) do
|
||||||
if modifier.condition(description) then
|
if modifier.condition(description) then
|
||||||
@@ -332,20 +337,24 @@ end
|
|||||||
|
|
||||||
-- returns the specified object table in the current language.
|
-- returns the specified object table in the current language.
|
||||||
-- falls back to english if it doesnt exist
|
-- falls back to english if it doesnt exist
|
||||||
function EID:getDescriptionTable(objTable)
|
function EID:getDescriptionEntry(objTable, objID)
|
||||||
|
if not objID then
|
||||||
return EID.descriptions[EID.Config["Language"]][objTable] or EID.descriptions["en_us"][objTable]
|
return EID.descriptions[EID.Config["Language"]][objTable] or EID.descriptions["en_us"][objTable]
|
||||||
|
else
|
||||||
|
local translatedTable = EID.descriptions[EID.Config["Language"]][objTable]
|
||||||
|
return (translatedTable and translatedTable[objID]) or (EID.descriptions["en_us"][objTable] and EID.descriptions["en_us"][objTable][objID])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- returns the description data table related to a given id, variant and subtype
|
-- returns the description data table related to a given id, variant and subtype
|
||||||
-- falls back to english if it doesnt exist
|
-- falls back to english if it doesnt exist
|
||||||
function EID:getDescriptionData(Type, Variant, SubType)
|
function EID:getDescriptionData(Type, Variant, SubType)
|
||||||
local fullString = Type.."."..Variant
|
local fullString = Type.."."..Variant
|
||||||
local moddedDesc = EID.descriptions[EID.Config["Language"]].custom[fullString.."."..SubType] or
|
local moddedDesc = EID:getDescriptionEntry("custom", fullString.."."..SubType)
|
||||||
EID.descriptions["en_us"].custom[fullString.."."..SubType] or nil
|
|
||||||
local tableName = EID:getTableName(Type, Variant, SubType)
|
local tableName = EID:getTableName(Type, Variant, SubType)
|
||||||
local adjustedID = EID:getAdjustedSubtype(Type, Variant, SubType)
|
local adjustedID = EID:getAdjustedSubtype(Type, Variant, SubType)
|
||||||
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, adjustedID)
|
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, adjustedID)
|
||||||
local defaultDesc = EID.descriptions[EID.Config["Language"]][tableName][adjustedID] or EID.descriptions["en_us"][tableName][adjustedID] or nil
|
local defaultDesc = EID:getDescriptionEntry(tableName, adjustedID)
|
||||||
|
|
||||||
return moddedDesc or legacyModdedDescription or defaultDesc
|
return moddedDesc or legacyModdedDescription or defaultDesc
|
||||||
end
|
end
|
||||||
@@ -406,7 +415,7 @@ function EID:getTransformationName(id)
|
|||||||
end
|
end
|
||||||
return id
|
return id
|
||||||
end
|
end
|
||||||
return EID:getDescriptionTable("transformations")[tonumber(id) + 1] or str
|
return EID:getDescriptionEntry("transformations")[tonumber(id) + 1] or str
|
||||||
end
|
end
|
||||||
|
|
||||||
-- tries to get the ingame name of an item based on its ID
|
-- tries to get the ingame name of an item based on its ID
|
||||||
@@ -430,9 +439,9 @@ function EID:getObjectName(Type, Variant, SubType)
|
|||||||
name = name or EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
name = name or EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
||||||
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
|
||||||
return EID:getDescriptionTable("sacrificeHeader")
|
return EID:getDescriptionEntry("sacrificeHeader")
|
||||||
elseif tableName == "dice" then
|
elseif tableName == "dice" then
|
||||||
return EID:getDescriptionTable("diceHeader")
|
return EID:getDescriptionEntry("diceHeader")
|
||||||
elseif tableName == "custom" then
|
elseif tableName == "custom" then
|
||||||
return name or Type.."."..Variant.."."..SubType
|
return name or Type.."."..Variant.."."..SubType
|
||||||
end
|
end
|
||||||
@@ -452,6 +461,7 @@ function EID:getXMLDescription(Type, Variant, SubType)
|
|||||||
end
|
end
|
||||||
return desc or "(No Description available)"
|
return desc or "(No Description available)"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check if an entity is part of the describable entities
|
-- check if an entity is part of the describable entities
|
||||||
function EID:hasDescription(entity)
|
function EID:hasDescription(entity)
|
||||||
local isAllowed = false
|
local isAllowed = false
|
||||||
|
|||||||
@@ -571,9 +571,9 @@ function EID:handleBagOfCraftingRendering()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local customDescObj = EID:getDescriptionObj(5, 100, 710)
|
local customDescObj = EID:getDescriptionObj(5, 100, 710)
|
||||||
local roomDesc = EID.descriptions[EID.Config["Language"]].CraftingRoomContent or EID.descriptions["en_us"].CraftingRoomContent
|
local roomDesc = EID:getDescriptionEntry("CraftingRoomContent")
|
||||||
local bagContentDesc = EID.descriptions[EID.Config["Language"]].CraftingBagContent or EID.descriptions["en_us"].CraftingBagContent
|
local bagContentDesc = EID:getDescriptionEntry("CraftingBagContent")
|
||||||
local resultDesc = EID.descriptions[EID.Config["Language"]].CraftingResults or EID.descriptions["en_us"].CraftingResults
|
local resultDesc = EID:getDescriptionEntry("CraftingResults")
|
||||||
local bagContentResult = ""
|
local bagContentResult = ""
|
||||||
if #EID.BagItems >= 8 then
|
if #EID.BagItems >= 8 then
|
||||||
local recipe = EID:calculateBagOfCrafting(EID.BagItems)
|
local recipe = EID:calculateBagOfCrafting(EID.BagItems)
|
||||||
|
|||||||
+23
-21
@@ -3,8 +3,9 @@ local game = Game()
|
|||||||
|
|
||||||
-- Handle Birthright
|
-- Handle Birthright
|
||||||
local function BirthrightCondition(descObj)
|
local function BirthrightCondition(descObj)
|
||||||
return descObj.ItemType == 5 and descObj.ItemVariant == PickupVariant.PICKUP_COLLECTIBLE and descObj.ID == 619
|
return descObj.ObjType == 5 and descObj.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE and descObj.ObjSubType == 619
|
||||||
end
|
end
|
||||||
|
|
||||||
local function BirthrightCallback(descObj)
|
local function BirthrightCallback(descObj)
|
||||||
descObj.Description = ""
|
descObj.Description = ""
|
||||||
local describedPlayerTypes = {}
|
local describedPlayerTypes = {}
|
||||||
@@ -13,11 +14,10 @@ local game = Game()
|
|||||||
local playerID = player:GetPlayerType()
|
local playerID = player:GetPlayerType()
|
||||||
if not player:IsSubPlayer() and player:GetMainTwin( ):GetPlayerType() == playerID and not describedPlayerTypes[playerID] then
|
if not player:IsSubPlayer() and player:GetMainTwin( ):GetPlayerType() == playerID and not describedPlayerTypes[playerID] then
|
||||||
describedPlayerTypes[playerID] = true
|
describedPlayerTypes[playerID] = true
|
||||||
local translatedDesc = EID.descriptions[EID.Config["Language"]]["birthright"]
|
local birthrightDesc = EID:getDescriptionEntry("birthright", playerID+1)
|
||||||
local birthrightDesc = (translatedDesc and translatedDesc[playerID+1]) or EID.descriptions["en_us"]["birthright"][playerID+1] or nil
|
|
||||||
if birthrightDesc ~=nil then
|
if birthrightDesc ~=nil then
|
||||||
local playerName = birthrightDesc[1] or player:GetName()
|
local playerName = birthrightDesc[1] or player:GetName()
|
||||||
descObj.Description = descObj.Description.."{{CustomTransformation}} {{ColorGray}}"..playerName.."{{CR}}#"..birthrightDesc[3].."#"
|
EID:appendToDescription(descObj, "{{CustomTransformation}} {{ColorGray}}"..playerName.."{{CR}}#"..birthrightDesc[3].."#")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -29,7 +29,7 @@ local game = Game()
|
|||||||
|
|
||||||
-- Handle Bingeeater description addition
|
-- Handle Bingeeater description addition
|
||||||
local function BingeeaterCondition(descObj)
|
local function BingeeaterCondition(descObj)
|
||||||
if descObj.ItemType ~= 5 or descObj.ItemVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
if descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
for i = 0,game:GetNumPlayers() - 1 do
|
for i = 0,game:GetNumPlayers() - 1 do
|
||||||
@@ -40,12 +40,12 @@ local game = Game()
|
|||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function BingeeaterCallback(descObj)
|
local function BingeeaterCallback(descObj)
|
||||||
local translatedDesc = EID.descriptions[EID.Config["Language"]]["bingeEaterBuffs"]
|
local bingeBuff = EID:getDescriptionEntry("bingeEaterBuffs", descObj.ObjSubType)
|
||||||
local bingeBuff = (translatedDesc and translatedDesc[descObj.ID]) or EID.descriptions["en_us"]["bingeEaterBuffs"][descObj.ID] or nil
|
|
||||||
if bingeBuff ~= nil then
|
if bingeBuff ~= nil then
|
||||||
local bingeStr = "#{{Collectible664}} "
|
local iconStr = "#{{Collectible664}} "
|
||||||
descObj.Description = descObj.Description..bingeStr..bingeBuff[3]:gsub("#",bingeStr)
|
EID:appendToDescription(descObj, iconStr..bingeBuff[3]:gsub("#",iconStr))
|
||||||
end
|
end
|
||||||
return descObj
|
return descObj
|
||||||
end
|
end
|
||||||
@@ -55,7 +55,7 @@ local game = Game()
|
|||||||
|
|
||||||
-- Handle Spindown Dice description addition
|
-- Handle Spindown Dice description addition
|
||||||
local function SpindownDiceCondition(descObj)
|
local function SpindownDiceCondition(descObj)
|
||||||
if descObj.ItemType ~= 5 or descObj.ItemVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
if descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
for i = 0,game:GetNumPlayers() - 1 do
|
for i = 0,game:GetNumPlayers() - 1 do
|
||||||
@@ -66,20 +66,21 @@ local game = Game()
|
|||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function SpindownDiceCallback(descObj)
|
local function SpindownDiceCallback(descObj)
|
||||||
descObj.Description = descObj.Description.."#{{Collectible723}} :"
|
EID:appendToDescription(descObj, "#{{Collectible723}} :")
|
||||||
local refID = descObj.ID
|
local refID = descObj.ObjSubType
|
||||||
for i = 1,EID.Config["SpindownDiceResults"] do
|
for i = 1,EID.Config["SpindownDiceResults"] do
|
||||||
local spinnedID = EID:getSpindownResult(refID)
|
local spinnedID = EID:getSpindownResult(refID)
|
||||||
refID = spinnedID
|
refID = spinnedID
|
||||||
if spinnedID > 0 then
|
if spinnedID > 0 then
|
||||||
descObj.Description = descObj.Description.."{{Collectible"..spinnedID.."}}"
|
EID:appendToDescription(descObj, "{{Collectible"..spinnedID.."}}")
|
||||||
if i ~= EID.Config["SpindownDiceResults"] then
|
if i ~= EID.Config["SpindownDiceResults"] then
|
||||||
descObj.Description = descObj.Description.." ->"
|
EID:appendToDescription(descObj, " ->")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local errorMsg = EID.descriptions[EID.Config["Language"]]["spindownError"] or EID.descriptions["en_us"]["spindownError"] or nil
|
local errorMsg = EID:getDescriptionEntry("spindownError") or ""
|
||||||
descObj.Description = descObj.Description..errorMsg
|
EID:appendToDescription(descObj, errorMsg)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -88,9 +89,10 @@ local game = Game()
|
|||||||
EID:addDescriptionModifier("Spindown Dice", SpindownDiceCondition, SpindownDiceCallback)
|
EID:addDescriptionModifier("Spindown Dice", SpindownDiceCondition, SpindownDiceCallback)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Handle Tarot Cloth description addition
|
-- Handle Tarot Cloth description addition
|
||||||
local function TarotClothCondition(descObj)
|
local function TarotClothCondition(descObj)
|
||||||
if descObj.ItemType ~= 5 or descObj.ItemVariant ~= PickupVariant.PICKUP_TAROTCARD then
|
if descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_TAROTCARD then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
for i = 0,game:GetNumPlayers() - 1 do
|
for i = 0,game:GetNumPlayers() - 1 do
|
||||||
@@ -101,12 +103,12 @@ local game = Game()
|
|||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function TarotClothCallback(descObj)
|
local function TarotClothCallback(descObj)
|
||||||
local translatedDesc = EID.descriptions[EID.Config["Language"]]["tarotClothBuffs"] or EID.descriptions["en_us"]["tarotClothBuffs"]
|
local clothBuff = EID:getDescriptionEntry("tarotClothBuffs", descObj.ObjSubType)
|
||||||
local clothBuff = (translatedDesc and translatedDesc[descObj.ID]) or ( translatedDesc and translatedDesc[descObj.ID]) or nil
|
|
||||||
if clothBuff ~= nil then
|
if clothBuff ~= nil then
|
||||||
local bingeStr = "#{{Collectible451}} "
|
local iconStr = "#{{Collectible451}} "
|
||||||
descObj.Description = descObj.Description..bingeStr..clothBuff[3]:gsub("#",bingeStr)
|
EID:appendToDescription(descObj, iconStr..clothBuff[3]:gsub("#",iconStr))
|
||||||
end
|
end
|
||||||
return descObj
|
return descObj
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -211,27 +211,24 @@ end
|
|||||||
function EID:printDescription(desc)
|
function EID:printDescription(desc)
|
||||||
local textScale = Vector(EID.Config["Scale"], EID.Config["Scale"])
|
local textScale = Vector(EID.Config["Scale"], EID.Config["Scale"])
|
||||||
local renderPos = EID:getTextPosition()
|
local renderPos = EID:getTextPosition()
|
||||||
local itemType = -1
|
|
||||||
if tonumber(desc.ID) ~= nil and desc.ItemType == 5 and desc.ItemVariant == 100 then
|
|
||||||
itemType = EID.itemConfig:GetCollectible(tonumber(desc.ID)).Type or -1
|
|
||||||
end
|
|
||||||
local offsetX = 0
|
local offsetX = 0
|
||||||
if EID.Config["ShowItemIcon"] then
|
if EID.Config["ShowItemIcon"] then
|
||||||
local iconType = nil
|
local iconType = nil
|
||||||
local renderID = desc.ID
|
if desc.ObjType == 5 then
|
||||||
if desc.ItemType == 5 and desc.ItemVariant == 100 then
|
if desc.ObjVariant == 100 then
|
||||||
iconType = "Collectible"
|
iconType = "Collectible"
|
||||||
elseif desc.ItemType == 5 and desc.ItemVariant == 350 then
|
elseif desc.ObjVariant == 350 then
|
||||||
iconType = "Trinket"
|
iconType = "Trinket"
|
||||||
elseif desc.ItemType == 5 and desc.ItemVariant == 300 then
|
elseif desc.ObjVariant == 300 then
|
||||||
iconType = "Card"
|
iconType = "Card"
|
||||||
elseif desc.ItemType == 5 and desc.ItemVariant == 70 then
|
elseif desc.ObjVariant == 70 then
|
||||||
iconType = "Pill"
|
iconType = "Pill"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if iconType ~= nil then
|
if iconType ~= nil then
|
||||||
offsetX = offsetX + 14
|
offsetX = offsetX + 14
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
"{{" .. iconType .. renderID .. "}}",
|
"{{" .. iconType .. desc.ObjSubType .. "}}",
|
||||||
renderPos + (Vector(-3, -4) * EID.Config["Scale"]),
|
renderPos + (Vector(-3, -4) * EID.Config["Scale"]),
|
||||||
textScale,
|
textScale,
|
||||||
EID:getNameColor()
|
EID:getNameColor()
|
||||||
@@ -239,6 +236,10 @@ function EID:printDescription(desc)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
--Display ItemType / Charge
|
--Display ItemType / Charge
|
||||||
|
local itemType = -1
|
||||||
|
if tonumber(desc.ObjSubType) ~= nil and desc.ObjType == 5 and desc.ObjVariant == 100 then
|
||||||
|
itemType = EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Type or -1
|
||||||
|
end
|
||||||
if EID.Config["ShowItemType"] and (itemType == 3 or itemType == 4) then
|
if EID.Config["ShowItemType"] and (itemType == 3 or itemType == 4) then
|
||||||
local offsetY = 2
|
local offsetY = 2
|
||||||
if EID.Config["Scale"] < 1 then
|
if EID.Config["Scale"] < 1 then
|
||||||
@@ -249,11 +250,11 @@ function EID:printDescription(desc)
|
|||||||
if itemType == 3 then
|
if itemType == 3 then
|
||||||
-- Display Charge
|
-- Display Charge
|
||||||
offsetX = offsetX + 1
|
offsetX = offsetX + 1
|
||||||
local curItemConfig = EID.itemConfig:GetCollectible(desc.ID)
|
local curItemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType)
|
||||||
if REPENTANCE and curItemConfig.ChargeType == ItemConfig.CHARGE_TIMED then
|
if REPENTANCE and curItemConfig.ChargeType == ItemConfig.CHARGE_TIMED then
|
||||||
EID.InlineIconSprite2:SetFrame("pickups", 10) -- Timer Icon
|
EID.InlineIconSprite2:SetFrame("pickups", 10) -- Timer Icon
|
||||||
elseif REPENTANCE and (curItemConfig.ChargeType == ItemConfig.CHARGE_SPECIAL or desc.ID == CollectibleType.COLLECTIBLE_BLANK_CARD or desc.ID == CollectibleType.COLLECTIBLE_PLACEBO or
|
elseif REPENTANCE and (curItemConfig.ChargeType == ItemConfig.CHARGE_SPECIAL or desc.ObjSubType == CollectibleType.COLLECTIBLE_BLANK_CARD or desc.ObjSubType == CollectibleType.COLLECTIBLE_PLACEBO or
|
||||||
desc.ID == CollectibleType.COLLECTIBLE_CLEAR_RUNE or desc.ID == CollectibleType.COLLECTIBLE_D_INFINITY) then
|
desc.ObjSubType == CollectibleType.COLLECTIBLE_CLEAR_RUNE or desc.ObjSubType == CollectibleType.COLLECTIBLE_D_INFINITY) then
|
||||||
EID.InlineIconSprite2:SetFrame("numbers", 13)
|
EID.InlineIconSprite2:SetFrame("numbers", 13)
|
||||||
else
|
else
|
||||||
EID.InlineIconSprite2:SetFrame("numbers", curItemConfig.MaxCharges)
|
EID.InlineIconSprite2:SetFrame("numbers", curItemConfig.MaxCharges)
|
||||||
@@ -274,7 +275,7 @@ function EID:printDescription(desc)
|
|||||||
if EID.Config["TranslateItemName"] ~= 2 then
|
if EID.Config["TranslateItemName"] ~= 2 then
|
||||||
local curLanguage = EID.Config["Language"]
|
local curLanguage = EID.Config["Language"]
|
||||||
EID.Config["Language"] = "en_us"
|
EID.Config["Language"] = "en_us"
|
||||||
local englishName = EID:getObjectName(desc.ItemType, desc.ItemVariant, desc.ID)
|
local englishName = EID:getObjectName(desc.ObjType, desc.ObjVariant, desc.ObjSubType)
|
||||||
EID.Config["Language"] = curLanguage
|
EID.Config["Language"] = curLanguage
|
||||||
if EID.Config["TranslateItemName"] == 1 then
|
if EID.Config["TranslateItemName"] == 1 then
|
||||||
curName = englishName
|
curName = englishName
|
||||||
@@ -282,8 +283,8 @@ function EID:printDescription(desc)
|
|||||||
curName = curName.." ("..englishName..")"
|
curName = curName.." ("..englishName..")"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if REPENTANCE and EID.Config["ShowQuality"] and desc.ItemVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
if REPENTANCE and EID.Config["ShowQuality"] and desc.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ID)).Quality)
|
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Quality)
|
||||||
curName = curName.." - {{Quality"..quality.."}}"
|
curName = curName.." - {{Quality"..quality.."}}"
|
||||||
end
|
end
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
@@ -564,7 +565,7 @@ local function onRender(t)
|
|||||||
end
|
end
|
||||||
local descriptionObj = EID:getDescriptionObj(closest.Type, closest.Variant, trinketID)
|
local descriptionObj = EID:getDescriptionObj(closest.Type, closest.Variant, trinketID)
|
||||||
if isGoldenTrinket then
|
if isGoldenTrinket then
|
||||||
local goldenDesc = EID.descriptions[EID.Config["Language"]].goldenTrinket or EID.descriptions["en_us"].goldenTrinket or ""
|
local goldenDesc = EID:getDescriptionEntry("goldenTrinket") or ""
|
||||||
descriptionObj.Description = "{{ColorGold}}"..goldenDesc.."#"..descriptionObj.Description
|
descriptionObj.Description = "{{ColorGold}}"..goldenDesc.."#"..descriptionObj.Description
|
||||||
end
|
end
|
||||||
EID:printDescription(descriptionObj)
|
EID:printDescription(descriptionObj)
|
||||||
@@ -615,7 +616,7 @@ local function onRender(t)
|
|||||||
EID:printDescription(descEntry)
|
EID:printDescription(descEntry)
|
||||||
else
|
else
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
"{{Pill"..pillColor.."}} "..EID:getDescriptionTable("unidentifiedPill"),
|
"{{Pill"..pillColor.."}} "..EID:getDescriptionEntry("unidentifiedPill"),
|
||||||
EID:getTextPosition(),
|
EID:getTextPosition(),
|
||||||
Vector(EID.Config["Scale"], EID.Config["Scale"]),
|
Vector(EID.Config["Scale"], EID.Config["Scale"]),
|
||||||
EID:getErrorColor()
|
EID:getErrorColor()
|
||||||
|
|||||||
Reference in new issue
Block a user