mirror of
https://github.com/minetest-mods/throwing_arrows.git
synced 2024-11-14 22:50:24 +01:00
Replace deprecated functions with newer ones (#1)
This commit is contained in:
parent
e47fd58725
commit
cdf1738596
8
init.lua
8
init.lua
|
@ -170,11 +170,11 @@ if get_setting("teleport_arrow") then
|
|||
return
|
||||
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
|
||||
end
|
||||
|
||||
hitter:moveto(last_pos)
|
||||
hitter:move_to(last_pos)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
@ -256,9 +256,9 @@ if get_setting("drop_arrow") then
|
|||
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
|
||||
end,
|
||||
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)
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user