minetest-i4/i3/init.lua
Jaidyn Ann e49a197fc3 Add conversion mod to transfer data from i3→14
This makes i4 a modpack; files have been moved correspondingly.
2024-01-12 13:18:10 -06:00

12 lines
392 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- This is a placeholder mod, to mimic i3s presence for mods that test for mods
-- that test for it using modpath or some other mechanism.
-- i4 is compatible with i3, mods can use the global tables i3 or i4.
local storage = core.get_mod_storage("i3")
local data = core.deserialize(storage:get_string"data") or {}
if data and not i4.imported then
i4.data = data
i4.imported = true
end