Fixed Horsepill descriptions and icon not working
This commit is contained in:
1 parent
f7b72ba35a
commit
711667e8c1
2 files changed
+9
-2
No files matched your search
+1
-1
@@ -355,7 +355,7 @@ function EID:getDescriptionData(Type, Variant, SubType)
|
|||||||
local fullString = Type.."."..Variant
|
local fullString = Type.."."..Variant
|
||||||
local adjustedID = EID:getAdjustedSubtype(Type, Variant, SubType)
|
local adjustedID = EID:getAdjustedSubtype(Type, Variant, SubType)
|
||||||
local moddedDesc = EID:getDescriptionEntry("custom", fullString.."."..adjustedID)
|
local moddedDesc = EID:getDescriptionEntry("custom", fullString.."."..adjustedID)
|
||||||
local tableName = EID:getTableName(Type, Variant, adjustedID)
|
local tableName = EID:getTableName(Type, Variant, SubType)
|
||||||
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, adjustedID)
|
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, adjustedID)
|
||||||
local defaultDesc = EID:getDescriptionEntry(tableName, adjustedID)
|
local defaultDesc = EID:getDescriptionEntry(tableName, adjustedID)
|
||||||
|
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ function EID:printDescription(desc)
|
|||||||
local offsetX = 0
|
local offsetX = 0
|
||||||
if EID.Config["ShowItemIcon"] then
|
if EID.Config["ShowItemIcon"] then
|
||||||
local iconType = nil
|
local iconType = nil
|
||||||
|
local subType = desc.ObjSubType
|
||||||
if desc.ObjType == 5 then
|
if desc.ObjType == 5 then
|
||||||
if desc.ObjVariant == 100 then
|
if desc.ObjVariant == 100 then
|
||||||
iconType = "Collectible"
|
iconType = "Collectible"
|
||||||
@@ -237,12 +238,15 @@ function EID:printDescription(desc)
|
|||||||
iconType = "Card"
|
iconType = "Card"
|
||||||
elseif desc.ObjVariant == 70 then
|
elseif desc.ObjVariant == 70 then
|
||||||
iconType = "Pill"
|
iconType = "Pill"
|
||||||
|
if subType >= 2049 then
|
||||||
|
subType = subType - 2048
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if iconType ~= nil then
|
if iconType ~= nil then
|
||||||
offsetX = offsetX + 14
|
offsetX = offsetX + 14
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
"{{" .. iconType .. desc.ObjSubType .. "}}",
|
"{{" .. iconType .. subType .. "}}",
|
||||||
renderPos + (Vector(-3, -4) * EID.Config["Scale"]),
|
renderPos + (Vector(-3, -4) * EID.Config["Scale"]),
|
||||||
textScale,
|
textScale,
|
||||||
EID:getNameColor()
|
EID:getNameColor()
|
||||||
@@ -699,6 +703,9 @@ local function onRender(t)
|
|||||||
local descEntry = EID:getDescriptionObj(closest.Type, closest.Variant, pillColor)
|
local descEntry = EID:getDescriptionObj(closest.Type, closest.Variant, pillColor)
|
||||||
EID:printDescription(descEntry)
|
EID:printDescription(descEntry)
|
||||||
else
|
else
|
||||||
|
if pillColor >= 2049 then
|
||||||
|
pillColor = pillColor - 2048
|
||||||
|
end
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
"{{Pill"..pillColor.."}} "..EID:getDescriptionEntry("unidentifiedPill"),
|
"{{Pill"..pillColor.."}} "..EID:getDescriptionEntry("unidentifiedPill"),
|
||||||
EID:getTextPosition(),
|
EID:getTextPosition(),
|
||||||
|
|||||||
Reference in new issue
Block a user