BoC CraftingIsHidden and ShowCraftingResult variables are now part of the global EID table
This commit is contained in:
1 parent
c3c8710617
commit
1fb5c302c7
1 file changed
+7
-7
@@ -680,8 +680,8 @@ local downHeld = 0
|
|||||||
local upHeld = 0
|
local upHeld = 0
|
||||||
local resetBagCounter = 0
|
local resetBagCounter = 0
|
||||||
|
|
||||||
local craftingIsHidden = false
|
EID.CraftingIsHidden = false
|
||||||
local showCraftingResult = false
|
EID.ShowCraftingResult = false
|
||||||
|
|
||||||
local prevDesc = ""
|
local prevDesc = ""
|
||||||
|
|
||||||
@@ -937,11 +937,11 @@ function EID:handleBagOfCraftingUpdating()
|
|||||||
-- Check for Hide/Preview hotkeys; prevent them from triggering while in MCM
|
-- Check for Hide/Preview hotkeys; prevent them from triggering while in MCM
|
||||||
if not ModConfigMenu or not ModConfigMenu.IsVisible then
|
if not ModConfigMenu or not ModConfigMenu.IsVisible then
|
||||||
if Input.IsButtonTriggered(EID.Config["CraftingHideKey"], 0) or Input.IsButtonTriggered(EID.Config["CraftingHideButton"], EID.bagPlayer.ControllerIndex) then
|
if Input.IsButtonTriggered(EID.Config["CraftingHideKey"], 0) or Input.IsButtonTriggered(EID.Config["CraftingHideButton"], EID.bagPlayer.ControllerIndex) then
|
||||||
craftingIsHidden = not craftingIsHidden
|
EID.CraftingIsHidden = not EID.CraftingIsHidden
|
||||||
end
|
end
|
||||||
|
|
||||||
if Input.IsButtonTriggered(EID.Config["CraftingResultKey"], 0) or Input.IsButtonTriggered(EID.Config["CraftingResultButton"], EID.bagPlayer.ControllerIndex) then
|
if Input.IsButtonTriggered(EID.Config["CraftingResultKey"], 0) or Input.IsButtonTriggered(EID.Config["CraftingResultButton"], EID.bagPlayer.ControllerIndex) then
|
||||||
showCraftingResult = not showCraftingResult
|
EID.ShowCraftingResult = not EID.ShowCraftingResult
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -997,7 +997,7 @@ function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
displayingRecipeList = false
|
displayingRecipeList = false
|
||||||
if ((EID.isHidden or craftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
if ((EID.isHidden or EID.CraftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
||||||
return false
|
return false
|
||||||
elseif EID.Config["BagOfCraftingHideInBattle"] and (Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0) then
|
elseif EID.Config["BagOfCraftingHideInBattle"] and (Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0) then
|
||||||
return false
|
return false
|
||||||
@@ -1011,9 +1011,9 @@ function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
|||||||
|
|
||||||
local bagItems = EID.BoC.BagItemsOverride or EID.BoC.BagItems
|
local bagItems = EID.BoC.BagItemsOverride or EID.BoC.BagItems
|
||||||
-- Display the result of the 8 items in our bag if applicable
|
-- Display the result of the 8 items in our bag if applicable
|
||||||
if (showCraftingResult or EID.Config["BagOfCraftingDisplayRecipesMode"] == "Preview Only") and #bagItems == 8 then
|
if (EID.ShowCraftingResult or EID.Config["BagOfCraftingDisplayRecipesMode"] == "Preview Only") and #bagItems == 8 then
|
||||||
if EID.Config["BagOfCraftingDisplayRecipesMode"] ~= "Recipe List" and EID:hasCurseBlind() and EID.Config["DisableOnCurse"] then
|
if EID.Config["BagOfCraftingDisplayRecipesMode"] ~= "Recipe List" and EID:hasCurseBlind() and EID.Config["DisableOnCurse"] then
|
||||||
showCraftingResult = false
|
EID.ShowCraftingResult = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local craftingResult = EID:calculateBagOfCrafting(bagItems)
|
local craftingResult = EID:calculateBagOfCrafting(bagItems)
|
||||||
|
|||||||
Reference in new issue
Block a user