Fixed some issues relating to custom descriptions
This commit is contained in:
1 parent
f4efb1b3c5
commit
c1fe8f2697
3 files changed
+38
-19
No files matched your search
+14
-2
@@ -102,14 +102,26 @@ function EID:getModDescription(list, id)
|
||||
end
|
||||
|
||||
--Get the name of the given transformation by its ID
|
||||
function EID:getTransformation(id)
|
||||
function EID:getTransformationName(id)
|
||||
local str = "Custom"
|
||||
if (tonumber(id) <= #transformations - 1) then
|
||||
if tonumber(id) == nil then
|
||||
return id
|
||||
elseif EID:isVanillaTransformationID(id) then
|
||||
return transformations[tonumber(id) + 1]
|
||||
end
|
||||
return str
|
||||
end
|
||||
|
||||
--Returns true, if the transformation has a vanilla icon
|
||||
function EID:isVanillaTransformationID(id)
|
||||
if tonumber(id) ~= nil then
|
||||
if (tonumber(id) <= #transformations - 1) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- tries to get the ingame name of an item based on its ID
|
||||
function EID:getObjectName(objID, objType)
|
||||
if objType == "collectible" then
|
||||
|
||||
Reference in new issue
Block a user