mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-26 09:03:46 +01:00
v1.12 Teleporter node added
This commit is contained in:
parent
b71c0e869c
commit
82f5e49977
@ -85,11 +85,15 @@ minetest.register_node("tubelib_addons3:teleporter", {
|
||||
on_destruct = function(pos)
|
||||
-- unpair peer node
|
||||
local meta = minetest.get_meta(pos)
|
||||
local peer_pos = minetest.string_to_pos(meta:get_string("peer"))
|
||||
local peer_meta = minetest.get_meta(peer_pos)
|
||||
peer_meta:set_string("channel", nil)
|
||||
peer_meta:set_string("formspec", sForm)
|
||||
peer_meta:set_string("infotext", "Tubelib Teleporter, unconfigured")
|
||||
local peer = meta:get_string("peer")
|
||||
if peer ~= "" then
|
||||
local peer_pos = minetest.string_to_pos(peer)
|
||||
local peer_meta = minetest.get_meta(peer_pos)
|
||||
peer_meta:set_string("channel", nil)
|
||||
peer_meta:set_string("peer", nil)
|
||||
peer_meta:set_string("formspec", sForm)
|
||||
peer_meta:set_string("infotext", "Tubelib Teleporter, unconfigured")
|
||||
end
|
||||
end,
|
||||
|
||||
on_rotate = screwdriver.disallow,
|
||||
|
Loading…
Reference in New Issue
Block a user