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


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


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

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