mirror of
https://github.com/minetest-mods/throwing_arrows.git
synced 2025-01-10 10:10:26 +01:00
Replace deprecated functions with newer ones (#1)
This commit is contained in:
parent
e47fd58725
commit
cdf1738596
6
init.lua
6
init.lua
@ -170,11 +170,11 @@ if get_setting("teleport_arrow") then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.setting_getbool("throwing.allow_teleport_in_protected") == false then
|
if minetest.settings:get_bool("throwing.allow_teleport_in_protected") == false then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
hitter:moveto(last_pos)
|
hitter:move_to(last_pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -256,7 +256,7 @@ if get_setting("drop_arrow") then
|
|||||||
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
|
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
|
||||||
end,
|
end,
|
||||||
on_hit_fails = function(self, _, thrower, data)
|
on_hit_fails = function(self, _, thrower, data)
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
|
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user