From d48b3dcaeec7523890029d88a21641bc37bebeb0 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 16 Jan 2023 02:12:39 -0500 Subject: [PATCH] Starting Inventory fix #4 Optimized and remove chatcommand. --- mods/ITEMS/mcl_starting_inventory/init.lua | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_starting_inventory/init.lua b/mods/ITEMS/mcl_starting_inventory/init.lua index 5644e3d06b..dfd2ba6dbc 100644 --- a/mods/ITEMS/mcl_starting_inventory/init.lua +++ b/mods/ITEMS/mcl_starting_inventory/init.lua @@ -13,7 +13,7 @@ end local give_inventory = minetest.settings:get("starting_inv_contents", false) -local stuff_string +local stuff_string = "mcl_tools:pick_iron,mcl_tools:axe_iron,mcl_tools:shovel_iron,mcl_torches:torch 32,mcl_core:cobble 32" mcl_starting_inventory = { items = {} @@ -55,20 +55,8 @@ function mcl_starting_inventory.get_list() end if give_inventory then - stuff_string = "mcl_tools:pick_iron,mcl_tools:axe_iron,mcl_tools:shovel_iron,mcl_torches:torch 32,mcl_core:cobble 32" mcl_starting_inventory.add_from_csv(stuff_string) mcl_log("Okay to give inventory:\n" .. dump(mcl_starting_inventory.get_list())) end minetest.register_on_newplayer(mcl_starting_inventory.give) - -minetest.register_chatcommand("give_starting_inventory", { - description = "Grant yourself the starting inventory.", - func = function(name, params) - stuff_string = "mcl_tools:pick_iron,mcl_tools:axe_iron,mcl_tools:shovel_iron,mcl_torches:torch 32,mcl_core:cobble 32" - mcl_log("Manually giving inventory:\n" .. dump(mcl_starting_inventory.get_list())) - mcl_starting_inventory.add_from_csv(stuff_string) - minetest.chat_send_player(name, "Granted Starting Inventory.") - return true - end -})