diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index 91173a68..74f3b6f1 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -59,6 +59,7 @@ local repCollectibles={ [155] = {"155", "The Peeper", "Floats around the room#Deals 17.1 contact damage per second#Tears shot from isaacs left eye deal 34% more damage"}, -- The Peeper [158] = {"158", "Crystal Ball", "Reveal full map#Drops random Card or soul heart#While held:#↑ +15% Planetatium chance#100% if a treasure room was skipped"}, -- Crystal Ball [171] = {"171", "Spider Butt", "Slows down enemies for 4 seconds#10 Damage to all enemies#Enemies killed with it spawn blue spiders"}, -- Spider Butt + [172] = {"172", "Sacrificial Dagger", "Orbital knife#Blocks enemy shots#Deals 112.5 damage per second"}, -- Sacrificial Dagger [176] = {"176", "Stem Cells", "↑ +1 Health up#↑ +0.16 Shot Speed up#Heals 1 red heart"}, -- Stem Cells [178] = {"178", "Holy Water", "{{Throwable}} {{ColorOrange}}Throwable{{CR}}#Leaves pool of creep at the thrown location"}, -- Holy Water [182] = {"182", "Sacred Heart", "Homing tears#↑ +1 Health up#↑ 230% + 1 Damage up#↓ -0.4 Tears down#↓ -0.25 Shot Speed down#↑ +0.5 Range up#Full Health"}, -- Sacred Heart @@ -675,3 +676,5 @@ EID.descriptions["en_us"].CraftingFloorContent = "Floor:" EID.descriptions["en_us"].CraftingResults = "(Scroll: hold {{CONFIG_BoC_Toggle}} + {{ButtonY}} {{ButtonA}},#Lock: {{ButtonX}}, Refresh: {{ButtonB}})" EID.descriptions["en_us"].CraftingBagModError = "!!! {{ColorRed}}ERROR:#{{ColorRed}}The \"Crafting result calculation\" feature currently does not work when item mods are installed!#{{ColorRed}}Please uninstall the item mods or deactivate the Bag of Crafting descriptions in the config" +EID.descriptions["en_us"].AchievementWarningTitle = "{{ColorYellow}}!!! WARNING !!!" +EID.descriptions["en_us"].AchievementWarningText = "Achievements are disabled!#In order to enable progression and achievements, you first need to kill Mom (Depths II) without any mods enabled." diff --git a/eid_api.lua b/eid_api.lua index 17feb696..80891061 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -751,23 +751,38 @@ end -- Converts a given CollectibleID into the respective Spindown dice result function EID:getSpindownResult(collectibleID) - local config = Isaac.GetItemConfig() local newID = collectibleID repeat newID = newID - 1 - until (config:GetCollectible(newID) and not config:GetCollectible(newID).Hidden) or newID == CollectibleType.COLLECTIBLE_NULL + --note: the order of the SkipLocked check statement is important so that the item is checked for being in a pool either way (to display a ? if it isn't) + until (EID.itemConfig:GetCollectible(newID) and (EID:isCollectibleUnlockedAnyPool(newID) or not EID.Config["SpindownDiceSkipLocked"]) and not EID.itemConfig:GetCollectible(newID).Hidden) or newID == CollectibleType.COLLECTIBLE_NULL return newID end +function EID:GetMaxCollectibleID() + local id = CollectibleType.NUM_COLLECTIBLES-1 + local step = 16 + while step > 0 do + if EID.itemConfig:GetCollectible(id+step) ~= nil then + id = id + step + else + step = step // 2 + end + end + + return id +end + +local maxCollectibleID = nil function EID:isCollectibleUnlocked(collectibleID, itemPoolOfItem) local itemPool = Game():GetItemPool() - local itemConfig = Isaac.GetItemConfig() - for i= 1, GetMaxCollectibleID() do + --local itemConfig = Isaac.GetItemConfig() + if (not maxCollectibleID) then maxCollectibleID = EID:GetMaxCollectibleID() end + for i= 1, maxCollectibleID do if ItemConfig.Config.IsValidCollectible(i) and i ~= collectibleID then itemPool:AddRoomBlacklist(i) end end - local room = Game():GetRoom() local isUnlocked = false for i = 0,1 do -- some samples to make sure local collID = itemPool:GetCollectible(itemPoolOfItem, false) @@ -781,28 +796,30 @@ function EID:isCollectibleUnlocked(collectibleID, itemPoolOfItem) end function EID:isCollectibleUnlockedAnyPool(collectibleID) - local itemConfig = Isaac.GetItemConfig() + local item = EID.itemConfig:GetCollectible(collectibleID) if EID.itemUnlockStates[collectibleID] == nil then - local itemPoolNum = 0 - while EID:isCollectibleUnlocked(collectibleID, itemPoolNum) == false do - if itemPoolNum == ItemPoolType.NUM_ITEMPOOLS - 1 then - if itemConfig:GetCollectible(collectibleID).Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST then - --print("item " .. tostring(collectibleID) .. " is tagged as quest!") - EID.itemUnlockStates[collectibleID] = true - return true - end - --print("couldn't find item " .. tostring(collectibleID) .. " in any item pools") - EID.itemUnlockStates[collectibleID] = false - return false - end - itemPoolNum = itemPoolNum + 1 + --whitelist all quest items and items with no associated achievement + if (item.AchievementID == -1 or item.Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then + EID.itemUnlockStates[collectibleID] = true + return true end - --print("found item " .. tostring(collectibleID) .. " unlocked in pool " .. tostring(itemPoolNum)) - EID.itemUnlockStates[collectibleID] = true - return true + --blacklist all hidden items + if (item.Hidden) then + EID.itemUnlockStates[collectibleID] = false + return false + end + --iterate through the pools this item can be in + for k,v in ipairs(EID.CollectiblesPools[collectibleID]) do + if (EID:isCollectibleUnlocked(collectibleID, v)) then + EID.itemUnlockStates[collectibleID] = true + return true + end + end + --note: some items will still be missed by this, if they've been taken out of their pools (especially when in Greed Mode) + EID.itemUnlockStates[collectibleID] = false + return false else - --print("item " .. tostring(collectibleID) .. " was already cached: " .. tostring(EID.itemUnlockStates[collectibleID])) - return EID.itemUnlockStates[collectibleID] + return EID.itemUnlockStates[collectibleID] end end @@ -822,20 +839,20 @@ end -- Converts a given table into a string containing the crafting icons of the table, which are also grouped to reduce render lag -- Example input: {1,1,1,2,2,3,3,3} -- Result: "3{{Crafting3}}2{{Crafting2}}3{{Crafting1}}" +local emptyPickupTable = {} +for i=1,25 do emptyPickupTable[i] = 0 end function EID:tableToCraftingIconsMerged(craftTable) local sortedList = {table.unpack(craftTable)} table.sort(sortedList, function(a, b) return a > b end) - local filteredList = {} + local filteredList = {table.unpack(emptyPickupTable)} for _,nr in ipairs(sortedList) do - if filteredList[nr] == nil then - filteredList[nr] = 1 - else - filteredList[nr] = filteredList[nr] +1 - end + filteredList[nr] = filteredList[nr] +1 end local iconString = "" - for nr,count in pairs(filteredList) do - iconString = iconString..count.."{{Crafting"..nr.."}}" + for nr,count in ipairs(filteredList) do + if (count > 0) then + iconString = iconString..count.."{{Crafting"..nr.."}}" + end end return iconString end diff --git a/eid_bagOfCrafting.lua b/eid_bagOfCrafting.lua index 0f67bf2f..b6966f3d 100644 --- a/eid_bagOfCrafting.lua +++ b/eid_bagOfCrafting.lua @@ -511,24 +511,11 @@ EID.refreshNextTick = false EID.downHeld = 0 EID.upHeld = 0 -local function GetMaxCollectibleID() - local id = CollectibleType.NUM_COLLECTIBLES-1 - local step = 16 - while step > 0 do - if Isaac.GetItemConfig():GetCollectible(id+step) ~= nil then - id = id + step - else - step = step // 2 - end - end - - return id -end local maxItemID = nil local function detectModdedItems() if maxItemID == nil then - maxItemID = GetMaxCollectibleID() + maxItemID = EID:GetMaxCollectibleID() end if maxItemID > CollectibleType.NUM_COLLECTIBLES then local customDescObj = EID:getDescriptionObj(5, 100, 710) @@ -683,7 +670,13 @@ function EID:handleBagOfCraftingRendering() for k, v in pairs(randResults) do local resultID = EID:calculateBagOfCrafting(v) if resultID > 0 then - table.insert(calcResults, {v, resultID}) + if (not EID:isCollectibleUnlockedAnyPool(resultID)) then + if (EID.Config["BagOfCraftingDisplayBreakfast"]) then + table.insert(calcResults, {v, resultID, 25}) + end + else + table.insert(calcResults, {v, resultID}) + end end end randResultCache[queryString] = calcResults @@ -767,11 +760,9 @@ function EID:handleBagOfCraftingRendering() --fix bug with being allowed to go to an empty page if recipe count = multiple of page size (or if we refresh on last page) if (EID.bagOfCraftingOffset >= #results) then EID.bagOfCraftingOffset = EID.bagOfCraftingOffset - EID.Config["BagOfCraftingResults"] end - local resultCount = 0 - local skips = 0 local prevItem = 0 - local qualities = { [0] = "{{ColorSilver}}", "{{ColorLime}}", "{{ColorTransform}}", "{{ColorObjName}}", "{{ColorGold}}" } + local qualities = { [0] = "{{ColorSilver}}", "{{ColorLime}}", "{{ColorPastelBlue}}", "{{ColorLavender}}", "{{ColorLightOrange}}" } local prefix = "#{{Blank}} " if (EID.lockedResults) then prefix = "#{{Trinket159}} " @@ -783,19 +774,27 @@ function EID:handleBagOfCraftingRendering() end for i=EID.bagOfCraftingOffset+1,EID.bagOfCraftingOffset+EID.Config["BagOfCraftingResults"] do local v = results[i] - if (not v) then break end - if (not EID.Config["BagOfCraftingDisplayNames"]) then - customDescObj.Description = customDescObj.Description.."# {{Collectible"..v[2].."}} " .. " =" + if not v then break end + + if not EID.Config["BagOfCraftingDisplayNames"] then + customDescObj.Description = customDescObj.Description.."# {{Collectible"..v[2].."}} " + --tack on Breakfast image to locked recipes + if v[3] then customDescObj.Description = customDescObj.Description.."({{Collectible25}})" end + --color the equals sign with the item quality, so the order of the list can make sense + customDescObj.Description = customDescObj.Description.. qualities[EID.itemWeightsLookup[v[2]]] .. "={{CR}}" --only display the item name if it's the first occurrence else - if (prevItem ~= v[2]) then + if prevItem ~= v[2] then --substring the first 18 characters of the item name so it fits on one line; is there a way to get around desc line length limits? customDescObj.Description = customDescObj.Description.."# {{Collectible"..v[2].."}} ".. qualities[EID.itemWeightsLookup[v[2]]] .. string.sub(EID:getObjectName(5, 100, v[2]),1,18).."#" else customDescObj.Description = customDescObj.Description.."#" end + --replace recipe bulletpoint with Breakfast on locked recipes + if v[3] then customDescObj.Description = customDescObj.Description.." {{Collectible25}} " end end + customDescObj.Description = customDescObj.Description..EID:tableToCraftingIconsMerged(v[1]) prevItem = v[2] end @@ -806,12 +805,3 @@ function EID:handleBagOfCraftingRendering() EID:printDescription(customDescObj) return true end - ---[[ -Isaac.DebugString("Calculating: {1, 1, 1, 1, 1, 1, 1, 1}") -Isaac.DebugString(EID:calculateBagOfCrafting({1, 1, 1, 1, 1, 1, 1, 1})) -Isaac.DebugString("Calculating: {1, 1, 1, 1, 1, 1, 1, 2}") -Isaac.DebugString(EID:calculateBagOfCrafting({1, 1, 1, 1, 1, 1, 1, 2})) -Isaac.DebugString("Calculating: {1, 1, 1, 1, 1, 1, 1, 3}") -Isaac.DebugString(EID:calculateBagOfCrafting({1, 1, 1, 1, 1, 1, 1, 3})) -]]-- diff --git a/eid_config.lua b/eid_config.lua index 8d144fac..aad59af1 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -176,15 +176,19 @@ EID.UserConfig = { ["BagOfCraftingCombinationMax"] = 12, -- Changes the number of random recipes calculated -- Higher numbers will cause lag spikes on new pickup sets! - -- Default = 500 - ["BagOfCraftingRandomResults"] = 500, + -- Default = 400 + ["BagOfCraftingRandomResults"] = 400, -- Set the keybinding to toggle the scroll feature of the bag of crafting descriptions -- look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html -- Default = ButtonAction.ACTION_MAP ["BagOfCraftingToggleKey"] = ButtonAction.ACTION_MAP, -- Display craftable item names, moving the recipe to a new line -- Default = false - ["BagOfCraftingDisplayNames"] = false, + ["BagOfCraftingDisplayNames"] = false, + -- Display locked item recipes, which will all turn into Breakfast + -- However, there are false positives with this, as the current state of item pools is checked to determine an item's locked status + -- Default = true + ["BagOfCraftingDisplayBreakfast"] = true, ---------Mouse Controls----------- @@ -202,6 +206,10 @@ EID.UserConfig = { -- Default = 3 ["SpindownDiceResults"] = 3, + -- Spindown dice preview can skip over locked items, however the method for determining an item's locked status is not perfect + -- Default = false + ["SpindownDiceSkipLocked"] = false, + -- Show ID of described object in the format "Type.Variant.SubType" next to the name -- Default = false ["ShowObjectID"] = false, @@ -282,10 +290,12 @@ EID.DefaultConfig = { ["DisplayBagOfCrafting"] = "always", ["BagOfCraftingResults"] = 7, ["BagOfCraftingCombinationMax"] = 12, - ["BagOfCraftingRandomResults"] = 500, + ["BagOfCraftingRandomResults"] = 400, ["BagOfCraftingToggleKey"] = ButtonAction.ACTION_MAP, - ["BagOfCraftingDisplayNames"] = false, + ["BagOfCraftingDisplayNames"] = false, + ["BagOfCraftingDisplayBreakfast"] = true, ["SpindownDiceResults"] = 3, + ["SpindownDiceSkipLocked"] = false, ["EnableMouseControls"] = false, ["ShowCursor"] = false, ["ErrorMessage"] = "[Effect not defined]", diff --git a/eid_data.lua b/eid_data.lua index 75728362..ba977a19 100644 --- a/eid_data.lua +++ b/eid_data.lua @@ -291,6 +291,9 @@ EID.InlineColors = { ["ColorTeal"] = KColor(0, 0.5, 0.5, 1), ["ColorNavy"] = KColor(0, 0, 0.5, 1), ["ColorOrange"] = KColor(1, 0.54, 0, 1), + ["ColorPastelBlue"] = KColor(0.3882, 0.5216, 1, 1), + ["ColorLavender"] = KColor(0.7451, 0.3686, 1, 1), + ["ColorLightOrange"] = KColor(1, 0.6353, 0.3686, 1), -- Swag Colors -- Rainbow color effect @@ -364,3 +367,23 @@ EID.InlineColors = { return color end, } + + +--[[ +A list of all the item pools that an item is in +generated from itempools in bagOfCrafting.lua: +local items = {} +for i=1,800 do items[i] = {} end + +for k,v in ipairs(itempools) do + for k2,v2 in ipairs(v) do + local item = v2[1] + table.insert(items[item],k-1) + end +end +for k,v in ipairs(items) do + print("{" .. table.concat(v,",") .. "},") +end +]] +EID.CollectiblesPools = { +{0,16,23,24}, {0,16}, {0,16,23}, {0,16,23}, {0,16,23}, {0,16}, {0,4,16,21,29}, {0,3,16,28}, {7}, {0,13,16,28}, {5,18}, {0,16,17}, {0,11,16}, {0,2,11,17}, {0,17}, {5,17}, {0,5}, {}, {0}, {5}, {1,10,23}, {2,10,17}, {2,10,17}, {2,10,17}, {2,10,17}, {2,10,17,30}, {2,17,29}, {2,8,17}, {2,8,15,17,27}, {2,15,17,27}, {2,15,17,27}, {2,8,17,23}, {1,4,6}, {3,6,16,20}, {3,5,6,16,20}, {0,7}, {0,16,25}, {16,23}, {0,15,27}, {0}, {0,15,27}, {0,16,30}, {}, {0,23}, {0,16}, {0,10,18,23}, {0,16,23}, {0,16,23}, {0,23}, {16}, {2,3,11,12,20,23}, {0,16}, {0}, {1,10}, {0,15,16,27}, {0,16}, {0,13,16,28}, {0,6}, {}, {1,29}, {}, {0,16}, {1,14,18,23}, {1,16}, {0,6,16}, {0,23}, {0,3,16,20,28}, {0,16,20,23}, {0,16}, {2,11,17}, {0,17}, {0,4,21}, {16,17,18,19,20,21,22,28}, {3,8,20}, {0,1,18}, {0,18}, {0,16,23}, {0,6,16,21}, {3,11,12,20}, {3,11,12,20}, {3,9,12,19,20}, {3,11,20}, {3,11,20}, {3,5,18}, {0,1,16,23}, {0}, {0,11,16}, {0,16,28}, {0,16,23}, {23}, {0,18,23}, {0,2}, {0,16,23}, {0,16}, {0,16,23,28}, {0,16,28}, {0,3,6,16,20}, {0,4,16}, {0,16,28}, {0,16,28}, {0,4,16,17}, {0,1,10,11,15,16,23,27}, {0,16}, {0,16}, {0,18,23}, {0,16,25}, {0,16}, {0,4,16}, {0,3,20}, {0,15,16,27}, {0,10,16}, {4,21,28}, {0,3,20,28}, {0,3,15,16,20,27}, {0,3,16,20}, {1,14,18,23}, {0,16,20,28}, {3,20}, {}, {0,5,16,17}, {0,5}, {3,11,20}, {0,3,6,20}, {0,4,16}, {0,16,25}, {3,11}, {0,3,5,11}, {0,13,16,28}, {0}, {}, {0,16}, {16,17,20}, {3,9,12,19,20}, {3,9,12,19,20}, {}, {0,23}, {0,1,16,23,25}, {0,16,21,29}, {1,15,18,27}, {0,9,16,25,30}, {2}, {0,4,16}, {0,2,11,17}, {0,10,28}, {3,9,12,19,20}, {0,4,16}, {1,23}, {0,16}, {0,16}, {0,16}, {0,16}, {0,16,23}, {0,16,23}, {0,16}, {0,16,28}, {1,4,18}, {0,3,16,20}, {}, {3,11,20}, {0}, {0,16}, {0,4,16,21}, {0,3,16,28}, {1}, {2}, {0,18,23}, {0,16,28}, {5}, {0,16}, {0,16,28}, {0}, {0,3,16,20,28}, {0,4,21}, {0,16,28}, {0,13,16,27}, {0,2,17}, {1,10}, {0,4,21}, {8}, {0,10}, {}, {4,21}, {2,17,29}, {4,21}, {4,21}, {0,16}, {3,20}, {0,16,28}, {0,16,23}, {0,5,25}, {0,16}, {0,6,16}, {2,17}, {2,8,17,23}, {1,2,10,11,15,17,27}, {2,8,17,23}, {2,17,21}, {2,10,17}, {1,13,15,17,27}, {0,15,16,27}, {0,16}, {0}, {1}, {1,10,18}, {1,14}, {0,16}, {28}, {1,18,23}, {0,7,16,25}, {0,16}, {0}, {3,9,12,19,20,23}, {0,5,16}, {0,16}, {3,12}, {3,11,12,20}, {0,15,16,27}, {2}, {2}, {0,16,25}, {0,16}, {0,16}, {0,16}, {0,16}, {0,3,11,12,20}, {5,16}, {0,1,23}, {0,15,16,27}, {0,16}, {3,11,20}, {0,16}, {1,23}, {0,16}, {0,16}, {}, {0,16}, {0,3,16,20}, {}, {}, {0,2,11,17}, {3,11,12}, {0,5,16}, {4,21}, {0,16,23}, {0,16}, {1,10,18}, {1,18}, {1,18}, {1}, {1}, {1,18,23}, {1,18}, {2,17}, {2,16,17}, {2,8,17,23}, {0,16,25}, {0,16}, {5,16}, {3,11,20}, {1,12,18}, {0,16}, {3,5,11}, {5,23}, {0,13,16,28}, {0,16,28}, {0,16,28}, {0,16,23,28}, {0,3,16,20,28,30}, {0,3,16,20,28}, {0,20,28}, {0,5,10,16}, {0,13,28}, {0,16,28,30}, {0,16,28}, {0,3,28}, {0}, {0,16,28}, {0,3,11,28}, {0,13,16,28}, {0,16,28}, {0,16,28}, {0,6}, {0,18,23}, {0,18,23}, {0,18,23}, {1,5,18}, {0,5,6}, {0,16}, {1,18}, {1}, {0,16}, {0,3,6,20}, {}, {0,10}, {0,1}, {1}, {1,9,18}, {0}, {0,16}, {0,16}, {0,16}, {0,16}, {0,16}, {0}, {0,16}, {0,16}, {0,16}, {0,16}, {0,16}, {0,16}, {3,20}, {0,16}, {0,4,21}, {0,17}, {0,16}, {0,5,9,16}, {0,16}, {0,16}, {0,16}, {0,13,16,28}, {0,5,16}, {0,16,28}, {0}, {0}, {0,16}, {4}, {}, {}, {0,16}, {0,16}, {4,21}, {0,4,16}, {0,4,16,21}, {0,4,16,21}, {0,4,16,21}, {0,16,30}, {1,23}, {1,23}, {2,17}, {2,11,17}, {2,8,17,27}, {2,17}, {2,8,13,17}, {2,8,17}, {2,11,17}, {2,17}, {1}, {1,5,18}, {1,16,29}, {0}, {0,16}, {0,16,23}, {0,16,25}, {2,8,17}, {2,8,15,17,27}, {1,14,18}, {1,16,23}, {0,16}, {0,16}, {3,20,28}, {0,28}, {0,10,16,23,29}, {4,21,28}, {0,13,16,28}, {0,13,16,28}, {0,16,25}, {0,16,25}, {0,16}, {0,16}, {2,8,17,23}, {0,9,12,16}, {1,14,18,28}, {0,16}, {0,4,16}, {0,16}, {1,10}, {0,16}, {0,7,16}, {0,16}, {1,16,18}, {0}, {0,16,23}, {1,16,23}, {0,16,28}, {0,10,28}, {0,18,23}, {4,21}, {0,5,13,28}, {0,5,16}, {0,4,21,28}, {0,3,16,20}, {0,16}, {0,16}, {0,16}, {0,16,23}, {1}, {0,16,23}, {0,16}, {3,20}, {4,21}, {0,16}, {1,5,18}, {1,18,23,28}, {0,28}, {0,5,18}, {0,18,23}, {0,16,21}, {3,12,20}, {3,11,20}, {0,16}, {0,3,16,20}, {3,20}, {4,21}, {1}, {4,21}, {1,16,18}, {3,28}, {0}, {0,23}, {3,11,20}, {0,16}, {0,1,23}, {4,21}, {1,5}, {1,16,23}, {0,13,16,28}, {0,23}, {2,8,17}, {}, {0,13,16,28}, {0,3,16,20}, {0,16,25}, {3,20}, {1,16,18}, {0,28}, {0,16}, {0,23}, {2,8,17,23}, {1,15,18,23,27,29}, {0,16}, {3,20}, {3,12,20}, {0,16}, {0,8,16,23}, {0,16}, {0,16}, {0,10,16}, {0,16}, {0,16}, {5,16}, {1,12,18,20,23}, {0,16}, {0,16}, {0,16}, {2,8,10,17,27}, {2,8,10,17}, {0,16}, {0,16}, {0,16}, {0,16}, {0,16}, {3,20}, {0,16}, {4,21}, {0,16,23}, {0,16}, {0,16}, {3,12,20,28}, {0,16}, {0,16,28}, {0,16,28}, {1,18,28}, {0,16,28}, {}, {1,3,9,11,12,18}, {0,18,23}, {3,4,18}, {0,18,23}, {1}, {1,30}, {0,18}, {0,18}, {1,18,25}, {}, {0,1,10,18}, {1,18}, {1,11,18}, {0,18,23,29}, {5,18}, {4,21}, {0,28}, {0,13,28}, {0,11,16}, {0,14,16,23}, {0,16}, {0,11,12,16}, {0,16}, {3,4}, {4,21}, {5,18}, {5}, {0,16}, {11,12,16,20}, {0,7,16}, {1,18,23}, {0,16}, {0,16}, {0,12,15,16,27}, {0,16,28}, {4}, {0,16,28}, {0,16,18}, {0,16}, {1,16}, {1,16,18,23}, {0,16,18,23}, {0,16,25}, {1,16,18,23,28}, {3,4,20,28}, {1,14,16}, {1}, {0,16}, {1}, {0,16,23}, {0,16}, {3,4,20,21}, {1,13,18,23,29}, {4,21}, {0,16}, {3,20}, {0,16}, {0,16}, {4,21}, {1,8,18}, {1,18}, {3,12,20}, {0,16,28}, {2,17,23}, {0,16}, {0,16}, {2,17}, {0,16}, {0,4,16}, {0,16}, {0,3,6,16,20}, {5,27}, {2,17,27}, {0,16}, {0,16}, {}, {}, {}, {0,16}, {3,20}, {0,16}, {3,20}, {0,16}, {0,16}, {0,14,16}, {0,16}, {0,16}, {5}, {0,16,25}, {2,17}, {0,9,12,16}, {1,18}, {4,21}, {4,21}, {3,12,20}, {0,16}, {5,8}, {3,20}, {4,21}, {4,21}, {0,16,28}, {0,7,16}, {3,20}, {0,16}, {4,21}, {5,9,12,13,15}, {0,13,16,28}, {5}, {0,16,25}, {4,6,21}, {1,18}, {4,21}, {}, {26}, {26}, {26}, {26}, {26}, {26}, {26}, {26}, {26}, {26}, {26}, {1,23}, {2,17}, {4,21}, {1}, {1,14,18}, {1,18,23,27}, {0,16}, {3,20}, {0,16,28}, {0,16,28}, {0,5,16,23}, {0,16,28}, {0,16}, {0,5,16,28}, {}, {0,16,25}, {0,16,28}, {0,16}, {0,16,23}, {0,16,30}, {1,18}, {}, {1,18}, {4,21}, {1,18}, {1,2,17,18,23}, {0,5,16}, {}, {}, {5}, {0,13,16,23,28}, {}, {0,16}, {5}, {}, {3,4,20,21}, {0,16,28}, {5,18}, {0,16}, {1,18,23}, {0,16,30}, {4,21}, {0,16}, {1,9,12}, {4,21}, {2,8,17,23}, {0,16,28}, {3,20,25}, {1,14,18}, {}, {0,13,16,23,28}, {0,16}, {4,21}, {0,16}, {4,21}, {3,9,12,20}, {0,16,23}, {}, {0,16}, {0,16}, {2,17}, {1}, {0,16,28}, {}, {0,16}, {5}, {3,9,20}, {}, {5,18}, {}, {5}, {1}, {0,16}, {3,11}, {}, {5,18}, {0,5,16}, {0,11,16}, {0,5,16}, {}, {3,20,28}, {0,16}, {0,16}, {0,16,28}, {0,16}, {3,20}, {4,21}, {4,21}, {0,16,23}, {5,18}, {5,18}, {0,16}, {4,5,18,21}, {3,12,18,20}, {0,13,16}, {3,12,20}, {0,3,16,20}, {4,21}, {5,12}, {3,20,28}, {3,20}, {5,18}, {5,18}, {3,12,20}, {0,5,16,18}, {3,20}, {3,20}, {3,20}, {2,10,17}, {2,8,17}, {0,16,23}, {}, {}, {3,6,20}, {}, {}, {}, {1,5,16}, {0,5,16}, {}, {1,5,16,29}, {0,16,23}, {5,16,18}, {0,16,18}, {0,5,16,18,23}, {0,16}, {0,16}, {0,16}, {0,16,25}, {0,3,16,20}, {0,16}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} } diff --git a/eid_modifiers.lua b/eid_modifiers.lua index 9a1ca114..3d5ade7a 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -80,6 +80,7 @@ local game = Game() refID = spinnedID if refID > 0 and refID < 4294960000 then EID:appendToDescription(descObj, "{{Collectible"..refID.."}}") + if EID.itemUnlockStates[refID] == false then EID:appendToDescription(descObj, "?") end if i ~= EID.Config["SpindownDiceResults"] then EID:appendToDescription(descObj, " ->") end diff --git a/main.lua b/main.lua index f97b4bd1..6440d327 100644 --- a/main.lua +++ b/main.lua @@ -9,7 +9,7 @@ local game = Game() require("eid_config") EID.Config = EID.UserConfig EID.Config.Version = "3.2" -EID.ModVersion = "3.82" +EID.ModVersion = "3.84" EID.DefaultConfig.Version = EID.Config.Version EID.isHidden = false EID.player = nil @@ -377,7 +377,7 @@ local function IsMirror() local level = game:GetLevel() local id = level:GetCurrentRoomIndex() - return GetPtrHash(level:GetRoomByIdx(id)) == GetPtrHash(level:GetRoomByIdx(id, 1)) + return id >=0 and GetPtrHash(level:GetRoomByIdx(id)) == GetPtrHash(level:GetRoomByIdx(id, 1)) end local isMirrorRoom = false @@ -535,6 +535,22 @@ function EID:onGameUpdate() end EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate) +local hasShownAchievementWarning = false +local function renderAchievementInfo() + if game:GetFrameCount() < 10*30 then + local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT) + if not hasCubeOfMeatUnlocked then + local demoDescObj = EID:getDescriptionObj(-999, -1, 1) + demoDescObj.Name = EID:getDescriptionEntry("AchievementWarningTitle") or "" + demoDescObj.Description = EID:getDescriptionEntry("AchievementWarningText") or "" + EID:displayPermanentText(demoDescObj) + hasShownAchievementWarning = true + end + elseif hasShownAchievementWarning then + EID:hidePermanentText() + end +end + --------------------------------------------------------------------------- ---------------------------On Render Function------------------------------ @@ -550,6 +566,7 @@ local function onRender(t) end EID:renderMCMDummyDescription() + renderAchievementInfo() EID.player = Isaac.GetPlayer(0) if EID.GameVersion == "ab+" then @@ -790,6 +807,8 @@ if EID.MCMLoaded or REPENTANCE then EID.Config["BagFloorContent"] = EID.bagOfCraftingRoomQueries or {} end EID.SaveData(EID, json.encode(EID.Config)) + EID:hidePermanentText() + EID.itemUnlockStates[CollectibleType.COLLECTIBLE_CUBE_OF_MEAT] = nil end EID:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, SaveGame) end diff --git a/metadata.xml b/metadata.xml index 6cbae1a7..435dd424 100644 --- a/metadata.xml +++ b/metadata.xml @@ -90,7 +90,7 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions - Jake for the sweet [b]German[/b] language pack - [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities - 3.83 + 3.84 Public diff --git a/mod_config_menu.lua b/mod_config_menu.lua index 6b71f2ae..76e6afeb 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -491,6 +491,51 @@ if MCMLoaded then } ) + -- Spindown Dice results + local diceSteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} + MCM.AddSetting( + "EID", + "Display", + { + Type = ModConfigMenu.OptionType.SCROLL, + CurrentSetting = function() + return AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 + end, + Display = function() + return "Spindown Dice: $scroll" .. + AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 .. " " .. EID.Config["SpindownDiceResults"] .. " Items" + end, + OnChange = function(currentNum) + EID.Config["SpindownDiceResults"] = diceSteps[currentNum%#diceSteps + 1] + end, + Info = {"Preview of Items resulting when using the Spindown dice X times"} + } + ) + -- + + -- Spindown Dice skip locked items + MCM.AddSetting( + "EID", + "Display", + { + Type = ModConfigMenu.OptionType.BOOLEAN, + CurrentSetting = function() + return EID.Config["SpindownDiceSkipLocked"] + end, + Display = function() + local onOff = "False" + if EID.Config["SpindownDiceSkipLocked"] then + onOff = "True" + end + return "Skip Locked Items: " .. onOff + end, + OnChange = function(currentBool) + EID.Config["SpindownDiceSkipLocked"] = currentBool + end, + Info = {"Skip locked items in the preview just as the dice will; the method to check for unlock status is not perfect, though"} + } + ) + --------Obstruction--------- MCM.AddSpace("EID", "Display") MCM.AddText("EID", "Display", "Display Infos when obstructed") @@ -647,26 +692,6 @@ if MCMLoaded then } ) - -- Spindown Dice results - local diceSteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} - MCM.AddSetting( - "EID", - "Display", - { - Type = ModConfigMenu.OptionType.SCROLL, - CurrentSetting = function() - return AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 - end, - Display = function() - return "Spindown Dice: $scroll" .. - AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 .. " " .. EID.Config["SpindownDiceResults"] .. " Items" - end, - OnChange = function(currentNum) - EID.Config["SpindownDiceResults"] = diceSteps[currentNum%#diceSteps + 1] - end, - Info = {"Preview of Items resulting when using the Spindown dice X times"} - } - ) MCM.AddSpace("EID", "Display") MCM.AddText("EID", "Display", "Interaction with 'Options?'") @@ -1031,6 +1056,28 @@ if MCMLoaded then end, Info = {"If on, each result takes two lines; lower your displayed results accordingly"} } + ) + -- Bag of Crafting Breakfast recipes + MCM.AddSetting( + "EID", + "Crafting", + { + Type = ModConfigMenu.OptionType.BOOLEAN, + CurrentSetting = function() + return EID.Config["BagOfCraftingDisplayBreakfast"] + end, + Display = function() + local onOff = "False" + if EID.Config["BagOfCraftingDisplayBreakfast"] then + onOff = "True" + end + return "Show Locked Recipes: " .. onOff + end, + OnChange = function(currentBool) + EID.Config["BagOfCraftingDisplayBreakfast"] = currentBool + end, + Info = {"Recipes for locked items turn into Breakfast, cluttering the list; the method to check for unlock status is not perfect, though"} + } ) MCM.AddSpace("EID", "Crafting") diff --git a/resources/gfx/EID_Icons.png b/resources/gfx/EID_Icons.png deleted file mode 100644 index cd4ce9b9..00000000 Binary files a/resources/gfx/EID_Icons.png and /dev/null differ diff --git a/resources/gfx/eid_blank.png b/resources/gfx/eid_blank.png index cd4ce9b9..e3dabb80 100644 Binary files a/resources/gfx/eid_blank.png and b/resources/gfx/eid_blank.png differ diff --git a/resources/gfx/eid_transform_icons_old.anm2 b/resources/gfx/eid_transform_icons_old.anm2 deleted file mode 100644 index bafa7fd6..00000000 --- a/resources/gfx/eid_transform_icons_old.anm2 +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/gfx/eid_transform_icons_old.png b/resources/gfx/eid_transform_icons_old.png deleted file mode 100644 index e2343a8e..00000000 Binary files a/resources/gfx/eid_transform_icons_old.png and /dev/null differ diff --git a/resources/gfx/icons.anm2 b/resources/gfx/icons.anm2 deleted file mode 100644 index 5ab334ff..00000000 --- a/resources/gfx/icons.anm2 +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -