From 99969434feef4e3ef8ce6d08327117a89c91b3a6 Mon Sep 17 00:00:00 2001 From: v-rob <31123645+v-rob@users.noreply.github.com> Date: Sun, 7 Jan 2018 13:41:48 -0800 Subject: [PATCH] Change name to copy_chest --- init.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 870dbb5..52162eb 100644 --- a/init.lua +++ b/init.lua @@ -21,8 +21,8 @@ local function get_infinite_chest_formspec(inv) return formspec end -minetest.register_node("infinite_chest:chest", { - description = "Infinite Chest", +minetest.register_node("copy_chest:chest", { + description = "Copy Chest", tiles = {"default_chest_top.png"}, is_ground_content = false, groups = {choppy = 2, oddly_breakable_by_hand = 2}, @@ -30,27 +30,27 @@ minetest.register_node("infinite_chest:chest", { on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("formspec", get_infinite_chest_formspec(nil)) - meta:set_string( 'infotext', ('Infinite Chest')) + meta:set_string( 'infotext', ('Copy Chest')) local inv = meta:get_inventory() inv:set_size('put_in', 1 * 1) inv:set_size('take_from', 1 * 1) end, on_metadata_inventory_put = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name() .. - " moves stuff to infinite chest at " .. minetest.pos_to_string(pos)) + " moves stuff to copy chest at " .. minetest.pos_to_string(pos)) local meta = minetest.get_meta(pos) meta:set_string("formspec", get_infinite_chest_formspec(meta:get_inventory())) end, on_metadata_inventory_take = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name() .. - " takes stuff from infinite chest at " .. minetest.pos_to_string(pos)) + " takes stuff from copy chest at " .. minetest.pos_to_string(pos)) local meta = minetest.get_meta(pos) meta:set_string("formspec", get_infinite_chest_formspec(meta:get_inventory())) end, }) minetest.register_abm({ - nodenames = {'infinite_chest:chest'}, + nodenames = {'copy_chest:chest'}, interval = 1, chance = 1, action = function(pos, node) @@ -66,6 +66,6 @@ minetest.register_abm({ if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= nil then hopper:add_container({ - {"top", "infinite_chest:chest", "take_from"}, + {"top", "copy_chest:chest", "take_from"}, }) end \ No newline at end of file