diff options
author | SmallJoker <mk939@ymail.com> | 2018-07-03 22:30:44 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-07-03 22:30:44 +0200 |
commit | 92a55c3985b53dd0a99460527fb88e14ddf60563 (patch) | |
tree | 596b82830e8e29ba89810acfd824319e2a35362d /wielder.lua | |
parent | 1a396c707c6af22f3067f47df1790ce7fe56d90c (diff) |
Replace deprecated Lua function calls
Diffstat (limited to 'wielder.lua')
-rw-r--r-- | wielder.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wielder.lua b/wielder.lua index eb7931f..711e3ca 100644 --- a/wielder.lua +++ b/wielder.lua @@ -258,7 +258,7 @@ local function register_wielder(data) end, after_place_node = function (pos, placer) pipeworks.scan_for_tube_objects(pos) - local placer_pos = placer:getpos() + local placer_pos = placer:get_pos() if placer_pos and placer:is_player() then placer_pos = vector.add(placer_pos, assumed_eye_pos) end if placer_pos then local dir = vector.subtract(pos, placer_pos) @@ -495,7 +495,9 @@ if pipeworks.enable_dispenser then sneak = true, act = function(virtplayer, pointed_thing) local wieldstack = virtplayer:get_wielded_item() - virtplayer:set_wielded_item((minetest.registered_items[wieldstack:get_name()] or {on_drop=minetest.item_drop}).on_drop(wieldstack, virtplayer, virtplayer:getpos()) or wieldstack) + virtplayer:set_wielded_item((minetest.registered_items[wieldstack:get_name()] or + {on_drop=minetest.item_drop}).on_drop(wieldstack, virtplayer, virtplayer:get_pos()) or + wieldstack) end, eject_drops = false, }) |