
age_of_mending = {}
age_of_mending._mod_storage = core.get_mod_storage()
-- information about version such as current, last version, and just upgraded flag
age_of_mending.version = {}


-- the current version of the game as a number, `'a42'` -> `42`
age_of_mending.version.current = 55
--#update--------------------------


-- the last loaded version of the game
age_of_mending.version.previous = tonumber(age_of_mending._mod_storage:get_string("version")) or 0
-- true if the version is different than the previous loaded version
age_of_mending.version.just_updated = age_of_mending.version.current ~= age_of_mending.version.previous

-- update the saved last version; note that it will save downgrades
age_of_mending._mod_storage:set_string("version", age_of_mending.version.current)
