Co-op mode Hold Tab support
This commit is contained in:
1 parent
2ddb700614
commit
afbc51bd88
1 file changed
+5
-2
+5
-2
@@ -65,6 +65,8 @@ local function TabCallback(descObj)
|
|||||||
EID.inModifierPreview = true
|
EID.inModifierPreview = true
|
||||||
local descEntry = EID:getDescriptionObj(5, 100, EID.TabPreviewID)
|
local descEntry = EID:getDescriptionObj(5, 100, EID.TabPreviewID)
|
||||||
EID.inModifierPreview = false
|
EID.inModifierPreview = false
|
||||||
|
descEntry.Entity = descObj.Entity
|
||||||
|
EID.TabPreviewID = 0
|
||||||
return descEntry
|
return descEntry
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -498,9 +500,10 @@ local function EIDConditionsAB(descObj)
|
|||||||
end
|
end
|
||||||
EID:addDescriptionModifier("EID Afterbirth+", EIDConditionsAB, nil)
|
EID:addDescriptionModifier("EID Afterbirth+", EIDConditionsAB, nil)
|
||||||
|
|
||||||
-- should this be done differently so that mods can add tab previews?
|
-- should this be done differently so that mods can add tab previews? (tab conditions is done last, but would be done before callbacks mods add, maybe tab should be checked in EID:getDescriptionObj
|
||||||
local function TabConditions(descObj)
|
local function TabConditions(descObj)
|
||||||
if EID.player and Input.IsActionPressed(ButtonAction.ACTION_MAP, EID.player.ControllerIndex) and not EID.inModifierPreview then return true end
|
if EID:PlayersActionPressed(ButtonAction.ACTION_MAP) and not EID.inModifierPreview then return true end
|
||||||
|
EID.TabPreviewID = 0
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user