Only lock controls if Recipe List is on screen
This commit is contained in:
1 parent
1c00914e02
commit
e11aabe399
1 file changed
+7
-3
@@ -789,6 +789,7 @@ local newResults = {}
|
|||||||
local skipRandom = false
|
local skipRandom = false
|
||||||
local isRefresh = false
|
local isRefresh = false
|
||||||
local queryString = ""
|
local queryString = ""
|
||||||
|
local displayingRecipeList = false
|
||||||
|
|
||||||
local function RecipeCrunchCoroutine()
|
local function RecipeCrunchCoroutine()
|
||||||
coTimer = Isaac.GetTime()
|
coTimer = Isaac.GetTime()
|
||||||
@@ -894,7 +895,7 @@ function EID:handleBagOfCraftingUpdating()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Check for Hold Tab key inputs
|
-- Check for Hold Tab key inputs
|
||||||
if Input.IsActionPressed(EID.Config["BagOfCraftingToggleKey"], EID.bagPlayer.ControllerIndex) then
|
if displayingRecipeList and Input.IsActionPressed(EID.Config["BagOfCraftingToggleKey"], EID.bagPlayer.ControllerIndex) then
|
||||||
EID.bagPlayer.ControlsCooldown = 2
|
EID.bagPlayer.ControlsCooldown = 2
|
||||||
if Input.IsActionTriggered(ButtonAction.ACTION_SHOOTDOWN, EID.bagPlayer.ControllerIndex) then
|
if Input.IsActionTriggered(ButtonAction.ACTION_SHOOTDOWN, EID.bagPlayer.ControllerIndex) then
|
||||||
bagOfCraftingOffset = math.min(numResults-(numResults%EID.Config["BagOfCraftingResults"]), bagOfCraftingOffset + EID.Config["BagOfCraftingResults"])
|
bagOfCraftingOffset = math.min(numResults-(numResults%EID.Config["BagOfCraftingResults"]), bagOfCraftingOffset + EID.Config["BagOfCraftingResults"])
|
||||||
@@ -940,9 +941,11 @@ end
|
|||||||
-- Called when needed based on EID.Config["RefreshRate"]
|
-- Called when needed based on EID.Config["RefreshRate"]
|
||||||
function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
||||||
-- Determine if we should display anything at all
|
-- Determine if we should display anything at all
|
||||||
if ((EID.isHidden or craftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
if not EID:RefreshThisFrame() and not ignoreRefreshRate then
|
||||||
return false
|
return false
|
||||||
elseif not EID:RefreshThisFrame() and not ignoreRefreshRate then
|
end
|
||||||
|
displayingRecipeList = false
|
||||||
|
if ((EID.isHidden or craftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
||||||
return false
|
return false
|
||||||
elseif EID.Config["BagOfCraftingHideInBattle"] then
|
elseif EID.Config["BagOfCraftingHideInBattle"] then
|
||||||
if Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0 then
|
if Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0 then
|
||||||
@@ -1070,6 +1073,7 @@ function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Recipe List display
|
-- Recipe List display
|
||||||
|
displayingRecipeList = true
|
||||||
if sortNeeded then
|
if sortNeeded then
|
||||||
sortAllItems()
|
sortAllItems()
|
||||||
sortNeeded = false
|
sortNeeded = false
|
||||||
|
|||||||
Reference in new issue
Block a user