Change README.md and fix a bug for teleporter and wireless

This commit is contained in:
palige
2015-08-31 11:25:29 +02:00
parent 636e1faedf
commit 9df8c6be64
3 changed files with 20 additions and 8 deletions

View File

@ -1,4 +1,4 @@
teleporters = {}
local teleporters = {}
local register = function(pos)
local meta = minetest.env:get_meta(pos)
@ -63,7 +63,13 @@ minetest.register_node("moremesecons_teleporter:teleporter", {
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
register(pos)
end
end,
on_destruct = function(pos)
local RID = minetest.get_meta(pos):get_int("RID")
if RID then
table.remove(teleporters, RID)
end
end,
})