Made Item Quality editable via Modifiers + maybe improved performance
This commit is contained in:
1 parent
e11aabe399
commit
37274dad55
2 files changed
+9
-3
No files matched your search
@@ -350,6 +350,7 @@ function EID:getDescriptionObj(Type, Variant, SubType, entity, checkModifiers)
|
|||||||
description.Transformation = EID:getTransformation(Type, Variant, SubType)
|
description.Transformation = EID:getTransformation(Type, Variant, SubType)
|
||||||
|
|
||||||
description.ModName = tableEntry and tableEntry[4]
|
description.ModName = tableEntry and tableEntry[4]
|
||||||
|
description.Quality = EID:getObjectQuality(description)
|
||||||
|
|
||||||
if checkModifiers ~= false then
|
if checkModifiers ~= false then
|
||||||
for _,modifier in ipairs(EID.DescModifiers) do
|
for _,modifier in ipairs(EID.DescModifiers) do
|
||||||
@@ -1566,3 +1567,9 @@ function EID:evaluateQueuedItems()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EID:getObjectQuality(descObj)
|
||||||
|
if descObj.ObjType == 5 and descObj.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
|
return tonumber(EID.itemConfig:GetCollectible(tonumber(descObj.ObjSubType)).Quality)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -633,9 +633,8 @@ function EID:printDescription(desc, cachedID)
|
|||||||
curName = curName.." {{ColorGray}}"..desc.ObjType.."."..desc.ObjVariant.."."..desc.ObjSubType
|
curName = curName.." {{ColorGray}}"..desc.ObjType.."."..desc.ObjVariant.."."..desc.ObjSubType
|
||||||
end
|
end
|
||||||
-- Display Quality
|
-- Display Quality
|
||||||
if REPENTANCE and EID.Config["ShowQuality"] and desc.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
if EID.Config["ShowQuality"] and desc.Quality then
|
||||||
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Quality)
|
curName = curName.." - {{Quality"..desc.Quality.."}}"
|
||||||
curName = curName.." - {{Quality"..quality.."}}"
|
|
||||||
end
|
end
|
||||||
-- Display the mod this item is from
|
-- Display the mod this item is from
|
||||||
if desc.ModName then
|
if desc.ModName then
|
||||||
|
|||||||
Reference in new issue
Block a user