From 350fcd48273163740ce620fc2352889581968f1b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 12 Mar 2017 02:55:29 +0100 Subject: [PATCH] Rename doors mod to mcl_doors --- mods/ITEMS/{doors => mcl_doors}/README.txt | 0 mods/ITEMS/{doors => mcl_doors}/depends.txt | 0 mods/ITEMS/{doors => mcl_doors}/init.lua | 89 +++++++++++------- mods/ITEMS/mcl_doors/mod.conf | 1 + .../sounds/doors_door_close.ogg | Bin .../sounds/doors_door_open.ogg | Bin .../sounds/doors_steel_door_close.ogg | Bin .../sounds/doors_steel_door_open.ogg | Bin .../textures/door_acacia.png | Bin .../textures/door_acacia_a.png | Bin .../textures/door_acacia_b.png | Bin .../textures/door_birch.png | Bin .../textures/door_birch_a.png | Bin .../textures/door_birch_b.png | Bin .../textures/door_brown.png | Bin .../textures/door_dark_oak.png | Bin .../textures/door_dark_oak_a.png | Bin .../textures/door_dark_oak_b.png | Bin .../textures/door_grey.png | Bin .../textures/door_jungle.png | Bin .../textures/door_jungle_a.png | Bin .../textures/door_jungle_b.png | Bin .../textures/door_spruce.png | Bin .../textures/door_spruce_a.png | Bin .../textures/door_spruce_b.png | Bin .../textures/door_steel.png | Bin .../textures/door_steel_a.png | Bin .../textures/door_steel_b.png | Bin .../textures/door_trapdoor.png | Bin .../textures/door_wood.png | Bin .../textures/door_wood_a.png | Bin .../textures/door_wood_b.png | Bin .../textures/iron_trapdoor.png | Bin 33 files changed, 55 insertions(+), 35 deletions(-) rename mods/ITEMS/{doors => mcl_doors}/README.txt (100%) rename mods/ITEMS/{doors => mcl_doors}/depends.txt (100%) rename mods/ITEMS/{doors => mcl_doors}/init.lua (84%) create mode 100644 mods/ITEMS/mcl_doors/mod.conf rename mods/ITEMS/{doors => mcl_doors}/sounds/doors_door_close.ogg (100%) rename mods/ITEMS/{doors => mcl_doors}/sounds/doors_door_open.ogg (100%) rename mods/ITEMS/{doors => mcl_doors}/sounds/doors_steel_door_close.ogg (100%) rename mods/ITEMS/{doors => mcl_doors}/sounds/doors_steel_door_open.ogg (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_acacia.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_acacia_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_acacia_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_birch.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_birch_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_birch_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_brown.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_dark_oak.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_dark_oak_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_dark_oak_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_grey.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_jungle.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_jungle_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_jungle_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_spruce.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_spruce_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_spruce_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_steel.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_steel_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_steel_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_trapdoor.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_wood.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_wood_a.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/door_wood_b.png (100%) rename mods/ITEMS/{doors => mcl_doors}/textures/iron_trapdoor.png (100%) diff --git a/mods/ITEMS/doors/README.txt b/mods/ITEMS/mcl_doors/README.txt similarity index 100% rename from mods/ITEMS/doors/README.txt rename to mods/ITEMS/mcl_doors/README.txt diff --git a/mods/ITEMS/doors/depends.txt b/mods/ITEMS/mcl_doors/depends.txt similarity index 100% rename from mods/ITEMS/doors/depends.txt rename to mods/ITEMS/mcl_doors/depends.txt diff --git a/mods/ITEMS/doors/init.lua b/mods/ITEMS/mcl_doors/init.lua similarity index 84% rename from mods/ITEMS/doors/init.lua rename to mods/ITEMS/mcl_doors/init.lua index 6d436d5e31..c652efe417 100644 --- a/mods/ITEMS/doors/init.lua +++ b/mods/ITEMS/mcl_doors/init.lua @@ -1,5 +1,5 @@ local init = os.clock() -doors = {} +mcl_doors = {} -- Registers a door -- name: The name of the door @@ -27,7 +27,7 @@ local function is_right(pos, clicker) end end -function doors:register_door(name, def) +function mcl_doors:register_door(name, def) def.groups.not_in_creative_inventory = 1 if not def.sound_open then @@ -313,7 +313,7 @@ function doors:register_door(name, def) end --- Normal Door --- -doors:register_door("doors:door_wood", { +mcl_doors:register_door("mcl_doors:wooden_door", { description = "Oak Door", inventory_image = "door_wood.png", groups = {handy=1,axey=1, door=1, material_wood=1}, @@ -324,7 +324,7 @@ doors:register_door("doors:door_wood", { }) minetest.register_craft({ - output = "doors:door_wood 3", + output = "mcl_doors:wooden_door 3", recipe = { {"mcl_core:wood", "mcl_core:wood"}, {"mcl_core:wood", "mcl_core:wood"}, @@ -333,7 +333,7 @@ minetest.register_craft({ }) --- Accacia Door -- -doors:register_door("doors:door_acacia", { +mcl_doors:register_door("mcl_doors:acacia_door", { description = "Acacia Door", inventory_image = "door_acacia.png", groups = {handy=1,axey=1, door=1, material_wood=1}, @@ -344,7 +344,7 @@ doors:register_door("doors:door_acacia", { }) minetest.register_craft({ - output = "doors:door_acacia 3", + output = "mcl_doors:acacia_door 3", recipe = { {"mcl_core:acaciawood", "mcl_core:acaciawood"}, {"mcl_core:acaciawood", "mcl_core:acaciawood"}, @@ -353,7 +353,7 @@ minetest.register_craft({ }) --- birch Door -- -doors:register_door("doors:door_birch", { +mcl_doors:register_door("mcl_doors:birch_door", { description = "Birch Door", inventory_image = "door_birch.png", groups = {handy=1,axey=1, door=1, material_wood=1}, @@ -364,7 +364,7 @@ doors:register_door("doors:door_birch", { }) minetest.register_craft({ - output = "doors:door_birch 3", + output = "mcl_doors:birch_door 3", recipe = { {"mcl_core:birchwood", "mcl_core:birchwood"}, {"mcl_core:birchwood", "mcl_core:birchwood"}, @@ -373,7 +373,7 @@ minetest.register_craft({ }) --- dark oak Door -- -doors:register_door("doors:door_dark_oak", { +mcl_doors:register_door("mcl_doors:dark_oak_door", { description = "Dark Oak Door", inventory_image = "door_dark_oak.png", groups = {handy=1,axey=1, door=1, material_wood=1}, @@ -384,7 +384,7 @@ doors:register_door("doors:door_dark_oak", { }) minetest.register_craft({ - output = "doors:door_dark_oak 3", + output = "mcl_doors:dark_oak_door 3", recipe = { {"mcl_core:darkwood", "mcl_core:darkwood"}, {"mcl_core:darkwood", "mcl_core:darkwood"}, @@ -393,7 +393,7 @@ minetest.register_craft({ }) --- jungle Door -- -doors:register_door("doors:door_jungle", { +mcl_doors:register_door("mcl_doors:jungle_door", { description = "Jungle Door", inventory_image = "door_jungle.png", groups = {handy=1,axey=1, door=1, material_wood=1}, @@ -404,7 +404,7 @@ doors:register_door("doors:door_jungle", { }) minetest.register_craft({ - output = "doors:door_jungle 3", + output = "mcl_doors:jungle_door 3", recipe = { {"mcl_core:junglewood", "mcl_core:junglewood"}, {"mcl_core:junglewood", "mcl_core:junglewood"}, @@ -413,7 +413,7 @@ minetest.register_craft({ }) --- spruce Door -- -doors:register_door("doors:door_spruce", { +mcl_doors:register_door("mcl_doors:spruce_door", { description = "Spruce Door", inventory_image = "door_spruce.png", groups = {handy=1,axey=1, door=1, material_wood=1}, @@ -424,7 +424,7 @@ doors:register_door("doors:door_spruce", { }) minetest.register_craft({ - output = "doors:door_spruce 3", + output = "mcl_doors:spruce_door 3", recipe = { {"mcl_core:sprucewood", "mcl_core:sprucewood"}, {"mcl_core:sprucewood", "mcl_core:sprucewood"}, @@ -434,37 +434,37 @@ minetest.register_craft({ minetest.register_craft({ type = "fuel", - recipe = "doors:door_wood", + recipe = "mcl_doors:wooden_door", burntime = 10, }) minetest.register_craft({ type = "fuel", - recipe = "doors:door_jungle", + recipe = "mcl_doors:jungle_door", burntime = 10, }) minetest.register_craft({ type = "fuel", - recipe = "doors:door_dark_oak", + recipe = "mcl_doors:dark_oak_door", burntime = 10, }) minetest.register_craft({ type = "fuel", - recipe = "doors:door_birch", + recipe = "mcl_doors:birch_door", burntime = 10, }) minetest.register_craft({ type = "fuel", - recipe = "doors:door_acacia", + recipe = "mcl_doors:acacia_door", burntime = 10, }) minetest.register_craft({ type = "fuel", - recipe = "doors:door_spruce", + recipe = "mcl_doors:spruce_door", burntime = 10, }) --- Door in Iron --- -doors:register_door("doors:door_iron", { +mcl_doors:register_door("mcl_doors:iron_door", { description = "Iron Door", inventory_image = "door_steel.png", groups = {pickaxey=1, door=1,mesecon_effector_on=1}, @@ -477,7 +477,7 @@ doors:register_door("doors:door_iron", { }) minetest.register_craft({ - output = "doors:door_iron 3", + output = "mcl_doors:iron_door 3", recipe = { {"mcl_core:iron_ingot", "mcl_core:iron_ingot"}, {"mcl_core:iron_ingot", "mcl_core:iron_ingot"}, @@ -485,15 +485,9 @@ minetest.register_craft({ } }) -minetest.register_alias("doors:door_wood_a_c", "doors:door_wood_t_1") -minetest.register_alias("doors:door_wood_a_o", "doors:door_wood_t_1") -minetest.register_alias("doors:door_wood_b_c", "doors:door_wood_b_1") -minetest.register_alias("doors:door_wood_b_o", "doors:door_wood_b_1") - - ---- Trapdoor ---- -function doors:register_trapdoor(name, def) +function mcl_doors:register_trapdoor(name, def) local function update_door(pos, node) minetest.set_node(pos, node) end @@ -592,7 +586,7 @@ function doors:register_trapdoor(name, def) end -doors:register_trapdoor("doors:trapdoor", { +mcl_doors:register_trapdoor("mcl_doors:trapdoor", { description = "Wooden Trapdoor", tiles = {"door_trapdoor.png"}, wield_image = "door_trapdoor.png", @@ -602,7 +596,7 @@ doors:register_trapdoor("doors:trapdoor", { }) minetest.register_craft({ - output = 'doors:trapdoor 2', + output = 'mcl_doors:trapdoor 2', recipe = { {'group:wood', 'group:wood', 'group:wood'}, {'group:wood', 'group:wood', 'group:wood'}, @@ -611,11 +605,11 @@ minetest.register_craft({ minetest.register_craft({ type = "fuel", - recipe = "doors:trapdoor", + recipe = "mcl_doors:trapdoor", burntime = 15, }) -doors:register_trapdoor("doors:iron_trapdoor", { +mcl_doors:register_trapdoor("mcl_doors:iron_trapdoor", { description = "Iron Trapdoor", tiles = {"iron_trapdoor.png"}, wield_image = "iron_trapdoor.png", @@ -627,12 +621,37 @@ doors:register_trapdoor("doors:iron_trapdoor", { }) minetest.register_craft({ - output = 'doors:iron_trapdoor', + output = 'mcl_doors:iron_trapdoor', recipe = { {'mcl_core:iron_ingot', 'mcl_core:iron_ingot'}, {'mcl_core:iron_ingot', 'mcl_core:iron_ingot'}, } }) +-- Register aliases +local doornames = { + ["door"] = "wooden_door", + ["door_jungle"] = "jungle_door", + ["door_spruce"] = "spruce_door", + ["door_dark_oak"] = "dark_oak_door", + ["door_birch"] = "birch_door", + ["door_acacia"] = "acacia_door", + ["door_iron"] = "iron_door", +} + +for oldname, newname in pairs(doornames) do + minetest.register_alias("doors:"..oldname, "mcl_doors:"..newname) + minetest.register_alias("doors:"..oldname.."_t_1", "mcl_doors:"..newname.."_t_1") + minetest.register_alias("doors:"..oldname.."_b_1", "mcl_doors:"..newname.."_b_1") + minetest.register_alias("doors:"..oldname.."_t_2", "mcl_doors:"..newname.."_t_2") + minetest.register_alias("doors:"..oldname.."_b_2", "mcl_doors:"..newname.."_b_2") +end + +minetest.register_alias("doors:trapdoor", "mcl_doors:trapdoor") +minetest.register_alias("doors:trapdoor_open", "mcl_doors:trapdoor_open") +minetest.register_alias("doors:iron_trapdoor", "mcl_doors:iron_trapdoor") +minetest.register_alias("doors:iron_trapdoor_open", "mcl_doors:iron_trapdoor_open") + +-- Debug info local time_to_load= os.clock() - init -print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load)) +minetest.log("action", (string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))) diff --git a/mods/ITEMS/mcl_doors/mod.conf b/mods/ITEMS/mcl_doors/mod.conf new file mode 100644 index 0000000000..d504e84979 --- /dev/null +++ b/mods/ITEMS/mcl_doors/mod.conf @@ -0,0 +1 @@ +name = mcl_doors diff --git a/mods/ITEMS/doors/sounds/doors_door_close.ogg b/mods/ITEMS/mcl_doors/sounds/doors_door_close.ogg similarity index 100% rename from mods/ITEMS/doors/sounds/doors_door_close.ogg rename to mods/ITEMS/mcl_doors/sounds/doors_door_close.ogg diff --git a/mods/ITEMS/doors/sounds/doors_door_open.ogg b/mods/ITEMS/mcl_doors/sounds/doors_door_open.ogg similarity index 100% rename from mods/ITEMS/doors/sounds/doors_door_open.ogg rename to mods/ITEMS/mcl_doors/sounds/doors_door_open.ogg diff --git a/mods/ITEMS/doors/sounds/doors_steel_door_close.ogg b/mods/ITEMS/mcl_doors/sounds/doors_steel_door_close.ogg similarity index 100% rename from mods/ITEMS/doors/sounds/doors_steel_door_close.ogg rename to mods/ITEMS/mcl_doors/sounds/doors_steel_door_close.ogg diff --git a/mods/ITEMS/doors/sounds/doors_steel_door_open.ogg b/mods/ITEMS/mcl_doors/sounds/doors_steel_door_open.ogg similarity index 100% rename from mods/ITEMS/doors/sounds/doors_steel_door_open.ogg rename to mods/ITEMS/mcl_doors/sounds/doors_steel_door_open.ogg diff --git a/mods/ITEMS/doors/textures/door_acacia.png b/mods/ITEMS/mcl_doors/textures/door_acacia.png similarity index 100% rename from mods/ITEMS/doors/textures/door_acacia.png rename to mods/ITEMS/mcl_doors/textures/door_acacia.png diff --git a/mods/ITEMS/doors/textures/door_acacia_a.png b/mods/ITEMS/mcl_doors/textures/door_acacia_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_acacia_a.png rename to mods/ITEMS/mcl_doors/textures/door_acacia_a.png diff --git a/mods/ITEMS/doors/textures/door_acacia_b.png b/mods/ITEMS/mcl_doors/textures/door_acacia_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_acacia_b.png rename to mods/ITEMS/mcl_doors/textures/door_acacia_b.png diff --git a/mods/ITEMS/doors/textures/door_birch.png b/mods/ITEMS/mcl_doors/textures/door_birch.png similarity index 100% rename from mods/ITEMS/doors/textures/door_birch.png rename to mods/ITEMS/mcl_doors/textures/door_birch.png diff --git a/mods/ITEMS/doors/textures/door_birch_a.png b/mods/ITEMS/mcl_doors/textures/door_birch_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_birch_a.png rename to mods/ITEMS/mcl_doors/textures/door_birch_a.png diff --git a/mods/ITEMS/doors/textures/door_birch_b.png b/mods/ITEMS/mcl_doors/textures/door_birch_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_birch_b.png rename to mods/ITEMS/mcl_doors/textures/door_birch_b.png diff --git a/mods/ITEMS/doors/textures/door_brown.png b/mods/ITEMS/mcl_doors/textures/door_brown.png similarity index 100% rename from mods/ITEMS/doors/textures/door_brown.png rename to mods/ITEMS/mcl_doors/textures/door_brown.png diff --git a/mods/ITEMS/doors/textures/door_dark_oak.png b/mods/ITEMS/mcl_doors/textures/door_dark_oak.png similarity index 100% rename from mods/ITEMS/doors/textures/door_dark_oak.png rename to mods/ITEMS/mcl_doors/textures/door_dark_oak.png diff --git a/mods/ITEMS/doors/textures/door_dark_oak_a.png b/mods/ITEMS/mcl_doors/textures/door_dark_oak_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_dark_oak_a.png rename to mods/ITEMS/mcl_doors/textures/door_dark_oak_a.png diff --git a/mods/ITEMS/doors/textures/door_dark_oak_b.png b/mods/ITEMS/mcl_doors/textures/door_dark_oak_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_dark_oak_b.png rename to mods/ITEMS/mcl_doors/textures/door_dark_oak_b.png diff --git a/mods/ITEMS/doors/textures/door_grey.png b/mods/ITEMS/mcl_doors/textures/door_grey.png similarity index 100% rename from mods/ITEMS/doors/textures/door_grey.png rename to mods/ITEMS/mcl_doors/textures/door_grey.png diff --git a/mods/ITEMS/doors/textures/door_jungle.png b/mods/ITEMS/mcl_doors/textures/door_jungle.png similarity index 100% rename from mods/ITEMS/doors/textures/door_jungle.png rename to mods/ITEMS/mcl_doors/textures/door_jungle.png diff --git a/mods/ITEMS/doors/textures/door_jungle_a.png b/mods/ITEMS/mcl_doors/textures/door_jungle_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_jungle_a.png rename to mods/ITEMS/mcl_doors/textures/door_jungle_a.png diff --git a/mods/ITEMS/doors/textures/door_jungle_b.png b/mods/ITEMS/mcl_doors/textures/door_jungle_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_jungle_b.png rename to mods/ITEMS/mcl_doors/textures/door_jungle_b.png diff --git a/mods/ITEMS/doors/textures/door_spruce.png b/mods/ITEMS/mcl_doors/textures/door_spruce.png similarity index 100% rename from mods/ITEMS/doors/textures/door_spruce.png rename to mods/ITEMS/mcl_doors/textures/door_spruce.png diff --git a/mods/ITEMS/doors/textures/door_spruce_a.png b/mods/ITEMS/mcl_doors/textures/door_spruce_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_spruce_a.png rename to mods/ITEMS/mcl_doors/textures/door_spruce_a.png diff --git a/mods/ITEMS/doors/textures/door_spruce_b.png b/mods/ITEMS/mcl_doors/textures/door_spruce_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_spruce_b.png rename to mods/ITEMS/mcl_doors/textures/door_spruce_b.png diff --git a/mods/ITEMS/doors/textures/door_steel.png b/mods/ITEMS/mcl_doors/textures/door_steel.png similarity index 100% rename from mods/ITEMS/doors/textures/door_steel.png rename to mods/ITEMS/mcl_doors/textures/door_steel.png diff --git a/mods/ITEMS/doors/textures/door_steel_a.png b/mods/ITEMS/mcl_doors/textures/door_steel_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_steel_a.png rename to mods/ITEMS/mcl_doors/textures/door_steel_a.png diff --git a/mods/ITEMS/doors/textures/door_steel_b.png b/mods/ITEMS/mcl_doors/textures/door_steel_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_steel_b.png rename to mods/ITEMS/mcl_doors/textures/door_steel_b.png diff --git a/mods/ITEMS/doors/textures/door_trapdoor.png b/mods/ITEMS/mcl_doors/textures/door_trapdoor.png similarity index 100% rename from mods/ITEMS/doors/textures/door_trapdoor.png rename to mods/ITEMS/mcl_doors/textures/door_trapdoor.png diff --git a/mods/ITEMS/doors/textures/door_wood.png b/mods/ITEMS/mcl_doors/textures/door_wood.png similarity index 100% rename from mods/ITEMS/doors/textures/door_wood.png rename to mods/ITEMS/mcl_doors/textures/door_wood.png diff --git a/mods/ITEMS/doors/textures/door_wood_a.png b/mods/ITEMS/mcl_doors/textures/door_wood_a.png similarity index 100% rename from mods/ITEMS/doors/textures/door_wood_a.png rename to mods/ITEMS/mcl_doors/textures/door_wood_a.png diff --git a/mods/ITEMS/doors/textures/door_wood_b.png b/mods/ITEMS/mcl_doors/textures/door_wood_b.png similarity index 100% rename from mods/ITEMS/doors/textures/door_wood_b.png rename to mods/ITEMS/mcl_doors/textures/door_wood_b.png diff --git a/mods/ITEMS/doors/textures/iron_trapdoor.png b/mods/ITEMS/mcl_doors/textures/iron_trapdoor.png similarity index 100% rename from mods/ITEMS/doors/textures/iron_trapdoor.png rename to mods/ITEMS/mcl_doors/textures/iron_trapdoor.png