Fix deprecated get/set_attribute calls (#9)
This commit is contained in:
parent
c500257c0d
commit
7bb3e01547
6
init.lua
6
init.lua
@ -63,7 +63,7 @@ skybox.set = function(player, number)
|
||||
player:set_sky(sky[2], "skybox", textures, true)
|
||||
end
|
||||
player:set_clouds(sky[4])
|
||||
player:set_attribute("skybox:skybox", sky[1])
|
||||
player:get_meta():set_string("skybox:skybox", sky[1])
|
||||
end
|
||||
end
|
||||
|
||||
@ -86,7 +86,7 @@ skybox.clear = function(player)
|
||||
player:set_moon({visible = true})
|
||||
player:set_stars({visible = true})
|
||||
|
||||
player:set_attribute("skybox:skybox", "off")
|
||||
player:get_meta():set_string("skybox:skybox", "off")
|
||||
end
|
||||
|
||||
skybox.add = function(def)
|
||||
@ -102,7 +102,7 @@ end
|
||||
--
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local sky = player:get_attribute("skybox:skybox")
|
||||
local sky = player:get_meta():get_string("skybox:skybox")
|
||||
if not sky or sky == "" then
|
||||
skybox.clear(player)
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user