Added function to get objectnames by id
This commit is contained in:
1 parent
b0b52a3858
commit
f4efb1b3c5
2 files changed
+30
-21
No files matched your search
+20
-1
@@ -66,7 +66,7 @@ EID.TRANSFORMATION = {
|
||||
["SUPERBUM"] = 11
|
||||
}
|
||||
|
||||
-- List of item Types
|
||||
-- List of item Types
|
||||
EID.ItemTypeAnm2Names = {
|
||||
"null", -- 1
|
||||
"passive", -- 2
|
||||
@@ -110,6 +110,25 @@ function EID:getTransformation(id)
|
||||
return str
|
||||
end
|
||||
|
||||
-- tries to get the ingame name of an item based on its ID
|
||||
function EID:getObjectName(objID, objType)
|
||||
if objType == "collectible" then
|
||||
return EID.itemConfig:GetCollectible(objID).Name
|
||||
elseif objType == "trinket" then
|
||||
return EID.itemConfig:GetTrinket(objID).Name
|
||||
elseif objType == "card" then
|
||||
return EID.itemConfig:GetCard(objID).Name
|
||||
elseif objType == "pill" then
|
||||
return EID.itemConfig:GetPillEffect(objID).Name
|
||||
elseif objType == "sacrifice" then
|
||||
return sacrificeDescriptionHeader
|
||||
elseif objType == "dice" then
|
||||
return diceDescriptionHeader
|
||||
elseif objType == "custom" then
|
||||
return objID
|
||||
end
|
||||
end
|
||||
|
||||
-- check if an entity is part of the describable entities
|
||||
function EID:hasDescription(entity)
|
||||
local isAllowed = false
|
||||
|
||||
Reference in new issue
Block a user