Removed env:
This commit is contained in:
parent
b8443e8c68
commit
a3ca1f3711
@ -63,13 +63,13 @@ minetest.register_node("mydeck:machine", {
|
|||||||
|
|
||||||
|
|
||||||
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", "Deck Machine (owned by " .. (placer:get_player_name() or "") .. ")");
|
meta:set_string("infotext", "Deck 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 inv:is_empty("ingot") and
|
if inv:is_empty("ingot") and
|
||||||
inv:is_empty("res") and
|
inv:is_empty("res") and
|
||||||
@ -86,7 +86,7 @@ can_dig = function(pos,player)
|
|||||||
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[12,10;]"..
|
meta:set_string("formspec", "invsize[12,10;]"..
|
||||||
"background[-0.15,-0.25;12.40,10.75;mydeck_background.png]"..
|
"background[-0.15,-0.25;12.40,10.75;mydeck_background.png]"..
|
||||||
"label[6,4;Wood:]"..
|
"label[6,4;Wood:]"..
|
||||||
@ -150,7 +150,7 @@ on_construct = function(pos)
|
|||||||
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["joists"]
|
if fields["joists"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user