From f600a9f645af40d22c8eb7c17aff89507b71816e Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Fri, 15 Jan 2016 18:50:32 -0800 Subject: [PATCH] New mesh door models, and extensive door API This patch replaces the default door nodes with a new mesh model and nodes. Two new models were added that are 2 blocks high. One for left-hinge and one for right-hinge doors. This allows us to make a single texture fit on both models. The alternative would have been 1 model and 2 unmapped textures, which is more work for mod developers. Doors work exactly like the old doors, including ownership, breaking doors, opening and closing. Under the hood, we can prevent the top part of the door from being obstructed by placing an invisible node. This prevents liquids from flowing through doors or people placing sand or other blocks in the top half. The door code automatically places and removes these as needed. Metadata is used to store door state, just like the old version. A doors API is added, it allows mods to use the API to open/close or toggle door states without worrying about sounds, permissions and other details. This is intended for e.g. mesecons. This API allows mods to manipulate or inspect doors for players or for themselves. In-game old door nodes are automatically converted using an ABM and preserve ownership and orientation and state. TNT blows up all doors and trapdoors except for the steel ones, who can survive a blast. We return an itemstack in on_blast(), which requires a TNT API patch which is also pending. We enable backface culling for most of these doors, as this gives the identical visual appearance that the old doors had. In the case of the glass door, there's a slight twist. The texture files used by the new doors have new names that do not conflict with previous texture file names to avoid texture pack conflicts. Thanks to red-001 for some of the conversion code, cleanups, and extra textures. --- game_api.txt | 50 +- mods/doors/README.txt | 17 +- mods/doors/init.lua | 738 +++++++++--------- mods/doors/models/door_a.obj | 40 + mods/doors/models/door_b.obj | 40 + mods/doors/textures/doors_brown.png | Bin 109 -> 0 bytes mods/doors/textures/doors_door_glass.png | Bin 0 -> 3064 bytes .../textures/doors_door_obsidian_glass.png | Bin 0 -> 2988 bytes mods/doors/textures/doors_door_steel.png | Bin 0 -> 1099 bytes mods/doors/textures/doors_door_wood.png | Bin 0 -> 1662 bytes mods/doors/textures/doors_glass_a.png | Bin 158 -> 0 bytes mods/doors/textures/doors_glass_b.png | Bin 158 -> 0 bytes mods/doors/textures/doors_glass_side.png | Bin 82 -> 0 bytes mods/doors/textures/doors_grey.png | Bin 105 -> 0 bytes .../{doors_glass.png => doors_item_glass.png} | Bin ...lass.png => doors_item_obsidian_glass.png} | Bin mods/doors/textures/doors_item_steel.png | Bin 0 -> 132 bytes .../{doors_wood.png => doors_item_wood.png} | Bin .../doors/textures/doors_obsidian_glass_a.png | Bin 128 -> 0 bytes .../doors/textures/doors_obsidian_glass_b.png | Bin 128 -> 0 bytes .../textures/doors_obsidian_glass_side.png | Bin 82 -> 0 bytes mods/doors/textures/doors_steel.png | Bin 132 -> 0 bytes mods/doors/textures/doors_steel_a.png | Bin 273 -> 0 bytes mods/doors/textures/doors_steel_b.png | Bin 260 -> 0 bytes mods/doors/textures/doors_wood_a.png | Bin 294 -> 0 bytes mods/doors/textures/doors_wood_b.png | Bin 291 -> 0 bytes 26 files changed, 499 insertions(+), 386 deletions(-) create mode 100644 mods/doors/models/door_a.obj create mode 100644 mods/doors/models/door_b.obj delete mode 100644 mods/doors/textures/doors_brown.png create mode 100644 mods/doors/textures/doors_door_glass.png create mode 100644 mods/doors/textures/doors_door_obsidian_glass.png create mode 100644 mods/doors/textures/doors_door_steel.png create mode 100644 mods/doors/textures/doors_door_wood.png delete mode 100644 mods/doors/textures/doors_glass_a.png delete mode 100644 mods/doors/textures/doors_glass_b.png delete mode 100644 mods/doors/textures/doors_glass_side.png delete mode 100644 mods/doors/textures/doors_grey.png rename mods/doors/textures/{doors_glass.png => doors_item_glass.png} (100%) rename mods/doors/textures/{doors_obsidian_glass.png => doors_item_obsidian_glass.png} (100%) create mode 100644 mods/doors/textures/doors_item_steel.png rename mods/doors/textures/{doors_wood.png => doors_item_wood.png} (100%) delete mode 100644 mods/doors/textures/doors_obsidian_glass_a.png delete mode 100644 mods/doors/textures/doors_obsidian_glass_b.png delete mode 100644 mods/doors/textures/doors_obsidian_glass_side.png delete mode 100644 mods/doors/textures/doors_steel.png delete mode 100644 mods/doors/textures/doors_steel_a.png delete mode 100644 mods/doors/textures/doors_steel_b.png delete mode 100644 mods/doors/textures/doors_wood_a.png delete mode 100644 mods/doors/textures/doors_wood_b.png diff --git a/game_api.txt b/game_api.txt index 774bd1d1..7395f3b4 100644 --- a/game_api.txt +++ b/game_api.txt @@ -71,43 +71,55 @@ doors.register_door(name, def) -> Registers new door doors.register_trapdoor(name, def) -^ name: "Trapdoor name" +^ name: "mod_door" ^ def: See [#Trapdoor definition] -> Registers new trapdoor +doors.get(pos) +^ pos = { x = .., y = .., z = ..} + -> Returns an ObjecRef to a door, or nil if the pos did not contain a door + + Methods: + :open(player) -- Open the door object, returns if door was opened + :close(player) -- Close the door object, returns if door was closed + :toggle(player) -- Toggle the door state, returns if state was toggled + :state() -- returns the door state, true = open, false = closed + + the "player" parameter can be omitted in all methods. If passed then + the usual permission checks will be performed to make sure the player + has the permissions needed to open this door. If omitted then no + permission checks are performed. + #Door definition ---------------- { description = "Door description", inventory_image = "mod_door_inv.png", - groups = {group = 1}, - tiles_bottom: [Tile definition], - ^ the tiles of the bottom part of the door {front, side} - tiles_top: [Tile definition], - ^ the tiles of the bottom part of the door {front, side} - node_box_bottom = regular nodebox, see [Node boxes], OPTIONAL, - node_box_top = regular nodebox, see [Node boxes], OPTIONAL, - selection_box_bottom = regular nodebox, see [Node boxes], OPTIONAL, - selection_box_top = regular nodebox, see [Node boxes], OPTIONAL, - sound_open_door = sound play for open door, OPTIONAL, - sound_close_door = sound play for close door, OPTIONAL, - only_placer_can_open = true/false, + groups = {choppy = 1}, + tiles = { "mod_door.png" }, + material = "default:wood", -- used to make a craft recipe + sounds = default.node_sound_wood_defaults(), -- optional + sound_open = sound play for open door, -- optional + sound_close = sound play for close door, -- optional + protected = false, ^ If true, only placer can open the door (locked for others) } #Trapdoor definition ---------------- { + description = "Trapdoor description", + inventory_image = "mod_trapdoor_inv.png", + groups = {choppy = 1}, tile_front = "doors_trapdoor.png", ^ the texture for the front and back of the trapdoor tile_side: "doors_trapdoor_side.png", ^ the tiles of the four side parts of the trapdoor - sound_open = sound to play when opening the trapdoor, OPTIONAL, - sound_close = sound to play when closing the trapdoor, OPTIONAL, - -> You can add any other node definition properties for minetest.register_node, - such as wield_image, inventory_image, sounds, groups, description, ... - Only node_box, selection_box, tiles, drop, drawtype, paramtype, paramtype2, on_rightclick - will be overwritten by the trapdoor registration function + sounds = default.node_sound_wood_defaults(), -- optional + sound_open = sound play for open door, -- optional + sound_close = sound play for close door, -- optional + protected = false, + ^ If true, only placer can open the door (locked for others) } Fence API diff --git a/mods/doors/README.txt b/mods/doors/README.txt index 27f0507a..02a1e9e3 100644 --- a/mods/doors/README.txt +++ b/mods/doors/README.txt @@ -1,12 +1,15 @@ Minetest Game mod: doors ======================== -version: 1.3 +version: 2.0 License of source code: ----------------------- Copyright (C) 2012 PilzAdam modified by BlockMen (added sounds, glassdoors[glass, obsidian glass], trapdoor) Steel trapdoor added by sofar. +Copyright (C) 2015 sofar@foo-projects.org +Re-implemented most of the door algorithms, added meshes, UV wrapped texture +Added doors API to facilitate coding mods accessing and operating doors. This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it @@ -40,8 +43,20 @@ following textures created by sofar (CC-BY-SA-3.0) doors_trapdoor_steel_side.png door_trapdoor_side.png +Door 3d models by sofar (CC-BY-SA-3.0) + door_a.obj + door_b.obj + +Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen: WTFPL + door_obsidian_glass.png + +Glass door textures by red-001 based on textures by celeron55: CC BY-SA 3.0 + door_glass.png All other textures (created by PilzAdam): WTFPL +Door textures were converted to the new texture map by sofar, paramat and +red-001, under the same license as the originals. + License of sounds -------------------------------------- diff --git a/mods/doors/init.lua b/mods/doors/init.lua index e942d466..2d6271e6 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -1,435 +1,436 @@ -doors = {} --- Registers a door -function doors.register_door(name, def) - def.groups.not_in_creative_inventory = 1 +--[[ - local box = {{-0.5, -0.5, -0.5, 0.5, 0.5, -0.5+1.5/16}} +Copyright (C) 2012 PilzAdam + modified by BlockMen (added sounds, glassdoors[glass, obsidian glass], trapdoor) +Copyright (C) 2015 - Auke Kok - if not def.node_box_bottom then - def.node_box_bottom = box - end - if not def.node_box_top then - def.node_box_top = box - end - if not def.selection_box_bottom then - def.selection_box_bottom= box +--]] + +-- our API object +doors = {} + +-- private data +local _doors = {} +_doors.registered_doors = {} +_doors.registered_trapdoors = {} + +-- returns an object to a door object or nil +function doors.get(pos) + if _doors.registered_doors[minetest.get_node(pos).name] then + -- A normal upright door + return { + pos = pos, + open = function(self, player) + if self:state() then + return false + end + return _doors.door_toggle(self.pos, player) + end, + close = function(self, player) + if not self:state() then + return false + end + return _doors.door_toggle(self.pos, player) + end, + toggle = function(self, player) + return _doors.door_toggle(self.pos, player) + end, + state = function(self) + local state = minetest.get_meta(self.pos):get_int("state") + return state %2 == 1 + end + } + elseif _doors.registered_trapdoors[minetest.get_node(pos).name] then + -- A trapdoor + return { + pos = pos, + open = function(self, player) + if self:state() then + return false + end + return _doors.trapdoor_toggle(self.pos, player) + end, + close = function(self, player) + if not self:state() then + return false + end + return _doors.trapdoor_toggle(self.pos, player) + end, + toggle = function(self, player) + return _doors.trapdoor_toggle(self.pos, player) + end, + state = function(self) + local name = minetest.get_node(pos).name + return name:sub(-5) == "_open" + end + } + else + return nil end - if not def.selection_box_top then - def.selection_box_top = box +end + +-- this hidden node is placed on top of the bottom, and prevents +-- nodes from being placed in the top half of the door. +minetest.register_node("doors:hidden", { + description = "Hidden Door Segment", + drawtype = "airlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = false, + floodable = false, + drop = "", + groups = { not_in_creative_inventory = 1 }, + on_blast = function() end +}) + +-- table used to aid door opening/closing +local transform = { + { + { v = "_a", param2 = 3 }, + { v = "_a", param2 = 0 }, + { v = "_a", param2 = 1 }, + { v = "_a", param2 = 2 }, + }, + { + { v = "_b", param2 = 1 }, + { v = "_b", param2 = 2 }, + { v = "_b", param2 = 3 }, + { v = "_b", param2 = 0 }, + }, + { + { v = "_b", param2 = 1 }, + { v = "_b", param2 = 2 }, + { v = "_b", param2 = 3 }, + { v = "_b", param2 = 0 }, + }, + { + { v = "_a", param2 = 3 }, + { v = "_a", param2 = 0 }, + { v = "_a", param2 = 1 }, + { v = "_a", param2 = 2 }, + }, +} + +function _doors.door_toggle(pos, clicker) + local meta = minetest.get_meta(pos) + local state = meta:get_int("state") + local def = minetest.registered_nodes[minetest.get_node(pos).name] + local name = def.door.basename + + if clicker then + local owner = meta:get_string("doors_owner") + if owner ~= "" then + if clicker:get_player_name() ~= owner then + return false + end + end end - if not def.sound_close_door then - def.sound_close_door = "doors_door_close" + local old = state + -- until Lua-5.2 we have no bitwise operators :( + if state % 2 == 1 then + state = state - 1 + else + state = state + 1 end - if not def.sound_open_door then - def.sound_open_door = "doors_door_open" + + local dir = minetest.get_node(pos).param2 + if state % 2 == 0 then + minetest.sound_play(def.door.sounds[1], {pos = pos, gain = 0.3, max_hear_distance = 10}) + else + minetest.sound_play(def.door.sounds[2], {pos = pos, gain = 0.3, max_hear_distance = 10}) end - - - minetest.register_craftitem(name, { + + minetest.swap_node(pos, { + name = "doors:" .. name .. transform[state + 1][dir+1].v, + param2 = transform[state + 1][dir+1].param2 + }) + meta:set_int("state", state) + + return true +end + +function doors.register(name, def) + -- replace old doors of this type automatically + minetest.register_abm({ + nodenames = {"doors:"..name.."_b_1", "doors:"..name.."_b_2"}, + interval = 7.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local l = tonumber(node.name:sub(-1)) + local meta = minetest.get_meta(pos) + local h = meta:get_int("right") + 1 + local p2 = node.param2 + local replace = { + { { type = "a", state = 0 }, { type = "a", state = 3 } }, + { { type = "b", state = 1 }, { type = "b", state = 2 } } + } + local new = replace[l][h] + -- retain infotext and doors_owner fields + minetest.swap_node(pos, { name = "doors:" .. name .. "_" .. new.type, param2 = p2}) + meta:set_int("state", new.state) + -- wipe meta on top node as it's unused + minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, { name = "doors:hidden" }) + end + }) + + minetest.register_craftitem("doors:" .. name, { description = def.description, inventory_image = def.inventory_image, on_place = function(itemstack, placer, pointed_thing) - if not pointed_thing.type == "node" then - return itemstack - end + local pos = pointed_thing.above + local node = minetest.get_node(pos) - local ptu = pointed_thing.under - local nu = minetest.get_node(ptu) - if minetest.registered_nodes[nu.name].on_rightclick then - return minetest.registered_nodes[nu.name].on_rightclick(ptu, nu, placer, itemstack) - end - - local pt = pointed_thing.above - local pt2 = {x=pt.x, y=pt.y, z=pt.z} - pt2.y = pt2.y+1 - if - not minetest.registered_nodes[minetest.get_node(pt).name].buildable_to or - not minetest.registered_nodes[minetest.get_node(pt2).name].buildable_to or - not placer or - not placer:is_player() - then + if not minetest.registered_nodes[node.name].buildable_to then return itemstack end - if minetest.is_protected(pt, placer:get_player_name()) or - minetest.is_protected(pt2, placer:get_player_name()) then - minetest.record_protection_violation(pt, placer:get_player_name()) + local above = { x = pos.x, y = pos.y + 1, z = pos.z } + if not minetest.registered_nodes[minetest.get_node(above).name].buildable_to then return itemstack end - local p2 = minetest.dir_to_facedir(placer:get_look_dir()) - local pt3 = {x=pt.x, y=pt.y, z=pt.z} - if p2 == 0 then - pt3.x = pt3.x-1 - elseif p2 == 1 then - pt3.z = pt3.z+1 - elseif p2 == 2 then - pt3.x = pt3.x+1 - elseif p2 == 3 then - pt3.z = pt3.z-1 - end - if minetest.get_item_group(minetest.get_node(pt3).name, "door") == 0 then - minetest.set_node(pt, {name=name.."_b_1", param2=p2}) - minetest.set_node(pt2, {name=name.."_t_1", param2=p2}) + local dir = minetest.dir_to_facedir(placer:get_look_dir()) + + local ref = { + { x = -1, y = 0, z = 0 }, + { x = 0, y = 0, z = 1 }, + { x = 1, y = 0, z = 0 }, + { x = 0, y = 0, z = -1 }, + } + + local aside = { + x = pos.x + ref[dir + 1].x, + y = pos.y + ref[dir + 1].y, + z = pos.z + ref[dir + 1].z, + } + + local state = 0 + if minetest.get_item_group(minetest.get_node(aside).name, "door") == 1 then + state = state + 2 + minetest.set_node(pos, {name = "doors:" .. name .. "_b", param2 = dir}) else - minetest.set_node(pt, {name=name.."_b_2", param2=p2}) - minetest.set_node(pt2, {name=name.."_t_2", param2=p2}) - minetest.get_meta(pt):set_int("right", 1) - minetest.get_meta(pt2):set_int("right", 1) + minetest.set_node(pos, {name = "doors:" .. name .. "_a", param2 = dir}) end + minetest.set_node(above, { name = "doors:hidden" }) + + local meta = minetest.get_meta(pos) + meta:set_int("state", state) - if def.only_placer_can_open then + if def.protected then local pn = placer:get_player_name() - local meta = minetest.get_meta(pt) meta:set_string("doors_owner", pn) - meta:set_string("infotext", "Owned by "..pn) - meta = minetest.get_meta(pt2) - meta:set_string("doors_owner", pn) - meta:set_string("infotext", "Owned by "..pn) + meta:set_string("infotext", "Owned by " .. pn) end if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end + return itemstack - end, + end }) - local tt = def.tiles_top - local tb = def.tiles_bottom - - local function after_dig_node(pos, name, digger) - local node = minetest.get_node(pos) - if node.name == name then - minetest.node_dig(pos, node, digger) + local can_dig = function(pos, digger) + if not def.protected then + return true end + local meta = minetest.get_meta(pos) + return meta:get_string("doors_owner") == digger:get_player_name() end - local function check_and_blast(pos, name) - local node = minetest.get_node(pos) - if node.name == name then - minetest.remove_node(pos) - end + if not def.sounds then + def.sounds = default.node_sound_wood_defaults() end - local function make_on_blast(base_name, dir, door_type, other_door_type) - if def.only_placer_can_open then - return function() end - else - return function(pos, intensity) - check_and_blast(pos, base_name .. door_type) - pos.y = pos.y + dir - check_and_blast(pos, base_name .. other_door_type) - end - end + if not def.sound_open then + def.sound_open = "doors_door_open" end - local function on_rightclick(pos, dir, check_name, replace, replace_dir, params) - pos.y = pos.y+dir - if minetest.get_node(pos).name ~= check_name then - return - end - local p2 = minetest.get_node(pos).param2 - p2 = params[p2+1] - - minetest.swap_node(pos, {name=replace_dir, param2=p2}) - - pos.y = pos.y-dir - minetest.swap_node(pos, {name=replace, param2=p2}) - - local snd_1 = def.sound_close_door - local snd_2 = def.sound_open_door - if params[1] == 3 then - snd_1 = def.sound_open_door - snd_2 = def.sound_close_door - end - - if minetest.get_meta(pos):get_int("right") ~= 0 then - minetest.sound_play(snd_1, {pos = pos, gain = 0.3, max_hear_distance = 10}) - else - minetest.sound_play(snd_2, {pos = pos, gain = 0.3, max_hear_distance = 10}) - end + if not def.sound_close then + def.sound_close = "doors_door_close" end - local function check_player_priv(pos, player) - if not def.only_placer_can_open then - return true - end - local meta = minetest.get_meta(pos) - local pn = player:get_player_name() - return meta:get_string("doors_owner") == pn - end + def.groups.not_in_creative_inventory = 1 + def.groups.door = 1 + def.drop = "doors:" .. name + def.door = { + basename = name, + sounds = { def.sound_close, def.sound_open }, + } - local function on_rotate(pos, node, dir, user, check_name, mode, new_param2) - if not check_player_priv(pos, user) then - return false - end - if mode ~= screwdriver.ROTATE_FACE then - return false - end + def.on_rightclick = function(pos, node, clicker) + _doors.door_toggle(pos, clicker) + end + def.after_dig_node = function(pos, node, meta, digger) + minetest.remove_node({ x = pos.x, y = pos.y + 1, z = pos.z}) + end + def.can_dig = function(pos, player) + return can_dig(pos, player) + end + def.on_rotate = function(pos, node, user, mode, new_param2) + return false + end - pos.y = pos.y + dir - if not minetest.get_node(pos).name == check_name then - return false - end - if minetest.is_protected(pos, user:get_player_name()) then - minetest.record_protection_violation(pos, user:get_player_name()) - return false + if def.protected then + def.on_blast = function() end + else + def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + -- hidden node doesn't get blasted away. + minetest.remove_node({ x = pos.x, y = pos.y + 1, z = pos.z}) + return { "doors:" .. name } end - - local node2 = minetest.get_node(pos) - node2.param2 = (node2.param2 + 1) % 4 - minetest.swap_node(pos, node2) - - pos.y = pos.y - dir - node.param2 = (node.param2 + 1) % 4 - minetest.swap_node(pos, node) - return true end - minetest.register_node(name.."_b_1", { - tiles = {tb[2], tb[2], tb[2], tb[2], tb[1], tb[1].."^[transformfx"}, + minetest.register_node("doors:" .. name .. "_a", { + description = def.description, + visual = "mesh", + mesh = "door_a.obj", + tiles = def.tiles, + drawtype = "mesh", paramtype = "light", paramtype2 = "facedir", + sunlight_propagates = true, + use_texture_alpha = true, + walkable = true, is_ground_content = false, - drop = name, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = def.node_box_bottom - }, - selection_box = { - type = "fixed", - fixed = def.selection_box_bottom - }, + buildable_to = false, + drop = def.drop, groups = def.groups, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - pos.y = pos.y+1 - after_dig_node(pos, name.."_t_1", digger) - end, - - on_rightclick = function(pos, node, clicker) - if check_player_priv(pos, clicker) then - on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0}) - end - end, - - on_rotate = function(pos, node, user, mode, new_param2) - return on_rotate(pos, node, 1, user, name.."_t_1", mode) - end, - - can_dig = check_player_priv, sounds = def.sounds, - sunlight_propagates = def.sunlight, - on_blast = make_on_blast(name, 1, "_b_1", "_t_1") - }) - - minetest.register_node(name.."_t_1", { - tiles = {tt[2], tt[2], tt[2], tt[2], tt[1], tt[1].."^[transformfx"}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "", - drawtype = "nodebox", - node_box = { + door = def.door, + on_rightclick = def.on_rightclick, + after_dig_node = def.after_dig_node, + can_dig = def.can_dig, + on_rotate = def.on_rotate, + on_blast = def.on_blast, + selection_box = { type = "fixed", - fixed = def.node_box_top + fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16} }, - selection_box = { + collision_box = { type = "fixed", - fixed = def.selection_box_top + fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16} }, - groups = def.groups, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - pos.y = pos.y-1 - after_dig_node(pos, name.."_b_1", digger) - end, - - on_rightclick = function(pos, node, clicker) - if check_player_priv(pos, clicker) then - on_rightclick(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0}) - end - end, - - on_rotate = function(pos, node, user, mode, new_param2) - return on_rotate(pos, node, -1, user, name.."_b_1", mode) - end, - - can_dig = check_player_priv, - sounds = def.sounds, - sunlight_propagates = def.sunlight, - on_blast = make_on_blast(name, -1, "_t_1", "_b_1") }) - minetest.register_node(name.."_b_2", { - tiles = {tb[2], tb[2], tb[2], tb[2], tb[1].."^[transformfx", tb[1]}, + minetest.register_node("doors:" .. name .. "_b", { + description = def.description, + visual = "mesh", + mesh = "door_b.obj", + tiles = def.tiles, + drawtype = "mesh", paramtype = "light", paramtype2 = "facedir", + sunlight_propagates = true, + use_texture_alpha = true, + walkable = true, is_ground_content = false, - drop = name, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = def.node_box_bottom - }, - selection_box = { - type = "fixed", - fixed = def.selection_box_bottom - }, + buildable_to = false, + drop = def.drop, groups = def.groups, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - pos.y = pos.y+1 - after_dig_node(pos, name.."_t_2", digger) - end, - - on_rightclick = function(pos, node, clicker) - if check_player_priv(pos, clicker) then - on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2}) - end - end, - - on_rotate = function(pos, node, user, mode, new_param2) - return on_rotate(pos, node, 1, user, name.."_t_2", mode) - end, - - can_dig = check_player_priv, sounds = def.sounds, - sunlight_propagates = def.sunlight, - on_blast = make_on_blast(name, 1, "_b_2", "_t_2") - }) - - minetest.register_node(name.."_t_2", { - tiles = {tt[2], tt[2], tt[2], tt[2], tt[1].."^[transformfx", tt[1]}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "", - drawtype = "nodebox", - node_box = { + door = def.door, + on_rightclick = def.on_rightclick, + after_dig_node = def.after_dig_node, + can_dig = def.can_dig, + on_rotate = def.on_rotate, + on_blast = def.on_blast, + selection_box = { type = "fixed", - fixed = def.node_box_top + fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16} }, - selection_box = { + collision_box = { type = "fixed", - fixed = def.selection_box_top + fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16} }, - groups = def.groups, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - pos.y = pos.y-1 - after_dig_node(pos, name.."_b_2", digger) - end, - - on_rightclick = function(pos, node, clicker) - if check_player_priv(pos, clicker) then - on_rightclick(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2}) - end - end, - - on_rotate = function(pos, node, user, mode, new_param2) - return on_rotate(pos, node, -1, user, name.."_b_2", mode) - end, + }) - can_dig = check_player_priv, - sounds = def.sounds, - sunlight_propagates = def.sunlight, - on_blast = make_on_blast(name, -1, "_t_2", "_b_2") + minetest.register_craft({ + output = "doors:" .. name, + recipe = { + {def.material,def.material}; + {def.material,def.material}; + {def.material,def.material}; + } }) + _doors.registered_doors["doors:" .. name .. "_a"] = true + _doors.registered_doors["doors:" .. name .. "_b"] = true end -doors.register_door("doors:door_wood", { - description = "Wooden Door", - inventory_image = "doors_wood.png", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1}, - 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, +doors.register("door_wood", { + tiles = {{ name = "doors_door_wood.png", backface_culling = true }}, + description = "Wooden Door", + inventory_image = "doors_item_wood.png", + groups = { snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }, + material = "group:wood", }) -minetest.register_craft({ - output = "doors:door_wood", - recipe = { - {"group:wood", "group:wood"}, - {"group:wood", "group:wood"}, - {"group:wood", "group:wood"} - } +doors.register("door_steel", { + tiles = {{ name = "doors_door_steel.png", backface_culling = true }}, + description = "Steel Door", + inventory_image = "doors_item_steel.png", + protected = true, + groups = { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 }, + material = "default:steel_ingot", }) -doors.register_door("doors:door_steel", { - description = "Steel Door", - inventory_image = "doors_steel.png", - groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1}, - 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, +doors.register("door_glass", { + tiles = { "doors_door_glass.png"}, + description = "Glass Door", + inventory_image = "doors_item_glass.png", + groups = { snappy=1, cracky=1, oddly_breakable_by_hand=3 }, + material = "default:glass", + sounds = default.node_sound_glass_defaults(), }) -minetest.register_craft({ - output = "doors:door_steel", - recipe = { - {"default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot"} - } -}) - -doors.register_door("doors:door_glass", { - description = "Glass Door", - inventory_image = "doors_glass.png", - groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1}, - 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, +doors.register("door_obsidian_glass", { + tiles = { "doors_door_obsidian_glass.png" }, + description = "Glass Door", + inventory_image = "doors_item_obsidian_glass.png", + groups = { snappy=1, cracky=1, oddly_breakable_by_hand=3 }, + material = "default:obsidian_glass", + sounds = default.node_sound_glass_defaults(), }) -minetest.register_craft({ - output = "doors:door_glass", - recipe = { - {"default:glass", "default:glass"}, - {"default:glass", "default:glass"}, - {"default:glass", "default:glass"} - } -}) - -doors.register_door("doors:door_obsidian_glass", { - description = "Obsidian Glass Door", - inventory_image = "doors_obsidian_glass.png", - groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1}, - tiles_bottom = {"doors_obsidian_glass_b.png", "doors_obsidian_glass_side.png"}, - tiles_top = {"doors_obsidian_glass_a.png", "doors_obsidian_glass_side.png"}, - sounds = default.node_sound_glass_defaults(), - sunlight = true, -}) +----trapdoor---- -minetest.register_craft({ - output = "doors:door_obsidian_glass", - recipe = { - {"default:obsidian_glass", "default:obsidian_glass"}, - {"default:obsidian_glass", "default:obsidian_glass"}, - {"default:obsidian_glass", "default:obsidian_glass"} - } -}) +function _doors.trapdoor_toggle(pos, clicker) + if clicker then + local meta = minetest.get_meta(pos) + local owner = meta:get_string("doors_owner") + if owner ~= "" then + if clicker:get_player_name() ~= owner then + return false + end + end + end + local node = minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] -----trapdoor---- + if string.sub(node.name, -5) == "_open" then + minetest.sound_play(def.sound_close, {pos = pos, gain = 0.3, max_hear_distance = 10}) + minetest.swap_node(pos, {name = string.sub(node.name, 1, string.len(node.name) - 5), param1 = node.param1, param2 = node.param2}) + else + minetest.sound_play(def.sound_open, {pos = pos, gain = 0.3, max_hear_distance = 10}) + minetest.swap_node(pos, {name = node.name .. "_open", param1 = node.param1, param2 = node.param2}) + end +end function doors.register_trapdoor(name, def) local name_closed = name local name_opened = name.."_open" local function check_player_priv(pos, player) - if not def.only_placer_can_open then + if not def.protected then return true end local meta = minetest.get_meta(pos) @@ -437,18 +438,8 @@ function doors.register_trapdoor(name, def) return meta:get_string("doors_owner") == pn end - def.on_rightclick = function (pos, node, clicker, itemstack, pointed_thing) - if not check_player_priv(pos, clicker) then - return - end - local newname = node.name == name_closed and name_opened or name_closed - local sound = false - if node.name == name_closed then sound = def.sound_open end - if node.name == name_opened then sound = def.sound_close end - if sound then - minetest.sound_play(sound, {pos = pos, gain = 0.3, max_hear_distance = 10}) - end - minetest.swap_node(pos, {name = newname, param1 = node.param1, param2 = node.param2}) + def.on_rightclick = function(pos, node, clicker) + _doors.trapdoor_toggle(pos, clicker) end -- Common trapdoor configuration @@ -458,7 +449,7 @@ function doors.register_trapdoor(name, def) def.is_ground_content = false def.can_dig = check_player_priv - if def.only_placer_can_open then + if def.protected then def.after_place_node = function(pos, placer, itemstack, pointed_thing) local pn = placer:get_player_name() local meta = minetest.get_meta(pos) @@ -467,6 +458,26 @@ function doors.register_trapdoor(name, def) return minetest.setting_getbool("creative_mode") end + + def.on_blast = function() end + else + def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + minetest.remove_node({ x = pos.x, y = pos.y + 1, z = pos.z}) + return { name } + end + end + + if not def.sounds then + def.sounds = default.node_sound_wood_defaults() + end + + if not def.sound_open then + def.sound_open = "doors_door_open" + end + + if not def.sound_close then + def.sound_close = "doors_door_close" end local def_opened = table.copy(def) @@ -501,9 +512,10 @@ function doors.register_trapdoor(name, def) minetest.register_node(name_opened, def_opened) minetest.register_node(name_closed, def_closed) -end - + _doors.registered_trapdoors[name_opened] = true + _doors.registered_trapdoors[name_closed] = true +end doors.register_trapdoor("doors:trapdoor", { description = "Trapdoor", @@ -512,9 +524,6 @@ doors.register_trapdoor("doors:trapdoor", { tile_front = "doors_trapdoor.png", tile_side = "doors_trapdoor_side.png", groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1}, - sounds = default.node_sound_wood_defaults(), - sound_open = "doors_door_open", - sound_close = "doors_door_close" }) doors.register_trapdoor("doors:trapdoor_steel", { @@ -523,11 +532,8 @@ doors.register_trapdoor("doors:trapdoor_steel", { wield_image = "doors_trapdoor_steel.png", tile_front = "doors_trapdoor_steel.png", tile_side = "doors_trapdoor_steel_side.png", - only_placer_can_open = true, + protected = true, groups = {snappy=1, bendy=2, cracky=1, melty=2, level=2, door=1}, - sounds = default.node_sound_wood_defaults(), - sound_open = "doors_door_open", - sound_close = "doors_door_close" }) minetest.register_craft({ diff --git a/mods/doors/models/door_a.obj b/mods/doors/models/door_a.obj new file mode 100644 index 00000000..bd5127b5 --- /dev/null +++ b/mods/doors/models/door_a.obj @@ -0,0 +1,40 @@ +# Blender v2.76 (sub 0) OBJ File: 'door_a.blend' +# www.blender.org +mtllib door_a.mtl +o Cube_Cube.001 +v 0.499000 -0.499000 -0.499000 +v 0.499000 1.499000 -0.499000 +v 0.499000 -0.499000 -0.375000 +v 0.499000 1.499000 -0.375000 +v -0.499000 -0.499000 -0.499000 +v -0.499000 1.499000 -0.499000 +v -0.499000 -0.499000 -0.375000 +v -0.499000 1.499000 -0.375000 +vt 0.842105 1.000000 +vt 0.894737 1.000000 +vt 0.894737 0.000000 +vt 0.842105 0.000000 +vt 0.421053 1.000000 +vt 0.421053 0.000000 +vt 0.947368 1.000000 +vt 0.947368 0.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.500000 +vt 0.947368 0.500000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +usemtl None +s off +f 2/1/1 4/2/1 3/3/1 1/4/1 +f 4/5/2 8/1/2 7/4/2 3/6/2 +f 8/2/3 6/7/3 5/8/3 7/3/3 +f 6/9/4 2/5/4 1/6/4 5/10/4 +f 1/11/5 3/12/5 7/7/5 5/13/5 +f 6/14/6 8/8/6 4/12/6 2/11/6 diff --git a/mods/doors/models/door_b.obj b/mods/doors/models/door_b.obj new file mode 100644 index 00000000..c5607b87 --- /dev/null +++ b/mods/doors/models/door_b.obj @@ -0,0 +1,40 @@ +# Blender v2.76 (sub 0) OBJ File: 'door_b.blend' +# www.blender.org +mtllib door_b.mtl +o Cube_Cube.001 +v -0.499000 -0.499000 -0.499000 +v -0.499000 1.499000 -0.499000 +v -0.499000 -0.499000 -0.375000 +v -0.499000 1.499000 -0.375000 +v 0.499000 -0.499000 -0.499000 +v 0.499000 1.499000 -0.499000 +v 0.499000 -0.499000 -0.375000 +v 0.499000 1.499000 -0.375000 +vt 0.842105 1.000000 +vt 0.842105 0.000000 +vt 0.894737 0.000000 +vt 0.894737 1.000000 +vt 0.421053 1.000000 +vt 0.421053 0.000000 +vt 0.947368 0.000000 +vt 0.947368 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.500000 +vt 0.947368 0.500000 +vt 1.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +usemtl None +s off +f 2/1/1 1/2/1 3/3/1 4/4/1 +f 4/5/2 3/6/2 7/2/2 8/1/2 +f 8/4/3 7/3/3 5/7/3 6/8/3 +f 6/9/4 5/10/4 1/6/4 2/5/4 +f 1/11/5 5/12/5 7/13/5 3/7/5 +f 6/8/6 2/13/6 4/12/6 8/14/6 diff --git a/mods/doors/textures/doors_brown.png b/mods/doors/textures/doors_brown.png deleted file mode 100644 index 8c8e3d898f41a2e9e859f2717d0a5729cec260b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{F!VDx;H*&N9DgFST5LY)72_H)tM*}e@LvcGj z(aqaii-A&-o-U3d9M_Wt5(*L$5(F5WSlKuX8a60OFbIEOG_;G)*$!01;OXk;vd$@? F2>>+r7bO4y diff --git a/mods/doors/textures/doors_door_glass.png b/mods/doors/textures/doors_door_glass.png new file mode 100644 index 0000000000000000000000000000000000000000..f597299bdfaa2389d40c5179069ccd5685b937f9 GIT binary patch literal 3064 zcmV000V4X+uL$P-t&- zZ*ypGa3D!TLm+T+Z)Rz1WdHzp+MQEpR8#2|J@?-9LQ9B%luK_?6$l_wLW_VDktQl3 z2@pz%A)(n7QNa;KMFbnjpojyGj)066Q7jCK3fKqaA)=0hqlk*i`{8?|Yu3E?=FR@K z*FNX0^PRKL2fzpnmPj*EHGmAMLLL#|gU7_i;p8qrfeIvW01ybXWFd3?BLM*Temp!Y zBESc}00DT@3kU$fO`E_l9Ebl8>Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ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*ZOvRRz_K4jtN z=Vz&VxeUc@=y6+lV;>(MPG)hy(2M5eXCZ9E>M)oK9%{sYG}XA7q2 R{`>#{002ovPDHLkV1fb(6QckC literal 0 HcmV?d00001 diff --git a/mods/doors/textures/doors_door_wood.png b/mods/doors/textures/doors_door_wood.png new file mode 100644 index 0000000000000000000000000000000000000000..7b18203eb37b72e44275281e4510e1e33b6290be GIT binary patch literal 1662 zcmV-^27&pBP)000I>NklgA6DB0fqwyP6Rvl z0|Fd6rO4eKfza;qVRB}=yIu~ur>A?TXJr>KsP3M+Rkv=Pd+sUq*~cFw+GaFlR?u3} zZ!tDQoR6dw36areG$^I9q5($dshuC#Utd0Fv8tI(vOzD-1?uHB0GTMfF{6w65C-qH zPh7n&0l0goAQOda|62ia%RIGjHkwV}<3EdvA~RdPSZhEOm#?a3*G8k2BBsP`?cRQY zHBDrux$y0)^2P`^cw5gI+Hf82=U8hfGK2GRs~0gEZ4Jg~zWnN&LF~Wy^usitU-0L@ zUktwg=GPykxO%}={2l;5D3-kc=sv&w!#@V&e)ZGibaZsg@BaAD!S`Q2ewcD=&_b0Q30;CnqNZ+5m8iOXgQA0FLfXu(QJr&|8`~KR@T_=y>qm z8qIuu&Vz#~UiNwN_0!Q!N$otYc2q9%@KRX*;;OVoo zZk!c^F^$u!%8`=a8Eq-60JW#AJb(Sy^8t!K|KxF+&o8#J_47|2C%3r5^_cSL=$POC z>8q{m8~gtApFBvb%0LSEkPxG`dMR>4N(L+2gqUZB+{)JXy@{m?mUpIE!()XdpV(0> z<(V15o*}mel^dpo9cTW`3Pg()KML*LPL5G(xWluv zGfq!WyW+hLK>6m9Z?2oHeE8mk;+?~epVq~EZF`ec&(ANKk~BNy?CcCH8t3Dn7o$O2 z!|DAQ)Gx6jy`6cE52sLFqW~G;$8^V(TZ5`!HpkiNAL|x77T=bnF&tgRI{^G}vKmnl+jf8XcVsqu7l5CAe?`nJ&PU#z z(8Fuv{*iNqa=Pu4k3ISqCGFMQlq_=s0hqCRzuh-m0(D>6B&ZFe;1! zf3d2OviA7O^P_{8Z~&P#l$Gi^mIkcvdmw)}dDD{Rq?e&Xk*L&W{6~)xwF^MSssb^7 zw;o#?UA}Jhn7+OKZJ0ktM0d`7+v>URY9Y3I>`o4_TaOi);Jje8#@-DAjCvWvBO798?4-PuJ3qE zpxMS?2(g{FH9iu%gL&q`T(2elJz+sj3?1BenN9 zA3L3{wL+=w)vOJKn7RxLG2wl{jnvhYQb#pbG^s5+i?W8>^qBJjUo{Subr`7B?`qyh z{-5T2B*f-|vZ_2{ZqZ{_3?>t-1Tt&7<5D;H%=X?@VKKq7*XprJVaWGrH+NZs>bk=D_R)m;D{>1tpHkheGS%^ZdpHb+|I zLeOe=R*D#W-QcQpe(Msg{RY4xG?GN?hOL^;=Mf!KFWdF;F)=_Hfc%c*|^m~V!C*X4CuG>*MqxGkH$-OWqzx}6+kJN4Lq0R|)a2UrsT+W-In07*qo IM6N<$f(<`F?*IS* literal 0 HcmV?d00001 diff --git a/mods/doors/textures/doors_glass_a.png b/mods/doors/textures/doors_glass_a.png deleted file mode 100644 index da2540287cfe24c451c14b424792ac431db80bda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?b1=0r&JidSb!a01s>&fZOswwi7XK(SBJ86 cUI<`kNP8-Mb^dev*+3l(p00i_>zopr0H_KpvH$=8 literal 0 HcmV?d00001 diff --git a/mods/doors/textures/doors_wood.png b/mods/doors/textures/doors_item_wood.png similarity index 100% rename from mods/doors/textures/doors_wood.png rename to mods/doors/textures/doors_item_wood.png diff --git a/mods/doors/textures/doors_obsidian_glass_a.png b/mods/doors/textures/doors_obsidian_glass_a.png deleted file mode 100644 index d5ac83d09d4f978330381944e2ca09138254aebb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|t{_1H0eLk;Q!^h?AcwIe z$S;_|;n|HeAV<~H#W95AdNN1vEU8lu4jeeZp*}-G%0Y*vaYC*`*rAqHy@EL+3|_lA VShk1sB>^=sc)I$ztaD0e0sw#{AIty% diff --git a/mods/doors/textures/doors_obsidian_glass_b.png b/mods/doors/textures/doors_obsidian_glass_b.png deleted file mode 100644 index d5ac83d09d4f978330381944e2ca09138254aebb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|t{_1H0eLk;Q!^h?AcwIe z$S;_|;n|HeAV<~H#W95AdNN1vEU8lu4jeeZp*}-G%0Y*vaYC*`*rAqHy@EL+3|_lA VShk1sB>^=sc)I$ztaD0e0sw#{AIty% diff --git a/mods/doors/textures/doors_obsidian_glass_side.png b/mods/doors/textures/doors_obsidian_glass_side.png deleted file mode 100644 index aa4c63aac9cb88b6361fa5964c4892504eac3841..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 82 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?jt^xuAZ#3u32XeVQT^vI= bt|un|*-Q+Kj}-S916d57u6{1-oD!MTNsI(6#ay?gui?Yn&W@|iPdwr}5l?%cV92M<1Y@L=c8orZ>nhYlT5Q&SV#Yf%W) z%vciS7tG-B>_!@p)8^^o7$R}mw?C5aumOjQVfRMa^*jG3a);y^$@{;^G!eS6X{q(& zgp3udf?ZhzMa7?39aX!1wl%`F41=Ba2;`Kd#IboMVb`|GFUf&SyiIZ1% zwwc9s9e(8Gb!KUT$v&kMBGUOA>ze*IZ4F6#*R89!$`2*S5B{<>lns+S<9fxy{YZ&(F`x%ge#R!X_prGcz+TE-pL5 zYnA{20EtONK~xyiHI0D|10e`QOGR#|)9wF%b~LwZVzl*9F!4R7!OT$Nso*8i*h(CD z(|zylx9q~?ZbDiOw8%?DD|;tBM-fgm31p8V%<)gm6ifvK3NX`%2v7`-U8U*zrGTg7 z#>?~RfC6d7M{8v>BQsYVEPC&Kt+{lCwpiA8xhSb)jB)9d^!NdQa0LjPaAQvZ0000< KMNUMnLSTZ7zjes~ diff --git a/mods/doors/textures/doors_wood_a.png b/mods/doors/textures/doors_wood_a.png deleted file mode 100644 index 86a747aa5ba39f399406f3cf07bb432d65878719..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Yk*IPE0FdulgbFS$O^Yi4m3;l zQjT*|$_dnPHI_&UFp2jw$?#K;a+deCl1cPX@-mkWv6st_vNkj{bTAO}x0Z|YG*nYl zI~~4>A7~I`NswPKgTu2MX+TcDr;B5V#O2Wb+d_vGI9vqv8!}9mo%~;)Wmu+mwlX3$ zJ%XX=T+=-Vo+Q>ed#9HK_tZJ)omsb2zEd%Wk7rHrUcL#bE!%pyi=vKQDw*-KGO8(6 z;p<(uq_4q?nLD?dJxf0o`D3o)?Nj?Fm#uBsweN43k@B|vN7rn)sw$DQymQJ-!NsfG ms(X45UX~CSTzM&_hEePlo8kxMzq5c&WAJqKb6Mw<&;$UzR%Vz0 diff --git a/mods/doors/textures/doors_wood_b.png b/mods/doors/textures/doors_wood_b.png deleted file mode 100644 index 966509827e65cdfec58d15fb9f8182220b762dbf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Q-Dv1YpRcGy02=2hjNmqa)!UU zyQx&XyHZksX{@WFkEKkYtz2%PW@?aGq?3GRm}P#5R;-Vai?M{7nwo>YSYDL1fq}tX zD?>4$X>&YX977~7yY`3k9X8-`&OA9O{gTDwf8n~V3~!t5d9o%Py7Jtn_?%|ri_YZR zX5xb1qkitySd(i1>X1mVOSM{cmPV4^szn@(yzR4#-8(J>>2K)f)1Pr?W51oz2d&*w zUE7vy-NkZQJooJD_#H1USxh)7@%S9C@pnTzdAp*1_C(nW&X@V_1%+!Cixo{d5vU}% l+Q;ok!S{R8hS|11m@1dE?X~Q