Fix bug with unconfigured turncontroller
This commit is contained in:
parent
3309316b18
commit
47c391c679
@ -83,20 +83,24 @@ 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", "")
|
||||||
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "l")
|
if nvm.lpos then
|
||||||
if new_posses then
|
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "l")
|
||||||
nvm.lpos = new_posses
|
if new_posses then
|
||||||
local name = player:get_player_name()
|
nvm.lpos = new_posses
|
||||||
mark.stop(name)
|
local name = player:get_player_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", "")
|
||||||
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "r")
|
if nvm.lpos then
|
||||||
if new_posses then
|
local new_posses = fly.rotate_nodes(pos, nvm.lpos, "r")
|
||||||
nvm.lpos = new_posses
|
if new_posses then
|
||||||
local name = player:get_player_name()
|
nvm.lpos = new_posses
|
||||||
mark.stop(name)
|
local name = player:get_player_name()
|
||||||
|
mark.stop(name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
meta:set_string("formspec", formspec(nvm, meta))
|
meta:set_string("formspec", formspec(nvm, meta))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user