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 @@
wireless = {}
local wireless = {}
local register = function(pos)
local meta = minetest.env:get_meta(pos)
@ -56,6 +56,12 @@ minetest.register_node("moremesecons_wireless:wireless", {
meta:set_string("formspec", "field[channel;channel;${channel}]")
register(pos)
end,
on_destruct = function(pos)
local RID = minetest.get_meta(pos):get_int("RID")
if RID then
table.remove(wireless, RID)
end
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
meta:set_string("channel", fields.channel)