Added toggle button to show Flip item description
This commit is contained in:
1 parent
4f9040e8c5
commit
69eb3b87d5
2 files changed
+17
-8
No files matched your search
+11
-4
@@ -421,10 +421,17 @@ local game = Game()
|
||||
end
|
||||
|
||||
local function FlipCallback(descObj)
|
||||
local text = EID:getEntityData(descObj.Entity, "EID_FlipItemID")
|
||||
if text ~= nil then
|
||||
local itemName = EID:getObjectName(5, 100, text)
|
||||
local appendText = "#{{Collectible711}} -> {{Collectible"..text.."}} "..itemName
|
||||
local flipItemID = EID:getEntityData(descObj.Entity, "EID_FlipItemID")
|
||||
if Input.IsActionPressed(ButtonAction.ACTION_MAP, EID.player.ControllerIndex) then
|
||||
local descEntry = EID:getDescriptionObj(5, 100, flipItemID)
|
||||
return descEntry
|
||||
end
|
||||
|
||||
local infoText = EID:getDescriptionEntry("FlipItemToggleInfo")
|
||||
if flipItemID ~= nil or infoText ~= nil then
|
||||
local itemName = EID:getObjectName(5, 100, flipItemID)
|
||||
local appendText = "#{{Collectible711}} -> {{Collectible"..flipItemID.."}} "..itemName
|
||||
appendText = appendText .. "#"..infoText
|
||||
EID:appendToDescription(descObj, appendText)
|
||||
end
|
||||
return descObj
|
||||
|
||||
Reference in new issue
Block a user