Refresh rate option
This commit is contained in:
1 parent
6ecf094755
commit
53305073c1
1 file changed
+17
-14
+17
-14
@@ -858,7 +858,8 @@ local function RecipeCrunchCoroutine()
|
|||||||
EID.RefreshBagTextbox = true
|
EID.RefreshBagTextbox = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function EID:handleBagOfCraftingRendering()
|
-- Called 60 times a second so we can read input properly
|
||||||
|
function EID:handleBagOfCraftingUpdating()
|
||||||
-- reset our calculated recipes when the game seed changes
|
-- reset our calculated recipes when the game seed changes
|
||||||
local curSeed = game:GetSeeds():GetStartSeed()
|
local curSeed = game:GetSeeds():GetStartSeed()
|
||||||
if (curSeed ~= lastSeedUsed) then
|
if (curSeed ~= lastSeedUsed) then
|
||||||
@@ -875,10 +876,6 @@ function EID:handleBagOfCraftingRendering()
|
|||||||
detectBagContentShift()
|
detectBagContentShift()
|
||||||
if EID.GameRenderCount % 2 == 0 then checkForPickups() end
|
if EID.GameRenderCount % 2 == 0 then checkForPickups() end
|
||||||
|
|
||||||
-- load the function we need for Show Recipes as Groups / 8 Icons
|
|
||||||
local tableToCraftingIconsFunc = EID.tableToCraftingIconsMerged
|
|
||||||
if EID.Config["BagOfCraftingDisplayIcons"] then tableToCraftingIconsFunc = EID.tableToCraftingIconsFull end
|
|
||||||
|
|
||||||
-- 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
|
||||||
@@ -889,22 +886,24 @@ function EID:handleBagOfCraftingRendering()
|
|||||||
showCraftingResult = not showCraftingResult
|
showCraftingResult = not showCraftingResult
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Called when needed based on EID.Config["RefreshRate"]
|
||||||
|
function EID:handleBagOfCraftingRendering()
|
||||||
-- 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 ((EID.isHidden or craftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
||||||
return
|
return false
|
||||||
|
elseif not EID:RefreshThisFrame() then
|
||||||
|
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
|
||||||
return
|
return false
|
||||||
end
|
end
|
||||||
end
|
elseif EID.Config["DisplayBagOfCrafting"] == "never" then
|
||||||
if EID.Config["DisplayBagOfCrafting"] == "never" then
|
|
||||||
return false
|
return false
|
||||||
end
|
elseif EID.Config["DisplayBagOfCrafting"] == "hold" and not string.find(EID.bagPlayer:GetSprite():GetAnimation(), "PickupWalk") then
|
||||||
if EID.Config["DisplayBagOfCrafting"] == "hold" and not string.find(EID.bagPlayer:GetSprite():GetAnimation(), "PickupWalk") then
|
|
||||||
return false
|
return false
|
||||||
end
|
elseif game:GetRoom():GetFrameCount() < 2 then
|
||||||
if game:GetRoom():GetFrameCount() < 2 then
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -981,6 +980,10 @@ function EID:handleBagOfCraftingRendering()
|
|||||||
local customDescObj = EID:getDescriptionObj(5, 100, 710)
|
local customDescObj = EID:getDescriptionObj(5, 100, 710)
|
||||||
customDescObj.Description = ""
|
customDescObj.Description = ""
|
||||||
|
|
||||||
|
-- load the function we need for Show Recipes as Groups / 8 Icons
|
||||||
|
local tableToCraftingIconsFunc = EID.tableToCraftingIconsMerged
|
||||||
|
if EID.Config["BagOfCraftingDisplayIcons"] then tableToCraftingIconsFunc = EID.tableToCraftingIconsFull end
|
||||||
|
|
||||||
-- Pickups Only / No Recipes Mode display
|
-- Pickups Only / No Recipes Mode display
|
||||||
if EID.Config["BagOfCraftingDisplayMode"] == "Pickups Only" then
|
if EID.Config["BagOfCraftingDisplayMode"] == "Pickups Only" then
|
||||||
EID:appendToDescription(customDescObj, getHotkeyString())
|
EID:appendToDescription(customDescObj, getHotkeyString())
|
||||||
|
|||||||
Reference in new issue
Block a user