-- This is a placeholder mod, to mimic i3’s presence for mods that test for it. -- It also migrates data from i3 to i4. local storage = core.get_mod_storage("i3") local data = core.deserialize(storage:get_string"data") or {} if data and not i4.imported then -- i3 stores all user-data in a mod-data table; we copy it verbatim to i4. i4.data = data -- By default, i4’s inventory-size is 32; i3’s, however, is 36. i4 will -- default to 36 at init-time if data was imported from i3. But since we’re -- only importing now (and i4 has already been initialized), we need to do -- it ourselves this time. if not i4.settings.inventory_size then i4.settings.inventory_size = 36 end -- Mark data as imported, so we don’t go through this song-and-dance again. i4.imported = true end