Doors Redux Mod
doors (by sorcerykid)
Doors Redux is a total rewrite of the Doors mod from Minetest Game. It builds upon the work of sofar, PilzAdam, and BlockMen to provide greater functionality in addition to an expanded selection of doors from my own Extra Doors mod.
The project actually began as experiment to incorporate centered doors into Minetest Game, because they look so much more visually appealing than the traditional offset doors. However, it turned out to be more complicated than planned, given the need to ensure backward compatibility with existing worlds. So I ended up rewriting the Doors mod from the ground up with a specialized translation matrix, including Blender models adapted from TumeniNode's excellent C Doors mod.
Thankfully, the end result was well worth the effort, since I was able to simplify most of the logic and extend the overall feature-set too! Check out the video below for a step-by-step guide to using Doors Redux!
Demonstration of Doors Redux Mod
https://vimeo.com/401744434
Repository:
https://bitbucket.org/sorcerykid/doors
Download Archive (.zip)
Download Archive (.tar.gz)
Dependencies:
Default Mod (required)
Configuration Panel Mod (required)
Screwdriver Mod (optional)
Installation Instructions:
- Backup the original "doors" mod to a safe location.
- Unzip the archive into the mods directory of your game.
- Rename the doors-master directory to "doors".
GNU Lesser General Public License v3 (LGPL-3.0)
Media License:
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Overview:
Some of the notable features of Doors Redux include:
- Distinctive sound fx when attempting to open a locked door
- Multiple locking modes for all doors: unlocked, locked, and shared
- Multiple closing modes for all doors: auto-close, hold-open, and manual
- Support for node-center and node-offset door positions
- Wrench tool cycles between door locking and closing modes
- Screwdriver tool alternates door position and direction
- Fully backwards-compatible API with additional functions
I truly believe that doors are one of the most essential but often overlooked elements of good architectural design. They set the tone and character of both a living and working space. Have the wrong style of door can make or break the underlying visual aesthetic of any building, which is why I accounted for several possible uses.
Usage Instructions:
First and foremost is support for the already familiar screwdriver. With this tool you can reposition almost any door depending on the mode of operation. Left-clicking switches the hand between left vs. right. Whereas right-clicking switches the position between center vs. offset. It's really that easy!
The wrench is another powerful tool in your arsenal for manipulating doors and trapdoors. It can be crafted from just one steel ingot and one steel rod. Like the screwdriver from Minetest Game, the wrench has two modes of operation (with the caveat that any existing doors placed by the original mod must be replaced to use this tool).
To adjust the closing mode, right-click the door or trapdoor with a wrench. The changes will be indicated in chat as follows:
- Normal (door will remain open or closed as per usual operation)
- Auto-Close (door will close automatically when opened)
- Hold-Open (door will be non-closable when opened)
Hold-open doors are ideal for when you want to allow for uninterupted passage through a doorway, without having to remove the door entirely. Fire doors in schools are a typical example of doors that are intended to remain open, except during emergencies.
To adjust the locking mode, left-click the door or trapdoor with a wrench. The changes will be indicated in chat as follows:
- Unlocked (door may be opened and closed by any player)
- Locked (door may only be opened and closed by the owner)
- Shared (door may only be opened and closed by members of the protection area)
It is important to note the distinction between protected doors and shared locking mode.
- Protected doors are owned nodes, and therefore can only be removed and manipulated by the player that originally placed the door, regardless of the locking-mode. All varieties of metal doors are protected doors. This is consistent with the terminology used in the official Minetest Game.
- Shared locking mode, in contrast, emulates the behavior of the "protected doors" in TenPlus1's Protector Redo Mod. Opening and closing of such doors is contingent on membership in the area of protection. Unfortunately, Protector Redo uses the term "protected doors", which is a misnomer.
- Locking a non-protected door (like an obsidian glass door) will also lock out the player that placed the door until the locking mode is reset.
- Players that have the 'protection_bypass' privilege, can open, close, and otherwise manipulate any door regardless of ownership or locking-mode.
- TNT explosions will have no effect on protected doors. However, normal doors will be added to the list of drops, unless they are in a protected area.
- Use of the wrench and screwdriver is restricted to the owner of the door (in the case of protected doors) or, otherwise, members of the protected area.
- The owner of a protected door can always dig the door that they placed, even when it is in a protected area that is controlled by another player.
Code: Select all
vector.offset = function ( pos, x, y, z ) return { x = pos.x + x, y = pos.y + y, z = pos.z + z } end vector.offset_y = function ( pos, y ) return { x = pos.x, y = pos.y + ( y or 1 ), z = pos.z } end vector.origin = { x = 0, y = 0, z = 0 }
- doors.register_door( name, def )
Registers a door withe the given name and definition table.
- def.tiles - the list of textures to apply to the model
- def.description - the description to show in the craft guide and itemstack tooltips
- def.inventory_image - the texture for the inventory item
- def.groups - the group levels of the node ('door = 1' will be added automatically)
- def.is_lockable - whether the locking mode is adjustable (default is false)
- def.is_closable - whether the closing mode is adjustable (default is false)
- def.sound_open - sound effect to play when opening
- def.sound_close - sound effect to play when closing
- def.sound_locked - sound effect to play when locked
- def.can_center - whether center positioning is possible (default is false)
- doors.get_door( pos )
Returns an object for working with a door at the given position. This is intended to be backwards compatible with the former doors.get( ) function.
- door_obj.get_properties( )
Returns a table with four fields describing the various properties of the door:
- is_open - true for opened or false for closed, as determined by the state
- type - either "center" or "offset", as determined by the state
- hand - either "left" or "right", as determined by the state
- face - ranges from 1 to 4, corresponding with the value of param2
Opens the door, unless it is already in an opened state. This will circumvent any ownership checks.
door_obj.close( )
Closes the door, unless it is already in a closed state. This will circumvent any ownership checks.