summaryrefslogtreecommitdiff
path: root/digilines_lightsensor/init.lua
diff options
context:
space:
mode:
authorCiaran Gultnieks <ciaran@ciarang.com>2014-02-13 20:45:31 +0000
committerCiaran Gultnieks <ciaran@ciarang.com>2014-02-26 13:22:29 +0000
commitb2f959328c685d42e2ea3b0ec1aa8d37797d009d (patch)
tree9ebdc4080f829281ff3e97647c5b0badd49d274d /digilines_lightsensor/init.lua
parent78d67f00a6d18e96884bc4677b62573e6be46540 (diff)
Update deprecated api calls
Diffstat (limited to 'digilines_lightsensor/init.lua')
-rw-r--r--digilines_lightsensor/init.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/digilines_lightsensor/init.lua b/digilines_lightsensor/init.lua
index 8db748e..2bbbc27 100644
--- a/digilines_lightsensor/init.lua
+++ b/digilines_lightsensor/init.lua
@@ -22,9 +22,9 @@ local lsensor_selbox =
}
local on_digiline_receive = function (pos, node, channel, msg)
- local setchan = minetest.env:get_meta(pos):get_string("channel")
+ local setchan = minetest.get_meta(pos):get_string("channel")
if channel == setchan and msg == GET_COMMAND then
- local lightval = minetest.env:get_node_light(pos)
+ local lightval = minetest.get_node_light(pos)
digiline:receptor_send(pos, digiline.rules.default, channel, lightval)
end
end
@@ -46,11 +46,11 @@ minetest.register_node("digilines_lightsensor:lightsensor", {
},
},
on_construct = function(pos)
- local meta = minetest.env:get_meta(pos)
+ local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end,
on_receive_fields = function(pos, formname, fields, sender)
- local meta = minetest.env:get_meta(pos)
+ local meta = minetest.get_meta(pos)
fields.channel = fields.channel or ""
meta:set_string("channel", fields.channel)
end,