Fix bug with unconfigured turncontroller
This commit is contained in:
parent
3309316b18
commit
47c391c679
@ -83,21 +83,25 @@ minetest.register_node("techage:ta4_turncontroller", {
|
|||||||
meta:set_string("formspec", formspec(nvm, meta))
|
meta:set_string("formspec", formspec(nvm, meta))
|
||||||
elseif fields.left then
|
elseif fields.left then
|
||||||
meta:set_string("status", "")
|
meta:set_string("status", "")
|
||||||
|
if nvm.lpos then
|
||||||
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "l")
|
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "l")
|
||||||
if new_posses then
|
if new_posses then
|
||||||
nvm.lpos = new_posses
|
nvm.lpos = new_posses
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
mark.stop(name)
|
mark.stop(name)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
meta:set_string("formspec", formspec(nvm, meta))
|
meta:set_string("formspec", formspec(nvm, meta))
|
||||||
elseif fields.right then
|
elseif fields.right then
|
||||||
meta:set_string("status", "")
|
meta:set_string("status", "")
|
||||||
|
if nvm.lpos then
|
||||||
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "r")
|
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "r")
|
||||||
if new_posses then
|
if new_posses then
|
||||||
nvm.lpos = new_posses
|
nvm.lpos = new_posses
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
mark.stop(name)
|
mark.stop(name)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
meta:set_string("formspec", formspec(nvm, meta))
|
meta:set_string("formspec", formspec(nvm, meta))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user