move DetectModdedItems to api
This commit is contained in:
1 parent
14807d51b0
commit
4db95e481f
1 file changed
+15
-2
+15
-2
@@ -777,14 +777,27 @@ function EID:GetMaxCollectibleID()
|
||||
step = step // 2
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return id
|
||||
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