fix mergeconflicts
This commit is contained in:
commit
960a9de9d8
188 changed files with 5137 additions and 1518 deletions
|
@ -1,62 +1,62 @@
|
|||
Minetest Game mod: doors
|
||||
========================
|
||||
version: 2.0
|
||||
See license.txt for license information.
|
||||
|
||||
License of source code:
|
||||
-----------------------
|
||||
Copyright (C) 2012 PilzAdam
|
||||
modified by BlockMen (added sounds, glassdoors[glass, obsidian glass], trapdoor)
|
||||
Steel trapdoor added by sofar.
|
||||
Copyright (C) 2016 sofar@foo-projects.org
|
||||
Re-implemented most of the door algorithms, added meshes, UV wrapped texture
|
||||
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
|
||||
Added Fence Gate model, code, and sounds.
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
Various Minetest developers and contributors (MIT)
|
||||
|
||||
License of textures
|
||||
--------------------------------------
|
||||
following Textures created by Fernando Zapata (CC BY-SA 3.0):
|
||||
|
||||
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 (WTFPL):
|
||||
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):
|
||||
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):
|
||||
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)
|
||||
Following textures created by sofar (CC-BY-SA-3.0):
|
||||
doors_trapdoor_steel.png
|
||||
doors_trapdoor_steel_side.png
|
||||
door_trapdoor_side.png
|
||||
|
||||
|
||||
Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen: WTFPL
|
||||
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 red-001 based on textures by celeron55: CC BY-SA 3.0
|
||||
Glass door textures by red-001 based on textures by celeron55 (CC BY-SA 3.0):
|
||||
door_glass.png
|
||||
All other textures (created by PilzAdam): WTFPL
|
||||
|
||||
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.
|
||||
|
||||
Models:
|
||||
--------------------------------------
|
||||
|
||||
Authors of media (models)
|
||||
-------------------------
|
||||
Door 3d models by sofar (CC-BY-SA-3.0)
|
||||
- door_a.obj
|
||||
- door_b.obj
|
||||
|
@ -64,17 +64,18 @@ Fence gate models by sofar (CC-BY-SA-3.0)
|
|||
- fencegate_open.obj
|
||||
- fencegate_closed.obj
|
||||
|
||||
License of sounds
|
||||
--------------------------------------
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
--[[
|
||||
|
||||
Copyright (C) 2012 PilzAdam
|
||||
modified by BlockMen (added sounds, glassdoors[glass, obsidian glass], trapdoor)
|
||||
Copyright (C) 2015 - Auke Kok <sofar@foo-projects.org>
|
||||
|
||||
--]]
|
||||
|
||||
-- our API object
|
||||
doors = {}
|
||||
|
||||
|
@ -148,8 +140,17 @@ function _doors.door_toggle(pos, node, clicker)
|
|||
end
|
||||
|
||||
if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then
|
||||
-- is player wielding the right key?
|
||||
local item = clicker:get_wielded_item()
|
||||
local owner = meta:get_string("doors_owner")
|
||||
if owner ~= "" then
|
||||
if item:get_name() == "default:key" then
|
||||
local key_meta = minetest.parse_json(item:get_metadata())
|
||||
local secret = meta:get_string("key_lock_secret")
|
||||
if secret ~= key_meta.secret then
|
||||
return false
|
||||
end
|
||||
|
||||
elseif owner ~= "" then
|
||||
if clicker:get_player_name() ~= owner then
|
||||
return false
|
||||
end
|
||||
|
@ -372,13 +373,37 @@ function doors.register(name, def)
|
|||
end
|
||||
def.after_dig_node = function(pos, node, meta, digger)
|
||||
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
|
||||
nodeupdate({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 = screwdriver and screwdriver.rotate_simple or false
|
||||
def.on_rotate = false
|
||||
|
||||
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)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("doors_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, "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, "a locked door", owner
|
||||
end
|
||||
else
|
||||
def.on_blast = function(pos, intensity)
|
||||
minetest.remove_node(pos)
|
||||
|
@ -430,7 +455,7 @@ doors.register("door_steel", {
|
|||
inventory_image = "doors_item_steel.png",
|
||||
protected = true,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
sound_open = "doors_steel_door_open",
|
||||
sound_close = "doors_steel_door_close",
|
||||
recipe = {
|
||||
|
@ -499,9 +524,18 @@ end
|
|||
function _doors.trapdoor_toggle(pos, node, clicker)
|
||||
node = node or minetest.get_node(pos)
|
||||
if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then
|
||||
-- is player wielding the right key?
|
||||
local item = clicker:get_wielded_item()
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("doors_owner")
|
||||
if owner ~= "" then
|
||||
if item:get_name() == "default:key" then
|
||||
local key_meta = minetest.parse_json(item:get_metadata())
|
||||
local secret = meta:get_string("key_lock_secret")
|
||||
if secret ~= key_meta.secret then
|
||||
return false
|
||||
end
|
||||
|
||||
elseif owner ~= "" then
|
||||
if clicker:get_player_name() ~= owner then
|
||||
return false
|
||||
end
|
||||
|
@ -527,7 +561,7 @@ function doors.register_trapdoor(name, def)
|
|||
if not name:find(":") then
|
||||
name = "doors:" .. name
|
||||
end
|
||||
|
||||
|
||||
local name_closed = name
|
||||
local name_opened = name.."_open"
|
||||
|
||||
|
@ -554,6 +588,30 @@ function doors.register_trapdoor(name, def)
|
|||
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)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("doors_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, "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, "a locked trapdoor", owner
|
||||
end
|
||||
else
|
||||
def.on_blast = function(pos, intensity)
|
||||
minetest.remove_node(pos)
|
||||
|
@ -629,7 +687,7 @@ doors.register_trapdoor("doors:trapdoor_steel", {
|
|||
tile_front = "doors_trapdoor_steel.png",
|
||||
tile_side = "doors_trapdoor_steel_side.png",
|
||||
protected = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
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},
|
||||
|
@ -704,7 +762,7 @@ function doors.register_fencegate(name, def)
|
|||
fence_open.collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {{-1/2, -1/2, -1/4, -3/8, 1/2, 1/4},
|
||||
{-5/8, -3/8, -1/2, -3/8, 3/8, 0}},
|
||||
{-1/2, -3/8, -1/2, -3/8, 3/8, 0}},
|
||||
}
|
||||
|
||||
minetest.register_node(":" .. name .. "_closed", fence_closed)
|
||||
|
@ -753,3 +811,48 @@ doors.register_fencegate("doors:gate_aspen_wood", {
|
|||
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,
|
||||
})
|
||||
|
|
164
mods/doors/license.txt
Normal file
164
mods/doors/license.txt
Normal file
|
@ -0,0 +1,164 @@
|
|||
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/
|
Loading…
Add table
Add a link
Reference in a new issue