move DetectModdedItems to api
This commit is contained in:
1 parent
14807d51b0
commit
4db95e481f
1 file changed
+14
-1
+14
-1
@@ -782,9 +782,22 @@ function EID:GetMaxCollectibleID()
|
||||
end
|
||||
|
||||
local maxCollectibleID = nil
|
||||
function EID:DetectModdedItems()
|
||||
if maxCollectibleID == nil then
|
||||
maxCollectibleID = EID:GetMaxCollectibleID()
|
||||
end
|
||||
if maxCollectibleID > EID.XMLMaxItemID then
|
||||
return true
|
||||
end
|
||||
if EID.itemConfig:GetCollectible(EID.XMLMaxItemID) == nil then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function EID:isCollectibleUnlocked(collectibleID, itemPoolOfItem)
|
||||
local itemPool = Game():GetItemPool()
|
||||
if (not maxCollectibleID) then maxCollectibleID = EID:GetMaxCollectibleID() end
|
||||
if maxCollectibleID == nil then maxCollectibleID = EID:GetMaxCollectibleID() end
|
||||
for i= 1, maxCollectibleID do
|
||||
if ItemConfig.Config.IsValidCollectible(i) and i ~= collectibleID then
|
||||
itemPool:AddRoomBlacklist(i)
|
||||
|
||||
Reference in new issue
Block a user