Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
olanti-p committed Dec 7, 2022
1 parent ccc9687 commit 6181f9d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions data/mods/saveload_lua_test/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ local storage = game.mod_storage[ game.current_mod ]
--[[
If we keep all our data simple and in mod.storage,
we won't even have to register save/load hooks,
it'll be saved automatically.
it'll be saved/loaded automatically.
]]--
mod.storage = storage

--[[
If we have complex enough state (e.g. recursive tables, or with custom metatables)
we may create a hook that would write a simplified version into mod_storage,
so the hardcoded JSON serializer would be able to handle it.
If we want to build complex state out of loaded data
we may create a hook that would read loaded data from mod_storage
and create our complex state in the mod_runtime.
]]--
mod.on_game_load_hook = function()
log_info("SLT: on_load")
Expand All @@ -34,9 +34,9 @@ mod.on_game_load_hook = function()
end

--[[
If we want to build complex state out of loaded data
we may create a hook that would read loaded data from mod_storage
and create our complex state in the mod_runtime.
If we have complex enough state (e.g. recursive tables, or with custom metatables)
we may create a hook that would write a simplified version into mod_storage,
so the hardcoded JSON serializer would be able to handle it.
]]--
mod.on_game_save_hook = function()
log_info("SLT: on_save")
Expand Down

0 comments on commit 6181f9d

Please sign in to comment.