From acf17f2ba45ac5f0eb111024b0350efead0df8ff Mon Sep 17 00:00:00 2001 From: Niklp <89982526+Niklp09@users.noreply.github.com> Date: Sat, 18 Jun 2022 10:44:02 +0200 Subject: [PATCH] Replace deprecated functions (#37) --- homedecor_books/init.lua | 2 +- homedecor_climate_control/init.lua | 8 ++++---- homedecor_seating/init.lua | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homedecor_books/init.lua b/homedecor_books/init.lua index a89ce2d7..1fcdbd61 100644 --- a/homedecor_books/init.lua +++ b/homedecor_books/init.lua @@ -194,7 +194,7 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields) meta:set_string("infotext", fields.title) end minetest.log("action", S("@1 has written in a book (title: \"@2\"): \"@3\" at location @4", - player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:getpos()))) + player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:get_pos()))) player_current_book[player_name] = nil return true diff --git a/homedecor_climate_control/init.lua b/homedecor_climate_control/init.lua index e78836ea..1d23e54b 100644 --- a/homedecor_climate_control/init.lua +++ b/homedecor_climate_control/init.lua @@ -47,13 +47,13 @@ local add_mesh_desk_fan_entity = function(pos) local param2 = minetest.get_node(pos).param2 local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan") if param2 == 0 then - entity:setyaw(3.142) -- 180 degrees + entity:set_yaw(3.142) -- 180 degrees elseif minetest.get_node(pos).param2 == 1 then - entity:setyaw(3.142/2) -- 90 degrees + entity:set_yaw(3.142/2) -- 90 degrees elseif minetest.get_node(pos).param2 == 3 then - entity:setyaw((-3.142/2)) -- 270 degrees + entity:set_yaw((-3.142/2)) -- 270 degrees else - entity:setyaw(0) + entity:set_yaw(0) end return entity end diff --git a/homedecor_seating/init.lua b/homedecor_seating/init.lua index cda889f5..b70ddf8a 100644 --- a/homedecor_seating/init.lua +++ b/homedecor_seating/init.lua @@ -121,7 +121,7 @@ function lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, seats) --seat the player sit_pos.y = sit_pos.y-0.5 - clicker:setpos(sit_pos) + clicker:set_pos(sit_pos) return itemstack end