Improved compatibility with AB+ and deactivated Achievement warning for that DLC
This commit is contained in:
1 parent
1a22c0083d
commit
751df4c3bb
3 files changed
+8
-9
No files matched your search
+5
-6
@@ -776,7 +776,6 @@ end
|
|||||||
local maxCollectibleID = nil
|
local maxCollectibleID = nil
|
||||||
function EID:isCollectibleUnlocked(collectibleID, itemPoolOfItem)
|
function EID:isCollectibleUnlocked(collectibleID, itemPoolOfItem)
|
||||||
local itemPool = Game():GetItemPool()
|
local itemPool = Game():GetItemPool()
|
||||||
--local itemConfig = Isaac.GetItemConfig()
|
|
||||||
if (not maxCollectibleID) then maxCollectibleID = EID:GetMaxCollectibleID() end
|
if (not maxCollectibleID) then maxCollectibleID = EID:GetMaxCollectibleID() end
|
||||||
for i= 1, maxCollectibleID do
|
for i= 1, maxCollectibleID do
|
||||||
if ItemConfig.Config.IsValidCollectible(i) and i ~= collectibleID then
|
if ItemConfig.Config.IsValidCollectible(i) and i ~= collectibleID then
|
||||||
@@ -785,7 +784,7 @@ function EID:isCollectibleUnlocked(collectibleID, itemPoolOfItem)
|
|||||||
end
|
end
|
||||||
local isUnlocked = false
|
local isUnlocked = false
|
||||||
for i = 0,1 do -- some samples to make sure
|
for i = 0,1 do -- some samples to make sure
|
||||||
local collID = itemPool:GetCollectible(itemPoolOfItem, false)
|
local collID = itemPool:GetCollectible(itemPoolOfItem, false, 1)
|
||||||
if collID == collectibleID then
|
if collID == collectibleID then
|
||||||
isUnlocked = true
|
isUnlocked = true
|
||||||
break
|
break
|
||||||
@@ -799,18 +798,18 @@ function EID:isCollectibleUnlockedAnyPool(collectibleID)
|
|||||||
local item = EID.itemConfig:GetCollectible(collectibleID)
|
local item = EID.itemConfig:GetCollectible(collectibleID)
|
||||||
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 & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then
|
if item.AchievementID == -1 or (item.Tags and item.Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then
|
||||||
EID.itemUnlockStates[collectibleID] = true
|
EID.itemUnlockStates[collectibleID] = true
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
--blacklist all hidden items
|
--blacklist all hidden items
|
||||||
if (item.Hidden) then
|
if item.Hidden then
|
||||||
EID.itemUnlockStates[collectibleID] = false
|
EID.itemUnlockStates[collectibleID] = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
--iterate through the pools this item can be in
|
--iterate through the pools this item can be in
|
||||||
for k,v in ipairs(EID.CollectiblesPools[collectibleID]) do
|
for k,itemPoolID in ipairs(EID.CollectiblesPools[collectibleID]) do
|
||||||
if (EID:isCollectibleUnlocked(collectibleID, v)) then
|
if (itemPoolID < ItemPoolType.NUM_ITEMPOOLS and EID:isCollectibleUnlocked(collectibleID, itemPoolID)) then
|
||||||
EID.itemUnlockStates[collectibleID] = true
|
EID.itemUnlockStates[collectibleID] = true
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ local game = Game()
|
|||||||
require("eid_config")
|
require("eid_config")
|
||||||
EID.Config = EID.UserConfig
|
EID.Config = EID.UserConfig
|
||||||
EID.Config.Version = "3.2"
|
EID.Config.Version = "3.2"
|
||||||
EID.ModVersion = "3.84"
|
EID.ModVersion = "3.85"
|
||||||
EID.DefaultConfig.Version = EID.Config.Version
|
EID.DefaultConfig.Version = EID.Config.Version
|
||||||
EID.isHidden = false
|
EID.isHidden = false
|
||||||
EID.player = nil
|
EID.player = nil
|
||||||
@@ -537,7 +537,7 @@ EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate)
|
|||||||
|
|
||||||
local hasShownAchievementWarning = false
|
local hasShownAchievementWarning = false
|
||||||
local function renderAchievementInfo()
|
local function renderAchievementInfo()
|
||||||
if game:GetFrameCount() < 10*30 then
|
if REPENTANCE and game:GetFrameCount() < 10*30 then
|
||||||
local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT)
|
local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT)
|
||||||
if not hasCubeOfMeatUnlocked then
|
if not hasCubeOfMeatUnlocked then
|
||||||
local demoDescObj = EID:getDescriptionObj(-999, -1, 1)
|
local demoDescObj = EID:getDescriptionObj(-999, -1, 1)
|
||||||
|
|||||||
+1
-1
@@ -90,7 +90,7 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions
|
|||||||
- Jake for the sweet [b]German[/b] language pack
|
- 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
|
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities
|
||||||
</description>
|
</description>
|
||||||
<version>3.84</version>
|
<version>3.85</version>
|
||||||
<visibility>Public</visibility>
|
<visibility>Public</visibility>
|
||||||
<tag id="Lua"/>
|
<tag id="Lua"/>
|
||||||
<tag id="Items"/>
|
<tag id="Items"/>
|
||||||
|
|||||||
Reference in new issue
Block a user