From 7bb3e015471f7aaafc91985d4ec7b3ccacb44dda Mon Sep 17 00:00:00 2001 From: Droog71 <71droog71@gmail.com> Date: Sun, 2 Jan 2022 14:39:21 -0500 Subject: [PATCH] Fix deprecated get/set_attribute calls (#9) --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 6b1b111..24bd3d8 100644 --- a/init.lua +++ b/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