diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index e2a1a9d9..debae205 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -1088,6 +1088,11 @@ EID.descriptions[languageCode].poopSpells = { {"Explosive Diarrhea", "Isaac quickly spawns 5 lit bombs"}, } +EID.descriptions[languageCode].itemPoolFor = "Pool for Item:" +EID.descriptions[languageCode].itemPoolNames = { + [0] = "Treasure", "Shop", "Boss", "Devil", "Angel", "Secret", "Library", "Shell Game", "Golden Chest", "Red Chest", "Beggar", "Demon Beggar", "Curse", "Key Master", "Battery Bum", "Mom's Chest", "Greed Treasure", "Greed Boss", "Greed Shop", "Greed Devil", "Greed Angel", "Greed Curse", "Greed Secret", "Crane Game", "Ultra Secret", "Bomb Bum", "Planetarium", "Old Chest", "Baby Shop", "Wooden Chest", "Rotten Beggar", +} + EID.descriptions[languageCode].VoidShopText = "If absorbed right after pickup, gain:" EID.descriptions[languageCode].VoidOptionText = " will be absorbed instead" EID.descriptions[languageCode].VoidNames[2] = "{1} Fire Rate up" diff --git a/descriptions/rep/ko_kr.lua b/descriptions/rep/ko_kr.lua index 79f19a26..bcf14465 100644 --- a/descriptions/rep/ko_kr.lua +++ b/descriptions/rep/ko_kr.lua @@ -1163,6 +1163,11 @@ EID.descriptions[languageCode].poopSpells = { {"폭탄 설사", "캐릭터의 위치에 점화된 폭탄 5개를 생성합니다."}, } +EID.descriptions[languageCode].itemPoolFor = "획득 시 배열:" +EID.descriptions[languageCode].itemPoolNames = { + [0] = "보물방", "상점", "보스방", "악마방", "천사방", "비밀방", "책방", "야바위꾼", "황금상자", "빨간상자", "거지", "악마거지", "저주방", "열쇠거지", "배터리거지", "엄마상자", "그리드-보물방", "그리드-보스방", "그리드-상점", "그리드-악마방", "그리드-천사방", "그리드-저주방", "그리드-비밀방", "크레인 게임", "특급비밀방", "폭탄거지", "천체관", "낡은상자", "패밀리어 상점", "나무상자", "썩은거지", +} + EID.descriptions[languageCode].VoidShopText = "아이템을 드는 도중 흡수 시 이하 능력치 증가:" EID.descriptions[languageCode].VoidOptionText = " 아이템이 대신 흡수됨" EID.descriptions[languageCode].VoidNames[2] = "연사(상한) {1}" diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index 1764aece..e4fc6b3f 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -530,6 +530,9 @@ local function GameStartCrafting() -- Check for modded items past the known max item ID on game start (can also support game updates) -- Only works if the new items are at Weight 1.0 in their item pools, but better than nothing if EID.Config["BagOfCraftingModdedRecipes"] and EID.itemConfig:GetCollectible(EID.XMLMaxItemID+1) ~= nil and not moddedCrafting then + -- Save last pool + local itemPool = game:GetItemPool() + local lastPool = itemPool:GetLastPool() -- Items past max ID detected CraftingMaxItemID = EID.XMLMaxItemID -- XMLMaxItemID is never modified -- Add new item qualities @@ -540,7 +543,6 @@ local function GameStartCrafting() CraftingItemAllowed[coll.ID] = true coll = EID.itemConfig:GetCollectible(CraftingMaxItemID+1) end - local itemPool = game:GetItemPool() -- Add new items to the crafting item pools, assuming Weight 1.0 for poolNum,_ in pairs(poolToIcon) do for i=1,EID.XMLMaxItemID do itemPool:AddRoomBlacklist(i) end @@ -553,6 +555,9 @@ local function GameStartCrafting() itemPool:AddRoomBlacklist(collID) collID = itemPool:GetCollectible(poolNum, false, 1, 25) end + + -- Do getCollectible again to revert last pool + itemPool:GetCollectible(lastPool, false, 1, 25) itemPool:ResetRoomBlacklist() end diff --git a/eid_config.lua b/eid_config.lua index 8dee6772..51d40a78 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -186,6 +186,17 @@ EID.UserConfig = { -- REPENTANCE ONLY!!! -- Default = true ["ShowQuality"] = true, + -- Enables or disables collectible's item pool when collected after item name + -- REPENTANCE ONLY!!! + -- Default = false + ["ShowItemPoolIcon"] = false, + -- Enables or disables collectible's item pool name when collected below item name + -- REPENTANCE ONLY!!! + -- Default = false + ["ShowItemPoolText"] = false, + -- Set the item pool for collectible text color + -- Default = "ColorSilver" + ["ItemPoolTextColor"] = "ColorSilver", -- Set the mod indicator display -- Default = "Both" ["ModIndicatorDisplay"] = "None", @@ -514,6 +525,9 @@ EID.DefaultConfig = { ["DisplayTrinketInfo"] = true, ["ItemNameColor"] = "ColorEIDObjName", ["ShowQuality"] = true, + ["ShowItemPoolIcon"] = false, + ["ShowItemPoolText"] = false, + ["ItemPoolTextColor"] = "ColorSilver", ["ModIndicatorDisplay"] = "None", ["ModIndicatorTextColor"] = "ColorLightOrange", ["ShowObjectID"] = false, diff --git a/eid_data.lua b/eid_data.lua index 4a77ff72..ca964afa 100644 --- a/eid_data.lua +++ b/eid_data.lua @@ -571,6 +571,39 @@ EID.InlineIcons = { ["SatanSmall"] = {"Boss", 18, 12, 9, 0, 1}, ["HushSmall"] = {"Boss", 19, 11, 9, 0, 1}, + -- ItemPoolTypes + ["ItemPoolTreasure"] = {"ItemPools", 0, 11, 11, 0, 0}, + ["ItemPoolShop"] = {"ItemPools", 1, 11, 11, 0, 0}, + ["ItemPoolBoss"] = {"ItemPools", 2, 11, 11, 0, 0}, + ["ItemPoolDevil"] = {"ItemPools", 3, 11, 11, 0, 0}, + ["ItemPoolAngel"] = {"ItemPools", 4, 11, 11, 0, 0}, + ["ItemPoolSecret"] = {"ItemPools", 5, 11, 11, 0, 0}, + ["ItemPoolLibrary"] = {"ItemPools", 6, 11, 11, 0, 0}, + ["ItemPoolShellGame"] = {"ItemPools", 7, 11, 11, 0, 0}, + ["ItemPoolGoldenChest"] = {"ItemPools", 8, 11, 11, 0, 0}, + ["ItemPoolRedChest"] = {"ItemPools", 9, 11, 11, 0, 0}, + ["ItemPoolBeggar"] = {"ItemPools", 10, 11, 11, 0, 0}, + ["ItemPoolDemonBeggar"] = {"ItemPools", 11, 11, 11, 0, 0}, + ["ItemPoolCurse"] = {"ItemPools", 12, 11, 11, 0, 0}, + ["ItemPoolKeyMaster"] = {"ItemPools", 13, 11, 11, 0, 0}, + ["ItemPoolBombBum"] = {"ItemPools", 14, 11, 11, 0, 0}, + ["ItemPoolMomsChest"] = {"ItemPools", 15, 11, 11, 0, 0}, + ["ItemPoolGreedTreasure"] = {"ItemPools", 16, 11, 11, 0, 0}, + ["ItemPoolGreedShop"] = {"ItemPools", 17, 11, 11, 0, 0}, + ["ItemPoolGreedBoss"] = {"ItemPools", 18, 11, 11, 0, 0}, + ["ItemPoolGreedDevil"] = {"ItemPools", 19, 11, 11, 0, 0}, + ["ItemPoolGreedAngel"] = {"ItemPools", 20, 11, 11, 0, 0}, + ["ItemPoolGreedCurse"] = {"ItemPools", 21, 11, 11, 0, 0}, + ["ItemPoolGreedSecret"] = {"ItemPools", 22, 11, 11, 0, 0}, + ["ItemPoolCraneGame"] = {"ItemPools", 23, 11, 11, 0, 0}, + ["ItemPoolUltraSecret"] = {"ItemPools", 24, 11, 11, 0, 0}, + ["ItemPoolBatteryBum"] = {"ItemPools", 25, 11, 11, 0, 0}, + ["ItemPoolPlanetarium"] = {"ItemPools", 26, 11, 11, 0, 0}, + ["ItemPoolOldChest"] = {"ItemPools", 27, 11, 11, 0, 0}, + ["ItemPoolBabyShop"] = {"ItemPools", 28, 11, 11, 0, 0}, + ["ItemPoolWoodenChest"] = {"ItemPools", 29, 11, 11, 0, 0}, + ["ItemPoolRottenBeggar"] = {"ItemPools", 30, 11, 11, 0, 0}, + -- Misc ["HardMode"] = {"Misc", 0, 16, 12, 0, -2}, ["GreedMode"] = {"Misc", 1, 16, 12, 0, -2}, @@ -847,3 +880,4 @@ EID.TransformationData = { EID.RoomShapeToMarkup = { "{{Room}}", "{{RoomSmallHorizontal}}", "{{RoomSmallVertical}}", "{{RoomLongVertical}}", "{{RoomLongThinVertical}}","{{RoomLongHorizontal}}", "{{RoomLongThinHorizontal}}", "{{RoomXL}}", "{{RoomLTopLeft}}", "{{RoomL}}", "{{RoomLBottomLeft}}", "{{RoomLBottomRight}}" } EID.RoomTypeToMarkup = { "{{Room}}", "{{Shop}}", "{{ErrorRoom}}", "{{TreasureRoom}}", "{{BossRoom}}", "{{MiniBoss}}", "{{SecretRoom}}", "{{SuperSecretRoom}}", "{{ArcadeRoom}}", "{{CursedRoom}}", "{{ChallengeRoom}}", "{{Library}}", "{{SacrificeRoom}}", "{{DevilRoom}}", "{{AngelRoom}}", "{{LadderRoom}}", "{{Room}}" --[[boss rush]], "{{IsaacsRoom}}", "{{BarrenRoom}}", "{{ChestRoom}}", "{{DiceRoom}}", "{{Shop}}", "{{Room}}", --[[Black Market / Greed Exit]] "{{Planetarium}}", "{{Teleporter}}","{{Teleporter}}", "{{Room}}", "{{Room}}" --[[Blue Key rooms]], "{{UltraSecretRoom}}" } +EID.ItemPoolTypeToMarkup = { [0] = "{{ItemPoolTreasure}}", "{{ItemPoolShop}}", "{{ItemPoolBoss}}", "{{ItemPoolDevil}}", "{{ItemPoolAngel}}", "{{ItemPoolSecret}}", "{{ItemPoolLibrary}}", "{{ItemPoolShellGame}}", "{{ItemPoolGoldenChest}}", "{{ItemPoolRedChest}}", "{{ItemPoolBeggar}}", "{{ItemPoolDemonBeggar}}", "{{ItemPoolCurse}}", "{{ItemPoolKeyMaster}}", "{{ItemPoolBombBum}}", "{{ItemPoolMomsChest}}", "{{ItemPoolGreedTreasure}}", "{{ItemPoolGreedShop}}", "{{ItemPoolGreedBoss}}", "{{ItemPoolGreedDevil}}", "{{ItemPoolGreedAngel}}", "{{ItemPoolGreedCurse}}", "{{ItemPoolGreedSecret}}", "{{ItemPoolCraneGame}}", "{{ItemPoolUltraSecret}}", "{{ItemPoolBatteryBum}}", "{{ItemPoolPlanetarium}}", "{{ItemPoolOldChest}}", "{{ItemPoolBabyShop}}", "{{ItemPoolWoodenChest}}", "{{ItemPoolRottenBeggar}}"} diff --git a/eid_mcm.lua b/eid_mcm.lua index 64e81592..0a472f2f 100644 --- a/eid_mcm.lua +++ b/eid_mcm.lua @@ -558,6 +558,8 @@ if MCMLoaded then EID:AddBooleanSetting("Visuals", "TransformationIcons", "Display Transformation Icon") EID:AddBooleanSetting("Visuals", "TransformationProgress", "Display Transformation Progress") EID:AddBooleanSetting("Visuals", "ShowQuality", "Display Quality Info", {repOnly = true}) + EID:AddBooleanSetting("Visuals", "ShowItemPoolIcon", "Display Item Pool Icon", {repOnly = true, infoText = "Displays collectible's item pool icon that is expected for full reroll effects."}) + EID:AddBooleanSetting("Visuals", "ShowItemPoolText", "Display Item Pool Name", {repOnly = true, infoText = "Displays collectible's item pool name that is expected for full reroll effects."}) EID:AddBooleanSetting("Visuals", "ShowObjectID", "Display Object ID") -------Mod indicator for modded items--------- @@ -929,7 +931,7 @@ if MCMLoaded then Minimum = 0, Maximum = 1000, Display = function() - if EID.Config["ModIndicatorTextColor"] == nil then EID.Config["TextColor"] = EID.DefaultConfig["ModIndicatorTextColor"] end + if EID.Config["ModIndicatorTextColor"] == nil then EID.Config["ModIndicatorTextColor"] = EID.DefaultConfig["ModIndicatorTextColor"] end return "Mod Indicator: " .. string.gsub(EID.Config["ModIndicatorTextColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ModIndicatorTextColor"]).."/"..#colorNameArray..")" end, OnChange = function(currentNum) @@ -941,6 +943,32 @@ if MCMLoaded then Info = {"Changes the color of mod indicator texts (as long as they are enabled)."} } ) + -- Last Pool indicator Color (REPENTANCE ONLY) + if EID.isRepentance then + MCM.AddSetting( + "EID", + "Colors", + { + Type = ModConfigMenu.OptionType.NUMBER, + CurrentSetting = function() + return AnIndexOf(colorNameArray, EID.Config["ItemPoolTextColor"]) + end, + Minimum = 0, + Maximum = 1000, + Display = function() + if EID.Config["ItemPoolTextColor"] == nil then EID.Config["ItemPoolTextColor"] = EID.DefaultConfig["ItemPoolTextColor"] end + return "Mod Indicator: " .. string.gsub(EID.Config["ItemPoolTextColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemPoolTextColor"]).."/"..#colorNameArray..")" + end, + OnChange = function(currentNum) + EID.MCM_OptionChanged = true + if currentNum == 0 then currentNum = #colorNameArray end + if currentNum > #colorNameArray then currentNum = 1 end + EID.Config["ItemPoolTextColor"] = colorNameArray[currentNum] + end, + Info = {"Changes the color of last item pool indicator texts (as long as they are enabled)."} + } + ) + end if MCM.i18n == "Chinese" then require("eid_mcm_cn") diff --git a/eid_modifiers.lua b/eid_modifiers.lua index 352d3430..42e5a391 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -229,6 +229,19 @@ end if EID.isRepentance then + -- Handle Last Pool + local function LastPoolCallback(descObj) + local itemConfig = EID.itemConfig:GetCollectible(descObj.ObjSubType) + if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then + local lastPool = game:GetItemPool():GetLastPool() + local poolName = "" + local poolDescPrepend = EID:getDescriptionEntry("itemPoolFor") + local poolDescTable = EID:getDescriptionEntry("itemPoolNames") + poolName = "{{"..EID.Config["ItemPoolTextColor"].."}}"..poolDescPrepend..""..(EID.ItemPoolTypeToMarkup[lastPool] or "{{ItemPoolTreasure}}")..poolDescTable[lastPool] .. "{{CR}}#" + descObj.Description = poolName .. descObj.Description + end + return descObj + end -- Handle Birthright local function BirthrightCallback(descObj) descObj.Description = "" @@ -676,6 +689,7 @@ if EID.isRepentance then -- Using magic numbers here in case it's slightly faster, and because the callback names give context -- Check Birthright first because it overwrites the description instead of appending to it if descObj.ObjSubType == 619 then table.insert(callbacks, BirthrightCallback) end + if not EID.InsideItemReminder and EID.Config["ShowItemPoolText"] then table.insert(callbacks, LastPoolCallback) end if descObj.ObjSubType == 644 then table.insert(callbacks, ConsolationPrizeCallback) end if EID.collectiblesOwned[664] then table.insert(callbacks, BingeEaterCallback) end diff --git a/main.lua b/main.lua index 93ede1e9..211dfcb0 100644 --- a/main.lua +++ b/main.lua @@ -622,6 +622,16 @@ function EID:printDescription(desc, cachedID) if EID.Config["ShowQuality"] and desc.Quality then curName = curName.." - {{Quality"..desc.Quality.."}}" end + -- Display Last Pool for Collectible for full reroll effects + if EID.isRepentance and EID.Config["ShowItemPoolIcon"] and (desc.ObjType == 5 and desc.ObjVariant == 100) then + local itemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType) + if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then + if not EID.Config["ShowQuality"] then + curName = curName.." - " + end + curName = curName..""..(EID.ItemPoolTypeToMarkup[game:GetItemPool():GetLastPool()] or "{{ItemPoolTreasure}}") + end + end -- Display the mod this item is from if desc.ModName then curName = curName .. EID:getModNameString(desc) diff --git a/resources/gfx/eid_inline_icons.anm2 b/resources/gfx/eid_inline_icons.anm2 index c9278c31..c6bf3222 100644 --- a/resources/gfx/eid_inline_icons.anm2 +++ b/resources/gfx/eid_inline_icons.anm2 @@ -1,5 +1,5 @@ - + @@ -643,5 +643,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/gfx/eid_inline_icons.png b/resources/gfx/eid_inline_icons.png index 3f2c6b0e..5d4c3464 100644 Binary files a/resources/gfx/eid_inline_icons.png and b/resources/gfx/eid_inline_icons.png differ