forked from thunderdog1138/star_wars
f600a9f645
This patch replaces the default door nodes with a new mesh model and nodes. Two new models were added that are 2 blocks high. One for left-hinge and one for right-hinge doors. This allows us to make a single texture fit on both models. The alternative would have been 1 model and 2 unmapped textures, which is more work for mod developers. Doors work exactly like the old doors, including ownership, breaking doors, opening and closing. Under the hood, we can prevent the top part of the door from being obstructed by placing an invisible node. This prevents liquids from flowing through doors or people placing sand or other blocks in the top half. The door code automatically places and removes these as needed. Metadata is used to store door state, just like the old version. A doors API is added, it allows mods to use the API to open/close or toggle door states without worrying about sounds, permissions and other details. This is intended for e.g. mesecons. This API allows mods to manipulate or inspect doors for players or for themselves. In-game old door nodes are automatically converted using an ABM and preserve ownership and orientation and state. TNT blows up all doors and trapdoors except for the steel ones, who can survive a blast. We return an itemstack in on_blast(), which requires a TNT API patch which is also pending. We enable backface culling for most of these doors, as this gives the identical visual appearance that the old doors had. In the case of the glass door, there's a slight twist. The texture files used by the new doors have new names that do not conflict with previous texture file names to avoid texture pack conflicts. Thanks to red-001 <red-001@users.noreply.github.com> for some of the conversion code, cleanups, and extra textures. |
||
---|---|---|
.. | ||
models | ||
sounds | ||
textures | ||
README.txt | ||
depends.txt | ||
init.lua |
README.txt
Minetest Game mod: doors ======================== version: 2.0 License of source code: ----------------------- Copyright (C) 2012 PilzAdam modified by BlockMen (added sounds, glassdoors[glass, obsidian glass], trapdoor) Steel trapdoor added by sofar. Copyright (C) 2015 sofar@foo-projects.org Re-implemented most of the door algorithms, added meshes, UV wrapped texture Added doors API to facilitate coding mods accessing and operating doors. This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it 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. License of 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): 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 doors_trapdoor_steel_side.png door_trapdoor_side.png Door 3d models by sofar (CC-BY-SA-3.0) door_a.obj door_b.obj Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen: WTFPL door_obsidian_glass.png Glass door textures by red-001 based on textures by celeron55: CC BY-SA 3.0 door_glass.png All other textures (created by PilzAdam): WTFPL Door textures were converted to the new texture map by sofar, paramat and red-001, under the same license as the originals. License of sounds -------------------------------------- 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