Fixed item collection feature not updating automatically
This commit is contained in:
1 parent
820487bfd8
commit
71a81add3b
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -1560,7 +1560,7 @@ end
|
||||
-- Returns true if an item needs to be collected for the collection page
|
||||
function EID:requiredForCollectionPage(itemID)
|
||||
if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or itemID >= CollectibleType.NUM_COLLECTIBLES or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end
|
||||
return not EID.SaveGame[EID.Config["SaveGameNumber"]].ItemCollection[itemID]
|
||||
return EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[itemID]
|
||||
end
|
||||
|
||||
-- Updates the item collection state of the players, based on the QueuedItem value.
|
||||
|
||||
@@ -1676,9 +1676,9 @@ function EID:OnGameStart(isSave)
|
||||
|
||||
-- collection progress
|
||||
EID.CollectedItems = savedEIDConfig["CollectedItems"] or {}
|
||||
if EID.SaveGame and EID.Config["SaveGameNumber"] > 0 then
|
||||
if EID.SaveGame and savedEIDConfig["SaveGameNumber"] > 0 then
|
||||
for _, id in ipairs(EID.CollectedItems) do
|
||||
EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[id] = nil
|
||||
EID.SaveGame[savedEIDConfig["SaveGameNumber"]].ItemNeedsPickup[id] = nil
|
||||
end
|
||||
end
|
||||
EID.PlayerItemInteractions = {}
|
||||
|
||||
Reference in new issue
Block a user