diff --git a/mods/HUD/crafting/README.txt b/mods/HUD/mcl_inventory/README.txt similarity index 100% rename from mods/HUD/crafting/README.txt rename to mods/HUD/mcl_inventory/README.txt diff --git a/mods/HUD/crafting/creative.lua b/mods/HUD/mcl_inventory/creative.lua similarity index 93% rename from mods/HUD/crafting/creative.lua rename to mods/HUD/mcl_inventory/creative.lua index 29df46978..cc5792741 100644 --- a/mods/HUD/crafting/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -1,5 +1,4 @@ -crafting = {} -crafting.creative_inventory_size = 0 +mcl_inventory.creative_inventory_size = 0 -- Prepare player info table local players = {} @@ -77,7 +76,7 @@ local function set_inv(filter, player) for _,itemstring in ipairs(creative_list) do inv:add_item("main", ItemStack(itemstring)) end - crafting.creative_inventory_size = #creative_list + mcl_inventory.creative_inventory_size = #creative_list end local function init(player) @@ -186,10 +185,10 @@ local function reset_menu_item_bg() end -crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, filter) +mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, show, page, filter) reset_menu_item_bg() pagenum = math.floor(pagenum) or 1 - local pagemax = math.floor((crafting.creative_inventory_size-1) / (9*5) + 1) + local pagemax = math.floor((mcl_inventory.creative_inventory_size-1) / (9*5) + 1) local slider_height if pagemax == 1 then slider_height = 4.525 @@ -386,10 +385,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if start_i < 0 then start_i = start_i + 9*5 end - if start_i >= crafting.creative_inventory_size then + if start_i >= mcl_inventory.creative_inventory_size then start_i = start_i - 9*5 end - if start_i < 0 or start_i >= crafting.creative_inventory_size then + if start_i < 0 or start_i >= mcl_inventory.creative_inventory_size then start_i = 0 end players[name].start_i = start_i @@ -400,7 +399,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) players[name].filter = filter end - crafting.set_creative_formspec(player, start_i, start_i / (9*5) + 1, false, page, filter) + mcl_inventory.set_creative_formspec(player, start_i, start_i / (9*5) + 1, false, page, filter) end) diff --git a/mods/HUD/crafting/depends.txt b/mods/HUD/mcl_inventory/depends.txt similarity index 100% rename from mods/HUD/crafting/depends.txt rename to mods/HUD/mcl_inventory/depends.txt diff --git a/mods/HUD/mcl_inventory/description.txt b/mods/HUD/mcl_inventory/description.txt new file mode 100644 index 000000000..c74d0012c --- /dev/null +++ b/mods/HUD/mcl_inventory/description.txt @@ -0,0 +1 @@ +Adds the player inventory, creative inventory and crafting table. diff --git a/mods/HUD/crafting/init.lua b/mods/HUD/mcl_inventory/init.lua similarity index 91% rename from mods/HUD/crafting/init.lua rename to mods/HUD/mcl_inventory/init.lua index cf6d42044..be17a2642 100644 --- a/mods/HUD/crafting/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -1,3 +1,5 @@ +mcl_inventory = {} + local show_armor = false if minetest.get_modpath("3d_armor") ~= nil then show_armor = true end @@ -37,7 +39,7 @@ end local function set_inventory(player) if minetest.setting_getbool("creative_mode") then - crafting.set_creative_formspec(player, 0, 1) + mcl_inventory.set_creative_formspec(player, 0, 1) return end local inv = player:get_inventory() @@ -173,7 +175,7 @@ minetest.register_on_joinplayer(function(player) drop_fields(player, "craft") end) -minetest.register_node("crafting:workbench", { +minetest.register_node("mcl_inventory:workbench", { description = "Crafting Table", tiles = {"crafting_workbench_top.png", "default_wood.png", "crafting_workbench_side.png", "crafting_workbench_side.png", "crafting_workbench_front.png", "crafting_workbench_front.png"}, @@ -189,7 +191,7 @@ minetest.register_node("crafting:workbench", { }) minetest.register_craft({ - output = "crafting:workbench", + output = "mcl_inventory:workbench", recipe = { {"group:wood", "group:wood"}, {"group:wood", "group:wood"} @@ -198,11 +200,12 @@ minetest.register_craft({ minetest.register_craft({ type = "fuel", - recipe = "crafting:workbench", + recipe = "mcl_inventory:workbench", burntime = 15, }) -if minetest.setting_getbool("creative_mode") then - dofile(minetest.get_modpath("crafting").."/creative.lua") -end +minetest.register_alias("crafting:workbench", "mcl_inventory:workbench") +if minetest.setting_getbool("creative_mode") then + dofile(minetest.get_modpath("mcl_inventory").."/creative.lua") +end diff --git a/mods/HUD/mcl_inventory/mod.conf b/mods/HUD/mcl_inventory/mod.conf new file mode 100644 index 000000000..2900f85c5 --- /dev/null +++ b/mods/HUD/mcl_inventory/mod.conf @@ -0,0 +1 @@ +name = mcl_inventory diff --git a/mods/HUD/crafting/textures/crafting_creative_active.png b/mods/HUD/mcl_inventory/textures/crafting_creative_active.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_active.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_active.png diff --git a/mods/HUD/crafting/textures/crafting_creative_bg.png b/mods/HUD/mcl_inventory/textures/crafting_creative_bg.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_bg.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_bg.png diff --git a/mods/HUD/crafting/textures/crafting_creative_bg_dark.png b/mods/HUD/mcl_inventory/textures/crafting_creative_bg_dark.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_bg_dark.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_bg_dark.png diff --git a/mods/HUD/crafting/textures/crafting_creative_down.png b/mods/HUD/mcl_inventory/textures/crafting_creative_down.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_down.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_down.png diff --git a/mods/HUD/crafting/textures/crafting_creative_inactive.png b/mods/HUD/mcl_inventory/textures/crafting_creative_inactive.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_inactive.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_inactive.png diff --git a/mods/HUD/crafting/textures/crafting_creative_marker.png b/mods/HUD/mcl_inventory/textures/crafting_creative_marker.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_marker.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_marker.png diff --git a/mods/HUD/crafting/textures/crafting_creative_trash.png b/mods/HUD/mcl_inventory/textures/crafting_creative_trash.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_trash.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_trash.png diff --git a/mods/HUD/crafting/textures/crafting_creative_up.png b/mods/HUD/mcl_inventory/textures/crafting_creative_up.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_creative_up.png rename to mods/HUD/mcl_inventory/textures/crafting_creative_up.png diff --git a/mods/HUD/crafting/textures/crafting_formspec_bg.png b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_formspec_bg.png rename to mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png diff --git a/mods/HUD/crafting/textures/crafting_formspec_bg2.png b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_formspec_bg2.png rename to mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png diff --git a/mods/HUD/crafting/textures/crafting_hotbar.png b/mods/HUD/mcl_inventory/textures/crafting_hotbar.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_hotbar.png rename to mods/HUD/mcl_inventory/textures/crafting_hotbar.png diff --git a/mods/HUD/crafting/textures/crafting_hotbar_selected.png b/mods/HUD/mcl_inventory/textures/crafting_hotbar_selected.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_hotbar_selected.png rename to mods/HUD/mcl_inventory/textures/crafting_hotbar_selected.png diff --git a/mods/HUD/crafting/textures/crafting_inventory.png b/mods/HUD/mcl_inventory/textures/crafting_inventory.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_9_slots.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_9_slots.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_chest.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_chest.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_chest.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_chest.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_chest_large.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_chest_large.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_chest_large.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_chest_large.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_creative.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_creative.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_creative.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_creative_scroll.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_scroll.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_creative_scroll.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_creative_scroll.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_creative_survival.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_survival.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_creative_survival.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_creative_survival.png diff --git a/mods/HUD/crafting/textures/crafting_inventory_workbench.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_workbench.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_inventory_workbench.png rename to mods/HUD/mcl_inventory/textures/crafting_inventory_workbench.png diff --git a/mods/HUD/crafting/textures/crafting_player2d.png b/mods/HUD/mcl_inventory/textures/crafting_player2d.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_player2d.png rename to mods/HUD/mcl_inventory/textures/crafting_player2d.png diff --git a/mods/HUD/crafting/textures/crafting_slider.png b/mods/HUD/mcl_inventory/textures/crafting_slider.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_slider.png rename to mods/HUD/mcl_inventory/textures/crafting_slider.png diff --git a/mods/HUD/crafting/textures/crafting_slot_feet.png b/mods/HUD/mcl_inventory/textures/crafting_slot_feet.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_slot_feet.png rename to mods/HUD/mcl_inventory/textures/crafting_slot_feet.png diff --git a/mods/HUD/crafting/textures/crafting_slot_head.png b/mods/HUD/mcl_inventory/textures/crafting_slot_head.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_slot_head.png rename to mods/HUD/mcl_inventory/textures/crafting_slot_head.png diff --git a/mods/HUD/crafting/textures/crafting_slot_legs.png b/mods/HUD/mcl_inventory/textures/crafting_slot_legs.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_slot_legs.png rename to mods/HUD/mcl_inventory/textures/crafting_slot_legs.png diff --git a/mods/HUD/crafting/textures/crafting_slot_torso.png b/mods/HUD/mcl_inventory/textures/crafting_slot_torso.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_slot_torso.png rename to mods/HUD/mcl_inventory/textures/crafting_slot_torso.png diff --git a/mods/HUD/crafting/textures/crafting_workbench_front.png b/mods/HUD/mcl_inventory/textures/crafting_workbench_front.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_workbench_front.png rename to mods/HUD/mcl_inventory/textures/crafting_workbench_front.png diff --git a/mods/HUD/crafting/textures/crafting_workbench_side.png b/mods/HUD/mcl_inventory/textures/crafting_workbench_side.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_workbench_side.png rename to mods/HUD/mcl_inventory/textures/crafting_workbench_side.png diff --git a/mods/HUD/crafting/textures/crafting_workbench_top.png b/mods/HUD/mcl_inventory/textures/crafting_workbench_top.png similarity index 100% rename from mods/HUD/crafting/textures/crafting_workbench_top.png rename to mods/HUD/mcl_inventory/textures/crafting_workbench_top.png diff --git a/mods/HUD/crafting/textures/fnt_blocks.png b/mods/HUD/mcl_inventory/textures/fnt_blocks.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_blocks.png rename to mods/HUD/mcl_inventory/textures/fnt_blocks.png diff --git a/mods/HUD/crafting/textures/fnt_brew.png b/mods/HUD/mcl_inventory/textures/fnt_brew.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_brew.png rename to mods/HUD/mcl_inventory/textures/fnt_brew.png diff --git a/mods/HUD/crafting/textures/fnt_chest.png b/mods/HUD/mcl_inventory/textures/fnt_chest.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_chest.png rename to mods/HUD/mcl_inventory/textures/fnt_chest.png diff --git a/mods/HUD/crafting/textures/fnt_combat.png b/mods/HUD/mcl_inventory/textures/fnt_combat.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_combat.png rename to mods/HUD/mcl_inventory/textures/fnt_combat.png diff --git a/mods/HUD/crafting/textures/fnt_deco.png b/mods/HUD/mcl_inventory/textures/fnt_deco.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_deco.png rename to mods/HUD/mcl_inventory/textures/fnt_deco.png diff --git a/mods/HUD/crafting/textures/fnt_ender_chest.png b/mods/HUD/mcl_inventory/textures/fnt_ender_chest.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_ender_chest.png rename to mods/HUD/mcl_inventory/textures/fnt_ender_chest.png diff --git a/mods/HUD/crafting/textures/fnt_food.png b/mods/HUD/mcl_inventory/textures/fnt_food.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_food.png rename to mods/HUD/mcl_inventory/textures/fnt_food.png diff --git a/mods/HUD/crafting/textures/fnt_matr.png b/mods/HUD/mcl_inventory/textures/fnt_matr.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_matr.png rename to mods/HUD/mcl_inventory/textures/fnt_matr.png diff --git a/mods/HUD/crafting/textures/fnt_misc.png b/mods/HUD/mcl_inventory/textures/fnt_misc.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_misc.png rename to mods/HUD/mcl_inventory/textures/fnt_misc.png diff --git a/mods/HUD/crafting/textures/fnt_nix.png b/mods/HUD/mcl_inventory/textures/fnt_nix.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_nix.png rename to mods/HUD/mcl_inventory/textures/fnt_nix.png diff --git a/mods/HUD/crafting/textures/fnt_rail.png b/mods/HUD/mcl_inventory/textures/fnt_rail.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_rail.png rename to mods/HUD/mcl_inventory/textures/fnt_rail.png diff --git a/mods/HUD/crafting/textures/fnt_redstone.png b/mods/HUD/mcl_inventory/textures/fnt_redstone.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_redstone.png rename to mods/HUD/mcl_inventory/textures/fnt_redstone.png diff --git a/mods/HUD/crafting/textures/fnt_shulker_box.png b/mods/HUD/mcl_inventory/textures/fnt_shulker_box.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_shulker_box.png rename to mods/HUD/mcl_inventory/textures/fnt_shulker_box.png diff --git a/mods/HUD/crafting/textures/fnt_tools.png b/mods/HUD/mcl_inventory/textures/fnt_tools.png similarity index 100% rename from mods/HUD/crafting/textures/fnt_tools.png rename to mods/HUD/mcl_inventory/textures/fnt_tools.png diff --git a/mods/MAPGEN/random_struct/depends.txt b/mods/MAPGEN/random_struct/depends.txt index c61ff93b0..93cc1633a 100644 --- a/mods/MAPGEN/random_struct/depends.txt +++ b/mods/MAPGEN/random_struct/depends.txt @@ -6,6 +6,6 @@ mcl_colorblocks mcl_wool mcl_fences mcl_chests -crafting +mcl_inventory mesecons_pressureplates mcl_tnt