diff --git a/cobble.lua b/cobble.lua index 97b2b88..060adc7 100644 --- a/cobble.lua +++ b/cobble.lua @@ -29,12 +29,12 @@ minetest.register_node("more_chests:cobble", { legacy_facedir_simple = true, sounds = default.node_sound_wood_defaults(), 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 "") end, on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", "size[8,9]".. "list[current_name;main;0,0;8,4;]".. @@ -46,12 +46,12 @@ minetest.register_node("more_chests:cobble", { inv:set_size("main", 8*4) end, can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); local inv = meta:get_inventory() return inv:is_empty("main") end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a locked chest belonging to ".. @@ -62,7 +62,7 @@ minetest.register_node("more_chests:cobble", { return count end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a locked chest belonging to ".. @@ -73,7 +73,7 @@ minetest.register_node("more_chests:cobble", { return stack:get_count() end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a locked chest belonging to ".. diff --git a/secret.lua b/secret.lua index ae133bb..44548fc 100644 --- a/secret.lua +++ b/secret.lua @@ -38,13 +38,13 @@ minetest.register_node("more_chests:secret", { legacy_facedir_simple = true, sounds = default.node_sound_wood_defaults(), 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", "Secret Chest (owned by ".. meta:get_string("owner")..")") end, on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", open) meta:set_string("infotext", "Secret Chest") meta:set_string("owner", "") @@ -52,12 +52,12 @@ minetest.register_node("more_chests:secret", { inv:set_size("main", 8*4) end, can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); local inv = meta:get_inventory() return inv:is_empty("main") end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a secret chest belonging to ".. @@ -68,7 +68,7 @@ minetest.register_node("more_chests:secret", { return count end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a secret chest belonging to ".. @@ -79,7 +79,7 @@ minetest.register_node("more_chests:secret", { return stack:get_count() end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a secret chest belonging to ".. @@ -102,7 +102,7 @@ minetest.register_node("more_chests:secret", { " takes stuff from secret chest at "..minetest.pos_to_string(pos)) end, on_receive_fields = function(pos, formname, fields, sender) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if has_locked_chest_privilege(meta, sender) then if fields.open == "open" then meta:set_string("formspec", open) diff --git a/shared.lua b/shared.lua index 32bb591..5f284e4 100644 --- a/shared.lua +++ b/shared.lua @@ -45,13 +45,13 @@ minetest.register_node("more_chests:shared", { legacy_facedir_simple = true, sounds = default.node_sound_wood_defaults(), 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", "Shared Chest (owned by ".. meta:get_string("owner")..")") end, on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", get_formspec("")) meta:set_string("infotext", "Shared Chest") meta:set_string("owner", "") @@ -59,12 +59,12 @@ minetest.register_node("more_chests:shared", { inv:set_size("main", 8*4) end, can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); local inv = meta:get_inventory() return inv:is_empty("main") end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a shared chest belonging to ".. @@ -75,7 +75,7 @@ minetest.register_node("more_chests:shared", { return count end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a shared chest belonging to ".. @@ -86,7 +86,7 @@ minetest.register_node("more_chests:shared", { return stack:get_count() end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. " tried to access a shared chest belonging to ".. @@ -109,7 +109,7 @@ minetest.register_node("more_chests:shared", { " takes stuff from shared chest at "..minetest.pos_to_string(pos)) end, on_receive_fields = function(pos, formspec, fields, sender) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); if fields.shared then if meta:get_string("owner") == sender:get_player_name() then meta:set_string("shared", fields.shared); diff --git a/wifi.lua b/wifi.lua index c9dbbae..2d06fb0 100644 --- a/wifi.lua +++ b/wifi.lua @@ -7,7 +7,7 @@ minetest.register_node("more_chests:wifi", { legacy_facedir_simple = true, sounds = default.node_sound_wood_defaults(), on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", "size[8,9]".. "list[current_player;more_chests:wifi;0,0;8,4;]"..