From 61579827875f42a08797229895a2fc2ad8bc3355 Mon Sep 17 00:00:00 2001 From: Craig Davison Date: Sat, 10 Jan 2015 17:02:47 +0000 Subject: [PATCH] Follow naming convention of textures and sounds in doors --- mods/doors/init.lua | 54 ++++++------------ .../{door_close.ogg => doors_door_close.ogg} | Bin .../{door_open.ogg => doors_door_open.ogg} | Bin .../{door_brown.png => doors_brown.png} | Bin .../{door_glass.png => doors_glass.png} | Bin .../{door_glass_a.png => doors_glass_a.png} | Bin .../{door_glass_b.png => doors_glass_b.png} | Bin ...or_glass_side.png => doors_glass_side.png} | Bin .../{door_grey.png => doors_grey.png} | Bin ...ian_glass.png => doors_obsidian_glass.png} | Bin ...glass_a.png => doors_obsidian_glass_a.png} | Bin ...glass_b.png => doors_obsidian_glass_b.png} | Bin ...side.png => doors_obsidian_glass_side.png} | Bin .../{door_steel.png => doors_steel.png} | Bin .../{door_steel_a.png => doors_steel_a.png} | Bin .../{door_steel_b.png => doors_steel_b.png} | Bin .../{door_trapdoor.png => doors_trapdoor.png} | Bin ...pdoor_side.png => doors_trapdoor_side.png} | Bin .../{door_wood.png => doors_wood.png} | Bin .../{door_wood_a.png => doors_wood_a.png} | Bin .../{door_wood_b.png => doors_wood_b.png} | Bin 21 files changed, 19 insertions(+), 35 deletions(-) rename mods/doors/sounds/{door_close.ogg => doors_door_close.ogg} (100%) rename mods/doors/sounds/{door_open.ogg => doors_door_open.ogg} (100%) rename mods/doors/textures/{door_brown.png => doors_brown.png} (100%) rename mods/doors/textures/{door_glass.png => doors_glass.png} (100%) rename mods/doors/textures/{door_glass_a.png => doors_glass_a.png} (100%) rename mods/doors/textures/{door_glass_b.png => doors_glass_b.png} (100%) rename mods/doors/textures/{door_glass_side.png => doors_glass_side.png} (100%) rename mods/doors/textures/{door_grey.png => doors_grey.png} (100%) rename mods/doors/textures/{door_obsidian_glass.png => doors_obsidian_glass.png} (100%) rename mods/doors/textures/{door_obsidian_glass_a.png => doors_obsidian_glass_a.png} (100%) rename mods/doors/textures/{door_obsidian_glass_b.png => doors_obsidian_glass_b.png} (100%) rename mods/doors/textures/{door_obsidian_glass_side.png => doors_obsidian_glass_side.png} (100%) rename mods/doors/textures/{door_steel.png => doors_steel.png} (100%) rename mods/doors/textures/{door_steel_a.png => doors_steel_a.png} (100%) rename mods/doors/textures/{door_steel_b.png => doors_steel_b.png} (100%) rename mods/doors/textures/{door_trapdoor.png => doors_trapdoor.png} (100%) rename mods/doors/textures/{door_trapdoor_side.png => doors_trapdoor_side.png} (100%) rename mods/doors/textures/{door_wood.png => doors_wood.png} (100%) rename mods/doors/textures/{door_wood_a.png => doors_wood_a.png} (100%) rename mods/doors/textures/{door_wood_b.png => doors_wood_b.png} (100%) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index c82de236..034179a2 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -1,22 +1,6 @@ doors = {} -- Registers a door --- name: The name of the door --- def: a table with the folowing fields: --- description --- inventory_image --- groups --- tiles_bottom: the tiles of the bottom part of the door {front, side} --- tiles_top: the tiles of the bottom part of the door {front, side} --- If the following fields are not defined the default values are used --- node_box_bottom --- node_box_top --- selection_box_bottom --- selection_box_top --- only_placer_can_open: if true only the player who placed the door can --- open it - - function doors.register_door(name, def) def.groups.not_in_creative_inventory = 1 @@ -36,10 +20,10 @@ function doors.register_door(name, def) end if not def.sound_close_door then - def.sound_close_door = "door_close" + def.sound_close_door = "doors_door_close" end if not def.sound_open_door then - def.sound_open_door = "door_open" + def.sound_open_door = "doors_door_open" end @@ -292,10 +276,10 @@ end doors.register_door("doors:door_wood", { description = "Wooden Door", - inventory_image = "door_wood.png", + inventory_image = "doors_wood.png", groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1}, - tiles_bottom = {"door_wood_b.png", "door_brown.png"}, - tiles_top = {"door_wood_a.png", "door_brown.png"}, + tiles_bottom = {"doors_wood_b.png", "doors_brown.png"}, + tiles_top = {"doors_wood_a.png", "doors_brown.png"}, sounds = default.node_sound_wood_defaults(), sunlight = false, }) @@ -311,10 +295,10 @@ minetest.register_craft({ doors.register_door("doors:door_steel", { description = "Steel Door", - inventory_image = "door_steel.png", + inventory_image = "doors_steel.png", groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1}, - tiles_bottom = {"door_steel_b.png", "door_grey.png"}, - tiles_top = {"door_steel_a.png", "door_grey.png"}, + tiles_bottom = {"doors_steel_b.png", "doors_grey.png"}, + tiles_top = {"doors_steel_a.png", "doors_grey.png"}, only_placer_can_open = true, sounds = default.node_sound_wood_defaults(), sunlight = false, @@ -331,10 +315,10 @@ minetest.register_craft({ doors.register_door("doors:door_glass", { description = "Glass Door", - inventory_image = "door_glass.png", + inventory_image = "doors_glass.png", groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1}, - tiles_bottom = {"door_glass_b.png", "door_glass_side.png"}, - tiles_top = {"door_glass_a.png", "door_glass_side.png"}, + tiles_bottom = {"doors_glass_b.png", "doors_glass_side.png"}, + tiles_top = {"doors_glass_a.png", "doors_glass_side.png"}, sounds = default.node_sound_glass_defaults(), sunlight = true, }) @@ -350,10 +334,10 @@ minetest.register_craft({ doors.register_door("doors:door_obsidian_glass", { description = "Obsidian Glass Door", - inventory_image = "door_obsidian_glass.png", + inventory_image = "doors_obsidian_glass.png", groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1}, - tiles_bottom = {"door_obsidian_glass_b.png", "door_obsidian_glass_side.png"}, - tiles_top = {"door_obsidian_glass_b.png", "door_obsidian_glass_side.png"}, + tiles_bottom = {"doors_obsidian_glass_b.png", "doors_obsidian_glass_side.png"}, + tiles_top = {"doors_obsidian_glass_b.png", "doors_obsidian_glass_side.png"}, sounds = default.node_sound_glass_defaults(), sunlight = true, }) @@ -382,11 +366,11 @@ local function punch(pos) local tmp_node2 if state == 1 then state = 0 - minetest.sound_play("door_close", {pos = pos, gain = 0.3, max_hear_distance = 10}) + minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10}) tmp_node = {name="doors:trapdoor", param1=me.param1, param2=me.param2} else state = 1 - minetest.sound_play("door_open", {pos = pos, gain = 0.3, max_hear_distance = 10}) + minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10}) tmp_node = {name="doors:trapdoor_open", param1=me.param1, param2=me.param2} end update_door(pos, tmp_node) @@ -395,9 +379,9 @@ end minetest.register_node("doors:trapdoor", { description = "Trapdoor", - inventory_image = "door_trapdoor.png", + inventory_image = "doors_trapdoor.png", drawtype = "nodebox", - tiles = {"door_trapdoor.png", "door_trapdoor.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png"}, + tiles = {"doors_trapdoor.png", "doors_trapdoor.png", "doors_trapdoor_side.png", "doors_trapdoor_side.png", "doors_trapdoor_side.png", "doors_trapdoor_side.png"}, paramtype = "light", paramtype2 = "facedir", groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1}, @@ -421,7 +405,7 @@ minetest.register_node("doors:trapdoor", { minetest.register_node("doors:trapdoor_open", { drawtype = "nodebox", - tiles = {"door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor.png", "door_trapdoor.png"}, + tiles = {"doors_trapdoor_side.png", "doors_trapdoor_side.png", "doors_trapdoor_side.png", "doors_trapdoor_side.png", "doors_trapdoor.png", "doors_trapdoor.png"}, paramtype = "light", paramtype2 = "facedir", pointable = true, diff --git a/mods/doors/sounds/door_close.ogg b/mods/doors/sounds/doors_door_close.ogg similarity index 100% rename from mods/doors/sounds/door_close.ogg rename to mods/doors/sounds/doors_door_close.ogg diff --git a/mods/doors/sounds/door_open.ogg b/mods/doors/sounds/doors_door_open.ogg similarity index 100% rename from mods/doors/sounds/door_open.ogg rename to mods/doors/sounds/doors_door_open.ogg diff --git a/mods/doors/textures/door_brown.png b/mods/doors/textures/doors_brown.png similarity index 100% rename from mods/doors/textures/door_brown.png rename to mods/doors/textures/doors_brown.png diff --git a/mods/doors/textures/door_glass.png b/mods/doors/textures/doors_glass.png similarity index 100% rename from mods/doors/textures/door_glass.png rename to mods/doors/textures/doors_glass.png diff --git a/mods/doors/textures/door_glass_a.png b/mods/doors/textures/doors_glass_a.png similarity index 100% rename from mods/doors/textures/door_glass_a.png rename to mods/doors/textures/doors_glass_a.png diff --git a/mods/doors/textures/door_glass_b.png b/mods/doors/textures/doors_glass_b.png similarity index 100% rename from mods/doors/textures/door_glass_b.png rename to mods/doors/textures/doors_glass_b.png diff --git a/mods/doors/textures/door_glass_side.png b/mods/doors/textures/doors_glass_side.png similarity index 100% rename from mods/doors/textures/door_glass_side.png rename to mods/doors/textures/doors_glass_side.png diff --git a/mods/doors/textures/door_grey.png b/mods/doors/textures/doors_grey.png similarity index 100% rename from mods/doors/textures/door_grey.png rename to mods/doors/textures/doors_grey.png diff --git a/mods/doors/textures/door_obsidian_glass.png b/mods/doors/textures/doors_obsidian_glass.png similarity index 100% rename from mods/doors/textures/door_obsidian_glass.png rename to mods/doors/textures/doors_obsidian_glass.png diff --git a/mods/doors/textures/door_obsidian_glass_a.png b/mods/doors/textures/doors_obsidian_glass_a.png similarity index 100% rename from mods/doors/textures/door_obsidian_glass_a.png rename to mods/doors/textures/doors_obsidian_glass_a.png diff --git a/mods/doors/textures/door_obsidian_glass_b.png b/mods/doors/textures/doors_obsidian_glass_b.png similarity index 100% rename from mods/doors/textures/door_obsidian_glass_b.png rename to mods/doors/textures/doors_obsidian_glass_b.png diff --git a/mods/doors/textures/door_obsidian_glass_side.png b/mods/doors/textures/doors_obsidian_glass_side.png similarity index 100% rename from mods/doors/textures/door_obsidian_glass_side.png rename to mods/doors/textures/doors_obsidian_glass_side.png diff --git a/mods/doors/textures/door_steel.png b/mods/doors/textures/doors_steel.png similarity index 100% rename from mods/doors/textures/door_steel.png rename to mods/doors/textures/doors_steel.png diff --git a/mods/doors/textures/door_steel_a.png b/mods/doors/textures/doors_steel_a.png similarity index 100% rename from mods/doors/textures/door_steel_a.png rename to mods/doors/textures/doors_steel_a.png diff --git a/mods/doors/textures/door_steel_b.png b/mods/doors/textures/doors_steel_b.png similarity index 100% rename from mods/doors/textures/door_steel_b.png rename to mods/doors/textures/doors_steel_b.png diff --git a/mods/doors/textures/door_trapdoor.png b/mods/doors/textures/doors_trapdoor.png similarity index 100% rename from mods/doors/textures/door_trapdoor.png rename to mods/doors/textures/doors_trapdoor.png diff --git a/mods/doors/textures/door_trapdoor_side.png b/mods/doors/textures/doors_trapdoor_side.png similarity index 100% rename from mods/doors/textures/door_trapdoor_side.png rename to mods/doors/textures/doors_trapdoor_side.png diff --git a/mods/doors/textures/door_wood.png b/mods/doors/textures/doors_wood.png similarity index 100% rename from mods/doors/textures/door_wood.png rename to mods/doors/textures/doors_wood.png diff --git a/mods/doors/textures/door_wood_a.png b/mods/doors/textures/doors_wood_a.png similarity index 100% rename from mods/doors/textures/door_wood_a.png rename to mods/doors/textures/doors_wood_a.png diff --git a/mods/doors/textures/door_wood_b.png b/mods/doors/textures/doors_wood_b.png similarity index 100% rename from mods/doors/textures/door_wood_b.png rename to mods/doors/textures/doors_wood_b.png -- 2.25.1