Removed env:
This commit is contained in:
parent
b284172047
commit
35d762134b
@ -160,12 +160,12 @@ minetest.register_node("mycorners:machine_corner", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
after_place_node = function(pos, placer)
|
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("owner", (placer:get_player_name() or ""));
|
||||||
meta:set_string("infotext", "Corner Machine (owned by " .. (placer:get_player_name() or "") .. ")");
|
meta:set_string("infotext", "Corner Machine (owned by " .. (placer:get_player_name() or "") .. ")");
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
local meta = minetest.env:get_meta(pos);
|
local meta = minetest.get_meta(pos);
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if not inv:is_empty("matblock") then
|
if not inv:is_empty("matblock") then
|
||||||
return false
|
return false
|
||||||
@ -177,7 +177,7 @@ can_dig = function(pos,player)
|
|||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "invsize[10,11;]"..
|
meta:set_string("formspec", "invsize[10,11;]"..
|
||||||
"background[-0.15,-0.25;10.40,11.75;mycorners_background.png]"..
|
"background[-0.15,-0.25;10.40,11.75;mycorners_background.png]"..
|
||||||
"label[0,0;Corner Machine]"..
|
"label[0,0;Corner Machine]"..
|
||||||
@ -210,7 +210,7 @@ on_construct = function(pos)
|
|||||||
inv:set_size("res2", 1)
|
inv:set_size("res2", 1)
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
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()
|
local inv = meta:get_inventory()
|
||||||
if fields["make"]
|
if fields["make"]
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user