Add function callable by other mods to restore custom skybox (#3)
This commit is contained in:
parent
7bb3e01547
commit
5086ec1256
5
init.lua
5
init.lua
@ -101,7 +101,7 @@ end
|
||||
-- registrations and load/save code
|
||||
--
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
skybox.restore = function(player)
|
||||
local sky = player:get_meta():get_string("skybox:skybox")
|
||||
if not sky or sky == "" then
|
||||
skybox.clear(player)
|
||||
@ -114,7 +114,8 @@ minetest.register_on_joinplayer(function(player)
|
||||
end
|
||||
skybox.clear(player)
|
||||
end
|
||||
end)
|
||||
end
|
||||
minetest.register_on_joinplayer(skybox.restore)
|
||||
|
||||
minetest.register_privilege("skybox", {
|
||||
description = "Change sky box for yourself",
|
||||
|
Loading…
x
Reference in New Issue
Block a user