Added support for Flip Items

This commit is contained in:
Wofsauge committed 2022-01-12 23:35:52 +01:00
1 parent 2bf625962b
commit 4f9040e8c5
3 files changed
+146 -30

No files matched your search

+9 -1
View File
@@ -297,15 +297,23 @@ function EID:appendToDescription(descObj, appendString)
descObj.Description = descObj.Description..appendString
end
-- returns the description object of a specific entity
-- falls back to english if the objID isnt available
function EID:getDescriptionObjByEntity(entity)
return EID:getDescriptionObj(entity.Type, entity.Variant, entity.SubType, entity)
end
-- returns the description object of the specified entity
-- falls back to english if the objID isnt available
function EID:getDescriptionObj(Type, Variant, SubType)
-- entity is optional
function EID:getDescriptionObj(Type, Variant, SubType, entity)
local description = {}
description.ObjType = Type
description.ObjVariant = Variant
description.ObjSubType = SubType
description.fullItemString = Type.."."..Variant.."."..description.ObjSubType
description.Name = EID:getObjectName(Type, Variant, description.ObjSubType)
description.Entity = entity or nil
local tableEntry = EID:getDescriptionData(Type, Variant, description.ObjSubType)
description.Description = tableEntry and tableEntry[3] or EID:getXMLDescription(Type, Variant, description.ObjSubType)