New doors mod

master
daret 2020-11-03 00:34:36 +01:00
parent 5d4b406f96
commit a64b9640b8
103 changed files with 2589 additions and 1508 deletions

View File

@ -10,7 +10,7 @@ source "$LIB"/build-whynot.lib
cd "$SRC" # for proper resolving the '*'
## Sync minetest_game
mod_install minetest_game --exclude=farming minetest_game/mods/*
mod_install minetest_game --exclude=farming --exclude=doors minetest_game/mods/*
# Install all other mods
mod_install blocks_functions

View File

@ -10,7 +10,6 @@ Mod: minetest_game/mods/butterflies
Mod: minetest_game/mods/carts
Mod: minetest_game/mods/creative
Mod: minetest_game/mods/default
Mod: minetest_game/mods/doors
Mod: minetest_game/mods/dungeon_loot
Mod: minetest_game/mods/dye
Mod: minetest_game/mods/env_sounds
@ -41,6 +40,10 @@ origin https://github.com/Sokomine/cottages (fetch)
* master 8cfaaed [origin/master] added listring to shelf
Mod: buildings/cottages
origin https://bitbucket.org/sorcerykid/doors.git (fetch)
* master 37b695f [origin/master] Build 02
Mod: buildings/doors
origin https://github.com/Sokomine/handle_schematics (fetch)
* master 0c5bfbe [origin/master] added mapgen dependencies for MCL2 for right order
Mod: buildings/handle_schematics
@ -73,6 +76,10 @@ origin https://github.com/appgurueu/cmdlib (fetch)
* master 2709571 [origin/master] Fix missing parameters error format
Mod: lib_api/cmdlib
origin https://bitbucket.org/sorcerykid/config.git (fetch)
* master a6d0493 [origin/master] Build 05
Mod: lib_api/config
origin https://github.com/TheTermos/mobkit (fetch)
* master a00c00c [origin/master] add a missing nil check
Mod: lib_api/mobkit

View File

@ -0,0 +1,477 @@
Doors Redux Mod v1.0
By Leslie E. Krause
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..
Some of the notable features 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
Moreover, a set of 18 new doors are readily available! They encompass a wide variety of
different building styles, so players are no longer restricted to the four basic steel,
wood, glass, and obsidian glass doors that come shipped with Minetest Game.
- Mansion Doors (exterior and interior)
- Prison & Vault Doors (exterior and interior)
- Barn & Shed Doors (exterior and interior)
- Castle Doors (exterior and interior)
- Cottage Doors (exterior and interior)
- Specialty Doors: Japanese and French
- Wooden Doors: Colonial, Atherton Double-Lite, Cambridge Single-Lite
- Steel Doors: Colonial, Atherton Double-Lite, Cambridge Single-Lite
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.
Incidentally, Doors Redux began as experiment to incororate centered doors into Minetest
Game because they look so much more visually appealing than the traditional offset doors.
However, the project turned out to be far more complicated than planned, given the need
to maintain compatibility with existing worlds. So I ended up rewriting the Doors mod
with a specialized translataion matrix, including B3D models adapted from TumeniNode's
excellent C Doors mod (which I would've used, but it didn't have a translation matrix).
Thankfully, the end result was well worth the effort, since I was able to simplify and
consolidate all of the logic, and expand the overall feature-set too :)
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 Doors 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)
Auto-closing doors are ideally suited for high-traffic commercial buildings like shopping
centers, where doors must not be left open unattended. The closing mechanism activates
after a preset time period, defined by 'config.autoclose_timeout' in seconds.
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)
When placing a door, it will be unlocked. The exception is protected doors, such as most
metal doors, which are locked by default.
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.
Below are some helpful notes regarding functionality that may be somewhat unique the
Doors Redux mod:
- 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 changed.
- 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.
Custom door definitions may be added to the init.lua file, or alternately you may use
the Doors Redux API in your own mods. The following function is available for registering
new doors:
doors.register_door( name, def )
Registers a door withe the given name and definition table.
Several fields of the definition table are required, but most are optional
* 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 when opening
* def.sound_close - sound effect when closing
* def.sound_locked - sound effect when locked
* def.can_center - whether center positioning (default is false)
For programmatically examining and manipulating doors, two API functions are provided:
doors.get_door( pos )
Returns an object for working with a door at the given position.
The door object, returned by the function above, provides the following methods:
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
door_obj.open( )
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.
A similar function, doors.get_trapdoor( ), allows for working with trapdoors. The object
returned provides the same methods as those above.
Repository
----------------------
Browse source code...
https://bitbucket.org/sorcerykid/doors
Download archive...
https://bitbucket.org/sorcerykid/doors/get/master.zip
https://bitbucket.org/sorcerykid/doors/get/master.tar.gz
Compatability
----------------------
Minetest 0.4.15+ required
Installation
----------------------
1) Backup the original "doors" mod to a safe location.
2) Unzip the archive into the mods directory of your game.
3) Rename the doors-master directory to "doors".
Source code license
----------------------------------------------------------
GNU Lesser General Public License v3 (LGPL-3.0)
Copyright (c) 2018-2020, Leslie E. Krause (leslie@searstower.org)
This program is free software; you can redistribute it and/or modify it under the terms of
the GNU Lesser General Public License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
http://www.gnu.org/licenses/lgpl-2.1.html
Multimedia License (textures, sounds, and models)
----------------------------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
/models/door_a.obj
by sofar
/models/door_b.obj
by sofar
/models/fencegate_open.obj
by sofar
/models/fencegate_closed.obj
by sofar
/textures/default_steel_rod.png
by sorcerykid
/textures/doors_door_barn1.png
by sorcerykid
/textures/doors_door_barn2.png
by sorcerykid
/textures/doors_door_castle1.png
by sorcerykid
/textures/doors_door_castle2.png
by sorcerykid
/textures/doors_door_cottage1.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_door_cottage2.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_door_dungeon1.png
by sorcerykid
/textures/doors_door_dungeon2.png
by sorcerykid
/textures/doors_door_french.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_door_japanese.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_door_mansion1.png
by sorcerykid
/textures/doors_door_mansion2.png
by sorcerykid
/textures/doors_door_steelglass1.png
by sorcerykid
/textures/doors_door_steelglass2.png
by sorcerykid
/textures/doors_door_steelpanel1.png
by sorcerykid
/textures/doors_door_steel.png
by PilzAdam
/textures/doors_door_woodglass1.png
by sorcerykid
/textures/doors_door_woodglass2.png
by sorcerykid
/textures/doors_door_woodpanel1.png
by sorcerykid
/textures/doors_door_wood.png
by Fernando Zapata
/textures/doors_item_barn1.png
by sorcerykid
/textures/doors_item_barn2.png
by sorcerykid
/textures/doors_item_castle1.png
by sorcerykid
/textures/doors_item_castle2.png
by sorcerykid
/textures/doors_item_cottage1.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_item_cottage2.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_item_dungeon1.png
by sorcerykid
/textures/doors_item_dungeon2.png
by sorcerykid
/textures/doors_item_french.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_item_glass.png
by Krock & paramat
inspired by VanessaE
/textures/doors_item_japanese.png
by kilbith (relicensed WTFPL)
modified by sorcerykid
/textures/doors_item_mansion1.png
by sorcerykid
/textures/doors_item_mansion2.png
by sorcerykid
/textures/doors_item_obsidian_glass.png
/textures/doors_item_steelglass1.png
by sorcerykid
/textures/doors_item_steelglass2.png
by sorcerykid
/textures/doors_item_steelpanel1.png
by sorcerykid
/textures/doors_item_steel.png
by PilzAdam
/textures/doors_item_woodglass1.png
by sorcerykid
/textures/doors_item_woodglass2.png
by sorcerykid
/textures/doors_item_woodpanel1.png
by sorcerykid
/textures/doors_item_wood.png
by Fernando Zapata
/textures/doors_trapdoor.png
by BlockMen
/textures/doors_trapdoor_side.png
by paramat
/textures/doors_trapdoor_steel.png
by sofar
/textures/doors_trapdoor_steel_side.png
by paramat
/textures/doors_door_glass.png
by Krock & paramat
inspired by VanessaE
/textures/doors_door_obsidian_glass.png
by red-001
inspired by PilzAdam & BlockMen
/textures/doors_wrench.png
obtained from https://github.com/Rogier-5/minetest-mod-rotate
by Rogier
/sounds/doors_door_close.ogg
by bennstir
/sounds/doors_door_open.ogg
by CGEffex
modified by BlockMen
/sounds/doors_door_locked.ogg
obtained from https://freesound.org/people/BenjaminNelan/sounds/321087/
by BenjaminNelan (relicensed CC0)
modified by sorceryid
/sounds/doors_fencegate_close.ogg
obtained from http://www.freesound.org/people/BarkersPinhead/sounds/274807/
by BarkersPinhead
obtained from http://www.freesound.org/people/rivernile7/sounds/249573/
by rivernile7
/sounds/doors_fencegate_open.ogg
obtained from http://www.freesound.org/people/mhtaylor67/sounds/126041/
by mhtaylor67 (relicensed CC0)
/sounds/doors_glass_door_close.ogg
obtained from https://www.freesound.org/people/SkeetMasterFunk69/sounds/235546/
by SkeetMasterFunk69 (relicensed CC0)
/sounds/doors_glass_door_open.ogg
obtained from https://www.freesound.org/people/SkeetMasterFunk69/sounds/235546/
by SkeetMasterFunk69 (relicensed CC0)
/sounds/doors_steel_door_close.ogg
by HazMatt
/sounds/doors_steel_door_open.ogg
by HazMatt
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
Multimedia License (textures, sounds, and models)
----------------------------------------------------------
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
/models/door_c.obj
by TumeniNodes
/models/door_d.obj
by TumeniNodes
/models/door_e.obj
by TumeniNodes
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/4.0/

View File

@ -0,0 +1,980 @@
--------------------------------------------------------
-- Minetest :: Doors Redux Mod (doors)
--
-- See README.txt for licensing and other information.
-- Copyright (c) 2016-2020, Leslie E. Krause
--
-- ./games/minetest_game/mods/doors/api.lua
--------------------------------------------------------
doors = { }
local config = minetest.load_config( )
doors.LOCKING_MODE_UNDEFINED = 0
doors.LOCKING_MODE_UNLOCKED = 1
doors.LOCKING_MODE_LOCKED = 2
doors.LOCKING_MODE_SHARED = 3
doors.CLOSING_MODE_UNDEFINED = 0
doors.CLOSING_MODE_MANUAL = 1
doors.CLOSING_MODE_AUTOCLOSE = 2
doors.CLOSING_MODE_HOLDOPEN = 3
doors.ADJUST_LOCKING = 1
doors.ADJUST_CLOSING = 2
minetest.register_node( "doors:hidden", {
description = "Hidden Door Segment",
drawtype = "nodebox", -- cannot use air-like, since falling nodes would be stuck
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = true,
pointable = false,
diggable = false,
buildable_to = false,
floodable = false,
drop = "",
groups = { not_in_creative_inventory = 1 },
on_blast = function( ) end,
tiles = { "blank.png" },
-- 1px transparent block inside door hinge near node top.
nodebox = {
type = "fixed",
fixed = { -15/32, 13/32, -15/32, -13/32, 1/2, -13/32 },
},
-- collision_box needed otherise selection box would be full node size
collision_box = {
type = "fixed",
fixed = { -15/32, 13/32, -15/32, -13/32, 1/2, -13/32 },
},
} )
-- table used to aid door opening/closing
-- tier 1 = hand, tier 2 = face, and tier 3 = is_open
local offset_transform = {
left = {
{ [false] = { suffix = "_a", param2 = 3 }, [true] = { suffix = "_b", param2 = 1 } },
{ [false] = { suffix = "_a", param2 = 0 }, [true] = { suffix = "_b", param2 = 2 } },
{ [false] = { suffix = "_a", param2 = 1 }, [true] = { suffix = "_b", param2 = 3 } },
{ [false] = { suffix = "_a", param2 = 2 }, [true] = { suffix = "_b", param2 = 0 } },
},
right = {
{ [false] = { suffix = "_b", param2 = 1 }, [true] = { suffix = "_a", param2 = 3 } },
{ [false] = { suffix = "_b", param2 = 2 }, [true] = { suffix = "_a", param2 = 0 } },
{ [false] = { suffix = "_b", param2 = 3 }, [true] = { suffix = "_a", param2 = 1 } },
{ [false] = { suffix = "_b", param2 = 0 }, [true] = { suffix = "_a", param2 = 2 } },
},
}
local center_transform = {
left = {
{ [false] = { suffix = "_c", param2 = 2 }, [true] = { suffix = "_d", param2 = 2 } },
{ [false] = { suffix = "_c", param2 = 3 }, [true] = { suffix = "_d", param2 = 3 } },
{ [false] = { suffix = "_c", param2 = 0 }, [true] = { suffix = "_d", param2 = 0 } },
{ [false] = { suffix = "_c", param2 = 1 }, [true] = { suffix = "_d", param2 = 1 } },
},
right = {
{ [false] = { suffix = "_c", param2 = 0 }, [true] = { suffix = "_e", param2 = 0 } },
{ [false] = { suffix = "_c", param2 = 1 }, [true] = { suffix = "_e", param2 = 1 } },
{ [false] = { suffix = "_c", param2 = 2 }, [true] = { suffix = "_e", param2 = 2 } },
{ [false] = { suffix = "_c", param2 = 3 }, [true] = { suffix = "_e", param2 = 3 } },
},
}
---------------------------------
-- get_door_properties( )
---------------------------------
local function get_door_properties( state, param2 )
local is_open = state % 2 == 1
local type = state < 4 and "offset" or "center"
local hand = math.floor( state / 2 ) % 2 == 0 and "left" or "right"
local face = param2 + 1
return is_open, type, hand, face
end
---------------------------------
-- get_door_transform( )
---------------------------------
local function get_door_transform( state, param2, toggle_open, switch_type, switch_hand, rotate_face )
local is_open, type, hand, face = get_door_properties( state, param2 )
-- NB: lots of nightmarish state calculations in order to maintain
-- backwards compatibility, so venture forward at your own risk :)
if toggle_open then
state = is_open and state - 1 or state + 1 -- add 1 for open, subtract 1 for close
is_open = not is_open
end
if switch_type then
state = type == "offset" and state + 4 or state - 4 -- add 4 for center, substract 4 for offset
type = type == "offset" and "center" or "offset"
-- need to rotate for seamless switch (also avoid face index overflow)
local face_translation = {
center = { [false] = 1, [true] = 2 },
offset = { [false] = 0, [true] = 1 },
}
face = ( face + face_translation[ type ][ is_open ] ) % 4 + 1
end
if switch_hand then
state = hand == "left" and state + 2 or state - 2 -- add 2 for left, subtract 2 for right
hand = hand == "left" and "right" or "left"
-- need to rotate for seamless switch (also avoid face index overflow)
local face_translation = {
center = { left = 3, right = 1 },
offset = { left = 0, right = 2 },
}
if is_open and type == "center" then -- hack to correct open center doors :P
face = face + 2
end
face = ( face + face_translation[ type ][ hand ] ) % 4 + 1
end
if rotate_face then
face = face % 4 + 1
end
return is_open, state, type == "offset" and
offset_transform[ hand ][ face ][ is_open ] or
center_transform[ hand ][ face ][ is_open ]
end
---------------------------------
-- is_door_protected( )
---------------------------------
local function is_door_protected( pos, ndef, player_name )
local owner = minetest.get_meta( pos ):get_string( "doors_owner" )
if minetest.get_player_privs( player_name ).protection_bypass then return false end
return ndef.protected and player_name ~= owner
end
---------------------------------
-- is_door_locked( )
---------------------------------
local function is_door_locked( pos, ndef, player_name )
local meta = minetest.get_meta( pos )
local locking_mode = meta:get_int( "locking_mode" )
local owner = meta:get_string( "doors_owner" )
if minetest.get_player_privs( player_name ).protection_bypass then return false end
if locking_mode == doors.LOCKING_MODE_UNDEFINED then
if ndef.protected and player_name ~= owner then
return true
end
elseif locking_mode == doors.LOCKING_MODE_LOCKED then
if ndef.protected and player_name ~= owner or not ndef.protected then
return true
end
elseif locking_mode == doors.LOCKING_MODE_SHARED then
if minetest.is_protected( pos, player_name ) then
return true
end
end
return false
end
local is_trapdoor_locked = is_door_locked
---------------------------------
-- update_door_hardware( )
---------------------------------
--[[
local function update_door_hardware( pos, state, param2 )
local node = minetest.get_node_above( pos )
if node.name ~= "doors:hidden" then
local ndef = minetest.registered_nodes[ node.name ]
local is_open, type, hand, face = get_door_properties( state, param2 )
-- update door hardware
local translate = {
center = {
left = { [false] = "e", [false] = "f" },
right = { [false] = "c", [false] = "d" },
},
offset = {
left = { [false] = "a", [false] = "b" },
right = { [false] = "a", [false] = "b" },
}
}
minetest.swap_node( pos, {
name = ndef.base_name .. translate[ type ][ face ][ is_open ],
param2 = param2
} )
end
end]]
---------------------------------
-- toggle_door( )
---------------------------------
local function toggle_door( pos, node, player )
local meta = minetest.get_meta( pos )
local ndef = minetest.registered_nodes[ node.name ]
local closing_mode = meta:get_int( "closing_mode" )
if player and is_door_locked( pos, ndef, player:get_player_name( ) ) then
minetest.sound_play( ndef.sound_locked, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
return false
end
local state = meta:get_int( "state" )
local is_open, state, transform = get_door_transform( state, node.param2, true, false, false )
local new_name = ndef.base_name .. transform.suffix
local new_param2 = transform.param2
if not is_open and closing_mode == doors.CLOSING_MODE_HOLDOPEN then
return false -- abort since this door does not close
elseif is_open and closing_mode == doors.CLOSING_MODE_AUTOCLOSE then
minetest.after( config.autoclose_timeout, function ( )
local check_node = minetest.get_node( pos )
local check_state = minetest.get_meta( pos ):get_int( "state" )
if check_node.name ~= new_name or check_node.param2 ~= new_param2 or check_state ~= state then
return -- apparently something changed, so abort
end
toggle_door( pos, check_node ) -- pass nil player, since security doesn't matter
end )
end
if is_open then
-- if opened, play open sound
minetest.sound_play( ndef.sound_open, {
pos = pos, gain = 0.3, max_hear_distance = 10
} )
else
-- if closed, play close sound
minetest.sound_play( ndef.sound_close, {
pos = pos, gain = 0.3, max_hear_distance = 10
} )
end
minetest.swap_node( pos, { name = new_name, param2 = new_param2 } )
meta:set_int( "state", state )
-- update_door_hardware( vector.offset_y( pos ), state, param2 )
end
---------------------------------
-- toggle_trapdoor( )
---------------------------------
function toggle_trapdoor( pos, node, player )
local meta = minetest.get_meta( pos )
local ndef = minetest.registered_nodes[ node.name ]
local closing_mode = meta:get_int( "closing_mode" )
if player and is_trapdoor_locked( pos, ndef, player:get_player_name( ) ) then
minetest.sound_play( ndef.sound_locked, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
return false
end
if node.name == ndef.base_name then
local new_name = ndef.base_name .. "_open"
if closing_mode == doors.CLOSING_MODE_AUTOCLOSE then
minetest.after( config.autoclose_timeout, function ( )
local check_node = minetest.get_node( pos )
if check_node.name ~= new_name or check_node.param2 ~= node.param2 then
return -- apparently something changed, so abort
end
toggle_trapdoor( pos, check_node ) -- pass nil player, since security doesn't matter
end )
end
minetest.sound_play( ndef.sound_open, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
minetest.swap_node( pos, { name = new_name, param1 = node.param1, param2 = node.param2 } )
else
local new_name = ndef.base_name
if closing_mode == doors.CLOSING_MODE_HOLDOPEN then
return false -- abort since this trapdoor does not close
end
minetest.sound_play( ndef.sound_close, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
minetest.swap_node( pos, { name = ndef.base_name, param1 = node.param1, param2 = node.param2 } )
end
end
---------------------------------
-- on_adjust_door( )
---------------------------------
local function on_adjust_door( pos, node, player, mode )
local meta = minetest.get_meta( pos )
local ndef = minetest.registered_nodes[ node.name ]
local locking_mode = meta:get_int( "locking_mode" )
local closing_mode = meta:get_int( "closing_mode" )
local player_name = player:get_player_name( )
if is_door_protected( pos, ndef, player_name ) then return false end
if mode == doors.ADJUST_LOCKING and ndef.is_lockable and locking_mode > 0 then
local mode_defs = { "unlocked", "locked", "shared" }
locking_mode = locking_mode % 3 + 1
minetest.chat_send_player( player_name, "Door locking is set to " .. mode_defs[ locking_mode ] .. "." )
meta:set_int( "locking_mode", locking_mode )
return true
elseif mode == doors.ADJUST_CLOSING and ndef.is_closable and closing_mode > 0 then
local mode_defs = { "manual", "auto-close", "hold-open" }
closing_mode = closing_mode % 3 + 1
minetest.chat_send_player( player_name, "Door closing is set to " .. mode_defs[ closing_mode ] .. "." )
meta:set_int( "closing_mode", closing_mode )
return true
end
minetest.chat_send_player( player_name, "This door does not provide locking and/or closing adjustments." )
return false
end
local on_adjust_trapdoor = on_adjust_door
---------------------------------
-- on_rotate_door( )
---------------------------------
local function on_rotate_door( pos, node, player, mode )
local ndef = minetest.registered_nodes[ node.name ]
local meta = minetest.get_meta( pos )
local state = meta:get_int( "state" )
if is_door_protected( pos, ndef, player:get_player_name( ) ) then return false end
if mode == screwdriver.ROTATE_FACE then
-- alternate hand between left <-> right
local is_open, state, transform = get_door_transform( state, node.param2, false, false, true, false )
minetest.swap_node( pos, { name = ndef.base_name .. transform.suffix, param2 = transform.param2 } )
meta:set_int( "state", state )
return true
elseif mode == screwdriver.ROTATE_AXIS and ndef.can_center and ndef.can_offset then
-- alternate type between center <-> offset
local is_open, state, transform = get_door_transform( state, node.param2, false, true, false, false )
minetest.swap_node( pos, { name = ndef.base_name .. transform.suffix, param2 = transform.param2 } )
meta:set_int( "state", state )
return true
end
return false
end
local on_rotate_trapdoor = function ( ) end
---------------------------------
-- doors.get_door_or_nil( )
---------------------------------
doors.get_door_or_nil = function ( pos )
local node = minetest.get_node( pos )
local meta = minetest.get_meta( pos )
local ndef = minetest.registered_nodes[ node.name ]
local self = { }
if ndef.groups.trapdoor then
return doors.get_trapdoor_or_nil( pos )
elseif not ndef.groups.door then
return nil
end
self.get_properties = function ( )
local state = meta:get_int( "state" )
local is_open, type, hand, face = get_door_properties( state, node.param2 )
return { is_open = is_open, type = type, hand = hand, face = face }
end
self.close = function ( )
local state = meta:get_int( "state" )
local is_open, state, transform = get_door_transform( state, node.param2, true, false, false )
local new_name = ndef.base_name .. transform.suffix
local new_param2 = transform.param2
if not is_open then
minetest.sound_play( ndef.sound_close, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
minetest.swap_node( pos, { name = new_name, param2 = new_param2 } )
meta:set_int( "state", state )
end
end
self.open = function ( )
local state = meta:get_int( "state" )
local is_open, state, transform = get_door_transform( state, node.param2, true, false, false )
local new_name = ndef.base_name .. transform.suffix
local new_param2 = transform.param2
if is_open then
minetest.sound_play( ndef.sound_open, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
minetest.swap_node( pos, { name = new_name, param2 = new_param2 } )
meta:set_int( "state", state )
end
end
self.state = function ( ) -- for backwards compatibility
return self.get_properties( ).is_open
end
return self
end
doors.get = doors.get_door_or_nil -- for backwards compatibility
---------------------------------
-- doors.get_trapdoor_or_nil( )
---------------------------------
doors.get_trapdoor_or_nil = function ( pos )
local node = minetest.get_node( pos )
local meta = minetest.get_meta( pos )
local ndef = minetest.registered_nodes[ node.name ]
local self = { }
if not ndef.groups.trapdoor then return end
self.get_properties = function ( )
return { is_open = node.name == ndef.base_name .. "_open", face = node.param2 + 1 }
end
self.close = function ( )
if node.name == ndef.base_name .. "_open" then
local new_name = ndef.base_name
minetest.sound_play( ndef.sound_close, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
minetest.swap_node( pos, { name = new_name, param2 = node.param2 } )
end
end
self.open = function ( )
if node.name == ndef.base_name then
local new_name = ndef.base_name .. "_open"
minetest.sound_play( ndef.sound_open, { pos = pos, gain = 0.3, max_hear_distance = 10 } )
minetest.swap_node( pos, { name = new_name, param2 = node.param2 } )
end
end
return self
end
----------------------------------
-- notify_on_placenode( )
----------------------------------
local function notify_on_placenode( pos, new_node, player, old_node, itemstack, pointed_thing )
for _, on_placenode in ipairs( minetest.registered_on_placenodes) do
-- clone tables since callback can modify them
local clone = {
pos = vector.new( pos ),
new_node = { name = new_node.name, param1 = new_node.param1, param2 = new_node.param2 },
old_node = { name = old_node.name, param1 = old_node.param1, param2 = old_node.param2 },
pointed_thing = {
type = pointed_thing.type,
above = vector.new( pointed_thing.above ),
under = vector.new( pointed_thing.under ),
ref = pointed_thing.ref,
}
}
on_placenode( clone.pos, clone.new_node, player, clone.old_node, itemstack, clone.pointed_thing )
end
end
---------------------------------
-- register_door_craftitem( )
---------------------------------
local function register_door_craftitem( name, def )
minetest.register_craftitem( ":" .. name, {
description = def.description,
inventory_image = def.inventory_image,
on_place = function( itemstack, player, pointed_thing )
local pos
if not pointed_thing.type == "node" then
return itemstack
end
local node = minetest.get_node( pointed_thing.under )
local ndef = minetest.registered_nodes[ node.name ]
if ndef and ndef.buildable_to then
pos = pointed_thing.under
else
pos = pointed_thing.above
node = minetest.get_node( pos )
ndef = minetest.registered_nodes[ node.name ]
if not ndef or not ndef.buildable_to then
return itemstack
end
end
local top_pos = vector.offset_y( pos )
local top_node = minetest.get_node_or_nil( top_pos )
local top_ndef = top_node and minetest.registered_nodes[ top_node.name ]
if not top_ndef or not top_ndef.buildable_to then
return itemstack
end
local player_name = player:get_player_name( )
if minetest.is_protected( pos, player_name ) or minetest.is_protected( top_pos, player_name ) then
return itemstack
end
local facedir = minetest.dir_to_facedir( player:get_look_dir( ) )
local facedir_to_pos = {
[0] = { x = -1, y = 0, z = 0 },
[1] = { x = 0, y = 0, z = 1 },
[2] = { x = 1, y = 0, z = 0 },
[3] = { x = 0, y = 0, z = -1 },
}
local look_pos = vector.add( pos, facedir_to_pos[ facedir ] )
local state = 0
-- NB: state stores door hand (left vs right) and door type (offset vs center)
-- and door is_open (true or false), while param2 stores door face (1-4).
if minetest.get_item_group( minetest.get_node( look_pos ).name, "door" ) == 1 then
state = state + 2 -- rotate 180
minetest.set_node( pos, { name = name .. "_b", param2 = facedir } )
minetest.set_node( top_pos, { name = "doors:hidden", param2 = ( facedir + 3 ) % 4 } )
else
minetest.set_node( pos, { name = name .. "_a", param2 = facedir } )
minetest.set_node( top_pos, { name = "doors:hidden", param2 = facedir } )
end
local meta = minetest.get_meta( pos )
meta:set_int( "state", state )
if def.protected then
meta:set_int( "oldtime", os.time( ) )
meta:set_int( "newtime", os.time( ) )
meta:set_string( "doors_owner", player_name )
meta:set_string( "infotext", "Owned by " .. player_name )
end
if def.is_lockable then
meta:set_string( "locking_mode", def.protected and doors.LOCKING_MODE_LOCKED or doors.LOCKING_MODE_UNLOCKED )
end
if def.is_closable then
meta:set_string( "closing_mode", doors.CLOSING_MODE_MANUAL )
end
if not minetest.setting_getbool( "creative_mode" ) then
itemstack:take_item( )
end
minetest.sound_play( def.sounds.place, { pos = pos } )
notify_on_placenode( pos, minetest.get_node( pos ), player, node, itemstack, pointed_thing )
return itemstack
end
} )
end
---------------------------------
-- doors.register_door( )
---------------------------------
function doors.register_door( name, def )
register_door_craftitem( name, def )
-- define the basic properties
def.base_name = name
def.drawtype = "mesh"
def.paramtype = "light"
def.paramtype2 = "facedir"
def.sunlight_propagates = true
def.walkable = true
def.is_ground_content = false
def.buildable_to = false
def.inventory_image = nil
def.drop = name
def.groups.not_in_creative_inventory = 1
def.groups.door = 1
-- define the crafting recipe
if def.recipe then
minetest.register_craft( { output = name, recipe = def.recipe } )
end
def.recipe = nil
-- define the opening/closing sounds
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
if not def.sound_locked then
def.sound_locked = "doors_door_locked"
end
-- define the placement types
if def.can_offset == nil or not def.can_center then
def.can_offset = true
end
if def.can_center == nil then
def.can_center = false
end
if def.is_lockable == nil then
def.is_lockable = false
end
if def.is_closable == nil then
def.is_closable = false
end
-- define the essential callbacks
def.on_adjust = on_adjust_door
def.on_rotate = on_rotate_door
def.on_rightclick = function ( pos, node, player, itemstack, pointed_thing )
toggle_door( pos, node, player )
return itemstack
end
def.on_destruct = function( pos )
minetest.remove_node( vector.offset_y( pos ) ) -- hidden node
minetest.check_for_falling( vector.offset_y( pos ) )
end
if def.protected then
def.can_dig = function ( pos, player )
local player_name = player:get_player_name( )
if is_door_protected( pos, def, player_name ) then
minetest.record_protection_violation( pos, player_name )
return false
else
return true
end
end
def.on_blast = function( ) end
else
def.on_blast = function( pos, intensity )
minetest.remove_node( pos ) -- door node
minetest.remove_node( vector.offset_y( pos ) ) -- hidden node
return { name }
end
end
-- register offset door nodes
if def.can_offset then
def.selection_box = { type = "fixed", fixed = { -1/2, -1/2, -8/16, 1/2, 3/2, -6/16 } }
def.collision_box = { type = "fixed", fixed = { -1/2, -1/2, -8/16, 1/2, 3/2, -6/16 } }
def.mesh = "door_a.obj"
minetest.register_node( ":" .. name .. "_a", def )
def.mesh = "door_b.obj"
minetest.register_node( ":" .. name .. "_b", def )
end
-- register center door nodes
if def.can_center then
def.selection_box = { type = "fixed", fixed = { -1/2, -1/2, -1/16, 1/2, 3/2, 1/16 } }
def.collision_box = { type = "fixed", fixed = { -1/2, -1/2, -1/16, 1/2, 3/2, 1/16 } }
def.mesh = "door_c.obj" -- shut
minetest.register_node( ":" .. name .. "_c", def )
def.selection_box = { type = "fixed", fixed = { 6/16, -1/2, -1, 8/16, 3/2, 0 } }
def.collision_box = { type = "fixed", fixed = { 6/16, -1/2, -1, 8/16, 3/2, 0 } }
def.mesh = "door_d.obj" -- open left-hand
minetest.register_node( ":" .. name .. "_d", def )
def.selection_box = { type = "fixed", fixed = { -8/16, -1/2, -1, -6/16, 3/2, 0 } }
def.collision_box = { type = "fixed", fixed = { -8/16, -1/2, -1, -6/16, 3/2, 0 } }
def.mesh = "door_e.obj" -- open right-hand
minetest.register_node( ":" .. name .. "_e", def )
end
end
doors.register = doors.register_door -- for backward compatibility
---------------------------------
-- doors.register_trapdoor( )
---------------------------------
function doors.register_trapdoor( name, def )
-- define the basic properties
def.base_name = name
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = "facedir"
def.is_ground_content = false
def.drop = name
def.groups.not_in_creative_inventory = 1
def.groups.trapdoor = 1
-- define the opening/closing sounds
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
if not def.sound_locked then
def.sound_locked = "doors_door_locked"
end
-- define the placement types
if def.is_lockable == nil then
def.is_lockable = false
end
if def.is_closable == nil then
def.is_closable = false
end
-- define the essential callbacks
def.on_adjust = on_adjust_trapdoor
def.on_rightclick = function ( pos, node, player, itemstack, pointed_thing )
toggle_trapdoor( pos, node, player )
return itemstack
end
if def.protected then
def.can_dig = function ( pos, player )
local player_name = player:get_player_name( )
if is_door_protected( pos, def, player_name ) then
minetest.record_protection_violation( pos, player_name )
return false
else
return true
end
end
def.after_place_node = function ( pos, player, itemstack, pointed_thing )
local player_name = player:get_player_name( )
local meta = minetest.get_meta( pos )
meta:set_int( "oldtime", os.time( ) )
meta:set_int( "newtime", os.time( ) )
meta:set_string( "doors_owner", player_name )
meta:set_string( "infotext", "Owned by " .. player_name )
if def.is_lockable then
meta:set_string( "locking_mode", def.protected and doors.LOCKING_MODE_LOCKED or doors.LOCKING_MODE_UNLOCKED )
end
if def.is_closable then
meta:set_string( "closing_mode", doors.CLOSING_MODE_MANUAL )
end
return minetest.setting_getbool( "creative_mode" )
end
def.on_blast = function ( ) end
else
def.after_place_node = function ( pos, player, itemstack, pointed_thing )
local player_name = player:get_player_name( )
local meta = minetest.get_meta( pos )
if def.is_lockable then
meta:set_string( "locking_mode", def.protected and doors.LOCKING_MODE_LOCKED or doors.LOCKING_MODE_UNLOCKED )
end
if def.is_closable then
meta:set_string( "closing_mode", doors.CLOSING_MODE_MANUAL )
end
return minetest.setting_getbool( "creative_mode" )
end
def.on_blast = function ( pos, intensity )
minetest.remove_node( pos )
return { name }
end
end
-- register trapdoor nodes
-- local def_closed = setmetatable( { }, __index = def )
def.node_box = { type = "fixed", fixed = { -0.5, -0.5, -0.5, 0.5, -6/16, 0.5 } }
def.selection_box = { type = "fixed", fixed = { -0.5, -0.5, -0.5, 0.5, -6/16, 0.5 } }
def.tiles = { def.tile_front, def.tile_front .. '^[transformFY', def.tile_side, def.tile_side, def.tile_side, def.tile_side }
minetest.register_node( ":" .. name, def ) -- closed
def.node_box = { type = "fixed", fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 0.5 } }
def.selection_box = { type = "fixed", fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5 } }
def.tiles = { def.tile_side, def.tile_side, def.tile_side .. '^[transform3', def.tile_side .. '^[transform1', def.tile_front .. '^[transform46', def.tile_front .. '^[transform6' }
minetest.register_node( ":" .. name .. "_open", def ) -- opened
end
---------------------------------
-- doors.register_fencegate( )
---------------------------------
function doors.register_fencegate( name, def )
local fence = {
description = def.description,
drawtype = "mesh",
tiles = {def.texture},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
drop = name .. "_closed",
connect_sides = {"left", "right"},
groups = def.groups,
sounds = def.sounds,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
local node_def = minetest.registered_nodes[node.name]
minetest.swap_node(pos, {name = node_def.gate, param2 = node.param2})
minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3,
max_hear_distance = 8})
return itemstack
end,
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
},
}
if not fence.sounds then
fence.sounds = default.node_sound_wood_defaults()
end
fence.groups.fence = 1
local fence_closed = table.copy(fence)
fence_closed.mesh = "doors_fencegate_closed.obj"
fence_closed.gate = name .. "_open"
fence_closed.sound = "doors_fencegate_open"
fence_closed.collision_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
}
local fence_open = table.copy(fence)
fence_open.mesh = "doors_fencegate_open.obj"
fence_open.gate = name .. "_closed"
fence_open.sound = "doors_fencegate_close"
fence_open.groups.not_in_creative_inventory = 1
fence_open.collision_box = {
type = "fixed",
fixed = {{-1/2, -1/2, -1/4, -3/8, 1/2, 1/4},
{-1/2, -3/8, -1/2, -3/8, 3/8, 0}},
}
minetest.register_node(":" .. name .. "_closed", fence_closed)
minetest.register_node(":" .. name .. "_open", fence_open)
minetest.register_craft({
output = name .. "_closed",
recipe = {
{"default:stick", def.material, "default:stick"},
{"default:stick", def.material, "default:stick"}
}
})
end
---------------------------------
-- handle_wrench( )
---------------------------------
local function handle_wrench( itemstack, player, pointed_thing, mode, uses )
if pointed_thing.type ~= "node" then return end
local pos = pointed_thing.under
local player_name = player:get_player_name( )
local node = minetest.get_node( pos )
local ndef = minetest.registered_nodes[ node.name ]
if minetest.is_protected( pos, player_name ) then
minetest.record_protection_violation( pos, player_name )
return
end
if ndef.on_adjust then
local has_wear = ndef.on_adjust( vector.new( pos ), { name = node.name, param1 = node.param1, param2 = node.param2 }, player, mode )
if not minetest.setting_getbool( "creative_mode" ) and has_wear then
itemstack:add_wear( 65535 / config.wrench_usage_limit - 1 )
end
end
end
--------------------
minetest.register_tool( "doors:wrench", {
description = "Wrench (left-click adjusts door locking, right-click adjusts door closing)",
inventory_image = "doors_wrench.png",
on_use = function( itemstack, player, pointed_thing )
handle_wrench( itemstack, player, pointed_thing, doors.ADJUST_LOCKING )
return itemstack
end,
on_place = function( itemstack, player, pointed_thing)
handle_wrench( itemstack, player, pointed_thing, doors.ADJUST_CLOSING )
return itemstack
end,
} )
minetest.register_craft( {
output = "doors:wrench",
recipe = {
{ "default:steel_ingot", "default:steel_rod" },
}
} )
minetest.register_craftitem( ":default:steel_rod", {
description = "Steel Rod",
inventory_image = "default_steel_rod.png",
} )
minetest.register_craft( {
output = "default:steel_rod 4",
recipe = {
{ "default:steel_ingot" },
}
} )
-- compatibility for Minetest S3 engine
if not vector.offset_y or not minetest.get_node_above then
dofile( minetest.get_modpath( "doors" ) .. "/compatibility.lua" )
end

View File

@ -0,0 +1,7 @@
minetest.get_node_above = function ( pos, off )
return minetest.get_node( { x = pos.x, y = pos.y + ( off or 1 ), z = pos.z } )
end
vector.offset_y = function ( pos, y )
return { x = pos.x, y = pos.y + ( y or 1 ), z = pos.z }
end

View File

@ -0,0 +1,2 @@
wrench_usage_limit = 200
autoclose_timeout = 2.5

View File

@ -0,0 +1,3 @@
default
config
screwdriver?

View File

@ -0,0 +1,532 @@
--------------------------------------------------------
-- Minetest :: Doors Redux Mod v1.0 (doors)
--
-- See README.txt for licensing and other information.
-- Copyright (c) 2016-2020, Leslie E. Krause
--
-- ./games/minetest_game/mods/doors/init.lua
--------------------------------------------------------
-- "One of the most essential but often overlooked elements of world design is door selection.
-- Doors set the tone and character and having the wrong style of door can make or break a build."
dofile( minetest.get_modpath( "doors" ) .. "/api.lua" )
------------------------
-- Door Registrations --
------------------------
doors.register_door( "doors:door_wood", {
tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
description = "Wooden Door",
inventory_image = "doors_item_wood.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood" },
{ "group:wood", "group:wood" },
{ "group:wood", "group:wood" },
},
can_center = true,
} )
doors.register_door( "doors:door_woodpanel1", {
-- Colonial Style (6 panel)
tiles = {{ name = "doors_door_woodpanel1.png", backface_culling = true }},
description = "Wooden Colonial Door",
inventory_image = "doors_item_woodpanel1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood", "default:stick" },
{ "group:wood", "group:wood", "default:stick" },
{ "group:wood", "group:wood", "default:stick" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_woodglass1", {
tiles = {{ name = "doors_door_woodglass1.png", backface_culling = true }},
description = "Wooden Single-Lite Door",
inventory_image = "doors_item_woodglass1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:glass", "default:glass", "default:stick" },
{ "group:wood", "group:wood", "" },
{ "group:wood", "group:wood", "" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_woodglass2", {
tiles = {{ name = "doors_door_woodglass2.png", backface_culling = true }},
description = "Wooden Double-Lite Door",
inventory_image = "doors_item_woodglass2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:glass", "default:glass", "default:stick" },
{ "group:wood", "group:wood", "default:stick" },
{ "group:wood", "group:wood", "" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_japanese", {
tiles = {{ name = "doors_door_japanese.png", backface_culling = true }},
description = "Japanese Door",
inventory_image = "doors_item_japanese.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:paper", "group:wood", "default:stick" },
{ "default:paper", "group:wood", "default:stick" },
{ "default:paper", "group:wood", "default:stick" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_french", {
tiles = {{ name = "doors_door_french.png", backface_culling = true }},
description = "French Door",
inventory_image = "doors_item_french.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:glass", "group:wood", "default:stick" },
{ "default:glass", "group:wood", "default:stick" },
{ "default:glass", "group:wood", "default:stick" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_cottage1", {
tiles = {{ name = "doors_door_cottage1.png", backface_culling = true }},
description = "Cottage Interior Door",
inventory_image = "doors_item_cottage1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood" },
{ "default:stick", "default:stick" },
{ "group:wood", "group:wood" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_cottage2", {
tiles = {{ name = "doors_door_cottage2.png", backface_culling = true }},
description = "Cottage Exterior Door",
inventory_image = "doors_item_cottage2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:glass", "default:glass" },
{ "default:stick", "default:stick" },
{ "group:wood", "group:wood" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_barn1", {
tiles = {{ name = "doors_door_barn1.png", backface_culling = true }},
description = "Barn Interior Door",
inventory_image = "doors_item_barn1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "default:stick", "default:stick", "default:stick" },
{ "group:wood", "group:wood", "group:wood" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_barn2", {
tiles = {{ name = "doors_door_barn2.png", backface_culling = true }},
description = "Barn Exterior Door",
inventory_image = "doors_item_barn2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "default:steel_rod", "default:steel_rod", "default:steel_rod" },
{ "group:wood", "group:wood", "group:wood" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_castle1", {
tiles = {{ name = "doors_door_castle1.png", backface_culling = true }},
description = "Castle Interior Door",
inventory_image = "doors_item_castle1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:stick", "group:wood", "group:wood" },
{ "", "group:wood", "group:wood" },
{ "default:stick", "group:wood", "group:wood" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_castle2", {
tiles = {{ name = "doors_door_castle2.png", backface_culling = true }},
description = "Castle Exterior Door",
inventory_image = "doors_item_castle2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "default:steel_rod", "group:wood", "group:wood" },
{ "", "group:wood", "group:wood" },
{ "default:steel_rod", "group:wood", "group:wood" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_mansion1", {
tiles = {{ name = "doors_door_mansion1.png", backface_culling = true }},
description = "Mansion Interior Door",
inventory_image = "doors_item_mansion1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood", "default:steel_rod" },
{ "group:wood", "group:wood", "dye:white" },
{ "group:wood", "group:wood", "default:steel_rod" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_mansion2", {
tiles = {{ name = "doors_door_mansion2.png", backface_culling = true }},
description = "Mansion Exterior Door ",
inventory_image = "doors_item_mansion2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
recipe = {
{ "group:wood", "group:wood", "default:steel_rod" },
{ "group:wood", "group:wood", "dye:black" },
{ "group:wood", "group:wood", "default:steel_rod" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_steel", {
tiles = {{ name = "doors_door_steel.png", backface_culling = true}},
description = "Steel Door",
inventory_image = "doors_item_steel.png",
protected = true,
groups = { cracky = 1, level = 2 },
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{ "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot" },
},
can_center = true,
is_lockable = true,
} )
doors.register_door( "doors:door_dungeon1", {
tiles = {{ name = "doors_door_dungeon1.png", backface_culling = true}},
description = "Dungeon Interior Door",
inventory_image = "doors_item_dungeon1.png",
protected = true,
groups = { cracky = 1, level = 2 },
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{ "default:steel_ingot", "default:steel_rod", "default:steel_ingot" },
{ "default:steel_rod", "default:steel_rod", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_rod", "default:steel_ingot" },
},
is_lockable = true,
} )
doors.register_door( "doors:door_dungeon2", {
tiles = {{ name = "doors_door_dungeon2.png", backface_culling = true}},
description = "Dungeon Exterior Door",
inventory_image = "doors_item_dungeon2.png",
protected = true,
groups = { cracky = 1, level = 2 },
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{ "default:steel_rod", "default:steel_rod", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
},
is_lockable = true,
} )
doors.register_door( "doors:door_steelpanel1", {
tiles = {{ name = "doors_door_steelpanel1.png", backface_culling = true}},
description = "Steel Colonial Door",
inventory_image = "doors_item_steelpanel1.png",
protected = true,
groups = { cracky = 1, level = 2 },
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_rod" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_steelglass1", {
tiles = {{ name = "doors_door_steelglass1.png", backface_culling = true}},
description = "Steel Single-Lite Door",
inventory_image = "doors_item_steelglass1.png",
protected = true,
groups = { cracky = 1, level = 2 },
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{ "default:glass", "default:glass", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_ingot", "" },
{ "default:steel_ingot", "default:steel_ingot", "" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_steelglass2", {
tiles = {{ name = "doors_door_steelglass2.png", backface_culling = true }},
description = "Steel Double-Lite Door",
inventory_image = "doors_item_steelglass2.png",
protected = true,
groups = { cracky = 1, level = 2 },
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{ "default:glass", "default:glass", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_rod" },
{ "default:steel_ingot", "default:steel_ingot", "" },
},
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_glass", {
tiles = { "doors_door_glass.png" },
description = "Glass Door",
inventory_image = "doors_item_glass.png",
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = default.node_sound_glass_defaults(),
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {
{ "default:glass", "default:glass" },
{ "default:glass", "default:glass" },
{ "default:glass", "default:glass" },
},
can_center = true,
is_lockable = true,
is_closable = true,
} )
doors.register_door( "doors:door_obsidian_glass", {
tiles = { "doors_door_obsidian_glass.png" },
description = "Obsidian Glass Door",
inventory_image = "doors_item_obsidian_glass.png",
groups = { cracky = 3 },
sounds = default.node_sound_glass_defaults(),
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {
{ "default:obsidian_glass", "default:obsidian_glass" },
{ "default:obsidian_glass", "default:obsidian_glass" },
{ "default:obsidian_glass", "default:obsidian_glass" },
},
can_center = true,
is_lockable = true,
is_closable = true,
} )
----------------------------
-- Trapdoor Registrations --
----------------------------
doors.register_trapdoor( "doors:trapdoor", {
description = "Trapdoor",
inventory_image = "doors_trapdoor.png",
wield_image = "doors_trapdoor.png",
tile_front = "doors_trapdoor.png",
tile_side = "doors_trapdoor_side.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1 },
is_closable = true,
} )
doors.register_trapdoor( "doors:trapdoor_steel", {
description = "Steel Trapdoor",
inventory_image = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png",
tile_front = "doors_trapdoor_steel.png",
tile_side = "doors_trapdoor_steel_side.png",
protected = true,
sounds = default.node_sound_metal_defaults( ),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
groups = { cracky = 1, level = 2, door = 1 },
is_lockable = true,
is_closable = true,
} )
minetest.register_craft( {
output = "doors:trapdoor 2",
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "group:wood", "group:wood", "group:wood" },
}
} )
minetest.register_craft( {
output = "doors:trapdoor_steel",
recipe = {
{ "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot" },
}
} )
-----------------------------
-- Fencegate Registrations --
-----------------------------
doors.register_fencegate( "doors:gate_wood", {
description = "Wooden Fence Gate",
texture = "default_wood.png",
material = "default:wood",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }
} )
doors.register_fencegate( "doors:gate_junglewood", {
description = "Junglewood Fence Gate",
texture = "default_junglewood.png",
material = "default:junglewood",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }
} )
doors.register_fencegate( "doors:gate_acacia_wood", {
description = "Acacia Fence Gate",
texture = "default_acacia_wood.png",
material = "default:acacia_wood",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }
} )
doors.register_fencegate( "doors:gate_pine_wood", {
description = "Pine Fence Gate",
texture = "default_pine_wood.png",
material = "default:pine_wood",
groups = { choppy = 3, oddly_breakable_by_hand = 2, flammable = 3 }
} )
doors.register_fencegate( "doors:gate_aspen_wood", {
description = "Aspen Fence Gate",
texture = "default_aspen_wood.png",
material = "default:aspen_wood",
groups = { choppy = 3, oddly_breakable_by_hand = 2, flammable = 3 }
} )
------------------------
-- Fuel Registrations --
------------------------
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_wood",
burntime = 14,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_woodpanel1",
burntime = 12,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_woodglass1",
burntime = 12,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_woodglass2",
burntime = 14,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_japanese",
burntime = 10,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_french",
burntime = 10,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_cottage1",
burntime = 16,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:door_cottage2",
burntime = 16,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:trapdoor",
burntime = 7,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:gate_wood_closed",
burntime = 7,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:gate_acacia_wood_closed",
burntime = 8,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:gate_junglewood_closed",
burntime = 9,
} )
minetest.register_craft({
type = "fuel",
recipe = "doors:gate_pine_wood_closed",
burntime = 6,
} )
minetest.register_craft( {
type = "fuel",
recipe = "doors:gate_aspen_wood_closed",
burntime = 5,
} )

View File

@ -1,7 +1,7 @@
# Blender v2.76 (sub 0) OBJ File: 'door_a.blend'
# www.blender.org
mtllib door_a.mtl
o door_a
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

View File

@ -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

View File

@ -0,0 +1,40 @@
# Blender v2.76 (sub 0) OBJ File: ''
# www.blender.org
mtllib c_door_a.mtl
o Cube_Cube.001
v 0.499000 1.499000 -0.049000
v 0.499000 1.499000 0.075000
v 0.499000 -0.499000 0.075000
v 0.499000 -0.499000 -0.049000
v -0.499000 1.499000 0.075000
v -0.499000 -0.499000 0.075000
v -0.499000 1.499000 -0.049000
v -0.499000 -0.499000 -0.049000
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 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/5/2 5/1/2 6/4/2 3/6/2
f 5/2/3 7/7/3 8/8/3 6/3/3
f 7/9/4 1/5/4 4/6/4 8/10/4
f 4/11/5 3/12/5 6/7/5 8/13/5
f 7/14/6 5/8/6 2/12/6 1/11/6

View File

@ -0,0 +1,40 @@
# Blender v2.76 (sub 0) OBJ File: 'c_door_R_open.blend'
# www.blender.org
mtllib c_door_R_open.mtl
o Cube_Cube.001
v -0.499000 1.499000 0.059000
v -0.499000 -0.499000 0.059000
v -0.375000 -0.499000 0.059000
v -0.375000 1.499000 0.059000
v -0.375000 -0.499000 -0.939000
v -0.375000 1.499000 -0.939000
v -0.499000 -0.499000 -0.939000
v -0.499000 1.499000 -0.939000
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 0.000000 0.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 -1.000000 -0.000000
vn 0.000000 1.000000 -0.000000
usemtl None
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/2/2 6/1/2
f 6/4/3 5/3/3 7/7/3 8/8/3
f 8/9/4 7/10/4 2/6/4 1/5/4
f 2/11/5 7/12/5 5/13/5 3/7/5
f 8/8/6 1/13/6 4/12/6 6/14/6

View File

@ -0,0 +1,40 @@
# Blender v2.76 (sub 0) OBJ File: ''
# www.blender.org
mtllib c_door_left_open.mtl
o Cube_Cube.001
v 0.371000 1.499000 0.059000
v 0.370999 -0.499000 0.059000
v 0.494999 -0.499000 0.059000
v 0.495000 1.499000 0.059000
v 0.494999 -0.499000 -0.939000
v 0.494999 1.499000 -0.939000
v 0.370999 -0.499000 -0.939000
v 0.370999 1.499000 -0.939000
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 0.000000 0.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 -1.000000 -0.000000
vn 0.000000 1.000000 -0.000000
usemtl None
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/2/2 6/1/2
f 6/4/3 5/3/3 7/7/3 8/8/3
f 8/9/4 7/10/4 2/6/4 1/5/4
f 2/11/5 7/12/5 5/13/5 3/7/5
f 8/8/6 1/13/6 4/12/6 6/14/6

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

View File

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 186 B

View File

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

View File

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View File

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

View File

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

View File

@ -3,3 +3,4 @@ description = Building mods
mg_villages - generate villages
handle_schematics - for mg_villages - saved hosuse schematics
cottages - needed for mg_villages, building medieval houses
doors - new doors

View File

@ -0,0 +1,153 @@
Configuration Panel Mod v1.1
By Leslie Krause
Configuration Panel is an API extension for Minetest that allows seamless loading of mod
configuration at runtime. It provides much greater flexibility than Minetest's builtin
'Settings' interface, since the mod configuration itself is read as a native Lua script.
Hence it's possible to include simple data structures without the need for serialization,
in addition to temporary variables, mathematical expressions, and conditional branching.
While some might be opposed to using Lua for configuration purposes, arguing that it is
anti-pattern, that's not actually true. In fact, Lua itself was originally intended to
double as a configuration language, like JSON, so it is very befitting of its purpose.
"Lua started off as a configuration language. This has some nice quirks in that it's
great for creating and configuring things - which is what you want to do in a game."
from Lua Users Wiki: Lua versus Python (http://lua-users.org/wiki/LuaVersusPython)
"An important use of Lua is as a configuration language...."
from Programming in Lua: Extending your Application (https://www.lua.org/pil/25.html)
There is only one function call necessary to load your mod's configuration:
minetest.load_config( base_config, options )
Automatically loads the mod configuration at server-startup according to the options
and returns a table of key-value pairs.
* 'base_config' is the default mod configuration (optional)
* 'options' are additional options that effect loading behavior (optional)
Example:
> local config = minetest.load_config( {
> spawn_pos = { x = 0, y = 0, z = 0 },
> filename = "player_spawns.txt",
> } )
By default, the configuration is first loaded from the 'config.lua' script within the mod
directory. If not found, it will instead be loaded from a script residing within the
'config' subdirectory of the current world. That script must be named the same as the mod
but with a '.lua' extension, of course.
This would be the typical order of loading on Linux distros of Minetest:
/usr/local/share/minetest/games/minetest_game/mods/sample_mod/config.lua
/home/minetest/.minetest/worlds/sample_world/config/sample_mod.lua
By specifying the option 'can_override = true', both scripts will be loaded, allowing for
the world configuration to override the game configuration. If, for example, you want to
change some game-specific settings for your mod, "sample_mod", as well as world-specific
settings for the world, "my_world", then you would save scripts in two locations:
/usr/local/share/minetest/games/minetest_game/mods/sample_mod/config.lua
> allow_fly = false
> allow_walk = false
> allow_swim = false
/home/minetest/.minetest/worlds/my_world/config/sample_mod.lua
> allow_swim = true
Hence, 'allow_fly' and 'allow_walk' will be false, whereas 'allow_swim' will be true. By
default, however, all three would remain false since the world configuration is ignored
whenever the game configuration is found.
For security reasons, configuration scripts are executed within a restricted environment.
However, the following builtin functions are made available for convenience:
* core.print
* core.debug (alias for minetest.log)
* core.is_yes (alias for minetest.is_yes)
* core.has_feature (alias for minetest.has_feature)
* core.string_to_pos (alias for minetest.string_to_pos)
* core.pos_to_string (alias for minetest.pos_to_string)
* core.colorize (alias for minetest.colorize)
* core.tonumber
* core.tostring
* core.sprintf (alias for string.format)
* core.tolower (alias for string.lower)
* core.toupper (alias for string.upper)
* core.concat (alias for table.concat)
* core.random (alias for math.random)
* core.max (alias for math.max)
* core.min (alias for math.min)
* core.next
* core.pairs
* core.ipairs
* core.date (alias for os.date)
* core.time (alias for os.time)
* core.assert
* core.error
The 'core' table also contains the properties 'MOD_NAME', 'MOD_PATH', and 'WORLD_PATH'
which designate the name and the path of the currently loading mod as well as the path
of the selected world respectively.
A chat command is also available for editing the configuration directly in-game. Simply
type '/config' followed by the mod name to configure (requires the "server" privilege).
Special Note: Before using the chat command you must add "config" to the list of trusted
mods in minetest.conf and you must install the ActiveFormspecs mod, otherwise the editing
functionality will be disabled.
Repository
----------------------
Browse source code:
https://bitbucket.org/sorcerykid/config
Download archive:
https://bitbucket.org/sorcerykid/config/get/master.zip
https://bitbucket.org/sorcerykid/config/get/master.tar.gz
Dependencies
----------------------
Default Mod (required)
https://github.com/minetest-game-mods/default
ActiveFormspecs Mod (optional)
https://bitbucket.org/sorcerykid/formspecs
Installation
----------------------
1) Unzip the archive into the mods directory of your game.
2) Rename the config-master directory to "config".
3) Add "config" as a dependency to any mods using the API.
Source Code License
----------------------
The MIT License (MIT)
Copyright (c) 2020, Leslie Krause (leslie@searstower.org)
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
For more details:
https://opensource.org/licenses/MIT

View File

@ -0,0 +1,2 @@
default
formspecs?

View File

@ -0,0 +1,261 @@
--------------------------------------------------------
-- Minetest :: Configuration Panel Mod (config)
--
-- See README.txt for licensing and other information.
-- Copyright (c) 2016-2020, Leslie E. Krause
--
-- ./games/minetest_game/mods/config/init.lua
--------------------------------------------------------
local env = minetest.request_insecure_environment( )
local world_path = minetest.get_worldpath( )
local configured_mods = { }
---------------------
-- Private Methods --
---------------------
local function import( config, filename )
local func = loadfile( filename )
if func then
setfenv( func, config )
local status = pcall( func )
if not status then
error( "Error in configuration file: " .. filename )
end
return true
end
return false
end
local function load_world_config( mod_name )
local file = env.io.open( world_path .. "/config/" .. mod_name .. ".lua", "r" )
if not file then return nil end
local data = file:read( "*all" )
file:close( )
return data
end
local function load_game_config( mod_name )
local file = env.io.open( minetest.get_modpath( mod_name ) .. "/config.lua", "r" )
if not file then return nil end
local data = file:read( "*all" )
file:close( )
return data
end
local function save_world_config( mod_name, data )
local file = env.io.open( world_path .. "/config/" .. mod_name .. ".lua", "w" )
if not file then return false end
file:write( data )
file:close( )
return true
end
local function save_game_config( mod_name, data )
local file = env.io.open( minetest.get_modpath( mod_name ) .. "/config.lua", "w" )
if not file then return false end
file:write( data )
file:close( )
return true
end
local function create_world_config( mod_name )
local file = env.io.open( world_path .. "/config/" .. mod_name .. ".lua", "w" )
if not file then return false end
file:close( )
return true
end
local function create_game_config( mod_name )
local file = env.io.open( minetest.get_modpath( mod_name ) .. "/config.lua", "w" )
if not file then return false end
file:close( )
return true
end
local function delete_world_config( mod_name )
return env.os.remove( world_path .. "/config/" .. mod_name .. ".lua" ) ~= nil
end
local function delete_game_config( mod_name )
return env.os.remove( minetest.get_modpath( mod_name ) .. "/config.lua" ) ~= nil
end
local function open_config_editor( player_name, mod_name )
local origin_idx
local content
local delete_config, create_config, load_config, save_config
local function reset_origin_map( idx )
origin_idx = idx
if origin_idx == 1 then
delete_config = delete_game_config
create_config = create_game_config
load_config = load_game_config
save_config = save_game_config
else
delete_config = delete_world_config
create_config = create_world_config
load_config = load_world_config
save_config = save_world_config
end
end
local function get_formspec( )
local formspec =
"size[10.0,8.5]" ..
default.gui_bg ..
default.gui_bg_img ..
string.format( "label[0.0,0.1;Configuration for mod '%s']", mod_name ) ..
"label[2.2,8.0;Origin:]" ..
string.format( "dropdown[3.1,7.9;2.6,1.0;origin;Game Config,World Config;%d;true]", origin_idx )
if not content then
formspec = formspec ..
"box[0.0,0.8;9.8.0,6.6;#222222]" ..
"label[4.0,3.8;File does not exist.]" ..
"button_exit[0.0,7.8;2.0,1.0;close;Close]" ..
"button[8.0,7.8;2.0,1.0;create;Create]"
else
formspec = formspec ..
"textarea[0.3,0.8;10.0,7.6;content;;" .. minetest.formspec_escape( content ) .. "]" ..
"button_exit[0.0,7.8;2.0,1.0;close;Close]" ..
"button[6.0,7.8;2.0,1.0;delete;Delete]" ..
"button[8.0,7.8;2.0,1.0;save;Save]"
end
return formspec
end
local function on_close( state, player, fields )
if fields.quit then return end -- short-circuit on form closure
if fields.save then
content = fields.content
save_config( mod_name, content )
elseif fields.load then
content = load_config( mod_name )
minetest.update_form( player_name, get_formspec ( ) )
elseif fields.delete then
if not delete_config( mod_name ) then
minetest.destroy_form( player_name )
minetest.chat_send_player( player_name, "Unable to delete configuration file." )
end
content = nil
minetest.update_form( player_name, get_formspec ( ) )
elseif fields.create then
if not create_config( mod_name ) then
minetest.destroy_form( player_name )
minetest.chat_send_player( player_name, "Unable to create configuration file." )
end
content = ""
minetest.update_form( player_name, get_formspec ( ) )
elseif fields.origin then
reset_origin_map( fields.origin )
content = load_config( mod_name )
minetest.update_form( player_name, get_formspec ( ) )
end
end
reset_origin_map( 1 )
content = load_config( mod_name )
minetest.create_form( nil, player_name, get_formspec( ), on_close )
end
--------------------
-- Public Methods --
--------------------
minetest.load_config = function ( base_config, options )
local name = minetest.get_current_modname( )
local path = minetest.get_modpath( name )
local config = base_config or { }
local status
if not options then options = { } end
config.core = {
MOD_NAME = name,
MOD_PATH = path,
WORLD_PATH = world_path,
tonumber = tonumber,
tostring = tostring,
sprintf = string.format,
tolower = string.lower,
toupper = string.upper,
concat = table.concat,
random = math.random,
max = math.max,
min = math.min,
print = print,
next = next,
pairs = pairs,
ipairs = ipairs,
date = os.date,
time = os.time,
assert = assert,
error = error,
}
if options.can_override then
status = import( config, path .. "/config.lua" )
status = import( config, world_path .. "/config/" .. name .. ".lua" ) or status
else
status = import( config, path .. "/config.lua" ) or import( config, world_path .. "/config/" .. name .. ".lua" )
end
if not status then
minetest.log( "warning", "Missing configuration file for mod \"" .. name .. "\"" )
end
configured_mods[ name ] = {
base_config = base_config,
can_refresh = options.can_refresh,
can_override = options.can_override,
}
config.core = nil
return config
end
------------------------------
-- Registered Chat Commands --
------------------------------
minetest.register_chatcommand( "config", {
description = "View and edit the configuration for a given mod.",
privs = { server = true },
func = function( player_name, param )
if not env then
return false, "This feature is disabled in a secure environment."
elseif not minetest.create_form then
return false, "This feature is not supported."
end
if not string.match( param, "^[a-zA-Z0-9_]+$" ) then
return false, "Invalid mod name."
elseif not configured_mods[ param ] then
return false, "Configuration not available."
end
open_config_editor( player_name, param )
return true
end
} )

View File

@ -1,6 +1,7 @@
description = Libraries and apis for mods
cmdlib - for character_anim
config - for doors redo
display_modpack - for signs
mobkit - for petz and other mod mods
mobs_redo - for some mob mods

View File

@ -1,87 +0,0 @@
Minetest Game mod: doors
========================
See license.txt for license information.
Authors of source code
----------------------
Originally by PilzAdam (MIT)
Modified by BlockMen (MIT): Added sounds, glass doors (glass, obsidian glass) and trapdoor.
Modified by sofar (sofar@foo-projects.org) (MIT):
Added Steel trapdoor.
Re-implemented most of the door algorithms, added meshes, UV wrapped texture.
Added doors API to facilitate coding mods accessing and operating doors.
Added Fence Gate model, code, and sounds.
Various Minetest developers and contributors (MIT)
Authors of media (textures)
---------------------------
Following textures created by Fernando Zapata (CC BY-SA 3.0):
door_wood.png
door_wood_a.png
door_wood_a_r.png
door_wood_b.png
door_wood_b_r.png
Following textures created by BlockMen (CC BY-SA 3.0):
door_trapdoor.png
door_obsidian_glass_side.png
Following textures created by celeron55 (CC BY-SA 3.0):
door_glass_a.png
door_glass_b.png
Following textures created by PenguinDad (CC BY-SA 4.0):
door_glass.png
door_obsidian_glass.png
Following textures created by sofar (CC-BY-SA-3.0):
doors_trapdoor_steel.png
Following textures created by paramat (CC-BY-SA-3.0):
door_trapdoor_side.png
doors_trapdoor_steel_side.png
Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen (CC BY-SA 3.0):
door_obsidian_glass.png
Glass door textures by Krock and paramat based on textures by VanessaE (CC BY-SA 3.0):
doors_door_glass.png
doors_item_glass.png
All other textures (created by PilzAdam) (CC BY-SA 3.0):
Door textures were converted to the new texture map by sofar, paramat and
red-001, under the same license as the originals.
Authors of media (models)
-------------------------
Door 3d models by sofar (CC-BY-SA-3.0)
- door_a.obj
- door_b.obj
Fence gate models by sofar (CC-BY-SA-3.0)
- fencegate_open.obj
- fencegate_closed.obj
Authors of media (sounds)
-------------------------
Opening-Sound created by CGEffex (CC BY 3.0), modified by BlockMen
door_open.ogg
Closing-Sound created by bennstir (CC BY 3.0)
door_close.ogg
fencegate_open.ogg:
http://www.freesound.org/people/mhtaylor67/sounds/126041/ - (CC0 1.0)
fencegate_close.ogg:
http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - (CC-BY-3.0)
http://www.freesound.org/people/rivernile7/sounds/249573/ - (CC-BY-3.0)
Steel door sounds open & close (CC-BY-3.0) by HazMatt
- http://www.freesound.org/people/HazMattt/sounds/187283/
doors_steel_door_open.ogg
doors_steel_door_close.ogg
doors_glass_door_open.ogg, doors_glass_door_close.ogg:
https://www.freesound.org/people/SkeetMasterFunk69/sounds/235546/ (CC0 1.0)

View File

@ -1,882 +0,0 @@
-- doors/init.lua
-- our API object
doors = {}
doors.registered_doors = {}
doors.registered_trapdoors = {}
-- Load support for MT game translation.
local S = minetest.get_translator("doors")
local function replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("doors_owner")
if owner and owner ~= "" then
meta:set_string("owner", owner)
meta:set_string("doors_owner", "")
end
end
-- returns an object to a door object or nil
function doors.get(pos)
local node_name = minetest.get_node(pos).name
if doors.registered_doors[node_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, nil, player)
end,
close = function(self, player)
if not self:state() then
return false
end
return doors.door_toggle(self.pos, nil, player)
end,
toggle = function(self, player)
return doors.door_toggle(self.pos, nil, player)
end,
state = function(self)
local state = minetest.get_meta(self.pos):get_int("state")
return state %2 == 1
end
}
elseif doors.registered_trapdoors[node_name] then
-- A trapdoor
return {
pos = pos,
open = function(self, player)
if self:state() then
return false
end
return doors.trapdoor_toggle(self.pos, nil, player)
end,
close = function(self, player)
if not self:state() then
return false
end
return doors.trapdoor_toggle(self.pos, nil, player)
end,
toggle = function(self, player)
return doors.trapdoor_toggle(self.pos, nil, player)
end,
state = function(self)
return minetest.get_node(self.pos).name:sub(-5) == "_open"
end
}
else
return nil
end
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 = S("Hidden Door Segment"),
drawtype = "airlike",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
-- has to be walkable for falling nodes to stop falling.
walkable = true,
pointable = false,
diggable = false,
buildable_to = false,
floodable = false,
drop = "",
groups = {not_in_creative_inventory = 1},
on_blast = function() end,
-- 1px block inside door hinge near node top
collision_box = {
type = "fixed",
fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32},
},
})
-- 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 = "_c", param2 = 1},
{v = "_c", param2 = 2},
{v = "_c", param2 = 3},
{v = "_c", param2 = 0},
},
{
{v = "_b", param2 = 1},
{v = "_b", param2 = 2},
{v = "_b", param2 = 3},
{v = "_b", param2 = 0},
},
{
{v = "_d", param2 = 3},
{v = "_d", param2 = 0},
{v = "_d", param2 = 1},
{v = "_d", param2 = 2},
},
}
function doors.door_toggle(pos, node, clicker)
local meta = minetest.get_meta(pos)
node = node or minetest.get_node(pos)
local def = minetest.registered_nodes[node.name]
local name = def.door.name
local state = meta:get_string("state")
if state == "" then
-- fix up lvm-placed right-hinged doors, default closed
if node.name:sub(-2) == "_b" then
state = 2
else
state = 0
end
else
state = tonumber(state)
end
replace_old_owner_information(pos)
if clicker and not default.can_interact_with_node(clicker, pos) then
return false
end
-- until Lua-5.2 we have no bitwise operators :(
if state % 2 == 1 then
state = state - 1
else
state = state + 1
end
local dir = node.param2
-- It's possible param2 is messed up, so, validate before using
-- the input data. This indicates something may have rotated
-- the door, even though that is not supported.
if not transform[state + 1] or not transform[state + 1][dir + 1] then
return false
end
if state % 2 == 0 then
minetest.sound_play(def.door.sounds[1],
{pos = pos, gain = 0.3, max_hear_distance = 10}, true)
else
minetest.sound_play(def.door.sounds[2],
{pos = pos, gain = 0.3, max_hear_distance = 10}, true)
end
minetest.swap_node(pos, {
name = name .. transform[state + 1][dir+1].v,
param2 = transform[state + 1][dir+1].param2
})
meta:set_int("state", state)
return true
end
local function on_place_node(place_to, newnode,
placer, oldnode, itemstack, pointed_thing)
-- Run script hook
for _, callback in ipairs(minetest.registered_on_placenodes) do
-- Deepcopy pos, node and pointed_thing because callback can modify them
local place_to_copy = {x = place_to.x, y = place_to.y, z = place_to.z}
local newnode_copy =
{name = newnode.name, param1 = newnode.param1, param2 = newnode.param2}
local oldnode_copy =
{name = oldnode.name, param1 = oldnode.param1, param2 = oldnode.param2}
local pointed_thing_copy = {
type = pointed_thing.type,
above = vector.new(pointed_thing.above),
under = vector.new(pointed_thing.under),
ref = pointed_thing.ref,
}
callback(place_to_copy, newnode_copy, placer,
oldnode_copy, itemstack, pointed_thing_copy)
end
end
local function can_dig_door(pos, digger)
replace_old_owner_information(pos)
return default.can_interact_with_node(digger, pos)
end
function doors.register(name, def)
if not name:find(":") then
name = "doors:" .. name
end
-- replace old doors of this type automatically
minetest.register_lbm({
name = ":doors:replace_" .. name:gsub(":", "_"),
nodenames = {name.."_b_1", name.."_b_2"},
action = function(pos, node)
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 = name .. "_" .. new.type, param2 = p2})
meta:set_int("state", new.state)
-- properly place doors:hidden at the right spot
local p3 = p2
if new.state >= 2 then
p3 = (p3 + 3) % 4
end
if new.state % 2 == 1 then
if new.state >= 2 then
p3 = (p3 + 1) % 4
else
p3 = (p3 + 3) % 4
end
end
-- 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", param2 = p3})
end
})
minetest.register_craftitem(":" .. name, {
description = def.description,
inventory_image = def.inventory_image,
groups = table.copy(def.groups),
on_place = function(itemstack, placer, pointed_thing)
local pos
if not pointed_thing.type == "node" then
return itemstack
end
local node = minetest.get_node(pointed_thing.under)
local pdef = minetest.registered_nodes[node.name]
if pdef and pdef.on_rightclick and
not (placer and placer:is_player() and
placer:get_player_control().sneak) then
return pdef.on_rightclick(pointed_thing.under,
node, placer, itemstack, pointed_thing)
end
if pdef and pdef.buildable_to then
pos = pointed_thing.under
else
pos = pointed_thing.above
node = minetest.get_node(pos)
pdef = minetest.registered_nodes[node.name]
if not pdef or not pdef.buildable_to then
return itemstack
end
end
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local top_node = minetest.get_node_or_nil(above)
local topdef = top_node and minetest.registered_nodes[top_node.name]
if not topdef or not topdef.buildable_to then
return itemstack
end
local pn = placer and placer:get_player_name() or ""
if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) then
return itemstack
end
local dir = placer and minetest.dir_to_facedir(placer:get_look_dir()) or 0
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 = name .. "_b", param2 = dir})
minetest.set_node(above, {name = "doors:hidden", param2 = (dir + 3) % 4})
else
minetest.set_node(pos, {name = name .. "_a", param2 = dir})
minetest.set_node(above, {name = "doors:hidden", param2 = dir})
end
local meta = minetest.get_meta(pos)
meta:set_int("state", state)
if def.protected then
meta:set_string("owner", pn)
meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn))
end
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then
itemstack:take_item()
end
minetest.sound_play(def.sounds.place, {pos = pos}, true)
on_place_node(pos, minetest.get_node(pos),
placer, node, itemstack, pointed_thing)
return itemstack
end
})
def.inventory_image = nil
if def.recipe then
minetest.register_craft({
output = name,
recipe = def.recipe,
})
end
def.recipe = nil
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
def.groups.not_in_creative_inventory = 1
def.groups.door = 1
def.drop = name
def.door = {
name = name,
sounds = { def.sound_close, def.sound_open },
}
if not def.on_rightclick then
def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
doors.door_toggle(pos, node, clicker)
return itemstack
end
end
def.after_dig_node = function(pos, node, meta, digger)
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z})
end
def.on_rotate = function(pos, node, user, mode, new_param2)
return false
end
if def.protected then
def.can_dig = can_dig_door
def.on_blast = function() end
def.on_key_use = function(pos, player)
local door = doors.get(pos)
door:toggle(player)
end
def.on_skeleton_key_use = function(pos, player, newsecret)
replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
local pname = player:get_player_name()
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
minetest.chat_send_player(pname, S("You do not own this locked door."))
return nil
end
local secret = meta:get_string("key_lock_secret")
if secret == "" then
secret = newsecret
meta:set_string("key_lock_secret", secret)
end
return secret, S("a locked door"), owner
end
def.node_dig_prediction = ""
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 {name}
end
end
def.on_destruct = function(pos)
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
end
def.drawtype = "mesh"
def.paramtype = "light"
def.paramtype2 = "facedir"
def.sunlight_propagates = true
def.walkable = true
def.is_ground_content = false
def.buildable_to = false
def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
def.mesh = "door_a.obj"
minetest.register_node(":" .. name .. "_a", def)
def.mesh = "door_b.obj"
minetest.register_node(":" .. name .. "_b", def)
def.mesh = "door_a2.obj"
minetest.register_node(":" .. name .. "_c", def)
def.mesh = "door_b2.obj"
minetest.register_node(":" .. name .. "_d", def)
doors.registered_doors[name .. "_a"] = true
doors.registered_doors[name .. "_b"] = true
doors.registered_doors[name .. "_c"] = true
doors.registered_doors[name .. "_d"] = true
end
doors.register("door_wood", {
tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
description = S("Wooden Door"),
inventory_image = "doors_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
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 = S("Steel Door"),
inventory_image = "doors_item_steel.png",
protected = true,
groups = {node = 1, cracky = 1, level = 2},
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{"default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot"},
}
})
doors.register("door_glass", {
tiles = {"doors_door_glass.png"},
description = S("Glass Door"),
inventory_image = "doors_item_glass.png",
groups = {node = 1, cracky=3, oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {
{"default:glass", "default:glass"},
{"default:glass", "default:glass"},
{"default:glass", "default:glass"},
}
})
doors.register("door_obsidian_glass", {
tiles = {"doors_door_obsidian_glass.png"},
description = S("Obsidian Glass Door"),
inventory_image = "doors_item_obsidian_glass.png",
groups = {node = 1, cracky=3},
sounds = default.node_sound_glass_defaults(),
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {
{"default:obsidian_glass", "default:obsidian_glass"},
{"default:obsidian_glass", "default:obsidian_glass"},
{"default:obsidian_glass", "default:obsidian_glass"},
},
})
-- Capture mods using the old API as best as possible.
function doors.register_door(name, def)
if def.only_placer_can_open then
def.protected = true
end
def.only_placer_can_open = nil
local i = name:find(":")
local modname = name:sub(1, i - 1)
if not def.tiles then
if def.protected then
def.tiles = {{name = "doors_door_steel.png", backface_culling = true}}
else
def.tiles = {{name = "doors_door_wood.png", backface_culling = true}}
end
minetest.log("warning", modname .. " registered door \"" .. name .. "\" " ..
"using deprecated API method \"doors.register_door()\" but " ..
"did not provide the \"tiles\" parameter. A fallback tiledef " ..
"will be used instead.")
end
doors.register(name, def)
end
----trapdoor----
function doors.trapdoor_toggle(pos, node, clicker)
node = node or minetest.get_node(pos)
replace_old_owner_information(pos)
if clicker and not default.can_interact_with_node(clicker, pos) then
return false
end
local def = minetest.registered_nodes[node.name]
if string.sub(node.name, -5) == "_open" then
minetest.sound_play(def.sound_close,
{pos = pos, gain = 0.3, max_hear_distance = 10}, true)
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}, true)
minetest.swap_node(pos, {name = node.name .. "_open",
param1 = node.param1, param2 = node.param2})
end
end
function doors.register_trapdoor(name, def)
if not name:find(":") then
name = "doors:" .. name
end
local name_closed = name
local name_opened = name.."_open"
def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
doors.trapdoor_toggle(pos, node, clicker)
return itemstack
end
-- Common trapdoor configuration
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = "facedir"
def.is_ground_content = false
if def.protected then
def.can_dig = can_dig_door
def.after_place_node = function(pos, placer, itemstack, pointed_thing)
local pn = placer:get_player_name()
local meta = minetest.get_meta(pos)
meta:set_string("owner", pn)
meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn))
return (creative and creative.is_enabled_for and creative.is_enabled_for(pn))
end
def.on_blast = function() end
def.on_key_use = function(pos, player)
local door = doors.get(pos)
door:toggle(player)
end
def.on_skeleton_key_use = function(pos, player, newsecret)
replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
local pname = player:get_player_name()
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
minetest.chat_send_player(pname, S("You do not own this trapdoor."))
return nil
end
local secret = meta:get_string("key_lock_secret")
if secret == "" then
secret = newsecret
meta:set_string("key_lock_secret", secret)
end
return secret, S("a locked trapdoor"), owner
end
def.node_dig_prediction = ""
else
def.on_blast = function(pos, intensity)
minetest.remove_node(pos)
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)
local def_closed = table.copy(def)
def_closed.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
def_closed.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
def_closed.tiles = {
def.tile_front,
def.tile_front .. '^[transformFY',
def.tile_side,
def.tile_side,
def.tile_side,
def.tile_side
}
def_opened.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
def_opened.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
def_opened.tiles = {
def.tile_side,
def.tile_side .. '^[transform2',
def.tile_side .. '^[transform3',
def.tile_side .. '^[transform1',
def.tile_front .. '^[transform46',
def.tile_front .. '^[transform6'
}
def_opened.drop = name_closed
def_opened.groups.not_in_creative_inventory = 1
minetest.register_node(name_opened, def_opened)
minetest.register_node(name_closed, def_closed)
doors.registered_trapdoors[name_opened] = true
doors.registered_trapdoors[name_closed] = true
end
doors.register_trapdoor("doors:trapdoor", {
description = S("Wooden Trapdoor"),
inventory_image = "doors_trapdoor.png",
wield_image = "doors_trapdoor.png",
tile_front = "doors_trapdoor.png",
tile_side = "doors_trapdoor_side.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1},
})
doors.register_trapdoor("doors:trapdoor_steel", {
description = S("Steel Trapdoor"),
inventory_image = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png",
tile_front = "doors_trapdoor_steel.png",
tile_side = "doors_trapdoor_steel_side.png",
protected = true,
sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
groups = {cracky = 1, level = 2, door = 1},
})
minetest.register_craft({
output = "doors:trapdoor 2",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
{"", "", ""},
}
})
minetest.register_craft({
output = "doors:trapdoor_steel",
recipe = {
{"default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot"},
}
})
----fence gate----
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
function doors.register_fencegate(name, def)
local fence = {
description = def.description,
drawtype = "mesh",
tiles = {},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
drop = name .. "_closed",
connect_sides = {"left", "right"},
groups = def.groups,
sounds = def.sounds,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local node_def = minetest.registered_nodes[node.name]
minetest.swap_node(pos, {name = node_def.gate, param2 = node.param2})
minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3,
max_hear_distance = 8}, true)
return itemstack
end,
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4}
},
}
if type(def.texture) == "string" then
fence.tiles[1] = {name = def.texture, backface_culling = true}
elseif def.texture.backface_culling == nil then
fence.tiles[1] = table.copy(def.texture)
fence.tiles[1].backface_culling = true
else
fence.tiles[1] = def.texture
end
if not fence.sounds then
fence.sounds = default.node_sound_wood_defaults()
end
fence.groups.fence = 1
local fence_closed = table.copy(fence)
fence_closed.mesh = "doors_fencegate_closed.obj"
fence_closed.gate = name .. "_open"
fence_closed.sound = "doors_fencegate_open"
fence_closed.collision_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
}
local fence_open = table.copy(fence)
fence_open.mesh = "doors_fencegate_open.obj"
fence_open.gate = name .. "_closed"
fence_open.sound = "doors_fencegate_close"
fence_open.groups.not_in_creative_inventory = 1
fence_open.collision_box = {
type = "fixed",
fixed = {{-1/2, -1/2, -1/8, -3/8, 1/2 + fence_collision_extra, 1/8},
{-1/2, -3/8, -1/2, -3/8, 3/8, 0 }}
}
minetest.register_node(":" .. name .. "_closed", fence_closed)
minetest.register_node(":" .. name .. "_open", fence_open)
minetest.register_craft({
output = name .. "_closed",
recipe = {
{"group:stick", def.material, "group:stick"},
{"group:stick", def.material, "group:stick"}
}
})
end
doors.register_fencegate("doors:gate_wood", {
description = S("Apple Wood Fence Gate"),
texture = "default_wood.png",
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_acacia_wood", {
description = S("Acacia Wood Fence Gate"),
texture = "default_acacia_wood.png",
material = "default:acacia_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_junglewood", {
description = S("Jungle Wood Fence Gate"),
texture = "default_junglewood.png",
material = "default:junglewood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_pine_wood", {
description = S("Pine Wood Fence Gate"),
texture = "default_pine_wood.png",
material = "default:pine_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}
})
doors.register_fencegate("doors:gate_aspen_wood", {
description = S("Aspen Wood Fence Gate"),
texture = "default_aspen_wood.png",
material = "default:aspen_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}
})
----fuels----
minetest.register_craft({
type = "fuel",
recipe = "doors:trapdoor",
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "doors:door_wood",
burntime = 14,
})
minetest.register_craft({
type = "fuel",
recipe = "doors:gate_wood_closed",
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "doors:gate_acacia_wood_closed",
burntime = 8,
})
minetest.register_craft({
type = "fuel",
recipe = "doors:gate_junglewood_closed",
burntime = 9,
})
minetest.register_craft({
type = "fuel",
recipe = "doors:gate_pine_wood_closed",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "doors:gate_aspen_wood_closed",
burntime = 5,
})

View File

@ -1,164 +0,0 @@
License of source code
----------------------
The MIT License (MIT)
Copyright (C) 2012-2016 PilzAdam
Copyright (C) 2014-2016 BlockMen
Copyright (C) 2015-2016 sofar (sofar@foo-projects.org)
Copyright (C) 2012-2016 Various Minetest developers and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
For more details:
https://opensource.org/licenses/MIT
Licenses of media (textures, models and sounds)
-----------------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2011-2016 Fernando Zapata
Copyright (C) 2014-2016 celeron55
Copyright (C) 2012-2016 PilzAdam
Copyright (C) 2014-2016 BlockMen
Copyright (C) 2015-2016 sofar
Copyright (C) 2016 red-001
Copyright (C) 2016 paramat
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
-----------------------
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Copyright (C) 2014-2016 PenguinDad
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/4.0/
-----------------------
Attribution 3.0 Unported (CC BY 3.0)
Copyright (C) 2014 CGEffex
Copyright (C) 2014 bennstir
Copyright (C) 2016 BarkersPinhead
Copyright (C) 2016 rivernile7
Copyright (C) 2016 HazMatt
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by/3.0/
-----------------------
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
mhtaylor67
SkeetMasterFunk69
No Copyright
The person who associated a work with this deed has dedicated the work to the public
domain by waiving all of his or her rights to the work worldwide under copyright law,
including all related and neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all
without asking permission. See Other Information below.
Other Information
In no way are the patent or trademark rights of any person affected by CC0, nor are the
rights that other persons may have in the work or in how the work is used, such as
publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work with this deed makes
no warranties about the work, and disclaims liability for all uses of the work, to the
fullest extent permitted by applicable law.
When using or citing the work, you should not imply endorsement by the author or the
affirmer.
For more details:
https://creativecommons.org/publicdomain/zero/1.0/

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Verborgenes Türsegment
Owned by @1=Eigentum von @1
You do not own this locked door.=Diese abgeschlossene Tür gehört Ihnen nicht.
a locked door=eine abgeschlossene Tür
Wooden Door=Holztür
Steel Door=Stahltür
Glass Door=Glastür
Obsidian Glass Door=Obsidianglastür
You do not own this trapdoor.=Diese Falltür gehört Ihnen nicht.
a locked trapdoor=eine abgeschlossene Falltür
Wooden Trapdoor=Holzfalltür
Steel Trapdoor=Stahlfalltür
Apple Wood Fence Gate=Apfelholzzauntor
Acacia Wood Fence Gate=Akazienholzzauntor
Jungle Wood Fence Gate=Dschungelholzzauntor
Pine Wood Fence Gate=Kiefernholzzauntor
Aspen Wood Fence Gate=Espenholzzauntor

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Segmento de puerta oculta
Owned by @1=Propiedad de @1
You do not own this locked door.=Esta puerta cerrada no te pertenece.
a locked door=una puerta cerrada
Wooden Door=Puerta de madera
Steel Door=Puerta de acero
Glass Door=Puerta de vidrio
Obsidian Glass Door=Puerta de vidrio de obsidiana
You do not own this trapdoor.=Esta trampilla no te pertenece.
a locked trapdoor=una trampilla cerrada
Wooden Trapdoor=Trampilla de madera
Steel Trapdoor=Trampilla de acero
Apple Wood Fence Gate=Puerta de cerca de manzano
Acacia Wood Fence Gate=Puerta de cerca de acacia
Jungle Wood Fence Gate=Puerta de cerca de madera tropical
Pine Wood Fence Gate=Puerta de cerca de pino
Aspen Wood Fence Gate=Puerta de cerca de álamo

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Segment de porte cachée
Owned by @1=Possédée par @1
You do not own this locked door.=Cette porte vérouillée ne vous appartient pas.
a locked door=une porte verouillée
Wooden Door=Porte en bois
Steel Door=Porte en acier
Glass Door=Porte en verre
Obsidian Glass Door=Porte en verre d'obsidienne
You do not own this trapdoor.=Vous ne possédez pas cette trappe.
a locked trapdoor=une trappe verouillée
Wooden Trapdoor=Trappe en bois
Steel Trapdoor=Trappe en acier
Apple Wood Fence Gate=Porte de clôture en bois de pommier
Acacia Wood Fence Gate=Porte de clôture en bois d'acacia
Jungle Wood Fence Gate=Porte de clôture en bois de la jungle
Pine Wood Fence Gate=Porte de clôture en bois de pin
Aspen Wood Fence Gate=Porte de clôture en bois de tremble

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Bagian Pintu Tersembunyi
Owned by @1=Milik @1
You do not own this locked door.=Anda bukan pemilik pintu terkunci ini.
a locked door=pintu terkunci
Wooden Door=Pintu Kayu
Steel Door=Pintu Baja
Glass Door=Pintu Kaca
Obsidian Glass Door=Pintu Kaca Obsidian
You do not own this trapdoor.=Anda bukan pemilik pintu kolong ini.
a locked trapdoor=pintu kolong terkunci
Wooden Trapdoor=Pintu Kolong Kayu
Steel Trapdoor=Pintu Kolong Baja
Apple Wood Fence Gate=Gerbang Kayu Pohon Apel
Acacia Wood Fence Gate=Gerbang Kayu Akasia
Jungle Wood Fence Gate=Gerbang Kayu Pohon Rimba
Pine Wood Fence Gate=Gerbang Kayu Pinus
Aspen Wood Fence Gate=Gerbang Kayu Aspen

View File

@ -1,19 +0,0 @@
# textdomain: doors
Hidden Door Segment=Segmento di porta nascosto
Owned by @1=Di proprietà di @1
You do not own this locked door.=Non sei il proprietario di questa porta chiusa a chiave.
a locked door=una porta chiusa a chiave
Wooden Door=Porta di legno
Steel Door=Porta d'acciaio
Glass Door=Porta di vetro
Obsidian Glass Door=Porta di vetro d'ossidiana
Owned by @1=Di proprietà di @1
You do not own this trapdoor.=Non sei il proprietario di questa botola.
a locked trapdoor=una botola chiusa a chiave
Wooden Trapdoor=Botola di legno
Steel Trapdoor=Botola d'acciaio
Apple Wood Fence Gate=Cancello della recinzione di legno di melo
Acacia Wood Fence Gate=Cancello della recinzione di legno d'acacia
Jungle Wood Fence Gate=Cancello della recinzione di legno della giungla
Pine Wood Fence Gate=Cancello della recinzione di legno di pino
Aspen Wood Fence Gate=Cancello della recinzione di legno di pioppo

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Segmen Pintu Tersembunyi
Owned by @1=Milik @1
You do not own this locked door.=Anda bukan pemilik pintu berkunci ini.
a locked door=pintu berkunci
Wooden Door=Pintu Kayu
Steel Door=Pintu Keluli
Glass Door=Pintu Kaca
Obsidian Glass Door=Pintu Kaca Obsidia
You do not own this trapdoor.=Anda bukan pemilik pintu kolong ini.
a locked trapdoor=pintu kolong berkunci
Wooden Trapdoor=Pintu Kolong Kayu
Steel Trapdoor=Pintu Kolong Keluli
Apple Wood Fence Gate=Pintu Pagar Kayu Epal
Acacia Wood Fence Gate=Pintu Pagar Kayu Akasia
Jungle Wood Fence Gate=Pintu Pagar Kayu Hutan
Pine Wood Fence Gate=Pintu Pagar Kayu Pain
Aspen Wood Fence Gate=Pintu Pagar Kayu Aspen

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Спрятанная Часть Двери
Owned by @1=Владелец: @1
You do not own this locked door.=Вы не владелец этой заблокированной двери.
a locked door=заблокированная дверь
Wooden Door=Деревянная Дверь
Steel Door=Стальная Дверь
Glass Door=Стеклянная Дверь
Obsidian Glass Door=Дверь Из Обсидианового Стекла
You do not own this trapdoor.=Вы не владелец этого люка.
a locked trapdoor=заблокированный люк
Wooden Trapdoor=Деревянный Люк
Steel Trapdoor=Стальной Люк
Apple Wood Fence Gate=Яблоневая Деревянная Калитка
Acacia Wood Fence Gate=Деревянная Калитка Из Акации
Jungle Wood Fence Gate=Деревянная Калитка Из Тропического Дерева
Pine Wood Fence Gate=Сосновая Деревянная Калитка
Aspen Wood Fence Gate=Осиновая Деревянная Калитка

View File

@ -1,19 +0,0 @@
# textdomain: doors
Hidden Door Segment=Dold dörrsegment
Owned by @1=Ägd av @1
You do not own this locked door.=Du äger inte denna låsta dörr.
a locked door=en låst dörr
Wooden Door=Trä Dörr
Steel Door=Stål Dörr
Glass Door=Glas Dörr
Obsidian Glass Door=Obsidian Glas Dörr
Owned by @1=Ägd av @1
You do not own this trapdoor.=Du äger inte denna fallucka
a locked trapdoor=en låst fallucka
Wooden Trapdoor=Trä Fallucka
Steel Trapdoor=Stål Fallucka
Apple Wood Fence Gate=Äpple Trä Fallucka
Acacia Wood Fence Gate=Akacia Trä Fallucka
Jungle Wood Fence Gate=Djungel Trä Fallucka
Pine Wood Fence Gate=Tall Trä Fallucka
Aspen Wood Fence Gate=Asp Trä Fallucka

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=Skrytá časť dverí
Owned by @1=Vlastník - @1
You do not own this locked door.=Nevlastníš tieto uzamknuté dvere.
a locked door=uzamknuté dvere
Wooden Door=Drevené dvere
Steel Door=Oceľové dvere
Glass Door=Sklenené dvere
Obsidian Glass Door=Obsidiánové sklenené dvere
You do not own this trapdoor.=Nevlastníš tieto padacie dvere.
a locked trapdoor=uzamknuté padacie dvere
Wooden Trapdoor=Drevené padacie dvere
Steel Trapdoor=Oceľové padacie dvere
Apple Wood Fence Gate=Drevený plot z jablone
Acacia Wood Fence Gate=Drevený plot z akácie
Jungle Wood Fence Gate=Drevený plot z džungľového dreva
Pine Wood Fence Gate=Drevený plot z borovice
Aspen Wood Fence Gate=Drevený plot z osiky

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=隐藏门段
Owned by @1=由@1拥有
You do not own this locked door.=这个门不属于你所有。
a locked door=一扇已上锁的门
Wooden Door=木门
Steel Door=铁门
Glass Door=玻璃门
Obsidian Glass Door=黑曜石玻璃门
You do not own this trapdoor.=这个活板门不属于你所有。
a locked trapdoor=一扇已上锁的活板门
Wooden Trapdoor=木活板门
Steel Trapdoor=铁活板门
Apple Wood Fence Gate=用苹果树做的木栅栏门
Acacia Wood Fence Gate=相思木栅栏门
Jungle Wood Fence Gate=丛林木栅栏门
Pine Wood Fence Gate=松木栅栏门
Aspen Wood Fence Gate=白杨木栅栏门

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=隱藏門段
Owned by @1=由@1擁有
You do not own this locked door.=這個門不屬於你所有。
a locked door=一扇已上鎖的門
Wooden Door=木門
Steel Door=鐵門
Glass Door=玻璃門
Obsidian Glass Door=黑曜石玻璃門
You do not own this trapdoor.=這個活板門不屬於你所有。
a locked trapdoor=一扇已上鎖的活板門
Wooden Trapdoor=木活板門
Steel Trapdoor=鐵活板門
Apple Wood Fence Gate=用蘋果樹做的木柵欄門
Acacia Wood Fence Gate=相思木柵欄門
Jungle Wood Fence Gate=叢林木柵欄門
Pine Wood Fence Gate=松木柵欄門
Aspen Wood Fence Gate=白楊木柵欄門

View File

@ -1,18 +0,0 @@
# textdomain: doors
Hidden Door Segment=
Owned by @1=
You do not own this locked door.=
a locked door=
Wooden Door=
Steel Door=
Glass Door=
Obsidian Glass Door=
You do not own this trapdoor.=
a locked trapdoor=
Wooden Trapdoor=
Steel Trapdoor=
Apple Wood Fence Gate=
Acacia Wood Fence Gate=
Jungle Wood Fence Gate=
Pine Wood Fence Gate=
Aspen Wood Fence Gate=

View File

@ -1,4 +0,0 @@
name = doors
description = Minetest Game mod: doors
depends = default
optional_depends = screwdriver

View File

@ -1,50 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib door_a2.mtl
o door_a2
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.499000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.375000
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
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.842105 0.000000
vt 0.842105 1.000000
vt 0.421052 1.000000
vt 0.421052 0.000000
vt 0.000001 0.000000
vt 0.000001 1.000000
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.947368 0.000000
vt 0.947368 1.000000
vt 0.842105 1.000000
vt 0.842105 0.000000
vt 0.421052 0.000000
vt 0.421052 1.000000
vt 0.947368 0.000000
vt 0.947368 0.500000
vt 1.000000 0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 0.947368 1.000000
vn -1.0000 -0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None.009
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 2/17/5 7/18/5 5/19/5 3/20/5
f 8/21/6 1/22/6 4/23/6 6/24/6

View File

@ -1,50 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib door_b.mtl
o door_b
v 0.499000 1.499000 -0.499000
v 0.499000 1.499000 -0.375000
v 0.499000 -0.499000 -0.375000
v 0.499000 -0.499000 -0.499000
v -0.499000 1.499000 -0.375000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.499000
vt 0.894736 1.000000
vt 0.947368 1.000000
vt 0.947368 0.000000
vt 0.894736 0.000000
vt 0.842105 1.000000
vt 0.421053 1.000000
vt 0.421053 0.000000
vt 0.842105 0.000000
vt 0.842105 1.000000
vt 0.894736 1.000000
vt 0.894736 0.000000
vt 0.842105 0.000000
vt 0.421053 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.421053 0.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 0.947368 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.947368 0.000000
vt 0.947368 0.500000
vt 1.000000 0.500000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None.007
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/5/2 5/6/2 6/7/2 3/8/2
f 5/9/3 7/10/3 8/11/3 6/12/3
f 7/13/4 1/14/4 4/15/4 8/16/4
f 4/17/5 3/18/5 6/19/5 8/20/5
f 7/21/6 5/22/6 2/23/6 1/24/6

View File

@ -1,50 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib door_b2.mtl
o door_b2
v 0.499000 1.499000 -0.499000
v 0.499000 1.499000 -0.375000
v 0.499000 -0.499000 -0.375000
v 0.499000 -0.499000 -0.499000
v -0.499000 1.499000 -0.375000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.499000
vt 0.842105 1.000000
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.842105 0.000000
vt 0.421052 1.000000
vt 0.000001 1.000000
vt 0.000001 0.000000
vt 0.421052 0.000000
vt 0.894737 1.000000
vt 0.947368 1.000000
vt 0.947368 0.000000
vt 0.894737 0.000000
vt 0.842105 1.000000
vt 0.421052 1.000000
vt 0.421052 0.000000
vt 0.842105 0.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 0.947368 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.947368 0.000000
vt 0.947368 0.500000
vt 1.000000 0.500000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None.010
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/5/2 5/6/2 6/7/2 3/8/2
f 5/9/3 7/10/3 8/11/3 6/12/3
f 7/13/4 1/14/4 4/15/4 8/16/4
f 4/17/5 3/18/5 6/19/5 8/20/5
f 7/21/6 5/22/6 2/23/6 1/24/6

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

Some files were not shown because too many files have changed in this diff Show More