New Mobs, Switch to Creatura

This commit is contained in:
ElCeejo 2022-02-10 18:00:06 -08:00 committed by GitHub
parent 1450e131fa
commit e773fab121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 6144 additions and 3247 deletions

20
api/storage.lua Normal file
View file

@ -0,0 +1,20 @@
local mod_storage = minetest.get_mod_storage()
local data = {
spawn_points = minetest.deserialize(mod_storage:get_string("spawn_points")) or {},
}
local function save()
mod_storage:set_string("spawn_points", minetest.serialize(data.spawn_points))
end
minetest.register_on_shutdown(save)
minetest.register_on_leaveplayer(save)
local function periodic_save()
save()
minetest.after(120, periodic_save)
end
minetest.after(120, periodic_save)
return data