Merge pull request #224 from Buurazu/patch-15
remove the low max item count warning message
This commit is contained in:
4 files changed
+27
-33
No files matched your search
@@ -34,6 +34,7 @@ local repCollectibles={
|
|||||||
[52] = {"52", "Dr. Fetus", "Bomb tears#Each bomb deals 10x your damage#If that results in over 60 damage, it instead deals 5x your damage + 30#↓ -60% Tears down"}, --Dr. Fetus
|
[52] = {"52", "Dr. Fetus", "Bomb tears#Each bomb deals 10x your damage#If that results in over 60 damage, it instead deals 5x your damage + 30#↓ -60% Tears down"}, --Dr. Fetus
|
||||||
[53] = {"53", "Magneto", "Magnetic attraction for pickups#Opens chests remotely, ignoring damage of spike chests"}, -- Magneto
|
[53] = {"53", "Magneto", "Magnetic attraction for pickups#Opens chests remotely, ignoring damage of spike chests"}, -- Magneto
|
||||||
[55] = {"55", "Mom's Eye", "Chance to shoot a tear backwards"}, -- Mom's Eye
|
[55] = {"55", "Mom's Eye", "Chance to shoot a tear backwards"}, -- Mom's Eye
|
||||||
|
[59] = {"59", "The Book of Belial", "<Item not obtainable>"}, -- The Book of Belial (Judas's Birthright Version)
|
||||||
[62] = {"62", "Charm of the Vampire", "↑ +0.3 Damage up#Heals half a heart for every 13 enemies killed"}, -- Charm of the Vampire
|
[62] = {"62", "Charm of the Vampire", "↑ +0.3 Damage up#Heals half a heart for every 13 enemies killed"}, -- Charm of the Vampire
|
||||||
[64] = {"64", "Steam Sale", "-50% on shop items price#Getting this item multiple times reduces the price further"}, -- Steam Sale
|
[64] = {"64", "Steam Sale", "-50% on shop items price#Getting this item multiple times reduces the price further"}, -- Steam Sale
|
||||||
[67] = {"67", "Sister Maggy", "Normal tear familiar#Deals 6 damage per tear"}, -- Sister Maggy
|
[67] = {"67", "Sister Maggy", "Normal tear familiar#Deals 6 damage per tear"}, -- Sister Maggy
|
||||||
|
|||||||
+3
-2
@@ -436,6 +436,7 @@ function EID:getObjectName(Type, Variant, SubType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if tableName == "collectibles" then
|
if tableName == "collectibles" then
|
||||||
|
if EID.itemConfig:GetCollectible(SubType) == nil then return Type.."."..Variant.."."..SubType end
|
||||||
local vanillaName = EID.itemConfig:GetCollectible(SubType).Name
|
local vanillaName = EID.itemConfig:GetCollectible(SubType).Name
|
||||||
return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName
|
return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName
|
||||||
elseif tableName == "trinkets" then
|
elseif tableName == "trinkets" then
|
||||||
@@ -766,8 +767,7 @@ function EID:getSpindownResult(collectibleID)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function EID:GetMaxCollectibleID()
|
function EID:GetMaxCollectibleID()
|
||||||
--start a little lower than NUM_COLLECTIBLES, due to mods with outdated items.xmls that are missing newer items
|
local id = CollectibleType.NUM_COLLECTIBLES-1
|
||||||
local id = CollectibleType.NUM_COLLECTIBLES-17
|
|
||||||
local step = 16
|
local step = 16
|
||||||
while step > 0 do
|
while step > 0 do
|
||||||
if EID.itemConfig:GetCollectible(id+step) ~= nil then
|
if EID.itemConfig:GetCollectible(id+step) ~= nil then
|
||||||
@@ -805,6 +805,7 @@ function EID:isCollectibleUnlockedAnyPool(collectibleID)
|
|||||||
--THIS FUNCTION IS FOR REPENTANCE ONLY due to using Repentance XML data; currently used by the Achievement Check, Spindown Dice, and Bag of Crafting
|
--THIS FUNCTION IS FOR REPENTANCE ONLY due to using Repentance XML data; currently used by the Achievement Check, Spindown Dice, and Bag of Crafting
|
||||||
if not REPENTANCE then return true end
|
if not REPENTANCE then return true end
|
||||||
local item = EID.itemConfig:GetCollectible(collectibleID)
|
local item = EID.itemConfig:GetCollectible(collectibleID)
|
||||||
|
if item == nil then return false end
|
||||||
if EID.itemUnlockStates[collectibleID] == nil then
|
if EID.itemUnlockStates[collectibleID] == nil then
|
||||||
--whitelist all quest items and items with no associated achievement
|
--whitelist all quest items and items with no associated achievement
|
||||||
if item.AchievementID == -1 or (item.Tags and item.Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then
|
if item.AchievementID == -1 or (item.Tags and item.Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then
|
||||||
|
|||||||
+10
-10
@@ -184,16 +184,13 @@ for i = 1, EID.XMLMaxItemID do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--don't sort if there's a collectible ID discrepancy
|
table.sort(sortedIDs, function(a, b)
|
||||||
if EID:GetMaxCollectibleID() == EID.XMLMaxItemID then
|
if EID.XMLItemQualities[a] == EID.XMLItemQualities[b] then
|
||||||
table.sort(sortedIDs, function(a, b)
|
return (EID:getObjectName(5, 100, a) < EID:getObjectName(5, 100, b))
|
||||||
if EID.XMLItemQualities[a] == EID.XMLItemQualities[b] then
|
else
|
||||||
return (EID:getObjectName(5, 100, a) < EID:getObjectName(5, 100, b))
|
return (EID.XMLItemQualities[a] > EID.XMLItemQualities[b])
|
||||||
else
|
end
|
||||||
return (EID.XMLItemQualities[a] > EID.XMLItemQualities[b])
|
end)
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
local customRNGSeed = 0x77777770
|
local customRNGSeed = 0x77777770
|
||||||
local customRNGShift = {0,0,0}
|
local customRNGShift = {0,0,0}
|
||||||
@@ -603,6 +600,9 @@ local function detectModdedItems()
|
|||||||
if maxItemID > EID.XMLMaxItemID then
|
if maxItemID > EID.XMLMaxItemID then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
if EID.itemConfig:GetCollectible(EID.XMLMaxItemID) == nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -551,27 +551,19 @@ EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate)
|
|||||||
local hasShownAchievementWarning = false
|
local hasShownAchievementWarning = false
|
||||||
|
|
||||||
local function renderAchievementInfo()
|
local function renderAchievementInfo()
|
||||||
if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 then
|
if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 and game.Challenge == 0 then
|
||||||
if EID:GetMaxCollectibleID() < EID.XMLMaxItemID then
|
local characterID = Game():GetPlayer(0):GetPlayerType()
|
||||||
local demoDescObj = EID:getDescriptionObj(-999, -1, 1)
|
--ID 21 = Tainted Isaac. Tainted characters have definitely beaten Mom! (Fixes Tainted Lost's item pools ruining this check)
|
||||||
demoDescObj.Name = EID:getDescriptionEntry("AchievementWarningTitle") or ""
|
if characterID < 21 then
|
||||||
demoDescObj.Description = EID:getDescriptionEntry("OutdatedModWarningText") or ""
|
local hasBookOfRevelationsUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS)
|
||||||
EID:displayPermanentText(demoDescObj)
|
if not hasBookOfRevelationsUnlocked then
|
||||||
hasShownAchievementWarning = true
|
local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT)
|
||||||
else
|
if not hasCubeOfMeatUnlocked then
|
||||||
local characterID = Game():GetPlayer(0):GetPlayerType()
|
local demoDescObj = EID:getDescriptionObj(-999, -1, 1)
|
||||||
--ID 21 = Tainted Isaac. Tainted characters have definitely beaten Mom! (Fixes Tainted Lost's item pools ruining this check)
|
demoDescObj.Name = EID:getDescriptionEntry("AchievementWarningTitle") or ""
|
||||||
if characterID < 21 and game.Challenge == 0 then
|
demoDescObj.Description = EID:getDescriptionEntry("AchievementWarningText") or ""
|
||||||
local hasBookOfRevelationsUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS)
|
EID:displayPermanentText(demoDescObj)
|
||||||
if not hasBookOfRevelationsUnlocked then
|
hasShownAchievementWarning = true
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user