mirror of
https://github.com/APercy/airutils.git
synced 2025-03-23 03:12:20 +00:00
improved dettach function
This commit is contained in:
parent
3673389f37
commit
247419019b
1 changed files with 4 additions and 3 deletions
7
init.lua
7
init.lua
|
@ -647,11 +647,12 @@ minetest.register_chatcommand("remove_hook", {
|
||||||
local entity = seat:get_luaentity()
|
local entity = seat:get_luaentity()
|
||||||
if entity then
|
if entity then
|
||||||
if entity.on_step == airutils.on_step then
|
if entity.on_step == airutils.on_step then
|
||||||
local rem_ent = entity.object:get_attach():get_luaentity()
|
local rem_obj = entity.object:get_attach()
|
||||||
if not rem_ent then
|
if not rem_obj then
|
||||||
minetest.chat_send_player(name,core.colorize('#ff0000', S(" >>> the hook is stuck!!!")))
|
minetest.chat_send_player(name,core.colorize('#ff0000', S(" >>> no hook found")))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local rem_ent = rem_obj:get_luaentity()
|
||||||
|
|
||||||
local pos = rem_ent.object:get_pos()
|
local pos = rem_ent.object:get_pos()
|
||||||
local rotation = rem_ent.object:get_rotation()
|
local rotation = rem_ent.object:get_rotation()
|
||||||
|
|
Loading…
Add table
Reference in a new issue