Removed env:
This commit is contained in:
parent
ecdf465456
commit
a3755d64e7
@ -46,13 +46,13 @@ minetest.register_node("mylights:machine", {
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local meta = minetest.get_meta(pos);
|
||||
meta:set_string("owner", (placer:get_player_name() or ""));
|
||||
meta:set_string("infotext", "Light Bulb Machine (owned by " .. (placer:get_player_name() or "") .. ")");
|
||||
end,
|
||||
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("ingot1") then
|
||||
return false
|
||||
@ -77,7 +77,7 @@ can_dig = function(pos,player)
|
||||
end,
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", "invsize[9,10;]"..
|
||||
"background[-0.15,-0.25;9.40,10.75;mylights_background.png]"..
|
||||
"label[0,0;Light Bulbs:]"..
|
||||
@ -110,7 +110,7 @@ on_construct = function(pos)
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
if fields["make"]
|
||||
|
@ -55,13 +55,13 @@ minetest.register_node("mylights:machine_cubes", {
|
||||
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local meta = minetest.get_meta(pos);
|
||||
meta:set_string("owner", (placer:get_player_name() or ""));
|
||||
meta:set_string("infotext", "Light Box and Cube Machine (owned by " .. (placer:get_player_name() or "") .. ")");
|
||||
end,
|
||||
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("ingot1") then
|
||||
return false
|
||||
@ -82,7 +82,7 @@ can_dig = function(pos,player)
|
||||
end,
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", "invsize[9,10;]"..
|
||||
"background[-0.15,-0.25;9.40,10.75;mylights_background2.png]"..
|
||||
"label[0,0;Light Box and Cubes:]"..
|
||||
@ -117,7 +117,7 @@ on_construct = function(pos)
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
if fields["makebox"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user