mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 00:02:23 +02:00
feat(mods): expose selected save chronology
This commit is contained in:
+13
-5
@@ -116,12 +116,20 @@ function Storage:selected(game)
|
||||
gameVersion = version,
|
||||
playthroughId = playthroughId,
|
||||
}
|
||||
local normal = SaveData.selectedNormalSaveInfo(save, self.injectedFs)
|
||||
if type(normal) == "table" and normal.savedAt ~= nil then
|
||||
context.normalSavedAt = normal.savedAt
|
||||
end
|
||||
return {
|
||||
context = function() return {
|
||||
engineVersion = context.engineVersion,
|
||||
gameVersion = context.gameVersion,
|
||||
playthroughId = context.playthroughId,
|
||||
} end,
|
||||
context = function()
|
||||
local copy = {
|
||||
engineVersion = context.engineVersion,
|
||||
gameVersion = context.gameVersion,
|
||||
playthroughId = context.playthroughId,
|
||||
}
|
||||
if context.normalSavedAt ~= nil then copy.normalSavedAt = context.normalSavedAt end
|
||||
return copy
|
||||
end,
|
||||
read = function(_, key) return self:read(selectedGame, key) end,
|
||||
write = function(_, key, value) return self:write(selectedGame, key, value) end,
|
||||
list = function(_, prefix) return self:list(selectedGame, prefix) end,
|
||||
|
||||
Reference in New Issue
Block a user