Compare commits
22 Commits
2019-06-07
...
0.4.16
Author | SHA1 | Date | |
---|---|---|---|
75eb750e0a | |||
e08e262377 | |||
b22a11f617 | |||
9427967784 | |||
8658cc27fc | |||
752cb473a0 | |||
9e0d558d54 | |||
3ea86f5c3f | |||
d05d03d5d9 | |||
55e2b03a50 | |||
78fcbd04db | |||
b50b7423b8 | |||
c741642057 | |||
5c52111bec | |||
503c05a09e | |||
ab94f9dc6a | |||
4d6f0c07c2 | |||
5fb16c4e33 | |||
b37e6ade7a | |||
c79f14bd89 | |||
e2a04b52b9 | |||
5dde3896f3 |
@ -4,9 +4,7 @@ allow_defined_top = true
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"unpack",
|
||||
"dump",
|
||||
table = { fields = { "copy", "getn" } },
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
@ -19,7 +17,6 @@ read_globals = {
|
||||
"mesecon",
|
||||
"unifieddyes",
|
||||
"creative",
|
||||
"homedecor_i18n",
|
||||
}
|
||||
|
||||
globals = {
|
||||
|
450
LICENSE
@ -1,15 +1,17 @@
|
||||
License for code: LGPL 3.0
|
||||
License for media and all other assets: CC-by-SA 4.0
|
||||
For the Lua code: LGPL 3.0 or higher
|
||||
For all models, all textures, and all sounds: CC-by-SA 3.0 or higher
|
||||
For everything else: WTFPL
|
||||
|
||||
These licenses apply to all modules and components in this modpack,
|
||||
unless otherwise stated.
|
||||
Exceptions to the above:
|
||||
|
||||
###############################################################################
|
||||
Fancy mesh fire model and texture by NathanS (CC-0).
|
||||
|
||||
===============================================================================
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@ -172,432 +174,26 @@ apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
###############################################################################
|
||||
===============================================================================
|
||||
|
||||
Attribution-ShareAlike 4.0 International
|
||||
This work is licensed under the Creative Commons Attribution-ShareAlike
|
||||
4.0 International License. To view a copy of this license, visit
|
||||
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
|
||||
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
||||
|
||||
=======================================================================
|
||||
===============================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
|
||||
including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
@ -1,61 +0,0 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
minetest.register_alias("building_blocks:stair_tar", "stairs:stair_Tar")
|
||||
minetest.register_alias("building_blocks:slab_marble", "stairs:slab_Marble")
|
||||
minetest.register_alias("building_blocks:stair_marble", "stairs:stair_Marble")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar")
|
||||
|
||||
if minetest.get_modpath("gloopblocks") then
|
||||
minetest.register_alias("building_blocks:gravel_spread", "gloopblocks:slab_gravel_1")
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
@ -1,5 +1,3 @@
|
||||
default
|
||||
homedecor_common
|
||||
homedecor_i18n
|
||||
moreblocks?
|
||||
gloopblocks?
|
||||
stairs?
|
||||
|
@ -1,7 +1,633 @@
|
||||
local S = homedecor.gettext
|
||||
local modpath = minetest.get_modpath("building_blocks")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_node("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = S("Adobe"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Roof block"),
|
||||
groups = {snappy=3},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:terrycloth_towel 2',
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Tarmac_spread 4',
|
||||
recipe = {
|
||||
{"group:tar_block", "group:tar_block"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:gravel_spread 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:gravel", "default:gravel"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:brobble_spread 4',
|
||||
recipe = {
|
||||
{"default:brick", "default:cobble", "default:brick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Fireplace 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Adobe 3',
|
||||
recipe = {
|
||||
{"default:sand"},
|
||||
{"default:clay"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Roofing 10',
|
||||
recipe = {
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:BWtile 10',
|
||||
recipe = {
|
||||
{"group:marble", "group:tar_block"},
|
||||
{"group:tar_block", "group:marble"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:grate 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:glass", "default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:woodglass 1',
|
||||
recipe = {
|
||||
{"default:wood"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:wood", "default:junglewood"},
|
||||
{"default:junglewood", "default:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:junglewood", "default:wood"},
|
||||
{"default:wood", "default:junglewood"},
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks 2',
|
||||
recipe = {
|
||||
{'group:stick', '' , 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'building_blocks:sticks'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:fakegrass 2',
|
||||
recipe = {
|
||||
{'default:leaves'},
|
||||
{"default:dirt"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:smoothglass",
|
||||
recipe = "default:glass"
|
||||
})
|
||||
minetest.register_node("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Streak Free Glass"),
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_sglass.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_grate.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = S("Fireplace"),
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron_fireplace.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Wood Framed Glass"),
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_wglass.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = S("Terrycloth towel"),
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Tarmac Spread"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "raillike",
|
||||
description = S("Chess board tiling"),
|
||||
tiles = {"building_blocks_BWtile.png"},
|
||||
inventory_image = "building_blocks_bwtile_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
-- Translators: "Brobble" is a portmanteau of "Brick" and "Cobble".
|
||||
-- Translate however you see fit.
|
||||
description = S("Brobble Spread"),
|
||||
tiles = {"building_blocks_brobble.png"},
|
||||
inventory_image = "building_blocks_brobble_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Gravel Spread"),
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_gravel_footstep", gain=0.5},
|
||||
dug = {name="default_gravel_footstep", gain=1.0},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Hardwood"),
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"marble",
|
||||
"building_blocks:Marble",
|
||||
{
|
||||
description = "Marble",
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"hardwood",
|
||||
"building_blocks:hardwood",
|
||||
{
|
||||
description = "Hardwood",
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"fakegrass",
|
||||
"building_blocks:fakegrass",
|
||||
{
|
||||
description = "Grass",
|
||||
tiles = {"default_grass.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"tar",
|
||||
"building_blocks:Tar",
|
||||
{
|
||||
description = "Tar",
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
groups = {crumbly=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"grate",
|
||||
"building_blocks:grate",
|
||||
{
|
||||
description = "Grate",
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"Adobe",
|
||||
"building_blocks:Adobe",
|
||||
{
|
||||
description = "Adobe",
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"Roofing",
|
||||
"building_blocks:Roofing",
|
||||
{
|
||||
description = "Roofing",
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
else
|
||||
bb_stairs = {}
|
||||
|
||||
-- Node will be called stairs:stair_<subname>
|
||||
function bb_stairs.register_stair(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("building_blocks:stair_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
-- Flipped recipe for the silly minecrafters
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{"", "", recipeitem},
|
||||
{"", recipeitem, recipeitem},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Node will be called stairs:slab_<subname>
|
||||
function bb_stairs.register_slab(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("building_blocks:slab_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:slab_' .. subname .. ' 3',
|
||||
recipe = {
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Nodes will be called stairs:{stair,slab}_<subname>
|
||||
function bb_stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
||||
bb_stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
||||
bb_stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
||||
end
|
||||
bb_stairs.register_stair_and_slab("marble","building_blocks:Marble",
|
||||
{cracky=3},
|
||||
{"building_blocks_marble.png"},
|
||||
S("Marble stair"),
|
||||
S("Marble slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("hardwood","building_blocks:hardwood",
|
||||
{choppy=1,flammable=1},
|
||||
{"building_blocks_hardwood.png"},
|
||||
S("Hardwood stair"),
|
||||
S("Hardwood slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("fakegrass","building_blocks:fakegrass",
|
||||
{crumbly=3},
|
||||
{"default_grass.png"},
|
||||
S("Grass stair"),
|
||||
S("Grass slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("tar","building_blocks:Tar",
|
||||
{crumbly=1},
|
||||
{"building_blocks_tar.png"},
|
||||
S("Tar stair"),
|
||||
S("Tar slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("grate","building_blocks:grate",
|
||||
{cracky=1},
|
||||
{"building_blocks_grate.png"},
|
||||
S("Grate Stair"),
|
||||
S("Grate Slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Adobe", "building_blocks:Adobe",
|
||||
{crumbly=3},
|
||||
{"building_blocks_Adobe.png"},
|
||||
S("Adobe stair"),
|
||||
S("Adobe slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Roofing", "building_blocks:Roofing",
|
||||
{snappy=3},
|
||||
{"building_blocks_Roofing.png"},
|
||||
S("Roofing stair"),
|
||||
S("Roofing slab")
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:hardwood",
|
||||
burntime = 28,
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = S("Fake Grass"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
image = "building_blocks_sticks.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:tar_base", {
|
||||
description = S("Tar base"),
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
--Tar
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:knife 1',
|
||||
recipe = {
|
||||
{"group:tar_block"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
|
||||
minetest.register_node("building_blocks:Tar", {
|
||||
description = S("Tar"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, tar_block = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Marble", {
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:sticks",
|
||||
burntime = 5,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:Tar",
|
||||
burntime = 40,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:Tar",
|
||||
recipe = "building_blocks:tar_base",
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = S("Tar Knife"),
|
||||
inventory_image = "building_blocks_knife.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses=100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "building_blocks:Marble 9",
|
||||
recipe = {
|
||||
{"default:clay", "group:tar_block", "default:clay"},
|
||||
{"group:tar_block","default:clay", "group:tar_block"},
|
||||
{"default:clay", "group:tar_block","default:clay"},
|
||||
}
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -1,230 +0,0 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
local stairs_groups_names = {"cracky","choppy","flammable","crumbly","snappy"}
|
||||
|
||||
local function building_blocks_stairs(nodename, def)
|
||||
minetest.register_node(nodename, def)
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
local mod, name = nodename:match("(.*):(.*)")
|
||||
minetest.register_alias(mod .. ":slab_" .. name, "stairs:slab_" .. name)
|
||||
minetest.register_alias(mod .. ":stair_" .. name, "stairs:stair_" .. name)
|
||||
local stairs_groups = {}
|
||||
for _, groupname in ipairs(stairs_groups_names) do
|
||||
stairs_groups[groupname] = def.groups[groupname]
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all(
|
||||
mod,
|
||||
name,
|
||||
nodename,
|
||||
{
|
||||
description = def.description,
|
||||
tiles = def.tiles,
|
||||
groups = stairs_groups,
|
||||
sounds = def.sounds,
|
||||
}
|
||||
)
|
||||
else
|
||||
stairs.register_stair_and_slab(name,nodename,
|
||||
stairs_groups,
|
||||
def.tiles,
|
||||
("%s Stair"):format(def.description),
|
||||
("%s Slab"):format(def.description),
|
||||
def.sounds
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
building_blocks_stairs("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Streak Free Glass"),
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Wood Framed Glass"),
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
building_blocks_stairs("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = S("Adobe"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = S("Fake Grass"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Hardwood"),
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Roof block"),
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Tar", {
|
||||
description = S("Tar"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, tar_block = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Marble", {
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
-- Translators: "Brobble" is a portmanteau of "Brick" and "Cobble".
|
||||
-- Translate however you see fit.
|
||||
description = S("Brobble Spread"),
|
||||
tiles = {"building_blocks_brobble.png"},
|
||||
inventory_image = "building_blocks_brobble_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Gravel Spread"),
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_gravel_footstep", gain=0.5},
|
||||
dug = {name="default_gravel_footstep", gain=1.0},
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Tarmac Spread"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = S("Terrycloth towel"),
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Chess board tiling"),
|
||||
tiles = {
|
||||
"building_blocks_BWtile.png",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png",
|
||||
"building_blocks_BWtile.png"
|
||||
},
|
||||
inventory_image = "building_blocks_bwtile_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = S("Fireplace"),
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron_fireplace.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
@ -1,23 +0,0 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
image = "building_blocks_sticks.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
minetest.register_craftitem("building_blocks:tar_base", {
|
||||
description = S("Tar base"),
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = S("Tar Knife"),
|
||||
inventory_image = "building_blocks_knife.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses=100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
@ -1,174 +0,0 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks 2',
|
||||
recipe = {
|
||||
{'group:stick', '' , 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Adobe 3',
|
||||
recipe = {
|
||||
{"default:sand"},
|
||||
{"default:clay"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:brobble_spread 4',
|
||||
recipe = {
|
||||
{"default:brick", "default:cobble", "default:brick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:BWtile 10',
|
||||
recipe = {
|
||||
{"group:marble", "group:tar_block"},
|
||||
{"group:tar_block", "group:marble"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:fakegrass 2',
|
||||
recipe = {
|
||||
{'default:leaves'},
|
||||
{"default:dirt"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Fireplace 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:grate 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:glass", "default:glass"},
|
||||
}
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:gravel_spread 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:gravel", "default:gravel"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:wood", "default:junglewood"},
|
||||
{"default:junglewood", "default:wood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:junglewood", "default:wood"},
|
||||
{"default:wood", "default:junglewood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:knife 1',
|
||||
recipe = {
|
||||
{"group:tar_block"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "building_blocks:Marble 9",
|
||||
recipe = {
|
||||
{"default:clay", "group:tar_block", "default:clay"},
|
||||
{"group:tar_block","default:clay", "group:tar_block"},
|
||||
{"default:clay", "group:tar_block","default:clay"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Roofing 10',
|
||||
recipe = {
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'building_blocks:sticks'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Tarmac_spread 4',
|
||||
recipe = {
|
||||
{"group:tar_block", "group:tar_block"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:terrycloth_towel 2',
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:woodglass 1',
|
||||
recipe = {
|
||||
{"default:wood"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:smoothglass",
|
||||
recipe = "default:glass"
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:Tar",
|
||||
recipe = "building_blocks:tar_base",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:hardwood",
|
||||
burntime = 28,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:sticks",
|
||||
burntime = 5,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:Tar",
|
||||
burntime = 40,
|
||||
})
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 499 B |
2
chains/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
homedecor
|
179
chains/init.lua
Normal file
@ -0,0 +1,179 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local chains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
|
||||
}
|
||||
|
||||
local topchains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
|
||||
{ -0.1, -0.625, -0.1, 0.1, 0.4, 0.1 }
|
||||
}
|
||||
}
|
||||
|
||||
minetest.register_node("chains:chain", {
|
||||
description = S("Hanging chain (wrought iron)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "chains.obj",
|
||||
tiles = {"chains_wrought_iron.png"},
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
inventory_image = "chain_wrought_iron_inv.png",
|
||||
groups = {cracky=3},
|
||||
selection_box = chains_sbox,
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_brass", {
|
||||
description = S("Hanging chain (brass)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "chains.obj",
|
||||
tiles = {"chains_brass.png"},
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
inventory_image = "chain_brass_inv.png",
|
||||
groups = {cracky=3},
|
||||
selection_box = chains_sbox,
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_top", {
|
||||
description = S("Hanging chain (ceiling mount, wrought iron)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "top_chains.obj",
|
||||
tiles = {"chains_wrought_iron.png"},
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
inventory_image = "top_chain_wrought_iron_inv.png",
|
||||
groups = {cracky=3},
|
||||
selection_box = topchains_sbox,
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_top_brass", {
|
||||
description = S("Hanging chain (ceiling mount, brass)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "top_chains.obj",
|
||||
tiles = {"chains_brass.png"},
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
inventory_image = "top_chain_brass_inv.png",
|
||||
groups = {cracky=3},
|
||||
selection_box = topchains_sbox,
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chandelier", {
|
||||
description = S("Chandelier (wrought iron)"),
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
tiles = {
|
||||
"chains_wrought_iron.png",
|
||||
"chains_candle.png",
|
||||
{
|
||||
name="chains_candle_flame.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=3.0
|
||||
}
|
||||
}
|
||||
},
|
||||
drawtype = "mesh",
|
||||
mesh = "chains_chandelier.obj",
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chandelier_brass", {
|
||||
description = S("Chandelier (brass)"),
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
tiles = {
|
||||
"chains_brass.png",
|
||||
"chains_candle.png",
|
||||
{
|
||||
name="chains_candle_flame.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=3.0
|
||||
}
|
||||
}
|
||||
},
|
||||
drawtype = "mesh",
|
||||
mesh = "chains_chandelier.obj",
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
-- crafts
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'chains:chain 2',
|
||||
recipe = {
|
||||
{'glooptest:chainlink'},
|
||||
{'glooptest:chainlink'},
|
||||
{'glooptest:chainlink'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'chains:chain_top',
|
||||
recipe = {
|
||||
{'default:steel_ingot'},
|
||||
{'glooptest:chainlink'},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'chains:chandelier',
|
||||
recipe = {
|
||||
{'', 'glooptest:chainlink', ''},
|
||||
{'default:torch', 'glooptest:chainlink', 'default:torch'},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
-- brass versions
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'chains:chain_brass 2',
|
||||
recipe = {
|
||||
{'homedecor:chainlink_brass'},
|
||||
{'homedecor:chainlink_brass'},
|
||||
{'homedecor:chainlink_brass'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'chains:chain_top_brass',
|
||||
recipe = {
|
||||
{'technic:brass_ingot'},
|
||||
{'homedecor:chainlink_brass'},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'chains:chandelier_brass',
|
||||
recipe = {
|
||||
{'', 'homedecor:chainlink_brass', ''},
|
||||
{'default:torch', 'homedecor:chainlink_brass', 'default:torch'},
|
||||
{'technic:brass_ingot', 'technic:brass_ingot', 'technic:brass_ingot'},
|
||||
}
|
||||
})
|
881
chains/models/chains.obj
Normal file
@ -0,0 +1,881 @@
|
||||
# Blender v2.73 (sub 0) OBJ File: 'chains.blend'
|
||||
# www.blender.org
|
||||
o Torus.016_Torus
|
||||
v 0.000000 -0.429978 0.000002
|
||||
v 0.000000 -0.401109 0.055211
|
||||
v -0.014044 -0.391975 0.048870
|
||||
v -0.014044 -0.423304 0.000002
|
||||
v -0.009826 -0.379748 0.040970
|
||||
v -0.009826 -0.406012 0.000002
|
||||
v 0.009826 -0.379748 0.040970
|
||||
v 0.009826 -0.406012 0.000002
|
||||
v 0.014044 -0.391975 0.048870
|
||||
v 0.014044 -0.423304 0.000002
|
||||
v 0.000000 -0.316336 0.080195
|
||||
v -0.014044 -0.316336 0.069112
|
||||
v -0.009826 -0.316336 0.057941
|
||||
v 0.009826 -0.316336 0.057941
|
||||
v 0.014044 -0.316336 0.069112
|
||||
v 0.000000 -0.231564 0.055211
|
||||
v -0.014044 -0.240700 0.048870
|
||||
v -0.009826 -0.252925 0.040970
|
||||
v 0.009826 -0.252925 0.040970
|
||||
v 0.014044 -0.240700 0.048870
|
||||
v 0.000000 -0.202695 0.000002
|
||||
v -0.014044 -0.209368 0.000002
|
||||
v -0.009826 -0.226661 0.000002
|
||||
v 0.009826 -0.226661 0.000002
|
||||
v 0.014044 -0.209368 0.000002
|
||||
v 0.000000 -0.231564 -0.055206
|
||||
v -0.014044 -0.240700 -0.048868
|
||||
v -0.009826 -0.252925 -0.040967
|
||||
v 0.009826 -0.252925 -0.040967
|
||||
v 0.014044 -0.240700 -0.048865
|
||||
v 0.000000 -0.316336 -0.080190
|
||||
v -0.014044 -0.316336 -0.069108
|
||||
v -0.009826 -0.316336 -0.057936
|
||||
v 0.009826 -0.316336 -0.057936
|
||||
v 0.014044 -0.316336 -0.069108
|
||||
v 0.000000 -0.400361 -0.055206
|
||||
v -0.014044 -0.391975 -0.048868
|
||||
v -0.009826 -0.379748 -0.040967
|
||||
v 0.009826 -0.379748 -0.040967
|
||||
v 0.014044 -0.391975 -0.048868
|
||||
v 0.000000 -0.262249 0.000002
|
||||
v -0.061672 -0.233381 0.000002
|
||||
v -0.054590 -0.224245 -0.012569
|
||||
v 0.000000 -0.255577 -0.012569
|
||||
v -0.045765 -0.212018 -0.008794
|
||||
v 0.000000 -0.238285 -0.008794
|
||||
v -0.045765 -0.212018 0.008798
|
||||
v 0.000000 -0.238285 0.008798
|
||||
v -0.054590 -0.224245 0.012574
|
||||
v 0.000000 -0.255577 0.012574
|
||||
v -0.089582 -0.148609 0.000002
|
||||
v -0.077200 -0.148609 -0.012569
|
||||
v -0.064722 -0.148609 -0.008794
|
||||
v -0.064722 -0.148609 0.008799
|
||||
v -0.077200 -0.148609 0.012574
|
||||
v -0.061672 -0.063837 0.000002
|
||||
v -0.054590 -0.072971 -0.012569
|
||||
v -0.045765 -0.085198 -0.008794
|
||||
v -0.045765 -0.085198 0.008799
|
||||
v -0.054590 -0.072971 0.012574
|
||||
v 0.000000 -0.034967 0.000002
|
||||
v 0.000000 -0.041641 -0.012569
|
||||
v 0.000000 -0.058933 -0.008794
|
||||
v 0.000000 -0.058933 0.008799
|
||||
v 0.000000 -0.041641 0.012574
|
||||
v 0.061672 -0.063837 0.000002
|
||||
v 0.054590 -0.072971 -0.012569
|
||||
v 0.045765 -0.085198 -0.008794
|
||||
v 0.045765 -0.085198 0.008799
|
||||
v 0.054590 -0.072971 0.012574
|
||||
v 0.089582 -0.148609 0.000002
|
||||
v 0.077200 -0.148609 -0.012569
|
||||
v 0.064722 -0.148609 -0.008794
|
||||
v 0.064722 -0.148609 0.008799
|
||||
v 0.077200 -0.148609 0.012574
|
||||
v 0.061672 -0.232631 0.000002
|
||||
v 0.054590 -0.224245 -0.012569
|
||||
v 0.045765 -0.212018 -0.008794
|
||||
v 0.045765 -0.212018 0.008798
|
||||
v 0.054590 -0.224245 0.012574
|
||||
v 0.000000 0.073316 0.000002
|
||||
v 0.061672 0.102183 0.000002
|
||||
v 0.054590 0.111319 0.012574
|
||||
v 0.000000 0.079988 0.012574
|
||||
v 0.045765 0.123546 0.008799
|
||||
v 0.000000 0.097280 0.008799
|
||||
v 0.045765 0.123546 -0.008794
|
||||
v 0.000000 0.097280 -0.008794
|
||||
v 0.054590 0.111319 -0.012569
|
||||
v 0.000000 0.079988 -0.012569
|
||||
v 0.089582 0.186956 0.000002
|
||||
v 0.077200 0.186956 0.012574
|
||||
v 0.064722 0.186956 0.008799
|
||||
v 0.064722 0.186956 -0.008794
|
||||
v 0.077200 0.186956 -0.012569
|
||||
v 0.061672 0.271728 0.000002
|
||||
v 0.054590 0.262594 0.012574
|
||||
v 0.045765 0.250367 0.008799
|
||||
v 0.045765 0.250367 -0.008794
|
||||
v 0.054590 0.262594 -0.012569
|
||||
v 0.000000 0.300597 0.000002
|
||||
v 0.000000 0.293923 0.012574
|
||||
v 0.000000 0.276631 0.008799
|
||||
v 0.000000 0.276631 -0.008794
|
||||
v 0.000000 0.293923 -0.012569
|
||||
v -0.061672 0.271728 0.000002
|
||||
v -0.054590 0.262594 0.012574
|
||||
v -0.045765 0.250367 0.008799
|
||||
v -0.045765 0.250367 -0.008794
|
||||
v -0.054590 0.262594 -0.012569
|
||||
v -0.089582 0.186956 0.000002
|
||||
v -0.077200 0.186956 0.012574
|
||||
v -0.064722 0.186956 0.008799
|
||||
v -0.064722 0.186956 -0.008794
|
||||
v -0.077200 0.186956 -0.012569
|
||||
v -0.061672 0.102931 0.000002
|
||||
v -0.054590 0.111319 0.012574
|
||||
v -0.045765 0.123546 0.008799
|
||||
v -0.045765 0.123546 -0.008794
|
||||
v -0.054590 0.111319 -0.012569
|
||||
v 0.000000 -0.095037 0.000002
|
||||
v 0.000000 -0.066168 -0.055206
|
||||
v 0.014044 -0.057034 -0.048868
|
||||
v 0.014044 -0.088363 0.000002
|
||||
v 0.009826 -0.044807 -0.040967
|
||||
v 0.009826 -0.071071 0.000002
|
||||
v -0.009826 -0.044807 -0.040967
|
||||
v -0.009826 -0.071071 0.000002
|
||||
v -0.014044 -0.057034 -0.048868
|
||||
v -0.014044 -0.088363 0.000002
|
||||
v 0.000000 0.018605 -0.080190
|
||||
v 0.014044 0.018605 -0.069108
|
||||
v 0.009826 0.018605 -0.057936
|
||||
v -0.009826 0.018605 -0.057936
|
||||
v -0.014044 0.018605 -0.069108
|
||||
v 0.000000 0.103377 -0.055206
|
||||
v 0.014044 0.094243 -0.048868
|
||||
v 0.009826 0.082016 -0.040967
|
||||
v -0.009826 0.082016 -0.040967
|
||||
v -0.014044 0.094243 -0.048868
|
||||
v 0.000000 0.132246 0.000002
|
||||
v 0.014044 0.125572 0.000002
|
||||
v 0.009826 0.108280 0.000002
|
||||
v -0.009826 0.108280 0.000002
|
||||
v -0.014044 0.125572 0.000002
|
||||
v 0.000000 0.103377 0.055211
|
||||
v 0.014044 0.094243 0.048870
|
||||
v 0.009826 0.082016 0.040970
|
||||
v -0.009826 0.082016 0.040970
|
||||
v -0.014044 0.094243 0.048870
|
||||
v 0.000000 0.018605 0.080195
|
||||
v 0.014044 0.018605 0.069112
|
||||
v 0.009826 0.018605 0.057941
|
||||
v -0.009826 0.018605 0.057941
|
||||
v -0.014044 0.018605 0.069112
|
||||
v 0.000000 -0.065420 0.055211
|
||||
v 0.014044 -0.057032 0.048870
|
||||
v 0.009826 -0.044807 0.040970
|
||||
v -0.009826 -0.044807 0.040970
|
||||
v -0.014044 -0.057032 0.048870
|
||||
v 0.000000 -0.598329 0.000002
|
||||
v 0.061672 -0.569460 0.000002
|
||||
v 0.054590 -0.560326 0.012574
|
||||
v 0.000000 -0.591655 0.012574
|
||||
v 0.045765 -0.548099 0.008798
|
||||
v 0.000000 -0.574363 0.008798
|
||||
v 0.045765 -0.548099 -0.008794
|
||||
v 0.000000 -0.574363 -0.008794
|
||||
v 0.054590 -0.560326 -0.012569
|
||||
v 0.000000 -0.591655 -0.012569
|
||||
v 0.089582 -0.484687 0.000002
|
||||
v 0.077200 -0.484687 0.012574
|
||||
v 0.064722 -0.484687 0.008798
|
||||
v 0.064722 -0.484687 -0.008794
|
||||
v 0.077200 -0.484687 -0.012569
|
||||
v 0.061672 -0.399915 0.000002
|
||||
v 0.054590 -0.409051 0.012574
|
||||
v 0.045765 -0.421278 0.008798
|
||||
v 0.045765 -0.421278 -0.008794
|
||||
v 0.054590 -0.409051 -0.012569
|
||||
v 0.000000 -0.371048 0.000002
|
||||
v 0.000000 -0.377719 0.012574
|
||||
v 0.000000 -0.395012 0.008798
|
||||
v 0.000000 -0.395012 -0.008794
|
||||
v 0.000000 -0.377719 -0.012569
|
||||
v -0.061672 -0.399915 0.000002
|
||||
v -0.054590 -0.409051 0.012574
|
||||
v -0.045765 -0.421278 0.008798
|
||||
v -0.045765 -0.421278 -0.008794
|
||||
v -0.054590 -0.409051 -0.012569
|
||||
v -0.089582 -0.484687 0.000002
|
||||
v -0.077200 -0.484687 0.012574
|
||||
v -0.064722 -0.484687 0.008798
|
||||
v -0.064722 -0.484687 -0.008794
|
||||
v -0.077200 -0.484687 -0.012569
|
||||
v -0.061672 -0.568712 0.000002
|
||||
v -0.054590 -0.560326 0.012574
|
||||
v -0.045765 -0.548099 0.008798
|
||||
v -0.045765 -0.548099 -0.008794
|
||||
v -0.054590 -0.560326 -0.012569
|
||||
v 0.000000 0.241043 0.000002
|
||||
v 0.000000 0.269910 0.055211
|
||||
v -0.014044 0.279047 0.048870
|
||||
v -0.014044 0.247717 0.000002
|
||||
v -0.009826 0.291274 0.040970
|
||||
v -0.009826 0.265007 0.000002
|
||||
v 0.009826 0.291274 0.040970
|
||||
v 0.009826 0.265007 0.000002
|
||||
v 0.014044 0.279047 0.048870
|
||||
v 0.014044 0.247717 0.000002
|
||||
v 0.000000 0.354683 0.080195
|
||||
v -0.014044 0.354683 0.069112
|
||||
v -0.009826 0.354683 0.057941
|
||||
v 0.009826 0.354683 0.057941
|
||||
v 0.014044 0.354683 0.069112
|
||||
v 0.000000 0.439455 0.055211
|
||||
v -0.014044 0.430321 0.048870
|
||||
v -0.009826 0.418094 0.040970
|
||||
v 0.009826 0.418094 0.040970
|
||||
v 0.014044 0.430321 0.048870
|
||||
v 0.000000 0.468325 0.000002
|
||||
v -0.014044 0.461651 0.000002
|
||||
v -0.009826 0.444361 0.000002
|
||||
v 0.009826 0.444361 0.000002
|
||||
v 0.014044 0.461651 0.000002
|
||||
v 0.000000 0.439455 -0.055206
|
||||
v -0.014044 0.430321 -0.048868
|
||||
v -0.009826 0.418094 -0.040967
|
||||
v 0.009826 0.418094 -0.040967
|
||||
v 0.014044 0.430321 -0.048868
|
||||
v 0.000000 0.354683 -0.080190
|
||||
v -0.014044 0.354683 -0.069108
|
||||
v -0.009826 0.354683 -0.057936
|
||||
v 0.009826 0.354683 -0.057936
|
||||
v 0.014044 0.354683 -0.069108
|
||||
v 0.000000 0.270661 -0.055206
|
||||
v -0.014044 0.279047 -0.048868
|
||||
v -0.009826 0.291274 -0.040967
|
||||
v 0.009826 0.291274 -0.040967
|
||||
v 0.014044 0.279047 -0.048868
|
||||
vt 0.187500 0.125000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.250000 0.187500
|
||||
vt 0.187500 0.187500
|
||||
vt 0.250000 0.250000
|
||||
vt 0.187500 0.250000
|
||||
vt 0.250000 0.312500
|
||||
vt 0.187500 0.312500
|
||||
vt 0.250000 0.375000
|
||||
vt 0.187500 0.375000
|
||||
vt 0.187500 0.062500
|
||||
vt 0.250000 0.062500
|
||||
vt 0.312500 0.125000
|
||||
vt 0.312500 0.187500
|
||||
vt 0.312500 0.250000
|
||||
vt 0.312500 0.312500
|
||||
vt 0.312500 0.375000
|
||||
vt 0.312500 0.062500
|
||||
vt 0.375000 0.125000
|
||||
vt 0.375000 0.187500
|
||||
vt 0.375000 0.250000
|
||||
vt 0.375000 0.312500
|
||||
vt 0.375000 0.375000
|
||||
vt 0.375000 0.062500
|
||||
vt 0.437500 0.125000
|
||||
vt 0.437500 0.187500
|
||||
vt 0.437500 0.250000
|
||||
vt 0.437500 0.312500
|
||||
vt 0.437500 0.375000
|
||||
vt 0.437500 0.062500
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.187500
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 0.312500
|
||||
vt 0.500000 0.375000
|
||||
vt 0.500000 0.062500
|
||||
vt -0.000000 0.125000
|
||||
vt 0.062500 0.125000
|
||||
vt 0.062500 0.187500
|
||||
vt -0.000000 0.187500
|
||||
vt 0.062500 0.250000
|
||||
vt -0.000000 0.250000
|
||||
vt 0.062500 0.312500
|
||||
vt -0.000000 0.312500
|
||||
vt 0.062500 0.375000
|
||||
vt -0.000000 0.375000
|
||||
vt -0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt 0.125000 0.125000
|
||||
vt 0.125000 0.187500
|
||||
vt 0.125000 0.250000
|
||||
vt 0.125000 0.312500
|
||||
vt 0.125000 0.375000
|
||||
vt 0.125000 0.062500
|
||||
vt 0.750000 0.625000
|
||||
vt 0.812500 0.625000
|
||||
vt 0.812500 0.687500
|
||||
vt 0.750000 0.687500
|
||||
vt 0.750000 0.375000
|
||||
vt 0.812500 0.375000
|
||||
vt 0.812500 0.437500
|
||||
vt 0.750000 0.437500
|
||||
vt 0.812500 0.500000
|
||||
vt 0.750000 0.500000
|
||||
vt 0.812500 0.562500
|
||||
vt 0.750000 0.562500
|
||||
vt 0.875000 0.625000
|
||||
vt 0.875000 0.687500
|
||||
vt 0.875000 0.375000
|
||||
vt 0.875000 0.437500
|
||||
vt 0.875000 0.500000
|
||||
vt 0.875000 0.562500
|
||||
vt 0.937500 0.625000
|
||||
vt 0.937500 0.687500
|
||||
vt 0.937500 0.375000
|
||||
vt 0.937500 0.437500
|
||||
vt 0.937500 0.500000
|
||||
vt 0.937500 0.562500
|
||||
vt 1.000000 0.625000
|
||||
vt 1.000000 0.687500
|
||||
vt 1.000000 0.375000
|
||||
vt 1.000000 0.437500
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 0.562500
|
||||
vt 0.500000 0.625000
|
||||
vt 0.562500 0.625000
|
||||
vt 0.562500 0.687500
|
||||
vt 0.500000 0.687500
|
||||
vt 0.562500 0.375000
|
||||
vt 0.562500 0.437500
|
||||
vt 0.500000 0.437500
|
||||
vt 0.562500 0.500000
|
||||
vt 0.500000 0.500000
|
||||
vt 0.562500 0.562500
|
||||
vt 0.500000 0.562500
|
||||
vt 0.625000 0.625000
|
||||
vt 0.625000 0.687500
|
||||
vt 0.625000 0.375000
|
||||
vt 0.625000 0.437500
|
||||
vt 0.625000 0.500000
|
||||
vt 0.625000 0.562500
|
||||
vt 0.687500 0.625000
|
||||
vt 0.687500 0.687500
|
||||
vt 0.687500 0.375000
|
||||
vt 0.687500 0.437500
|
||||
vt 0.687500 0.500000
|
||||
vt 0.687500 0.562500
|
||||
vt 0.250000 0.625000
|
||||
vt 0.312500 0.625000
|
||||
vt 0.312500 0.687500
|
||||
vt 0.250000 0.687500
|
||||
vt 0.312500 0.437500
|
||||
vt 0.250000 0.437500
|
||||
vt 0.312500 0.500000
|
||||
vt 0.250000 0.500000
|
||||
vt 0.312500 0.562500
|
||||
vt 0.250000 0.562500
|
||||
vt 0.375000 0.625000
|
||||
vt 0.375000 0.687500
|
||||
vt 0.375000 0.437500
|
||||
vt 0.375000 0.500000
|
||||
vt 0.375000 0.562500
|
||||
vt 0.437500 0.625000
|
||||
vt 0.437500 0.687500
|
||||
vt 0.437500 0.437500
|
||||
vt 0.437500 0.500000
|
||||
vt 0.437500 0.562500
|
||||
vt -0.000000 0.625000
|
||||
vt 0.062500 0.625000
|
||||
vt 0.062500 0.687500
|
||||
vt -0.000000 0.687500
|
||||
vt 0.062500 0.437500
|
||||
vt -0.000000 0.437500
|
||||
vt 0.062500 0.500000
|
||||
vt -0.000000 0.500000
|
||||
vt 0.062500 0.562500
|
||||
vt -0.000000 0.562500
|
||||
vt 0.125000 0.625000
|
||||
vt 0.125000 0.687500
|
||||
vt 0.125000 0.437500
|
||||
vt 0.125000 0.500000
|
||||
vt 0.125000 0.562500
|
||||
vt 0.187500 0.625000
|
||||
vt 0.187500 0.687500
|
||||
vt 0.187500 0.437500
|
||||
vt 0.187500 0.500000
|
||||
vt 0.187500 0.562500
|
||||
vt 0.687500 0.750000
|
||||
vt 0.750000 0.750000
|
||||
vt 0.750000 0.812500
|
||||
vt 0.687500 0.812500
|
||||
vt 0.750000 0.875000
|
||||
vt 0.687500 0.875000
|
||||
vt 0.750000 0.937500
|
||||
vt 0.687500 0.937500
|
||||
vt 0.750000 1.000000
|
||||
vt 0.687500 1.000000
|
||||
vt 0.812500 0.750000
|
||||
vt 0.812500 0.812500
|
||||
vt 0.812500 0.875000
|
||||
vt 0.812500 0.937500
|
||||
vt 0.812500 1.000000
|
||||
vt 0.875000 0.750000
|
||||
vt 0.875000 0.812500
|
||||
vt 0.875000 0.875000
|
||||
vt 0.875000 0.937500
|
||||
vt 0.875000 1.000000
|
||||
vt 0.937500 0.750000
|
||||
vt 0.937500 0.812500
|
||||
vt 0.937500 0.875000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.937500 1.000000
|
||||
vt 1.000000 0.750000
|
||||
vt 1.000000 0.812500
|
||||
vt 1.000000 0.875000
|
||||
vt 1.000000 0.937500
|
||||
vt 1.000000 1.000000
|
||||
vt 0.500000 0.750000
|
||||
vt 0.562500 0.750000
|
||||
vt 0.562500 0.812500
|
||||
vt 0.500000 0.812500
|
||||
vt 0.562500 0.875000
|
||||
vt 0.500000 0.875000
|
||||
vt 0.562500 0.937500
|
||||
vt 0.500000 0.937500
|
||||
vt 0.562500 1.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.625000 0.750000
|
||||
vt 0.625000 0.812500
|
||||
vt 0.625000 0.875000
|
||||
vt 0.625000 0.937500
|
||||
vt 0.625000 1.000000
|
||||
vt 0.750000 0.312500
|
||||
vt 0.812500 0.312500
|
||||
vt 0.750000 0.062500
|
||||
vt 0.812500 0.062500
|
||||
vt 0.812500 0.125000
|
||||
vt 0.750000 0.125000
|
||||
vt 0.812500 0.187500
|
||||
vt 0.750000 0.187500
|
||||
vt 0.812500 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.875000 0.312500
|
||||
vt 0.875000 0.062500
|
||||
vt 0.875000 0.125000
|
||||
vt 0.875000 0.187500
|
||||
vt 0.875000 0.250000
|
||||
vt 0.937500 0.312500
|
||||
vt 0.937500 0.062500
|
||||
vt 0.937500 0.125000
|
||||
vt 0.937500 0.187500
|
||||
vt 0.937500 0.250000
|
||||
vt 1.000000 0.312500
|
||||
vt 1.000000 0.062500
|
||||
vt 1.000000 0.125000
|
||||
vt 1.000000 0.187500
|
||||
vt 1.000000 0.250000
|
||||
vt 0.562500 0.312500
|
||||
vt 0.562500 0.062500
|
||||
vt 0.562500 0.125000
|
||||
vt 0.562500 0.187500
|
||||
vt 0.562500 0.250000
|
||||
vt 0.625000 0.312500
|
||||
vt 0.625000 0.062500
|
||||
vt 0.625000 0.125000
|
||||
vt 0.625000 0.187500
|
||||
vt 0.625000 0.250000
|
||||
vt 0.687500 0.312500
|
||||
vt 0.687500 0.062500
|
||||
vt 0.687500 0.125000
|
||||
vt 0.687500 0.187500
|
||||
vt 0.687500 0.250000
|
||||
vt 0.250000 0.937500
|
||||
vt 0.312500 0.937500
|
||||
vt 0.312500 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 0.750000
|
||||
vt 0.250000 0.750000
|
||||
vt 0.312500 0.812500
|
||||
vt 0.250000 0.812500
|
||||
vt 0.312500 0.875000
|
||||
vt 0.250000 0.875000
|
||||
vt 0.375000 0.937500
|
||||
vt 0.375000 1.000000
|
||||
vt 0.375000 0.750000
|
||||
vt 0.375000 0.812500
|
||||
vt 0.375000 0.875000
|
||||
vt 0.437500 0.937500
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.750000
|
||||
vt 0.437500 0.812500
|
||||
vt 0.437500 0.875000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.062500 0.750000
|
||||
vt 0.000000 0.750000
|
||||
vt 0.062500 0.812500
|
||||
vt 0.000000 0.812500
|
||||
vt 0.062500 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 1.000000
|
||||
vt 0.125000 0.750000
|
||||
vt 0.125000 0.812500
|
||||
vt 0.125000 0.875000
|
||||
vt 0.187500 0.937500
|
||||
vt 0.187500 1.000000
|
||||
vt 0.187500 0.750000
|
||||
vt 0.187500 0.812500
|
||||
vt 0.187500 0.875000
|
||||
vn 0.000000 -1.000000 -0.004800
|
||||
vn 0.000000 -0.657400 0.753500
|
||||
vn -0.898300 -0.248500 0.362300
|
||||
vn -0.863600 -0.504100 -0.003400
|
||||
vn -0.661500 0.421500 -0.620200
|
||||
vn -0.746000 0.665900 0.000000
|
||||
vn 0.661500 0.421500 -0.620200
|
||||
vn 0.746000 0.665900 0.000000
|
||||
vn 0.898300 -0.248500 0.362300
|
||||
vn 0.863600 -0.504100 -0.003400
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn -0.925200 0.000000 0.379500
|
||||
vn -0.617100 0.000000 -0.786900
|
||||
vn 0.617100 0.000000 -0.786900
|
||||
vn 0.925200 0.000000 0.379500
|
||||
vn 0.000000 0.657400 0.753500
|
||||
vn -0.898300 0.248400 0.362300
|
||||
vn -0.661500 -0.421500 -0.620200
|
||||
vn 0.661500 -0.421500 -0.620200
|
||||
vn 0.898300 0.248400 0.362300
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -0.866100 0.499800 0.000000
|
||||
vn -0.746000 -0.665900 0.000000
|
||||
vn 0.746000 -0.665900 0.000000
|
||||
vn 0.866100 0.499800 0.000000
|
||||
vn 0.000000 0.657400 -0.753500
|
||||
vn -0.898300 0.248400 -0.362400
|
||||
vn -0.661600 -0.421500 0.620200
|
||||
vn 0.661500 -0.421500 0.620200
|
||||
vn 0.898300 0.248400 -0.362300
|
||||
vn 0.000000 -0.000900 -1.000000
|
||||
vn -0.924600 -0.000600 -0.380700
|
||||
vn -0.617100 0.000000 0.786900
|
||||
vn 0.617100 0.000000 0.786900
|
||||
vn 0.924700 -0.000600 -0.380700
|
||||
vn 0.000000 -0.650300 -0.759600
|
||||
vn -0.895600 -0.254600 -0.364800
|
||||
vn -0.661600 0.421500 0.620200
|
||||
vn 0.661600 0.421500 0.620200
|
||||
vn 0.895600 -0.254600 -0.364800
|
||||
vn 0.004900 -1.000000 0.000000
|
||||
vn -0.729700 -0.683800 0.000000
|
||||
vn -0.324500 -0.256300 -0.910500
|
||||
vn 0.003300 -0.475500 -0.879700
|
||||
vn 0.578700 0.436200 -0.689100
|
||||
vn 0.000000 0.666600 -0.745400
|
||||
vn 0.578700 0.436200 0.689100
|
||||
vn 0.000000 0.666600 0.745400
|
||||
vn -0.324500 -0.256300 0.910500
|
||||
vn 0.003300 -0.475500 0.879700
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn -0.359600 0.000000 -0.933100
|
||||
vn 0.756400 0.000000 -0.654100
|
||||
vn 0.756400 0.000000 0.654100
|
||||
vn -0.359600 0.000000 0.933100
|
||||
vn -0.729700 0.683700 0.000000
|
||||
vn -0.324500 0.256300 -0.910500
|
||||
vn 0.578700 -0.436200 -0.689100
|
||||
vn 0.578700 -0.436200 0.689100
|
||||
vn -0.324500 0.256300 0.910500
|
||||
vn 0.000000 0.470900 -0.882200
|
||||
vn 0.000000 -0.666600 -0.745400
|
||||
vn 0.000000 -0.666600 0.745400
|
||||
vn 0.000000 0.470900 0.882200
|
||||
vn 0.729700 0.683700 0.000000
|
||||
vn 0.324500 0.256300 -0.910500
|
||||
vn -0.578700 -0.436200 -0.689100
|
||||
vn -0.578700 -0.436200 0.689100
|
||||
vn 0.324500 0.256300 0.910500
|
||||
vn 1.000000 -0.001100 0.000000
|
||||
vn 0.361000 -0.000700 -0.932600
|
||||
vn -0.756400 0.000000 -0.654100
|
||||
vn -0.756400 0.000000 0.654100
|
||||
vn 0.361000 -0.000700 0.932600
|
||||
vn 0.736100 -0.676800 0.000000
|
||||
vn 0.327100 -0.263100 -0.907600
|
||||
vn -0.578700 0.436200 -0.689100
|
||||
vn -0.578700 0.436200 0.689100
|
||||
vn 0.327100 -0.263100 0.907600
|
||||
vn -0.004900 -1.000000 0.000000
|
||||
vn 0.729700 -0.683800 0.000000
|
||||
vn 0.324500 -0.256300 0.910500
|
||||
vn -0.003300 -0.475400 0.879700
|
||||
vn 0.324500 -0.256300 -0.910500
|
||||
vn -0.003300 -0.475400 -0.879700
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.359600 0.000000 0.933100
|
||||
vn 0.359600 0.000000 -0.933100
|
||||
vn -1.000000 -0.001100 0.000000
|
||||
vn -0.361000 -0.000700 0.932600
|
||||
vn -0.361000 -0.000700 -0.932600
|
||||
vn -0.736100 -0.676800 0.000000
|
||||
vn -0.327100 -0.263100 0.907600
|
||||
vn -0.327100 -0.263100 -0.907600
|
||||
vn 0.000000 -1.000000 0.004800
|
||||
vn 0.000000 -0.657400 -0.753500
|
||||
vn 0.898300 -0.248500 -0.362400
|
||||
vn 0.863600 -0.504100 0.003400
|
||||
vn -0.898300 -0.248500 -0.362400
|
||||
vn -0.863600 -0.504100 0.003400
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.925200 0.000000 -0.379500
|
||||
vn -0.925200 0.000000 -0.379500
|
||||
vn 0.898300 0.248500 -0.362400
|
||||
vn 0.661600 -0.421500 0.620200
|
||||
vn -0.898300 0.248500 -0.362400
|
||||
vn 0.898300 0.248500 0.362300
|
||||
vn -0.898300 0.248500 0.362300
|
||||
vn 0.000000 -0.000900 1.000000
|
||||
vn 0.924700 -0.000600 0.380700
|
||||
vn -0.924700 -0.000600 0.380700
|
||||
vn 0.000000 -0.650300 0.759600
|
||||
vn 0.895600 -0.254600 0.364700
|
||||
vn -0.895600 -0.254600 0.364700
|
||||
vn 0.729700 -0.683700 0.000000
|
||||
vn 0.729700 0.683800 0.000000
|
||||
vn -0.729700 0.683800 0.000000
|
||||
vn -0.898300 -0.248400 0.362300
|
||||
vn -0.863600 -0.504100 -0.003500
|
||||
vn 0.898300 -0.248400 0.362300
|
||||
vn 0.863600 -0.504100 -0.003500
|
||||
vn -0.661500 -0.421500 0.620200
|
||||
vn 0.924600 -0.000600 -0.380700
|
||||
vn -0.661500 0.421500 0.620200
|
||||
vn 0.661500 0.421500 0.620200
|
||||
s 1
|
||||
f 1/1/1 2/2/2 3/3/3 4/4/4
|
||||
f 4/4/4 3/3/3 5/5/5 6/6/6
|
||||
f 6/6/6 5/5/5 7/7/7 8/8/8
|
||||
f 8/8/8 7/7/7 9/9/9 10/10/10
|
||||
f 1/1/1 10/11/10 9/12/9 2/2/2
|
||||
f 2/2/2 11/13/11 12/14/12 3/3/3
|
||||
f 3/3/3 12/14/12 13/15/13 5/5/5
|
||||
f 5/5/5 13/15/13 14/16/14 7/7/7
|
||||
f 7/7/7 14/16/14 15/17/15 9/9/9
|
||||
f 9/12/9 15/18/15 11/13/11 2/2/2
|
||||
f 11/13/11 16/19/16 17/20/17 12/14/12
|
||||
f 12/14/12 17/20/17 18/21/18 13/15/13
|
||||
f 13/15/13 18/21/18 19/22/19 14/16/14
|
||||
f 14/16/14 19/22/19 20/23/20 15/17/15
|
||||
f 15/18/15 20/24/20 16/19/16 11/13/11
|
||||
f 16/19/16 21/25/21 22/26/22 17/20/17
|
||||
f 17/20/17 22/26/22 23/27/23 18/21/18
|
||||
f 18/21/18 23/27/23 24/28/24 19/22/19
|
||||
f 19/22/19 24/28/24 25/29/25 20/23/20
|
||||
f 20/24/20 25/30/25 21/25/21 16/19/16
|
||||
f 21/25/21 26/31/26 27/32/27 22/26/22
|
||||
f 22/26/22 27/32/27 28/33/28 23/27/23
|
||||
f 23/27/23 28/33/28 29/34/29 24/28/24
|
||||
f 24/28/24 29/34/29 30/35/30 25/29/25
|
||||
f 25/30/25 30/36/30 26/31/26 21/25/21
|
||||
f 26/37/26 31/38/31 32/39/32 27/40/27
|
||||
f 27/40/27 32/39/32 33/41/33 28/42/28
|
||||
f 28/42/28 33/41/33 34/43/34 29/44/29
|
||||
f 29/44/29 34/43/34 35/45/35 30/46/30
|
||||
f 30/47/30 35/48/35 31/38/31 26/37/26
|
||||
f 31/38/31 36/49/36 37/50/37 32/39/32
|
||||
f 32/39/32 37/50/37 38/51/38 33/41/33
|
||||
f 33/41/33 38/51/38 39/52/39 34/43/34
|
||||
f 34/43/34 39/52/39 40/53/40 35/45/35
|
||||
f 35/48/35 40/54/40 36/49/36 31/38/31
|
||||
f 36/49/36 1/1/1 4/4/4 37/50/37
|
||||
f 37/50/37 4/4/4 6/6/6 38/51/38
|
||||
f 38/51/38 6/6/6 8/8/8 39/52/39
|
||||
f 39/52/39 8/8/8 10/10/10 40/53/40
|
||||
f 1/1/1 36/49/36 40/54/40 10/11/10
|
||||
f 41/55/41 42/56/42 43/57/43 44/58/44
|
||||
f 44/59/44 43/60/43 45/61/45 46/62/46
|
||||
f 46/62/46 45/61/45 47/63/47 48/64/48
|
||||
f 48/64/48 47/63/47 49/65/49 50/66/50
|
||||
f 41/55/41 50/66/50 49/65/49 42/56/42
|
||||
f 42/56/42 51/67/51 52/68/52 43/57/43
|
||||
f 43/60/43 52/69/52 53/70/53 45/61/45
|
||||
f 45/61/45 53/70/53 54/71/54 47/63/47
|
||||
f 47/63/47 54/71/54 55/72/55 49/65/49
|
||||
f 49/65/49 55/72/55 51/67/51 42/56/42
|
||||
f 51/67/51 56/73/56 57/74/57 52/68/52
|
||||
f 52/69/52 57/75/57 58/76/58 53/70/53
|
||||
f 53/70/53 58/76/58 59/77/59 54/71/54
|
||||
f 54/71/54 59/77/59 60/78/60 55/72/55
|
||||
f 55/72/55 60/78/60 56/73/56 51/67/51
|
||||
f 56/73/56 61/79/21 62/80/61 57/74/57
|
||||
f 57/75/57 62/81/61 63/82/62 58/76/58
|
||||
f 58/76/58 63/82/62 64/83/63 59/77/59
|
||||
f 59/77/59 64/83/63 65/84/64 60/78/60
|
||||
f 60/78/60 65/84/64 61/79/21 56/73/56
|
||||
f 61/85/21 66/86/65 67/87/66 62/88/61
|
||||
f 62/35/61 67/89/66 68/90/67 63/91/62
|
||||
f 63/91/62 68/90/67 69/92/68 64/93/63
|
||||
f 64/93/63 69/92/68 70/94/69 65/95/64
|
||||
f 65/95/64 70/94/69 66/86/65 61/85/21
|
||||
f 66/86/65 71/96/70 72/97/71 67/87/66
|
||||
f 67/89/66 72/98/71 73/99/72 68/90/67
|
||||
f 68/90/67 73/99/72 74/100/73 69/92/68
|
||||
f 69/92/68 74/100/73 75/101/74 70/94/69
|
||||
f 70/94/69 75/101/74 71/96/70 66/86/65
|
||||
f 71/96/70 76/102/75 77/103/76 72/97/71
|
||||
f 72/98/71 77/104/76 78/105/77 73/99/72
|
||||
f 73/99/72 78/105/77 79/106/78 74/100/73
|
||||
f 74/100/73 79/106/78 80/107/79 75/101/74
|
||||
f 75/101/74 80/107/79 76/102/75 71/96/70
|
||||
f 76/102/75 41/55/41 44/58/44 77/103/76
|
||||
f 77/104/76 44/59/44 46/62/46 78/105/77
|
||||
f 78/105/77 46/62/46 48/64/48 79/106/78
|
||||
f 79/106/78 48/64/48 50/66/50 80/107/79
|
||||
f 41/55/41 76/102/75 80/107/79 50/66/50
|
||||
f 81/108/80 82/109/81 83/110/82 84/111/83
|
||||
f 84/9/83 83/17/82 85/112/78 86/113/48
|
||||
f 86/113/48 85/112/78 87/114/77 88/115/46
|
||||
f 88/115/46 87/114/77 89/116/84 90/117/85
|
||||
f 81/108/80 90/117/85 89/116/84 82/109/81
|
||||
f 82/109/81 91/118/86 92/119/87 83/110/82
|
||||
f 83/17/82 92/23/87 93/120/73 85/112/78
|
||||
f 85/112/78 93/120/73 94/121/72 87/114/77
|
||||
f 87/114/77 94/121/72 95/122/88 89/116/84
|
||||
f 89/116/84 95/122/88 91/118/86 82/109/81
|
||||
f 91/118/86 96/123/65 97/124/69 92/119/87
|
||||
f 92/23/87 97/29/69 98/125/68 93/120/73
|
||||
f 93/120/73 98/125/68 99/126/67 94/121/72
|
||||
f 94/121/72 99/126/67 100/127/66 95/122/88
|
||||
f 95/122/88 100/127/66 96/123/65 91/118/86
|
||||
f 96/123/65 101/85/21 102/88/64 97/124/69
|
||||
f 97/29/69 102/35/64 103/91/63 98/125/68
|
||||
f 98/125/68 103/91/63 104/93/62 99/126/67
|
||||
f 99/126/67 104/93/62 105/95/61 100/127/66
|
||||
f 100/127/66 105/95/61 101/85/21 96/123/65
|
||||
f 101/128/21 106/129/56 107/130/60 102/131/64
|
||||
f 102/46/64 107/45/60 108/132/59 103/133/63
|
||||
f 103/133/63 108/132/59 109/134/58 104/135/62
|
||||
f 104/135/62 109/134/58 110/136/57 105/137/61
|
||||
f 105/137/61 110/136/57 106/129/56 101/128/21
|
||||
f 106/129/56 111/138/89 112/139/90 107/130/60
|
||||
f 107/45/60 112/53/90 113/140/54 108/132/59
|
||||
f 108/132/59 113/140/54 114/141/53 109/134/58
|
||||
f 109/134/58 114/141/53 115/142/91 110/136/57
|
||||
f 110/136/57 115/142/91 111/138/89 106/129/56
|
||||
f 111/138/89 116/143/92 117/144/93 112/139/90
|
||||
f 112/53/90 117/10/93 118/145/47 113/140/54
|
||||
f 113/140/54 118/145/47 119/146/45 114/141/53
|
||||
f 114/141/53 119/146/45 120/147/94 115/142/91
|
||||
f 115/142/91 120/147/94 116/143/92 111/138/89
|
||||
f 116/143/92 81/108/80 84/111/83 117/144/93
|
||||
f 117/10/93 84/9/83 86/113/48 118/145/47
|
||||
f 118/145/47 86/113/48 88/115/46 119/146/45
|
||||
f 119/146/45 88/115/46 90/117/85 120/147/94
|
||||
f 81/108/80 116/143/92 120/147/94 90/117/85
|
||||
f 121/148/95 122/149/96 123/150/97 124/151/98
|
||||
f 124/151/98 123/150/97 125/152/39 126/153/8
|
||||
f 126/153/8 125/152/39 127/154/38 128/155/6
|
||||
f 128/155/6 127/154/38 129/156/99 130/157/100
|
||||
f 121/148/95 130/103/100 129/58/99 122/149/96
|
||||
f 122/149/96 131/158/101 132/159/102 123/150/97
|
||||
f 123/150/97 132/159/102 133/160/34 125/152/39
|
||||
f 125/152/39 133/160/34 134/161/33 127/154/38
|
||||
f 127/154/38 134/161/33 135/162/103 129/156/99
|
||||
f 129/58/99 135/57/103 131/158/101 122/149/96
|
||||
f 131/158/101 136/163/26 137/164/104 132/159/102
|
||||
f 132/159/102 137/164/104 138/165/105 133/160/34
|
||||
f 133/160/34 138/165/105 139/166/28 134/161/33
|
||||
f 134/161/33 139/166/28 140/167/106 135/162/103
|
||||
f 135/57/103 140/68/106 136/163/26 131/158/101
|
||||
f 136/163/26 141/168/21 142/169/25 137/164/104
|
||||
f 137/164/104 142/169/25 143/170/24 138/165/105
|
||||
f 138/165/105 143/170/24 144/171/23 139/166/28
|
||||
f 139/166/28 144/171/23 145/172/22 140/167/106
|
||||
f 140/68/106 145/74/22 141/168/21 136/163/26
|
||||
f 141/168/21 146/173/16 147/174/107 142/169/25
|
||||
f 142/169/25 147/174/107 148/175/19 143/170/24
|
||||
f 143/170/24 148/175/19 149/176/18 144/171/23
|
||||
f 144/171/23 149/176/18 150/177/108 145/172/22
|
||||
f 145/74/22 150/80/108 146/173/16 141/168/21
|
||||
f 146/178/16 151/179/109 152/180/110 147/181/107
|
||||
f 147/181/107 152/180/110 153/182/14 148/183/19
|
||||
f 148/183/19 153/182/14 154/184/13 149/185/18
|
||||
f 149/185/18 154/184/13 155/186/111 150/187/108
|
||||
f 150/88/108 155/87/111 151/179/109 146/178/16
|
||||
f 151/179/109 156/188/112 157/189/113 152/180/110
|
||||
f 152/180/110 157/189/113 158/190/7 153/182/14
|
||||
f 153/182/14 158/190/7 159/191/5 154/184/13
|
||||
f 154/184/13 159/191/5 160/192/114 155/186/111
|
||||
f 155/87/111 160/97/114 156/188/112 151/179/109
|
||||
f 156/188/112 121/148/95 124/151/98 157/189/113
|
||||
f 157/189/113 124/151/98 126/153/8 158/190/7
|
||||
f 158/190/7 126/153/8 128/155/6 159/191/5
|
||||
f 159/191/5 128/155/6 130/157/100 160/192/114
|
||||
f 121/148/95 156/188/112 160/97/114 130/103/100
|
||||
f 161/193/80 162/194/115 163/60/82 164/59/83
|
||||
f 164/195/83 163/196/82 165/197/78 166/198/48
|
||||
f 166/198/48 165/197/78 167/199/77 168/200/46
|
||||
f 168/200/46 167/199/77 169/201/84 170/202/85
|
||||
f 161/193/80 170/202/85 169/201/84 162/194/115
|
||||
f 162/194/115 171/203/86 172/69/87 163/60/82
|
||||
f 163/196/82 172/204/87 173/205/73 165/197/78
|
||||
f 165/197/78 173/205/73 174/206/72 167/199/77
|
||||
f 167/199/77 174/206/72 175/207/88 169/201/84
|
||||
f 169/201/84 175/207/88 171/203/86 162/194/115
|
||||
f 171/203/86 176/208/116 177/75/69 172/69/87
|
||||
f 172/204/87 177/209/69 178/210/68 173/205/73
|
||||
f 173/205/73 178/210/68 179/211/67 174/206/72
|
||||
f 174/206/72 179/211/67 180/212/66 175/207/88
|
||||
f 175/207/88 180/212/66 176/208/116 171/203/86
|
||||
f 176/208/116 181/213/21 182/81/64 177/75/69
|
||||
f 177/209/69 182/214/64 183/215/63 178/210/68
|
||||
f 178/210/68 183/215/63 184/216/62 179/211/67
|
||||
f 179/211/67 184/216/62 185/217/61 180/212/66
|
||||
f 180/212/66 185/217/61 181/213/21 176/208/116
|
||||
f 181/34/21 186/218/117 187/89/60 182/35/64
|
||||
f 182/36/64 187/219/60 188/220/59 183/31/63
|
||||
f 183/31/63 188/220/59 189/221/58 184/32/62
|
||||
f 184/32/62 189/221/58 190/222/57 185/33/61
|
||||
f 185/33/61 190/222/57 186/218/117 181/34/21
|
||||
f 186/218/117 191/223/89 192/98/90 187/89/60
|
||||
f 187/219/60 192/224/90 193/225/54 188/220/59
|
||||
f 188/220/59 193/225/54 194/226/53 189/221/58
|
||||
f 189/221/58 194/226/53 195/227/91 190/222/57
|
||||
f 190/222/57 195/227/91 191/223/89 186/218/117
|
||||
f 191/223/89 196/228/92 197/104/93 192/98/90
|
||||
f 192/224/90 197/229/93 198/230/47 193/225/54
|
||||
f 193/225/54 198/230/47 199/231/45 194/226/53
|
||||
f 194/226/53 199/231/45 200/232/94 195/227/91
|
||||
f 195/227/91 200/232/94 196/228/92 191/223/89
|
||||
f 196/228/92 161/193/80 164/59/83 197/104/93
|
||||
f 197/229/93 164/195/83 166/198/48 198/230/47
|
||||
f 198/230/47 166/198/48 168/200/46 199/231/45
|
||||
f 199/231/45 168/200/46 170/202/85 200/232/94
|
||||
f 161/193/80 196/228/92 200/232/94 170/202/85
|
||||
f 201/233/1 202/234/2 203/235/118 204/236/119
|
||||
f 204/111/119 203/110/118 205/237/5 206/238/6
|
||||
f 206/238/6 205/237/5 207/239/7 208/240/8
|
||||
f 208/240/8 207/239/7 209/241/120 210/242/121
|
||||
f 201/233/1 210/242/121 209/241/120 202/234/2
|
||||
f 202/234/2 211/243/11 212/244/12 203/235/118
|
||||
f 203/110/118 212/119/12 213/245/13 205/237/5
|
||||
f 205/237/5 213/245/13 214/246/14 207/239/7
|
||||
f 207/239/7 214/246/14 215/247/15 209/241/120
|
||||
f 209/241/120 215/247/15 211/243/11 202/234/2
|
||||
f 211/243/11 216/248/16 217/249/108 212/244/12
|
||||
f 212/119/12 217/124/108 218/250/18 213/245/13
|
||||
f 213/245/13 218/250/18 219/251/19 214/246/14
|
||||
f 214/246/14 219/251/19 220/252/107 215/247/15
|
||||
f 215/247/15 220/252/107 216/248/16 211/243/11
|
||||
f 216/248/16 221/185/21 222/187/22 217/249/108
|
||||
f 217/124/108 222/88/22 223/178/23 218/250/18
|
||||
f 218/250/18 223/178/23 224/181/24 219/251/19
|
||||
f 219/251/19 224/181/24 225/183/25 220/252/107
|
||||
f 220/252/107 225/183/25 221/185/21 216/248/16
|
||||
f 221/253/21 226/254/26 227/255/106 222/256/22
|
||||
f 222/131/22 227/130/106 228/257/122 223/258/23
|
||||
f 223/258/23 228/257/122 229/259/29 224/260/24
|
||||
f 224/260/24 229/259/29 230/261/104 225/262/25
|
||||
f 225/262/25 230/261/104 226/254/26 221/253/21
|
||||
f 226/254/26 231/263/31 232/264/32 227/255/106
|
||||
f 227/130/106 232/139/32 233/265/33 228/257/122
|
||||
f 228/257/122 233/265/33 234/266/34 229/259/29
|
||||
f 229/259/29 234/266/34 235/267/123 230/261/104
|
||||
f 230/261/104 235/267/123 231/263/31 226/254/26
|
||||
f 231/263/31 236/268/36 237/269/37 232/264/32
|
||||
f 232/139/32 237/144/37 238/270/124 233/265/33
|
||||
f 233/265/33 238/270/124 239/271/125 234/266/34
|
||||
f 234/266/34 239/271/125 240/272/40 235/267/123
|
||||
f 235/267/123 240/272/40 236/268/36 231/263/31
|
||||
f 236/268/36 201/233/1 204/236/119 237/269/37
|
||||
f 237/144/37 204/111/119 206/238/6 238/270/124
|
||||
f 238/270/124 206/238/6 208/240/8 239/271/125
|
||||
f 239/271/125 208/240/8 210/242/121 240/272/40
|
||||
f 201/233/1 236/268/36 240/272/40 210/242/121
|
BIN
chains/textures/chain_brass_inv.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
chains/textures/chain_wrought_iron_inv.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
chains/textures/chains_wrought_iron.png
Normal file
After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@ -33,6 +33,10 @@ computer:admiral128
|
||||
|
||||
There's also a `computer:computer' alias to `computer:babytower'.
|
||||
|
||||
License:
|
||||
Sourcecode: WTFPL (see below)
|
||||
Graphics: WTFPL (see below)
|
||||
|
||||
Thanks to all the people in the forums and the #minetest IRC channel for
|
||||
their support and suggestions; in no particular order:
|
||||
OldCoder, Josh, tonyka, VanessaE, davidpace, Jordach, and all the other
|
||||
@ -41,3 +45,17 @@ Thanks to all the people in the forums and the #minetest IRC channel for
|
||||
|
||||
See also:
|
||||
http://minetest.net/
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2012 Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
-- Amiga 500 lookalike
|
||||
computer.register("computer:shefriendSOO", {
|
||||
|
@ -1,2 +1,2 @@
|
||||
default
|
||||
homedecor_common
|
||||
homedecor_i18n
|
||||
|
6
computer/locale/es.txt
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
# Language: Español
|
||||
# Author: Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Plastic sheet = Placa de Plastico
|
||||
Unprocessed Plastic base = Base de Plastico No Procesada
|
@ -1,12 +1,14 @@
|
||||
|
||||
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
|
||||
-- License is WTFPL (see README.txt).
|
||||
|
||||
-- This file defines some items in order to not have to depend on other mods.
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if (not minetest.get_modpath("homedecor")) then
|
||||
|
||||
minetest.register_craftitem(":basic_materials:plastic_sheet", {
|
||||
minetest.register_craftitem(":homedecor:plastic_sheeting", {
|
||||
description = S("Plastic sheet"),
|
||||
inventory_image = "homedecor_plastic_sheeting.png",
|
||||
})
|
||||
@ -49,7 +51,7 @@ if (not minetest.get_modpath("homedecor")) then
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "basic_materials:plastic_sheet",
|
||||
output = "homedecor:plastic_sheeting",
|
||||
recipe = "homedecor:plastic_base",
|
||||
})
|
||||
|
||||
@ -61,7 +63,7 @@ if (not minetest.get_modpath("homedecor")) then
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'basic_materials:plastic_sheet',
|
||||
recipe = 'homedecor:plastic_sheeting',
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
|
@ -1,52 +1,54 @@
|
||||
|
||||
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
|
||||
-- License is WTFPL (see README.txt).
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:shefriendSOO",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "group:wood", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "group:wood", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:slaystation",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "group:wood", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "group:wood", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:vanio",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "", "" },
|
||||
{ "homedecor:plastic_sheeting", "", "" },
|
||||
{ "default:glass", "", "" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:specter",
|
||||
recipe = {
|
||||
{ "", "", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
||||
{ "", "", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:slaystation2",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:admiral64",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "group:wood", "group:wood", "group:wood" }
|
||||
}
|
||||
})
|
||||
@ -54,7 +56,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "computer:admiral128",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
}
|
||||
})
|
||||
@ -62,16 +64,16 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "computer:wee",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:copper_ingot", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:copper_ingot", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:piepad",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
@ -80,9 +82,9 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "computer:monitor",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "default:glass","" },
|
||||
{ "basic_materials:plastic_sheet", "default:glass","" },
|
||||
{ "basic_materials:plastic_sheet", "default:mese_crystal_fragment", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "default:glass","" },
|
||||
{ "homedecor:plastic_sheeting", "default:glass","" },
|
||||
{ "homedecor:plastic_sheeting", "default:mese_crystal_fragment", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
@ -90,35 +92,35 @@ minetest.register_craft({
|
||||
output = "computer:router",
|
||||
recipe = {
|
||||
{ "default:steel_ingot","","" },
|
||||
{ "default:steel_ingot" ,"basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "default:mese_crystal_fragment","basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
||||
{ "default:steel_ingot" ,"homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "default:mese_crystal_fragment","homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:tower",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:mese_crystal", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:printer",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "default:steel_ingot","" },
|
||||
{ "basic_materials:plastic_sheet", "default:mese_crystal", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "default:coal_lump", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "default:steel_ingot","" },
|
||||
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "default:coal_lump", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:printer",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "default:steel_ingot","" },
|
||||
{ "basic_materials:plastic_sheet", "default:mese_crystal", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "dye:black", "basic_materials:plastic_sheet", }
|
||||
{ "homedecor:plastic_sheeting", "default:steel_ingot","" },
|
||||
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "dye:black", "homedecor:plastic_sheeting", }
|
||||
}
|
||||
})
|
||||
|
||||
@ -134,8 +136,8 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "computer:tetris_arcade",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal", "basic_materials:plastic_sheet", },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:power_crystal", "homedecor:plastic_sheeting", },
|
||||
{ "dye:black", "default:glass", "dye:black" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal", "basic_materials:plastic_sheet" }
|
||||
{ "homedecor:plastic_sheeting", "homedecor:power_crystal", "homedecor:plastic_sheeting" }
|
||||
}
|
||||
})
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local shapes = {
|
||||
{ { x = {0, 1, 0, 1}, y = {0, 0, 1, 1} } },
|
||||
@ -33,10 +33,10 @@ local colors = { "computer_cyan.png", "computer_magenta.png", "computer_red.png"
|
||||
|
||||
local background = "image[0,0;3.55,6.66;computer_black.png]"
|
||||
local buttons = "button[3,4.5;0.6,0.6;left;<]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;"..minetest.formspec_escape(S("L")).."]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;L]"
|
||||
.."button[4.2,4.5;0.6,0.6;down;v]"
|
||||
.."button[4.2,5.3;0.6,0.6;drop;V]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;"..minetest.formspec_escape(S("R")).."]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;R]"
|
||||
.."button[5.4,4.5;0.6,0.6;right;>]"
|
||||
.."button[3.5,3;2,2;new;"..minetest.formspec_escape(S("New Game")).."]"
|
||||
|
||||
@ -231,7 +231,7 @@ local function step(pos, fields)
|
||||
local scr = { formsize, background,
|
||||
t.boardstring, t.previewstring,
|
||||
draw_shape(t.cur, t.x, t.y, t.rot, boardx, boardy),
|
||||
"label[3.8,0.1;"..S("Next...").."]label[3.8,2.7;"..S("Score: "),
|
||||
"label[3.8,0.1;Next...]label[3.8,2.7;Score: ",
|
||||
t.score, close, buttons }
|
||||
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
Most code and textures by Vanessa Ezekowitz.
|
||||
|
||||
Some code copied and modified from the game's default mods (especially
|
||||
doors) and ironzorg's flowers mod.
|
||||
|
||||
Whatever is stated here applies to all homedecor modpack components, as
|
||||
appropriate.
|
||||
|
||||
Licenses:
|
||||
* Door open/close sound by Slanesh on freesound.org
|
||||
http://freesound.org/people/Slanesh/sounds/31768/
|
||||
* Gate open/close by j1987 on freesound.org
|
||||
http://freesound.org/people/j1987/sounds/106116/
|
||||
* Doorbell sound by guitarguy1985 on freesound.org
|
||||
http://freesound.org/people/guitarguy1985/sounds/69384/
|
||||
* Book soundn by mckinneysound's on http://www.freesfx.co.uk/
|
||||
http://www.freesfx.co.uk/sfx/book?p=3
|
||||
* Phone ringing sound by andyt's on http://www.freesfx.co.uk/
|
||||
http://www.freesfx.co.uk/sfx/phone?p=5
|
||||
|
@ -1,2 +1,2 @@
|
||||
default
|
||||
homedecor_common
|
||||
default
|
||||
homedecor
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
@ -16,8 +16,8 @@ local function start_smoke(pos, node, clicker, chimney)
|
||||
end, s_handle)
|
||||
end
|
||||
minetest.delete_particlespawner(id)
|
||||
this_spawner_meta:set_int("smoky", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("smoky", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
return
|
||||
end
|
||||
|
||||
@ -34,7 +34,7 @@ local function start_smoke(pos, node, clicker, chimney)
|
||||
})
|
||||
if chimney == 1 then
|
||||
this_spawner_meta:set_int("smoky", id)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
else
|
||||
s_handle = minetest.sound_play("fire_small", {
|
||||
pos = pos,
|
||||
@ -62,40 +62,47 @@ local function stop_smoke(pos)
|
||||
end, s_handle)
|
||||
end
|
||||
|
||||
this_spawner_meta:set_int("smoky", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("smoky", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
end
|
||||
|
||||
minetest.register_node("fake_fire:ice_fire", {
|
||||
inventory_image = "ice_fire_inv.png",
|
||||
description = S("Ice fire"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1},
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name="ice_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
start_smoke(pos, node, clicker)
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
minetest.sound_play("fire_extinguish", {
|
||||
pos = pos, max_hear_distance = 5
|
||||
})
|
||||
end,
|
||||
drop = ""
|
||||
})
|
||||
-- FLAME TYPES
|
||||
local flame_types = {
|
||||
{ "fake", S("Fake fire") },
|
||||
{ "ice", S("Ice fire") },
|
||||
}
|
||||
|
||||
minetest.register_alias("fake_fire:fake_fire", "fire:permanent_flame")
|
||||
for _, f in ipairs(flame_types) do
|
||||
local name, desc = unpack(f)
|
||||
minetest.register_node("fake_fire:"..name.."_fire", {
|
||||
inventory_image = name.."_fire_inv.png",
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1},
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name=name.."_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
start_smoke(pos, node, clicker)
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
minetest.sound_play("fire_extinguish", {
|
||||
pos = pos, max_hear_distance = 5
|
||||
})
|
||||
end,
|
||||
drop = ""
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("fake_fire:fancy_fire", {
|
||||
inventory_image = "fancy_fire_inv.png",
|
||||
@ -183,18 +190,43 @@ for _, mat in ipairs(materials) do
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("fake_fire:flint_and_steel", "fire:flint_and_steel")
|
||||
|
||||
minetest.override_item("default:ice", {
|
||||
on_ignite = function(pos, igniter)
|
||||
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(flame_pos).name == "air" then
|
||||
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"})
|
||||
-- FLINT and STEEL
|
||||
minetest.register_tool("fake_fire:flint_and_steel", {
|
||||
description = S("Flint and steel"),
|
||||
inventory_image = "flint_and_steel.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={flamable = {uses=65, maxlevel=1}}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
|
||||
if string.find(minetest.get_node(pointed_thing.under).name, "ice") then
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:ice_fire"})
|
||||
else
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:fake_fire"})
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), S("This area is protected!"))
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
itemstack:add_wear(65535/65)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
-- CRAFTS
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:flint_and_steel',
|
||||
recipe = {"default:obsidian_shard", "default:steel_ingot"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
|
193
homedecor/bathroom_furniture.lua
Normal file
@ -0,0 +1,193 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_dark", {
|
||||
description = S("Bathroom/kitchen tiles (dark)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xff606060 },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_medium", {
|
||||
description = S("Bathroom/kitchen tiles (medium)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffc0c0c0 },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_light", {
|
||||
description = S("Bathroom/kitchen tiles (light)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffffffff },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
local tr_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.375, -0.3125, 0.25, 0.375, 0.375, 0.5 }
|
||||
}
|
||||
|
||||
homedecor.register("towel_rod", {
|
||||
description = S("Towel rod with towel"),
|
||||
mesh = "homedecor_towel_rod.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_terrycloth.png",
|
||||
"default_wood.png",
|
||||
},
|
||||
inventory_image = "homedecor_towel_rod_inv.png",
|
||||
selection_box = tr_cbox,
|
||||
walkable = false,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("medicine_cabinet", {
|
||||
description = S("Medicine cabinet"),
|
||||
mesh = "homedecor_medicine_cabinet.obj",
|
||||
tiles = {
|
||||
'default_wood.png',
|
||||
'homedecor_medicine_cabinet_mirror.png'
|
||||
},
|
||||
inventory_image = "homedecor_medicine_cabinet_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
node.name = "homedecor:medicine_cabinet_open"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
infotext=S("Medicine cabinet"),
|
||||
inventory = {
|
||||
size=6,
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("medicine_cabinet_open", {
|
||||
mesh = "homedecor_medicine_cabinet_open.obj",
|
||||
tiles = {
|
||||
'default_wood.png',
|
||||
'homedecor_medicine_cabinet_mirror.png',
|
||||
'homedecor_medicine_cabinet_inside.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
drop = "homedecor:medicine_cabinet",
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
node.name = "homedecor:medicine_cabinet"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
-- convert old static nodes
|
||||
|
||||
homedecor.old_static_bathroom_tiles = {
|
||||
"homedecor:tiles_1",
|
||||
"homedecor:tiles_2",
|
||||
"homedecor:tiles_3",
|
||||
"homedecor:tiles_4",
|
||||
"homedecor:tiles_red",
|
||||
"homedecor:tiles_tan",
|
||||
"homedecor:tiles_yellow",
|
||||
"homedecor:tiles_green",
|
||||
"homedecor:tiles_blue"
|
||||
}
|
||||
|
||||
local old_to_color = {
|
||||
"light_grey",
|
||||
"grey",
|
||||
"black",
|
||||
"black"
|
||||
}
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_bathroom_tiles",
|
||||
label = "Convert bathroom tiles to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_static_bathroom_tiles,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local newname = "homedecor:bathroom_tiles_light"
|
||||
local a = string.find(name, "_")
|
||||
local color = string.sub(name, a + 1)
|
||||
|
||||
if color == "tan" then
|
||||
color = "yellow_s50"
|
||||
elseif color == "1" or color == "2" or color == "3" or color == "4" then
|
||||
if color == "4" then
|
||||
newname = "homedecor:bathroom_tiles_medium"
|
||||
end
|
||||
color = old_to_color[tonumber(color)]
|
||||
elseif color ~= "yellow" then
|
||||
color = color.."_s50"
|
||||
end
|
||||
|
||||
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
|
||||
|
||||
minetest.set_node(pos, { name = newname, param2 = paletteidx })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:recolor_bathroom_tiles",
|
||||
label = "Convert bathroom tiles to use UD extended palette",
|
||||
run_at_every_load = false,
|
||||
nodenames = {
|
||||
"homedecor:bathroom_tiles_light",
|
||||
"homedecor:bathroom_tiles_medium",
|
||||
"homedecor:bathroom_tiles_dark",
|
||||
},
|
||||
action = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("palette") ~= "ext" then
|
||||
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
end
|
||||
})
|
326
homedecor/bathroom_sanitation.lua
Normal file
@ -0,0 +1,326 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local toilet_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -6/16, -8/16, -8/16, 6/16, 9/16, 8/16 },
|
||||
}
|
||||
|
||||
local toilet_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-6/16, -8/16, -8/16, 6/16, 1/16, 8/16 },
|
||||
{-6/16, -8/16, 4/16, 6/16, 9/16, 8/16 }
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("toilet", {
|
||||
description = S("Toilet"),
|
||||
mesh = "homedecor_toilet_closed.obj",
|
||||
tiles = {
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
|
||||
},
|
||||
selection_box = toilet_sbox,
|
||||
node_box = toilet_cbox,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "homedecor:toilet_open"
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toilet_open", {
|
||||
mesh = "homedecor_toilet_open.obj",
|
||||
tiles = {
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"default_water.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
|
||||
},
|
||||
selection_box = toilet_sbox,
|
||||
collision_box = toilet_cbox,
|
||||
drop = "homedecor:toilet",
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "homedecor:toilet"
|
||||
minetest.set_node(pos, node)
|
||||
minetest.sound_play("homedecor_toilet_flush", {
|
||||
pos=pos,
|
||||
max_hear_distance = 5,
|
||||
gain = 1,
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
-- toilet paper :-)
|
||||
|
||||
local tp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, 0.125, 0.0625, 0.1875, 0.4375, 0.5 }
|
||||
}
|
||||
|
||||
homedecor.register("toilet_paper", {
|
||||
description = S("Toilet paper"),
|
||||
mesh = "homedecor_toilet_paper.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_quilted_paper.png",
|
||||
"default_wood.png"
|
||||
},
|
||||
inventory_image = "homedecor_toilet_paper_inv.png",
|
||||
selection_box = tp_cbox,
|
||||
walkable = false,
|
||||
groups = {snappy=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
--Sink
|
||||
|
||||
local sink_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -5/16, -8/16, 1/16, 5/16, 8/16, 8/16 }
|
||||
}
|
||||
|
||||
homedecor.register("sink", {
|
||||
description = S("Bathroom Sink"),
|
||||
mesh = "homedecor_bathroom_sink.obj",
|
||||
tiles = {
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"default_water.png"
|
||||
},
|
||||
inventory_image="homedecor_bathroom_sink_inv.png",
|
||||
selection_box = sink_cbox,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 },
|
||||
{ 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 },
|
||||
{ -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 },
|
||||
{ -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 },
|
||||
{ -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 }
|
||||
}
|
||||
},
|
||||
on_destruct = function(pos)
|
||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
end
|
||||
})
|
||||
|
||||
--Taps
|
||||
|
||||
local function taps_on_rightclick(pos, node, clicker, itemstack, pointed_thing)
|
||||
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
if below and
|
||||
below.name == "homedecor:shower_tray" or
|
||||
below.name == "homedecor:sink" or
|
||||
below.name == "homedecor:kitchen_cabinet_with_sink" or
|
||||
below.name == "homedecor:kitchen_cabinet_with_sink_locked" then
|
||||
local particledef = {
|
||||
outlet = { x = 0, y = -0.44, z = 0.28 },
|
||||
velocity_x = { min = -0.1, max = 0.1 },
|
||||
velocity_y = -0.3,
|
||||
velocity_z = { min = -0.1, max = 0 },
|
||||
spread = 0
|
||||
}
|
||||
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
homedecor.register("taps", {
|
||||
description = S("Bathroom taps/faucet"),
|
||||
mesh = "homedecor_bathroom_faucet.obj",
|
||||
tiles = {
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal.png",
|
||||
"homedecor_generic_metal_bright.png"
|
||||
},
|
||||
inventory_image = "3dforniture_taps_inv.png",
|
||||
wield_image = "3dforniture_taps_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
|
||||
},
|
||||
walkable = false,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_rightclick = taps_on_rightclick,
|
||||
on_destruct = homedecor.stop_particle_spawner,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
homedecor.register("taps_brass", {
|
||||
description = S("Bathroom taps/faucet (brass)"),
|
||||
mesh = "homedecor_bathroom_faucet.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_metal_brass.png",
|
||||
"homedecor_generic_metal_brass.png",
|
||||
"homedecor_generic_metal.png",
|
||||
"homedecor_generic_metal_brass.png"
|
||||
},
|
||||
inventory_image = "3dforniture_taps_brass_inv.png",
|
||||
wield_image = "3dforniture_taps_brass_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
|
||||
},
|
||||
walkable = false,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_rightclick = taps_on_rightclick,
|
||||
on_destruct = homedecor.stop_particle_spawner,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
--Shower Tray
|
||||
|
||||
homedecor.register("shower_tray", {
|
||||
description = S("Shower Tray"),
|
||||
tiles = {
|
||||
"forniture_marble_base_ducha_top.png",
|
||||
"homedecor_marble.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, -0.5, -0.5, 0.5, -0.45, 0.5 },
|
||||
{ -0.5, -0.45, -0.5, 0.5, -0.4, -0.45 },
|
||||
{ -0.5, -0.45, 0.45, 0.5, -0.4, 0.5 },
|
||||
{ -0.5, -0.45, -0.45, -0.45, -0.4, 0.45 },
|
||||
{ 0.45, -0.45, -0.45, 0.5, -0.4, 0.45 }
|
||||
},
|
||||
},
|
||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_destruct = function(pos)
|
||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+2, z=pos.z}) -- the showerhead
|
||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z}) -- the taps, if any
|
||||
end
|
||||
})
|
||||
|
||||
--Shower Head
|
||||
|
||||
|
||||
local sh_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -0.4, -0.05, 0.2, 0.1, 0.5 }
|
||||
}
|
||||
|
||||
homedecor.register("shower_head", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_shower_head.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_metal.png",
|
||||
"homedecor_shower_head.png"
|
||||
},
|
||||
inventory_image = "homedecor_shower_head_inv.png",
|
||||
description = S("Shower Head"),
|
||||
groups = {snappy=3},
|
||||
selection_box = sh_cbox,
|
||||
walkable = false,
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-2.0, z=pos.z})
|
||||
if below and below.name == "homedecor:shower_tray" then
|
||||
local particledef = {
|
||||
outlet = { x = 0, y = -0.42, z = 0.1 },
|
||||
velocity_x = { min = -0.15, max = 0.15 },
|
||||
velocity_y = -2,
|
||||
velocity_z = { min = -0.3, max = 0.1 },
|
||||
spread = 0.12
|
||||
}
|
||||
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_shower")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = function(pos)
|
||||
homedecor.stop_particle_spawner(pos)
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("bathtub_clawfoot_brass_taps", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_bathtub_clawfoot.obj",
|
||||
tiles = {
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_brass.png",
|
||||
"homedecor_marble.png",
|
||||
"homedecor_bathtub_clawfoot_bottom_inside.png",
|
||||
},
|
||||
description = S("Bathtub, clawfoot, with brass taps"),
|
||||
groups = {cracky=3},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 1.5, 0.3125, 0.5 },
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("bathtub_clawfoot_chrome_taps", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_bathtub_clawfoot.obj",
|
||||
tiles = {
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_marble.png",
|
||||
"homedecor_bathtub_clawfoot_bottom_inside.png",
|
||||
},
|
||||
description = S("Bathtub, clawfoot, with chrome taps"),
|
||||
groups = {cracky=3},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 1.5, 0.3125, 0.5 },
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
local bs_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -8/16, -8/16, 1/16, 8/16, 8/16, 8/16 }
|
||||
}
|
||||
|
||||
homedecor.register("bathroom_set", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_bathroom_set.obj",
|
||||
tiles = {
|
||||
"homedecor_bathroom_set_mirror.png",
|
||||
"homedecor_bathroom_set_tray.png",
|
||||
"homedecor_bathroom_set_toothbrush.png",
|
||||
"homedecor_bathroom_set_cup.png",
|
||||
"homedecor_bathroom_set_toothpaste.png",
|
||||
},
|
||||
inventory_image = "homedecor_bathroom_set_inv.png",
|
||||
description = S("Bathroom sundries set"),
|
||||
groups = {snappy=3},
|
||||
selection_box = bs_cbox,
|
||||
walkable = false,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_alias("3dforniture:toilet", "homedecor:toilet")
|
||||
minetest.register_alias("3dforniture:toilet_open", "homedecor:toilet_open")
|
||||
minetest.register_alias("3dforniture:sink", "homedecor:sink")
|
||||
minetest.register_alias("3dforniture:taps", "homedecor:taps")
|
||||
minetest.register_alias("3dforniture:shower_tray", "homedecor:shower_tray")
|
||||
minetest.register_alias("3dforniture:shower_head", "homedecor:shower_head")
|
||||
minetest.register_alias("3dforniture:table_lamp", "homedecor:table_lamp_off")
|
||||
|
||||
minetest.register_alias("toilet", "homedecor:toilet")
|
||||
minetest.register_alias("sink", "homedecor:sink")
|
||||
minetest.register_alias("taps", "homedecor:taps")
|
||||
minetest.register_alias("shower_tray", "homedecor:shower_tray")
|
||||
minetest.register_alias("shower_head", "homedecor:shower_head")
|
||||
minetest.register_alias("table_lamp", "homedecor:table_lamp_off")
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
@ -52,11 +52,13 @@ homedecor.register("bed_regular", {
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
if not placer:get_player_control().sneak then
|
||||
return homedecor.bed_expansion(pos, placer, itemstack, pointed_thing)
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
homedecor.unextend_bed(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
@ -64,9 +66,11 @@ homedecor.register("bed_regular", {
|
||||
if itemname == "homedecor:bed_regular" then
|
||||
homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true)
|
||||
return itemstack
|
||||
-- else
|
||||
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
||||
-- return itemstack
|
||||
else
|
||||
-- if minetest.get_modpath("beds") then
|
||||
-- beds.on_rightclick(pos, clicker)
|
||||
-- end
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
})
|
||||
@ -89,11 +93,16 @@ homedecor.register("bed_extended", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
expand = { forward = "air" },
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
homedecor.unextend_bed(pos)
|
||||
end,
|
||||
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
||||
-- local itemname = itemstack:get_name()
|
||||
-- if minetest.get_modpath("beds") then
|
||||
-- beds.on_rightclick(pos, clicker)
|
||||
-- end
|
||||
-- return itemstack
|
||||
-- end,
|
||||
drop = "homedecor:bed_regular"
|
||||
@ -120,8 +129,10 @@ homedecor.register("bed_kingsize", {
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
local inv = digger:get_inventory()
|
||||
if digger:get_player_control().sneak and inv:room_for_item("main", "homedecor:bed_regular 2") then
|
||||
inv:remove_item("main", "homedecor:bed_kingsize 1")
|
||||
@ -129,9 +140,12 @@ homedecor.register("bed_kingsize", {
|
||||
end
|
||||
end,
|
||||
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
||||
-- local itemname = itemstack:get_name()
|
||||
-- if minetest.get_modpath("beds") then
|
||||
-- beds.on_rightclick(pos, clicker)
|
||||
-- end
|
||||
-- return itemstack
|
||||
-- end,
|
||||
-- end
|
||||
})
|
||||
|
||||
for _, w in pairs({ N_("mahogany"), N_("oak") }) do
|
||||
@ -220,7 +234,7 @@ for _, color in ipairs(bedcolors) do
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = ":homedecor:convert_beds",
|
||||
name = "homedecor:convert_beds",
|
||||
label = "Convert homedecor static bed nodes to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_bed_nodes,
|
||||
@ -265,126 +279,3 @@ minetest.register_lbm({
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:nightstand_oak_one_drawer",
|
||||
recipe = {
|
||||
{ "homedecor:drawer_small" },
|
||||
{ "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_oak_one_drawer",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:nightstand_oak_two_drawers",
|
||||
recipe = {
|
||||
{ "homedecor:drawer_small" },
|
||||
{ "homedecor:drawer_small" },
|
||||
{ "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:nightstand_oak_two_drawers",
|
||||
recipe = {
|
||||
{ "homedecor:nightstand_oak_one_drawer" },
|
||||
{ "homedecor:drawer_small" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_oak_two_drawers",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:nightstand_mahogany_one_drawer",
|
||||
recipe = {
|
||||
"homedecor:nightstand_oak_one_drawer",
|
||||
"dye:brown",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_mahogany_one_drawer",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:nightstand_mahogany_two_drawers",
|
||||
recipe = {
|
||||
"homedecor:nightstand_oak_two_drawers",
|
||||
"dye:brown",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_mahogany_two_drawers",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
{ "group:stick", "", "group:stick" },
|
||||
{ "wool:white", "wool:white", "wool:white" },
|
||||
{ "group:wood", "", "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_regular",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_kingsize",
|
||||
recipe = {
|
||||
{ "homedecor:bed_regular", "homedecor:bed_regular" }
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_kingsize",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_kingsize",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_kingsize",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
@ -89,7 +89,7 @@ for _, c in ipairs(bookcolors) do
|
||||
if data.title and data.title ~= "" then
|
||||
meta:set_string("infotext", data.title)
|
||||
end
|
||||
if not creative.is_enabled_for(plname) then
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
@ -156,20 +156,13 @@ for _, c in ipairs(bookcolors) do
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
if form_name ~= BOOK_FORMNAME then
|
||||
return false
|
||||
if form_name ~= BOOK_FORMNAME or not fields.save then
|
||||
return
|
||||
end
|
||||
local player_name = player:get_player_name()
|
||||
local pos = player_current_book[player_name]
|
||||
if not pos then
|
||||
return true
|
||||
end
|
||||
if not pos then return end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
if owner ~= "" and player_name ~= owner or not fields.save then
|
||||
player_current_book[player_name] = nil
|
||||
return true
|
||||
end
|
||||
meta:set_string("title", fields.title or "")
|
||||
meta:set_string("text", fields.text or "")
|
||||
meta:set_string("owner", player_name)
|
||||
@ -178,35 +171,7 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
end
|
||||
minetest.log("action", S("@1 has written in a book (title: \"@2\"): \"@3\" at location @4",
|
||||
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:getpos())))
|
||||
|
||||
player_current_book[player_name] = nil
|
||||
return true
|
||||
end)
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
local bookcolors = {
|
||||
"red",
|
||||
"green",
|
||||
"blue",
|
||||
"violet",
|
||||
"grey",
|
||||
"brown"
|
||||
}
|
||||
|
||||
for _, color in ipairs(bookcolors) do
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:book_"..color,
|
||||
recipe = {
|
||||
"dye:"..color,
|
||||
"default:book"
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- aliases
|
||||
|
||||
minetest.register_alias("homedecor:book", "homedecor:book_grey")
|
||||
minetest.register_alias("homedecor:book_open", "homedecor:book_open_grey")
|
@ -1,6 +1,6 @@
|
||||
-- Nodes that would affect the local temperature e.g. fans, heater, A/C
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor.register("air_conditioner", {
|
||||
description = S("Air Conditioner"),
|
||||
@ -16,7 +16,7 @@ homedecor.register("air_conditioner", {
|
||||
|
||||
-- fans
|
||||
|
||||
minetest.register_entity(":homedecor:mesh_desk_fan", {
|
||||
minetest.register_entity("homedecor:mesh_desk_fan", {
|
||||
collisionbox = homedecor.nodebox.null,
|
||||
visual = "mesh",
|
||||
mesh = "homedecor_desk_fan.b3d",
|
||||
@ -25,6 +25,7 @@ minetest.register_entity(":homedecor:mesh_desk_fan", {
|
||||
})
|
||||
|
||||
local add_mesh_desk_fan_entity = function(pos)
|
||||
print("in add_mesh_desk_fan_entity()")
|
||||
local param2 = minetest.get_node(pos).param2
|
||||
local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan")
|
||||
if param2 == 0 then
|
||||
@ -141,81 +142,3 @@ homedecor.register("radiator", {
|
||||
collision_box = r_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-- crafting
|
||||
minetest.register_craftitem(":homedecor:fan_blades", {
|
||||
description = S("Fan blades"),
|
||||
inventory_image = "homedecor_fan_blades.png"
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fan_blades 2",
|
||||
recipe = {
|
||||
{ "", "basic_materials:plastic_sheet", "" },
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:air_conditioner",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor" },
|
||||
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:air_conditioner",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:ceiling_fan",
|
||||
recipe = {
|
||||
{ "basic_materials:motor" },
|
||||
{ "homedecor:fan_blades" },
|
||||
{ "homedecor:glowlight_small_cube" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:ceiling_fan",
|
||||
recipe = {
|
||||
{ "basic_materials:motor" },
|
||||
{ "homedecor:fan_blades" },
|
||||
{ "homedecor:glowlight_small_cube" }
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:desk_fan",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor"},
|
||||
{"", "default:steel_ingot", ""}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:space_heater",
|
||||
recipe = {
|
||||
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"},
|
||||
{"basic_materials:plastic_sheet", "homedecor:fan_blades", "basic_materials:motor"},
|
||||
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:radiator",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" },
|
||||
{ "basic_materials:ic", "basic_materials:heating_element", "" },
|
||||
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
|
||||
},
|
||||
})
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local clock_sbox = {
|
||||
type = "fixed",
|
||||
@ -97,55 +97,5 @@ homedecor.register("grandfather_clock", {
|
||||
on_rotate = screwdriver.rotate_simple
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:analog_clock_plastic 2",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "dye:black", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "dye:black", "basic_materials:plastic_sheet" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:analog_clock_wood 2",
|
||||
recipe = {
|
||||
{ "group:stick", "dye:black", "group:stick" },
|
||||
{ "group:stick", "basic_materials:ic", "group:stick" },
|
||||
{ "group:stick", "dye:black", "group:stick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:digital_clock 2",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "default:paper", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal_simple", "basic_materials:plastic_sheet" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:alarm_clock",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "homedecor:speaker_driver", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "homedecor:digital_clock", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal_simple", "basic_materials:plastic_sheet" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:grandfather_clock",
|
||||
recipe = {
|
||||
{ "building_blocks:slab_hardwood","homedecor:analog_clock_wood","building_blocks:slab_hardwood" },
|
||||
{ "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" },
|
||||
{ "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" }
|
||||
},
|
||||
})
|
||||
|
||||
-- aliases
|
||||
|
||||
minetest.register_alias("homedecor:grandfather_clock_bottom", "homedecor:grandfather_clock")
|
||||
minetest.register_alias("homedecor:grandfather_clock_top", "air")
|
@ -1,7 +1,7 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_node(":homedecor:cobweb_corner", {
|
||||
minetest.register_node("homedecor:cobweb_corner", {
|
||||
description = S("Cobweb"),
|
||||
drawtype = "torchlike",
|
||||
tiles = { "homedecor_cobweb_torchlike.png" },
|
||||
@ -25,7 +25,7 @@ minetest.register_node(":homedecor:cobweb_corner", {
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node(":Lhomedecor:cobweb_centered", {
|
||||
minetest.register_node("homedecor:cobweb_centered", {
|
||||
description = S("Cobweb"),
|
||||
drawtype = "nodebox",
|
||||
tiles = { "homedecor_cobweb.png" },
|
||||
@ -52,7 +52,7 @@ minetest.register_node(":Lhomedecor:cobweb_centered", {
|
||||
drop = "homedecor:cobweb_corner"
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:cobweb_flat", {
|
||||
minetest.register_node("homedecor:cobweb_flat", {
|
||||
description = S("Cobweb"),
|
||||
drawtype = "nodebox",
|
||||
tiles = { "homedecor_cobweb.png" },
|
||||
@ -79,7 +79,7 @@ minetest.register_node(":homedecor:cobweb_flat", {
|
||||
drop = "homedecor:cobweb_corner"
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:cobweb_plantlike", {
|
||||
minetest.register_node("homedecor:cobweb_plantlike", {
|
||||
description = S("Cobweb"),
|
||||
drawtype = "plantlike",
|
||||
tiles = { "homedecor_cobweb_plantlike.png" },
|
||||
@ -158,13 +158,13 @@ function homedecor.rotate_cobweb(pos)
|
||||
|
||||
end
|
||||
|
||||
-- crafting
|
||||
-- convert existing cobwebs
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:cobweb_corner 5",
|
||||
recipe = {
|
||||
{ "farming:string", "", "farming:string" },
|
||||
{ "", "farming:string", "" },
|
||||
{ "farming:string", "", "farming:string" }
|
||||
},
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:cobweb" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
homedecor.rotate_cobweb(pos)
|
||||
end
|
||||
})
|
18
homedecor/copyright.txt
Normal file
@ -0,0 +1,18 @@
|
||||
Most code and all textures by Vanessa Ezekowitz.
|
||||
|
||||
Some code copied and modified from the game's default mods (especially
|
||||
doors) and ironzorg's flowers mod.
|
||||
|
||||
Licenses:
|
||||
* For the lua code, LGPL.
|
||||
* For the door open/close sound, CC-By-SA 3.0 by Slanesh on freesound.org
|
||||
http://freesound.org/people/Slanesh/sounds/31768/
|
||||
* For the gate open/close sound, CC0, by j1987 on freesound.org
|
||||
http://freesound.org/people/j1987/sounds/106116/
|
||||
* For the doorbell sound, CC0 by guitarguy1985 on freesound.org
|
||||
http://freesound.org/people/guitarguy1985/sounds/69384/
|
||||
* For the book sound, Public Domain by mckinneysound's on http://www.freesfx.co.uk/
|
||||
http://www.freesfx.co.uk/sfx/book?p=3
|
||||
* For the phone ring, Public Domain by andyt's on http://www.freesfx.co.uk/
|
||||
http://www.freesfx.co.uk/sfx/phone?p=5
|
||||
* For all images and everything else, WTFPL.
|
3112
homedecor/crafts.lua
Normal file
13
homedecor/depends.txt
Normal file
@ -0,0 +1,13 @@
|
||||
default
|
||||
unifieddyes
|
||||
homedecor_i18n
|
||||
building_blocks?
|
||||
signs_lib?
|
||||
moreblocks?
|
||||
technic?
|
||||
dye?
|
||||
bees?
|
||||
bucket?
|
||||
beds?
|
||||
flowers?
|
||||
3d_armor?
|
659
homedecor/doors_and_gates.lua
Normal file
@ -0,0 +1,659 @@
|
||||
-- Node definitions for Homedecor doors
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
-- doors
|
||||
|
||||
local function isSolid(pos, adjust)
|
||||
local adj = {x = adjust[1], y = adjust[2], z = adjust[3]}
|
||||
local node = minetest.get_node(vector.add(pos,adj))
|
||||
if node then
|
||||
local idef = minetest.registered_nodes[minetest.get_node(vector.add(pos,adj)).name]
|
||||
if idef then
|
||||
return idef.walkable
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function countSolids(pos,node,level)
|
||||
local solids = 0
|
||||
for x = -1, 1 do
|
||||
for z = -1, 1 do
|
||||
local y = (node.param2 == 5) and -level or level
|
||||
-- special cases when x == z == 0
|
||||
if x == 0 and z == 0 then
|
||||
if level == 1 then
|
||||
-- when looking past the trap door, cannot be solid in center
|
||||
if isSolid(pos,{x,y,z}) then
|
||||
return false
|
||||
end
|
||||
-- no else. it doesn't matter if x == y == z is solid, that's us.
|
||||
end
|
||||
elseif isSolid(pos,{x,y,z}) then
|
||||
solids = solids + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return solids
|
||||
end
|
||||
|
||||
local function calculateClosed(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
-- the door is considered closed if it is closing off something.
|
||||
|
||||
local direction = node.param2 % 6
|
||||
local isTrap = direction == 0 or direction == 5
|
||||
if isTrap then
|
||||
-- the trap door is considered closed when all nodes on its sides are solid
|
||||
-- or all nodes in the 3x3 above/below it are solid except the center
|
||||
for level = 0, 1 do
|
||||
local solids = countSolids(pos,node,level)
|
||||
if solids == 8 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
else
|
||||
-- the door is considered closed when the nodes on its sides are solid
|
||||
-- or the 3 nodes in its facing direction are solid nonsolid solid
|
||||
-- if the door has two levels (i.e. not a gate) then this must
|
||||
-- be true for the top node as well.
|
||||
|
||||
-- sorry I dunno the math to figure whether to x or z
|
||||
if direction == 1 or direction == 2 then
|
||||
if isSolid(pos,{0,0,-1}) and isSolid(pos,{0,0,1}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
local x = (direction == 1) and 1 or -1
|
||||
if isSolid(pos,{x,0,-1}) and not isSolid(pos,{x,0,0}) and isSolid(pos,{x,0,1}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
else
|
||||
-- direction == 3 or 4
|
||||
if isSolid(pos,{-1,0,0}) and isSolid(pos,{1,0,0}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
local z = (direction == 3) and 1 or -1
|
||||
if isSolid(pos,{-1,0,z}) and not isSolid(pos,{0,0,z}) and isSolid(pos,{1,0,z}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- isClosed flag, is 0 or 1 0 = open, 1 = closed
|
||||
local function getClosed(pos)
|
||||
local isClosed = minetest.get_meta(pos):get_string('closed')
|
||||
if isClosed=='' then
|
||||
return calculateClosed(pos)
|
||||
else
|
||||
isClosed = tonumber(isClosed)
|
||||
-- may be closed or open (1 or 0)
|
||||
return isClosed == 1
|
||||
end
|
||||
end
|
||||
|
||||
local function addDoorNode(pos,def,isClosed)
|
||||
minetest.set_node(pos, def)
|
||||
minetest.get_meta(pos):set_int('closed', isClosed and 1 or 0)
|
||||
end
|
||||
|
||||
local door_model_list = {
|
||||
{ name = "closet_mahogany",
|
||||
description = N_("Mahogany Closet Door (@1 opening)"),
|
||||
mesh = "homedecor_door_closet.obj"
|
||||
},
|
||||
|
||||
{ name = "closet_oak",
|
||||
description = N_("Oak Closet Door (@1 opening)"),
|
||||
mesh = "homedecor_door_closet.obj"
|
||||
},
|
||||
|
||||
{ name = "exterior_fancy",
|
||||
description = N_("Fancy Wood/Glass Door (@1 opening)"),
|
||||
mesh = "homedecor_door_fancy.obj",
|
||||
tiles = {
|
||||
"homedecor_door_exterior_fancy.png",
|
||||
"homedecor_door_exterior_fancy_insert.png"
|
||||
},
|
||||
usealpha = true
|
||||
},
|
||||
|
||||
{ name = "glass",
|
||||
description = N_("Glass Office Door (@1 opening)"),
|
||||
mesh = "homedecor_door_plain.obj"
|
||||
},
|
||||
|
||||
{ name = "wood_glass_oak",
|
||||
description = N_("Glass and Wood, Oak-colored (@1 opening)"),
|
||||
mesh = "homedecor_door_wood_glass.obj",
|
||||
tiles = {
|
||||
"homedecor_door_wood_glass_oak.png",
|
||||
"homedecor_door_wood_glass_insert.png",
|
||||
}
|
||||
},
|
||||
|
||||
{ name = "wood_glass_mahogany",
|
||||
description = N_("Glass and Wood, Mahogany-colored (@1 opening)"),
|
||||
mesh = "homedecor_door_wood_glass.obj",
|
||||
tiles = {
|
||||
"homedecor_door_wood_glass_mahogany.png",
|
||||
"homedecor_door_wood_glass_insert.png",
|
||||
}
|
||||
},
|
||||
|
||||
{ name = "wood_glass_white",
|
||||
description = N_("Glass and Wood, White (@1 opening)"),
|
||||
mesh = "homedecor_door_wood_glass.obj",
|
||||
tiles = {
|
||||
"homedecor_door_wood_glass_white.png",
|
||||
"homedecor_door_wood_glass_insert.png",
|
||||
}
|
||||
},
|
||||
|
||||
{ name = "wood_plain",
|
||||
description = N_("Plain Wooden Door (@1 opening)"),
|
||||
mesh = "homedecor_door_plain.obj"
|
||||
},
|
||||
|
||||
{ name = "bedroom",
|
||||
description = N_("White Bedroom Door (@1 opening)"),
|
||||
mesh = "homedecor_door_plain.obj"
|
||||
},
|
||||
|
||||
{ name = "wrought_iron",
|
||||
description = N_("Wrought Iron Gate/Door (@1 opening)"),
|
||||
mesh = "homedecor_door_wrought_iron.obj"
|
||||
},
|
||||
|
||||
{ name = "woodglass",
|
||||
description = N_("Wooden door with glass insert (@1 opening)"),
|
||||
mesh = "homedecor_door_woodglass_typea.obj",
|
||||
tiles = {
|
||||
"homedecor_door_woodglass_typea.png",
|
||||
"homedecor_door_woodglass_typea_insert.png",
|
||||
},
|
||||
usealpha = true
|
||||
},
|
||||
|
||||
{ name = "woodglass2",
|
||||
description = N_("Wooden door with glass insert, type 2 (@1 opening)"),
|
||||
mesh = "homedecor_door_plain.obj",
|
||||
usealpha = true
|
||||
},
|
||||
}
|
||||
|
||||
local def_selbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.375, 0.5, 1.5, 0.5 }
|
||||
}
|
||||
|
||||
local sides = { N_("left"), N_("right") }
|
||||
|
||||
for i, side in ipairs(sides) do
|
||||
|
||||
for _, door_model in ipairs(door_model_list) do
|
||||
|
||||
local doorname = door_model.name
|
||||
|
||||
local selbox = door_model.selectbox or def_selbox
|
||||
local colbox = door_model.collisionbox or door_model.selectbox or def_selbox
|
||||
local mesh = door_model.mesh
|
||||
local groups = {snappy = 3}
|
||||
|
||||
if side == "right" then
|
||||
mesh = string.gsub(door_model.mesh, ".obj", "_right.obj")
|
||||
groups = {snappy = 3, not_in_creative_inventory = 1}
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:door_"..doorname.."_"..side, {
|
||||
description = S(door_model.description, S(side)),
|
||||
drawtype = "mesh",
|
||||
mesh = mesh,
|
||||
tiles = door_model.tiles or { "homedecor_door_"..doorname..".png" },
|
||||
inventory_image = "homedecor_door_"..doorname.."_inv.png",
|
||||
wield_image = "homedecor_door_"..doorname.."_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = groups,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
use_texture_alpha = door_model.usealpha,
|
||||
selection_box = selbox,
|
||||
collision_box = colbox,
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_wing(itemstack, placer, pointed_thing,
|
||||
"homedecor:door_"..doorname.."_left", "air",
|
||||
"homedecor:door_"..doorname.."_right", "air")
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_meta(pos):set_int("closed", 1)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
homedecor.flip_door(pos, node, clicker, doorname, side)
|
||||
return itemstack
|
||||
end,
|
||||
-- both left and right doors may be used for open or closed doors
|
||||
-- so they have to have both action_on and action_off and just
|
||||
-- check when that action is invoked if to continue
|
||||
|
||||
on_punch = function(pos, node, puncher)
|
||||
minetest.get_meta(pos):set_string('closed',nil)
|
||||
end,
|
||||
drop = "homedecor:door_"..doorname.."_left",
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function(pos,node)
|
||||
local isClosed = getClosed(pos)
|
||||
if isClosed then
|
||||
homedecor.flip_door(pos,node,nil,doorname,side,isClosed)
|
||||
end
|
||||
end,
|
||||
action_off = function(pos,node)
|
||||
local isClosed = getClosed(pos)
|
||||
if not isClosed then
|
||||
homedecor.flip_door(pos,node,nil,doorname,side,isClosed)
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:door_"..doorname.."_top_"..side, "air")
|
||||
minetest.register_alias("homedecor:door_"..doorname.."_bottom_"..side, "homedecor:door_"..doorname.."_"..side)
|
||||
|
||||
end
|
||||
|
||||
minetest.register_alias("homedecor:door_wood_glass_top_"..side, "air")
|
||||
minetest.register_alias("homedecor:door_wood_glass_bottom_"..side, "homedecor:door_wood_glass_oak_"..side)
|
||||
|
||||
end
|
||||
|
||||
-- Gates
|
||||
|
||||
local gate_list = {
|
||||
{ "picket", S("Unpainted Picket Fence Gate") },
|
||||
{ "picket_white", S("White Picket Fence Gate") },
|
||||
{ "barbed_wire", S("Barbed Wire Fence Gate") },
|
||||
{ "chainlink", S("Chainlink Fence Gate") },
|
||||
{ "half_door", S("\"Half\" Door") },
|
||||
{ "half_door_white", S("\"Half\" Door (white)") }
|
||||
}
|
||||
|
||||
local gate_models_closed = {
|
||||
{{ -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 }},
|
||||
|
||||
{{ -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
||||
{ -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 }}, -- the wire
|
||||
|
||||
{{ -8/16, -8/16, 6/16, -7/16, 8/16, 8/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }, -- the chainlink itself
|
||||
{ -8/16, -3/16, 6/16, -6/16, 3/16, 8/16 }}, -- the lump representing the lock
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}, -- the whole door :P
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}, -- the whole door :P
|
||||
|
||||
}
|
||||
|
||||
local gate_models_open = {
|
||||
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
||||
|
||||
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
||||
|
||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, -6/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ 13/32, 7/16, -8/16, 15/32, 8/16, 8/16 }, -- top piece
|
||||
{ 13/32, -8/16, -8/16, 15/32, -7/16, 8/16 }, -- bottom piece
|
||||
{ 7/16, -8/16, -6/16, 7/16, 8/16, 6/16 }}, -- the wire
|
||||
|
||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, -7/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ 13/32, 7/16, -8/16, 15/32, 8/16, 8/16 }, -- top piece
|
||||
{ 13/32, -8/16, -8/16, 15/32, -7/16, 8/16 }, -- bottom piece
|
||||
{ 7/16, -8/16, -8/16, 7/16, 8/16, 8/16 }, -- the chainlink itself
|
||||
{ 6/16, -3/16, -8/16, 8/16, 3/16, -6/16 }}, -- the lump representing the lock
|
||||
|
||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, 8/16 }}, -- the whole door :P
|
||||
|
||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, 8/16 }}, -- the whole door :P
|
||||
}
|
||||
|
||||
for i, g in ipairs(gate_list) do
|
||||
|
||||
local gate, gatedesc = unpack(g)
|
||||
|
||||
local tiles = {
|
||||
"homedecor_gate_"..gate.."_tb.png",
|
||||
"homedecor_gate_"..gate.."_tb.png",
|
||||
"homedecor_gate_"..gate.."_lr.png",
|
||||
"homedecor_gate_"..gate.."_lr.png",
|
||||
"homedecor_gate_"..gate.."_fb.png^[transformFX",
|
||||
"homedecor_gate_"..gate.."_fb.png"
|
||||
}
|
||||
|
||||
if gate == "barbed_wire" then
|
||||
tiles = {
|
||||
"homedecor_gate_barbed_wire_edges.png",
|
||||
"homedecor_gate_barbed_wire_edges.png",
|
||||
"homedecor_gate_barbed_wire_edges.png",
|
||||
"homedecor_gate_barbed_wire_edges.png",
|
||||
"homedecor_gate_barbed_wire_fb.png^[transformFX",
|
||||
"homedecor_gate_barbed_wire_fb.png"
|
||||
}
|
||||
end
|
||||
|
||||
if gate == "picket" or gate == "picket_white" then
|
||||
tiles = {
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_gate_"..gate.."_back.png",
|
||||
"homedecor_gate_"..gate.."_front.png"
|
||||
}
|
||||
end
|
||||
|
||||
local def = {
|
||||
drawtype = "nodebox",
|
||||
description = gatedesc,
|
||||
tiles = tiles,
|
||||
paramtype = "light",
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = gate_models_closed[i]
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
homedecor.flip_gate(pos, node, clicker, gate, "closed")
|
||||
return itemstack
|
||||
end,
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function(pos,node) homedecor.flip_gate(pos,node,nil,gate, "closed") end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- gates when placed default to closed, closed.
|
||||
|
||||
minetest.register_node("homedecor:gate_"..gate.."_closed", def)
|
||||
|
||||
-- this is either a terrible idea or a great one
|
||||
def = table.copy(def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
def.selection_box.fixed = { 0.4, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
def.node_box.fixed = gate_models_open[i]
|
||||
def.tiles = {
|
||||
tiles[1].."^[transformR90",
|
||||
tiles[2].."^[transformR270",
|
||||
tiles[6],
|
||||
tiles[5],
|
||||
tiles[4],
|
||||
tiles[3]
|
||||
}
|
||||
def.drop = "homedecor:gate_"..gate.."_closed"
|
||||
def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
homedecor.flip_gate(pos, node, clicker, gate, "open")
|
||||
return itemstack
|
||||
end
|
||||
def.mesecons.effector = {
|
||||
action_off = function(pos,node) homedecor.flip_gate(pos,node,nil,gate, "open") end
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:gate_"..gate.."_open", def)
|
||||
end
|
||||
|
||||
minetest.register_alias("homedecor:fence_barbed_wire_gate_open", "homedecor:gate_barbed_wire_open")
|
||||
minetest.register_alias("homedecor:fence_barbed_wire_gate_closed", "homedecor:gate_barbed_wire_closed")
|
||||
minetest.register_alias("homedecor:fence_chainlink_gate_open", "homedecor:gate_chainlink_open")
|
||||
minetest.register_alias("homedecor:fence_chainlink_gate_closed", "homedecor:gate_chainlink_closed")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_open", "homedecor:gate_picket_open")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_closed", "homedecor:gate_picket_closed")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_white_open", "homedecor:gate_picket_white_open")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_white_closed", "homedecor:gate_picket_white_closed")
|
||||
|
||||
-- to open a door, you switch left for right and subtract from param2, or vice versa right for left
|
||||
-- that is to say open "right" doors become left door nodes, and open left doors right door nodes.
|
||||
-- also adjusting param2 so the node is at 90 degrees.
|
||||
|
||||
function homedecor.flip_door(pos, node, player, name, side, isClosed)
|
||||
if isClosed == nil then
|
||||
isClosed = getClosed(pos)
|
||||
end
|
||||
-- this is where we swap the isClosed status!
|
||||
-- i.e. if isClosed, we're adding an open door
|
||||
-- and if not isClosed, a closed door
|
||||
isClosed = not isClosed
|
||||
|
||||
local rside
|
||||
local nfdir
|
||||
local ofdir = node.param2 or 0
|
||||
if side == "left" then
|
||||
rside = "right"
|
||||
nfdir=ofdir - 1
|
||||
if nfdir < 0 then nfdir = 3 end
|
||||
else
|
||||
rside = "left"
|
||||
nfdir=ofdir + 1
|
||||
if nfdir > 3 then nfdir = 0 end
|
||||
end
|
||||
local sound = isClosed and 'close' or 'open'
|
||||
minetest.sound_play("homedecor_door_"..sound, {
|
||||
pos=pos,
|
||||
max_hear_distance = 5,
|
||||
gain = 2,
|
||||
})
|
||||
-- XXX: does the top half have to remember open/closed too?
|
||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_"..name.."_top_"..rside, param2=nfdir})
|
||||
|
||||
addDoorNode(pos,{ name = "homedecor:door_"..name.."_bottom_"..rside, param2=nfdir },isClosed)
|
||||
end
|
||||
|
||||
function homedecor.flip_gate(pos, node, player, gate, oc)
|
||||
local isClosed = getClosed(pos);
|
||||
minetest.sound_play("homedecor_gate_open_close", {
|
||||
pos=pos,
|
||||
max_hear_distance = 5,
|
||||
gain = 2,
|
||||
})
|
||||
|
||||
local fdir = node.param2 or 0
|
||||
|
||||
-- since right facing gates use "open" nodes for closed, we need an
|
||||
-- isClosed flag to tell if it's "really" closed.
|
||||
|
||||
local gateresult
|
||||
if oc == "closed" then
|
||||
gateresult = "homedecor:gate_"..gate.."_open"
|
||||
else
|
||||
gateresult = "homedecor:gate_"..gate.."_closed"
|
||||
end
|
||||
|
||||
local def = {name=gateresult, param2=fdir}
|
||||
|
||||
addDoorNode(pos, def, isClosed)
|
||||
|
||||
-- the following opens and closes gates below and above in sync with this one
|
||||
-- (without three gate open/close sounds)
|
||||
|
||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local below = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||
local nodeabove = minetest.get_node(above)
|
||||
local nodebelow = minetest.get_node(below)
|
||||
|
||||
if string.find(nodeabove.name, "homedecor:gate_"..gate) then
|
||||
addDoorNode(above, def, isClosed)
|
||||
end
|
||||
|
||||
if string.find(nodebelow.name, "homedecor:gate_"..gate) then
|
||||
addDoorNode(below, def, isClosed)
|
||||
end
|
||||
end
|
||||
|
||||
-- Japanese-style wood/paper wall pieces and door
|
||||
|
||||
local jp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:japanese_wall_top", {
|
||||
description = S("Japanese wall (top)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_wall_japanese_top.obj",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:japanese_wall_middle", {
|
||||
description = S("Japanese wall"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_wall_japanese_middle.obj",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:japanese_wall_bottom", {
|
||||
description = S("Japanese wall (bottom)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_wall_japanese_bottom.obj",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:tatami_mat", {
|
||||
tiles = {
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png"
|
||||
},
|
||||
description = S("Japanese tatami"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
homedecor.register("door_japanese_closed", {
|
||||
description = S("Japanese-style door"),
|
||||
inventory_image = "homedecor_door_japanese_inv.png",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
mesh = "homedecor_door_japanese_closed.obj",
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 1.5, 0.0625},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.0625, 0.5, 1.5, 0},
|
||||
},
|
||||
expand = { top = "placeholder" },
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:door_japanese_open", param2 = node.param2})
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("door_japanese_open", {
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
mesh = "homedecor_door_japanese_open.obj",
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rotate = screwdriver.disallow,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1.5, -0.5, -0.0625, 0.5, 1.5, 0},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1.5, -0.5, -0.0625, -0.5, 1.5, 0},
|
||||
},
|
||||
expand = { top = "placeholder" },
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:door_japanese_closed", param2 = node.param2})
|
||||
return itemstack
|
||||
end,
|
||||
drop = "homedecor:door_japanese_closed",
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:jpn_door_top", "air")
|
||||
minetest.register_alias("homedecor:jpn_door_bottom", "homedecor:door_japanese_closed")
|
||||
|
||||
minetest.register_alias("homedecor:jpn_door_top_open", "air")
|
||||
minetest.register_alias("homedecor:jpn_door_bottom_open", "homedecor:door_japanese_open")
|
81
homedecor/electrics.lua
Normal file
@ -0,0 +1,81 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor.register("power_outlet", {
|
||||
description = S("Power Outlet"),
|
||||
tiles = {
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_back.png",
|
||||
"homedecor_outlet_edges.png"
|
||||
},
|
||||
inventory_image = "homedecor_outlet_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.125, -0.3125, 0.4375, 0.125, 0, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1875, -0.375, 0.375, 0.1875, 0.0625, 0.5},
|
||||
}
|
||||
},
|
||||
groups = {cracky=3,dig_immediate=2},
|
||||
walkable = false
|
||||
})
|
||||
|
||||
homedecor.register("light_switch", {
|
||||
description = S("Light switch"),
|
||||
tiles = {
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_back.png",
|
||||
"homedecor_light_switch_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_light_switch_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.125, -0.5, 0.4375, 0.125, -0.1875, 0.5 },
|
||||
{ -0.03125, -0.3125, 0.40625, 0.03125, -0.25, 0.5 },
|
||||
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1875, -0.5625, 0.375, 0.1875, -0.1250, 0.5 },
|
||||
}
|
||||
},
|
||||
groups = {cracky=3,dig_immediate=2},
|
||||
walkable = false
|
||||
})
|
||||
|
||||
|
||||
homedecor.register("doorbell", {
|
||||
tiles = { "homedecor_doorbell.png" },
|
||||
inventory_image = "homedecor_doorbell_inv.png",
|
||||
description = S("Doorbell"),
|
||||
groups = {snappy=3},
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, 0, 0.46875, 0.0625, 0.1875, 0.5}, -- NodeBox1
|
||||
{-0.03125, 0.0625, 0.45, 0.03125, 0.125, 0.4675}, -- NodeBox2
|
||||
}
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.sound_play("homedecor_doorbell", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 15
|
||||
})
|
||||
end
|
||||
})
|
157
homedecor/electronics.lua
Normal file
@ -0,0 +1,157 @@
|
||||
-- Various home electronics
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor.register("speaker", {
|
||||
description = S("Large Stereo Speaker"),
|
||||
mesh="homedecor_speaker_large.obj",
|
||||
tiles = {
|
||||
"homedecor_speaker_sides.png",
|
||||
"homedecor_speaker_front.png"
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:speaker_open", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("speaker_open", {
|
||||
description = S("Large Stereo Speaker, open front"),
|
||||
mesh="homedecor_speaker_large_open.obj",
|
||||
tiles = {
|
||||
"homedecor_speaker_sides.png",
|
||||
"homedecor_speaker_driver.png",
|
||||
"homedecor_speaker_open_front.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
|
||||
},
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:speaker", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
local spk_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -3/16, -8/16, 1/16, 3/16, -2/16, 7/16 }
|
||||
}
|
||||
|
||||
homedecor.register("speaker_small", {
|
||||
description = S("Small Surround Speaker"),
|
||||
mesh="homedecor_speaker_small.obj",
|
||||
tiles = {
|
||||
"homedecor_speaker_sides.png",
|
||||
"homedecor_speaker_front.png"
|
||||
},
|
||||
selection_box = spk_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("stereo", {
|
||||
description = S("Stereo Receiver"),
|
||||
tiles = { 'homedecor_stereo_top.png',
|
||||
'homedecor_stereo_bottom.png',
|
||||
'homedecor_stereo_left.png^[transformFX',
|
||||
'homedecor_stereo_left.png',
|
||||
'homedecor_stereo_back.png',
|
||||
'homedecor_stereo_front.png'},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("projection_screen", {
|
||||
description = S("Projection Screen Material"),
|
||||
drawtype = 'signlike',
|
||||
tiles = { 'homedecor_projection_screen.png' },
|
||||
wield_image = 'homedecor_projection_screen_inv.png',
|
||||
inventory_image = 'homedecor_projection_screen_inv.png',
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
paramtype2 = 'wallmounted',
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_side = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("television", {
|
||||
description = S("Small CRT Television"),
|
||||
tiles = { 'homedecor_television_top.png',
|
||||
'homedecor_television_bottom.png',
|
||||
'homedecor_television_left.png^[transformFX',
|
||||
'homedecor_television_left.png',
|
||||
'homedecor_television_back.png',
|
||||
{ name="homedecor_television_front_animated.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=80.0
|
||||
}
|
||||
}
|
||||
},
|
||||
light_source = default.LIGHT_MAX - 1,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("dvd_vcr", {
|
||||
description = S("DVD and VCR"),
|
||||
tiles = {
|
||||
"homedecor_dvdvcr_top.png",
|
||||
"homedecor_dvdvcr_bottom.png",
|
||||
"homedecor_dvdvcr_sides.png",
|
||||
"homedecor_dvdvcr_sides.png^[transformFX",
|
||||
"homedecor_dvdvcr_back.png",
|
||||
"homedecor_dvdvcr_front.png",
|
||||
},
|
||||
inventory_image = "homedecor_dvdvcr_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.25, 0.3125, -0.375, 0.1875},
|
||||
{-0.25, -0.5, -0.25, 0.25, -0.1875, 0.125},
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
local tel_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.1875, 0.25, -0.21, 0.15 }
|
||||
}
|
||||
|
||||
homedecor.register("telephone", {
|
||||
mesh = "homedecor_telephone.obj",
|
||||
tiles = {
|
||||
"homedecor_telephone_dial.png",
|
||||
"homedecor_telephone_base.png",
|
||||
"homedecor_telephone_handset.png",
|
||||
"homedecor_telephone_cord.png",
|
||||
},
|
||||
inventory_image = "homedecor_telephone_inv.png",
|
||||
description = S("Telephone"),
|
||||
groups = {snappy=3},
|
||||
selection_box = tel_cbox,
|
||||
walkable = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "homedecor:telephone",
|
||||
label = "sfx",
|
||||
interval = 30,
|
||||
chance = 15,
|
||||
action = function(pos, node)
|
||||
minetest.sound_play("homedecor_telephone_ringing", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
end
|
||||
})
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
@ -34,6 +34,99 @@ homedecor.register("barbecue", {
|
||||
|
||||
minetest.register_alias("homedecor:barbecue_meat", "air")
|
||||
|
||||
local bl1_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.25, 1.5, 0.5, 0.5 }
|
||||
}
|
||||
|
||||
local bl1_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.25, 1.5, 0, 0.5 },
|
||||
{-0.5, -0.5, 0.45, 1.5, 0.5, 0.5 },
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("bench_large_1", {
|
||||
mesh = "homedecor_bench_large_1.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_wood_old.png",
|
||||
"homedecor_generic_metal_wrought_iron.png"
|
||||
},
|
||||
description = S("Garden Bench (style 1)"),
|
||||
inventory_image = "homedecor_bench_large_1_inv.png",
|
||||
groups = { snappy = 3 },
|
||||
expand = { right="placeholder" },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = bl1_sbox,
|
||||
node_box = bl1_cbox,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:bench_large_1_left", "homedecor:bench_large_1")
|
||||
minetest.register_alias("homedecor:bench_large_1_right", "air")
|
||||
|
||||
local bl2_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.25, 1.5, 0.5, 0.5 }
|
||||
}
|
||||
|
||||
local bl2_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.25, 1.5, 0, 0.5 },
|
||||
{-0.5, -0.5, 0.45, 1.5, 0.5, 0.5 },
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("bench_large_2", {
|
||||
description = S("Garden Bench (style 2)"),
|
||||
mesh = "homedecor_bench_large_2.obj",
|
||||
tiles = { "homedecor_generic_wood_old.png" },
|
||||
inventory_image = "homedecor_bench_large_2_inv.png",
|
||||
groups = {snappy=3},
|
||||
selection_box = bl2_sbox,
|
||||
node_box = bl2_cbox,
|
||||
expand = { right="placeholder" },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:bench_large_2_left", "homedecor:bench_large_2")
|
||||
minetest.register_alias("homedecor:bench_large_2_right", "air")
|
||||
|
||||
local dc_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 1 }
|
||||
}
|
||||
|
||||
homedecor.register("deckchair", {
|
||||
mesh = "homedecor_deckchair.obj",
|
||||
tiles = {"homedecor_deckchair.png"},
|
||||
description = S("Deck Chair"),
|
||||
groups = { snappy = 3 },
|
||||
expand = { forward="placeholder" },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = dc_cbox,
|
||||
collision_box = dc_cbox,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:deckchair_foot", "homedecor:deckchair")
|
||||
minetest.register_alias("homedecor:deckchair_head", "air")
|
||||
|
||||
homedecor.register("deckchair_striped_blue", {
|
||||
mesh = "homedecor_deckchair.obj",
|
||||
tiles = {"homedecor_deckchair_striped_blue.png"},
|
||||
description = S("Deck Chair"),
|
||||
groups = { snappy = 3 },
|
||||
expand = { forward="placeholder" },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = dc_cbox,
|
||||
collision_box = dc_cbox,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
homedecor.register("doghouse", {
|
||||
mesh = "homedecor_doghouse.obj",
|
||||
tiles = {
|
||||
@ -54,6 +147,21 @@ homedecor.register("doghouse", {
|
||||
minetest.register_alias("homedecor:doghouse_roof", "air")
|
||||
minetest.register_alias("homedecor:doghouse_base", "homedecor:doghouse")
|
||||
|
||||
homedecor.register("simple_bench", {
|
||||
tiles = { "homedecor_generic_wood_old.png" },
|
||||
description = S("Simple Bench"),
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.15, 0, 0.5, -0.05, 0.4},
|
||||
{-0.4, -0.5, 0.1, -0.3, -0.15, 0.3},
|
||||
{ 0.3, -0.5, 0.1, 0.4, -0.15, 0.3},
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("stonepath", {
|
||||
description = S("Garden stone path"),
|
||||
tiles = {
|
||||
@ -143,7 +251,6 @@ homedecor.register("swing", {
|
||||
place_on = "bottom"
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local placer_name = placer:get_player_name() or ""
|
||||
local isceiling, pos = homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||
if isceiling then
|
||||
local height = 0
|
||||
@ -156,7 +263,7 @@ homedecor.register("swing", {
|
||||
|
||||
if not testreg or not testreg.buildable_to then
|
||||
if i < 1 then
|
||||
minetest.chat_send_player(placer_name, "No room under there to hang a swing.")
|
||||
minetest.chat_send_player(placer:get_player_name(), "No room under there to hang a swing.")
|
||||
return itemstack
|
||||
else
|
||||
break
|
||||
@ -172,11 +279,11 @@ homedecor.register("swing", {
|
||||
|
||||
minetest.set_node({ x=pos.x, y=pos.y-height, z=pos.z }, { name = "homedecor:swing", param2 = fdir })
|
||||
|
||||
if not creative.is_enabled_for(placer_name) then
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(placer_name, "You have to point at the bottom side of an overhanging object to place a swing.")
|
||||
minetest.chat_send_player(placer:get_player_name(), "You have to point at the bottom side of an overhanging object to place a swing.")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
@ -259,8 +366,8 @@ homedecor.shrub_colors = {
|
||||
local shrub_cbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
|
||||
for _, color in ipairs(homedecor.shrub_colors) do
|
||||
minetest.register_node(":homedecor:shrubbery_large_"..color, {
|
||||
description = S("Shrubbery (large, @1)", S(color)),
|
||||
minetest.register_node("homedecor:shrubbery_large_"..color, {
|
||||
description = S("Shrubbery (@1)", S(color)),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_cube.obj",
|
||||
tiles = {"homedecor_shrubbery_"..color..".png"},
|
||||
@ -270,7 +377,7 @@ for _, color in ipairs(homedecor.shrub_colors) do
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:shrubbery_"..color, {
|
||||
minetest.register_node("homedecor:shrubbery_"..color, {
|
||||
description = S("Shrubbery (@1)", S(color)),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_shrubbery.obj",
|
||||
@ -288,186 +395,6 @@ for _, color in ipairs(homedecor.shrub_colors) do
|
||||
})
|
||||
end
|
||||
|
||||
-- crafting
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:chimney 2",
|
||||
recipe = {
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:doghouse",
|
||||
recipe = {
|
||||
{"homedecor:shingles_terracotta", "homedecor:shingles_terracotta", "homedecor:shingles_terracotta"},
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:wood", "building_blocks:terrycloth_towel", "group:wood"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:well",
|
||||
recipe = {
|
||||
{ "homedecor:shingles_wood", "homedecor:shingles_wood", "homedecor:shingles_wood" },
|
||||
{ "group:wood", "group:stick", "group:wood" },
|
||||
{ "group:stone", "", "group:stone" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stonepath 16",
|
||||
recipe = {
|
||||
{ "stairs:slab_stone","","stairs:slab_stone" },
|
||||
{ "","stairs:slab_stone","" },
|
||||
{ "stairs:slab_stone","","stairs:slab_stone" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stonepath 16",
|
||||
recipe = {
|
||||
{ "moreblocks:slab_stone","","moreblocks:slab_stone" },
|
||||
{ "","moreblocks:slab_stone","" },
|
||||
{ "moreblocks:slab_stone","","moreblocks:slab_stone" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stonepath 3",
|
||||
recipe = {
|
||||
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" },
|
||||
{ "","moreblocks:micro_stone_1","" },
|
||||
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:barbecue",
|
||||
recipe = {
|
||||
{ "","homedecor:fence_chainlink","" },
|
||||
{ "default:steel_ingot","fake_fire:embers","default:steel_ingot" },
|
||||
{ "homedecor:pole_wrought_iron","default:steel_ingot","homedecor:pole_wrought_iron" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:swing",
|
||||
recipe = {
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","stairs:slab_wood","farming:string" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:swing",
|
||||
recipe = {
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","moreblocks:slab_wood","farming:string" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:swing",
|
||||
recipe = {
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","moreblocks:panel_wood_1","farming:string" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:lattice_wood 8",
|
||||
recipe = {
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:lattice_white_wood 8",
|
||||
recipe = {
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
{"group:wood", "dye:white", "group:wood"},
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:lattice_wood_vegetal 8",
|
||||
recipe = {
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
{"group:wood", "group:leaves", "group:wood"},
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:lattice_white_wood_vegetal 8",
|
||||
recipe = {
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
{"group:wood", "group:leaves", "group:wood"},
|
||||
{"group:stick", "dye:white", "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:shrubbery_green 3",
|
||||
recipe = {
|
||||
{ "group:leaves", "group:leaves", "group:leaves" },
|
||||
{ "group:leaves", "group:leaves", "group:leaves" },
|
||||
{ "group:stick", "group:stick", "group:stick" }
|
||||
}
|
||||
})
|
||||
|
||||
for _, color in ipairs(homedecor.shrub_colors) do
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_large_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_"..color
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_large_"..color
|
||||
}
|
||||
})
|
||||
|
||||
if color ~= "green" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_large_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_large_green",
|
||||
"dye:"..color
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_green",
|
||||
"dye:"..color
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- aliases
|
||||
|
||||
minetest.register_alias("homedecor:well_top", "air")
|
||||
minetest.register_alias("homedecor:well_base", "homedecor:well")
|
||||
|
@ -14,7 +14,7 @@ if signs_modpath then
|
||||
sign_post_model = signs_lib.sign_post_model.nodebox
|
||||
end
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local materials = {
|
||||
{ S("brass"), "brass" },
|
||||
@ -307,183 +307,3 @@ if signs_modpath then
|
||||
signs_lib.register_fence_with_sign("homedecor:fence_brass", "homedecor:fence_brass_with_sign")
|
||||
signs_lib.register_fence_with_sign("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign")
|
||||
end
|
||||
|
||||
-- crafting
|
||||
|
||||
-- Brass/wrought iron fences
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_brass 6",
|
||||
recipe = {
|
||||
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
||||
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_wrought_iron 6",
|
||||
recipe = {
|
||||
{ "default:iron_lump","default:iron_lump","default:iron_lump" },
|
||||
{ "default:iron_lump","default:iron_lump","default:iron_lump" },
|
||||
},
|
||||
})
|
||||
|
||||
-- other types of fences
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_wrought_iron_2 4",
|
||||
recipe = {
|
||||
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
|
||||
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_wrought_iron_2_corner",
|
||||
recipe = {
|
||||
"homedecor:fence_wrought_iron_2",
|
||||
"homedecor:fence_wrought_iron_2"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_wrought_iron_2 2",
|
||||
recipe = {
|
||||
"homedecor:fence_wrought_iron_2_corner",
|
||||
},
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_picket 6",
|
||||
recipe = {
|
||||
{ "group:stick", "group:stick", "group:stick" },
|
||||
{ "group:stick", "", "group:stick" },
|
||||
{ "group:stick", "group:stick", "group:stick" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_picket_corner",
|
||||
recipe = {
|
||||
"homedecor:fence_picket",
|
||||
"homedecor:fence_picket"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_picket 2",
|
||||
recipe = {
|
||||
"homedecor:fence_picket_corner"
|
||||
},
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_picket_white 6",
|
||||
recipe = {
|
||||
{ "group:stick", "group:stick", "group:stick" },
|
||||
{ "group:stick", "dye:white", "group:stick" },
|
||||
{ "group:stick", "group:stick", "group:stick" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_picket_corner_white",
|
||||
recipe = {
|
||||
"homedecor:fence_picket_white",
|
||||
"homedecor:fence_picket_white"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_picket_white 2",
|
||||
recipe = {
|
||||
"homedecor:fence_picket_corner_white"
|
||||
},
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_privacy 6",
|
||||
recipe = {
|
||||
{ "group:wood", "group:stick", "group:wood" },
|
||||
{ "group:wood", "", "group:wood" },
|
||||
{ "group:wood", "group:stick", "group:wood" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_privacy_corner",
|
||||
recipe = {
|
||||
"homedecor:fence_privacy",
|
||||
"homedecor:fence_privacy"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_privacy 2",
|
||||
recipe = {
|
||||
"homedecor:fence_privacy_corner"
|
||||
},
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_barbed_wire 6",
|
||||
recipe = {
|
||||
{ "group:stick", "basic_materials:steel_wire", "group:stick" },
|
||||
{ "group:stick", "", "group:stick" },
|
||||
{ "group:stick", "basic_materials:steel_wire", "group:stick" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_barbed_wire_corner",
|
||||
recipe = { "homedecor:fence_barbed_wire", "homedecor:fence_barbed_wire" },
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_barbed_wire 2",
|
||||
recipe = { "homedecor:fence_barbed_wire_corner" },
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:fence_chainlink 9",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
{ "basic_materials:steel_wire", "basic_materials:steel_wire", "default:steel_ingot" },
|
||||
{ "basic_materials:steel_wire", "basic_materials:steel_wire", "default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_chainlink_corner",
|
||||
recipe = { "homedecor:fence_chainlink", "homedecor:fence_chainlink" },
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:fence_chainlink 2",
|
||||
recipe = { "homedecor:fence_chainlink_corner" },
|
||||
})
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor.register("coatrack_wallmount", {
|
||||
tiles = { homedecor.plain_wood },
|
||||
@ -67,55 +67,3 @@ for _, mat in ipairs(mat_colors) do
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:welcome_mat_grey 2",
|
||||
recipe = {
|
||||
{ "", "dye:black", "" },
|
||||
{ "wool:grey", "wool:grey", "wool:grey" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:welcome_mat_brown 2",
|
||||
recipe = {
|
||||
{ "", "dye:black", "" },
|
||||
{ "wool:brown", "wool:brown", "wool:brown" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:welcome_mat_green 2",
|
||||
recipe = {
|
||||
{ "", "dye:white", "" },
|
||||
{ "wool:dark_green", "wool:dark_green", "wool:dark_green" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:welcome_mat_green 2",
|
||||
recipe = {
|
||||
{ "", "dye:white", "" },
|
||||
{ "dye:black", "dye:black", "dye:black" },
|
||||
{ "wool:green", "wool:green", "wool:green" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:coat_tree",
|
||||
recipe = {
|
||||
{ "group:stick", "group:stick", "group:stick" },
|
||||
{ "", "group:stick", "" },
|
||||
{ "", "group:wood", "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:coatrack_wallmount",
|
||||
recipe = {
|
||||
{ "group:stick", "homedecor:curtainrod_wood", "group:stick" },
|
||||
},
|
||||
})
|
252
homedecor/furniture.lua
Normal file
@ -0,0 +1,252 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local table_colors = {
|
||||
{ "", S("Table"), homedecor.plain_wood },
|
||||
{ "_mahogany", S("Mahogany Table"), homedecor.mahogany_wood },
|
||||
{ "_white", S("White Table"), homedecor.white_wood }
|
||||
}
|
||||
|
||||
for _, t in ipairs(table_colors) do
|
||||
local suffix, desc, texture = unpack(t)
|
||||
|
||||
homedecor.register("table"..suffix, {
|
||||
description = desc,
|
||||
tiles = { texture },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.4, -0.5, -0.4, -0.3, 0.4, -0.3 },
|
||||
{ 0.3, -0.5, -0.4, 0.4, 0.4, -0.3 },
|
||||
{ -0.4, -0.5, 0.3, -0.3, 0.4, 0.4 },
|
||||
{ 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 },
|
||||
{ -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 },
|
||||
{ -0.4, -0.2, -0.3, -0.3, -0.1, 0.3 },
|
||||
{ 0.3, -0.2, -0.4, 0.4, -0.1, 0.3 },
|
||||
{ -0.3, -0.2, -0.4, 0.4, -0.1, -0.3 },
|
||||
{ -0.3, -0.2, 0.3, 0.3, -0.1, 0.4 },
|
||||
},
|
||||
},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
local kc_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125 },
|
||||
}
|
||||
|
||||
local ac_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5 },
|
||||
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("kitchen_chair_wood", {
|
||||
description = S("Kitchen chair"),
|
||||
mesh = "homedecor_kitchen_chair.obj",
|
||||
tiles = {
|
||||
homedecor.plain_wood,
|
||||
homedecor.plain_wood
|
||||
},
|
||||
inventory_image = "homedecor_chair_wood_inv.png",
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = kc_cbox,
|
||||
collision_box = kc_cbox,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = unifieddyes.fix_rotation_nsew,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
pos.y = pos.y+0 -- where do I put my ass ?
|
||||
homedecor.sit(pos, node, clicker)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("kitchen_chair_padded", {
|
||||
description = S("Kitchen chair"),
|
||||
mesh = "homedecor_kitchen_chair.obj",
|
||||
tiles = {
|
||||
homedecor.plain_wood,
|
||||
"wool_white.png",
|
||||
},
|
||||
inventory_image = "homedecor_chair_padded_inv.png",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = kc_cbox,
|
||||
collision_box = kc_cbox,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
pos.y = pos.y+0 -- where do I put my ass ?
|
||||
homedecor.sit(pos, node, clicker)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("armchair", {
|
||||
description = S("Armchair"),
|
||||
mesh = "forniture_armchair.obj",
|
||||
tiles = {
|
||||
"wool_white.png",
|
||||
{ name = "wool_dark_grey.png", color = 0xffffffff },
|
||||
{ name = "default_wood.png", color = 0xffffffff }
|
||||
},
|
||||
inventory_image = "homedecor_armchair_inv.png",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
groups = {snappy=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = ac_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
})
|
||||
|
||||
local ob_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
|
||||
minetest.register_node(":homedecor:openframe_bookshelf", {
|
||||
description = S("Bookshelf (open-frame)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_openframe_bookshelf.obj",
|
||||
tiles = {
|
||||
"homedecor_openframe_bookshelf_books.png",
|
||||
"default_wood.png"
|
||||
},
|
||||
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = ob_cbox,
|
||||
collision_box = ob_cbox,
|
||||
})
|
||||
|
||||
homedecor.register("wall_shelf", {
|
||||
description = S("Wall Shelf"),
|
||||
tiles = {
|
||||
"homedecor_wood_table_large_edges.png",
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.4, 0.47, 0.5, 0.47, 0.5},
|
||||
{-0.5, 0.47, -0.1875, 0.5, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Aliases for 3dforniture mod.
|
||||
|
||||
minetest.register_alias("3dforniture:table", "homedecor:table")
|
||||
minetest.register_alias("3dforniture:chair", "homedecor:chair")
|
||||
minetest.register_alias("3dforniture:armchair", "homedecor:armchair_black")
|
||||
minetest.register_alias("homedecor:armchair", "homedecor:armchair_black")
|
||||
|
||||
minetest.register_alias('table', 'homedecor:table')
|
||||
minetest.register_alias('chair', 'homedecor:chair')
|
||||
minetest.register_alias('armchair', 'homedecor:armchair')
|
||||
|
||||
-- conversion to param2 colorization
|
||||
|
||||
homedecor.old_static_chairs = {}
|
||||
|
||||
local chair_colors = {
|
||||
"black",
|
||||
"brown",
|
||||
"blue",
|
||||
"cyan",
|
||||
"dark_grey",
|
||||
"dark_green",
|
||||
"green",
|
||||
"grey",
|
||||
"magenta",
|
||||
"orange",
|
||||
"pink",
|
||||
"red",
|
||||
"violet",
|
||||
"white",
|
||||
"yellow",
|
||||
}
|
||||
|
||||
for _, color in ipairs(chair_colors) do
|
||||
table.insert(homedecor.old_static_chairs, "homedecor:chair_"..color)
|
||||
table.insert(homedecor.old_static_chairs, "homedecor:armchair_"..color)
|
||||
end
|
||||
table.insert(homedecor.old_static_chairs, "homedecor:chair")
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_chairs",
|
||||
label = "Convert homedecor chairs to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_static_chairs,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local paletteidx = 0
|
||||
local color
|
||||
local a,b = string.find(name, "_")
|
||||
|
||||
if a then
|
||||
color = string.sub(name, a+1)
|
||||
|
||||
if color == "blue" then
|
||||
color = "medium_blue"
|
||||
elseif color == "violet" then
|
||||
color = "medium_violet"
|
||||
elseif color == "red" then
|
||||
color = "medium_red"
|
||||
elseif color == "black" then
|
||||
color = "dark_grey"
|
||||
end
|
||||
|
||||
paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "wallmounted")
|
||||
end
|
||||
|
||||
local old_fdir = math.floor(node.param2 % 32)
|
||||
local new_fdir = 3
|
||||
|
||||
if old_fdir == 0 then
|
||||
new_fdir = 3
|
||||
elseif old_fdir == 1 then
|
||||
new_fdir = 4
|
||||
elseif old_fdir == 2 then
|
||||
new_fdir = 2
|
||||
elseif old_fdir == 3 then
|
||||
new_fdir = 5
|
||||
end
|
||||
|
||||
local param2 = paletteidx + new_fdir
|
||||
local newname = "homedecor:armchair"
|
||||
|
||||
print(name, dump(a), dump(b), dump(color).."("..dump(paletteidx)..")", dump(param2))
|
||||
|
||||
if node.name == "homedecor:chair" then
|
||||
newname = "homedecor:kitchen_chair_wood"
|
||||
elseif string.find(node.name, "homedecor:chair_") then
|
||||
newname = "homedecor:kitchen_chair_padded"
|
||||
end
|
||||
|
||||
minetest.set_node(pos, { name = newname, param2 = param2 })
|
||||
local meta = minetest.get_meta(pos)
|
||||
if color then
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
end
|
||||
})
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor.register("bars", {
|
||||
description = S("Bars"),
|
||||
@ -58,10 +58,61 @@ homedecor.register("chains", {
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("torch_wall", {
|
||||
description = S("Wall Torch"),
|
||||
mesh = "forniture_torch.obj",
|
||||
tiles = {
|
||||
{
|
||||
name="forniture_torch_flame.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=40,
|
||||
aspect_h=40,
|
||||
length=1.0,
|
||||
},
|
||||
},
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
"forniture_coal.png",
|
||||
},
|
||||
inventory_image="forniture_torch_inv.png",
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
|
||||
},
|
||||
groups = {cracky=3},
|
||||
})
|
||||
|
||||
local wl_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -0.5, 0, 0.2, 0.5, 0.5 },
|
||||
}
|
||||
|
||||
homedecor.register("wall_lamp", {
|
||||
description = S("Wall Lamp"),
|
||||
mesh = "homedecor_wall_lamp.obj",
|
||||
tiles = {
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
homedecor.lux_wood,
|
||||
"homedecor_light.png",
|
||||
"homedecor_generic_metal_wrought_iron.png"
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_wall_lamp_inv.png",
|
||||
groups = {snappy=3},
|
||||
light_source = 11,
|
||||
selection_box = wl_cbox,
|
||||
walkable = false
|
||||
})
|
||||
|
||||
minetest.register_alias("3dforniture:bars", "homedecor:bars")
|
||||
minetest.register_alias("3dforniture:L_binding_bars", "homedecor:L_binding_bars")
|
||||
minetest.register_alias("3dforniture:chains", "homedecor:chains")
|
||||
minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
|
||||
|
||||
minetest.register_alias('bars', 'homedecor:bars')
|
||||
minetest.register_alias('binding_bars', 'homedecor:L_binding_bars')
|
||||
minetest.register_alias('chains', 'homedecor:chains')
|
||||
minetest.register_alias('torch_wall', 'homedecor:torch_wall')
|
@ -1,83 +1,8 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
local table_colors = {
|
||||
{ "", S("Table"), homedecor.plain_wood },
|
||||
{ "_mahogany", S("Mahogany Table"), homedecor.mahogany_wood },
|
||||
{ "_white", S("White Table"), homedecor.white_wood }
|
||||
}
|
||||
|
||||
for _, t in ipairs(table_colors) do
|
||||
local suffix, desc, texture = unpack(t)
|
||||
|
||||
homedecor.register("table"..suffix, {
|
||||
description = desc,
|
||||
tiles = { texture },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.4, -0.5, -0.4, -0.3, 0.4, -0.3 },
|
||||
{ 0.3, -0.5, -0.4, 0.4, 0.4, -0.3 },
|
||||
{ -0.4, -0.5, 0.3, -0.3, 0.4, 0.4 },
|
||||
{ 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 },
|
||||
{ -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 },
|
||||
{ -0.4, -0.2, -0.3, -0.3, -0.1, 0.3 },
|
||||
{ 0.3, -0.2, -0.4, 0.4, -0.1, 0.3 },
|
||||
{ -0.3, -0.2, -0.4, 0.4, -0.1, -0.3 },
|
||||
{ -0.3, -0.2, 0.3, 0.3, -0.1, 0.4 },
|
||||
},
|
||||
},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
local ob_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
|
||||
minetest.register_node(":homedecor:openframe_bookshelf", {
|
||||
description = S("Bookshelf (open-frame)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_openframe_bookshelf.obj",
|
||||
tiles = {
|
||||
"homedecor_openframe_bookshelf_books.png",
|
||||
"default_wood.png"
|
||||
},
|
||||
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = ob_cbox,
|
||||
collision_box = ob_cbox,
|
||||
})
|
||||
|
||||
homedecor.register("wall_shelf", {
|
||||
description = S("Wall Shelf"),
|
||||
tiles = {
|
||||
"default_wood.png",
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.4, 0.47, 0.5, 0.47, 0.5},
|
||||
{-0.5, 0.47, -0.1875, 0.5, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Crafts
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table",
|
||||
recipe = {
|
||||
{ "default:wood","default:wood", "default:wood" },
|
||||
{ "group:wood","group:wood", "group:wood" },
|
||||
{ "group:stick", "", "group:stick" },
|
||||
},
|
||||
})
|
||||
@ -127,6 +52,51 @@ minetest.register_craft({
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_chair_wood 2",
|
||||
recipe = {
|
||||
{ "group:stick",""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "group:stick","group:stick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:armchair 2",
|
||||
recipe = {
|
||||
{ "wool:white",""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "wool:white","wool:white" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:kitchen_chair_padded",
|
||||
recipe = {
|
||||
"homedecor:kitchen_chair_wood",
|
||||
"wool:white",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:kitchen_chair_wood",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:kitchen_chair_padded",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:armchair",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
@ -136,17 +106,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:standing_lamp_off",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_lamp_off",
|
||||
@ -172,34 +131,14 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
output = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
{ "wool:white", "default:torch", "wool:white"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "moreblocks:slab_wood", "" },
|
||||
{ "homedecor:table_lamp_off"},
|
||||
{ "group:stick"},
|
||||
{ "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{ "cottages:wool", "default:torch", "cottages:wool"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "moreblocks:slab_wood", "" },
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:toilet",
|
||||
recipe = {
|
||||
@ -213,7 +152,6 @@ minetest.register_craft({
|
||||
output = "homedecor:sink",
|
||||
recipe = {
|
||||
{ "group:marble","bucket:bucket_empty", "group:marble" },
|
||||
{ "", "group:marble", "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -234,7 +172,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "homedecor:shower_tray",
|
||||
recipe = {
|
||||
{ "group:marble","bucket:bucket_empty", "group:marble" },
|
||||
{ "group:marble","bucket:bucket_water", "group:marble" },
|
||||
},
|
||||
})
|
||||
|
||||
@ -286,8 +224,3 @@ minetest.register_craft({
|
||||
{ "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Aliases for 3dforniture mod.
|
||||
|
||||
minetest.register_alias("3dforniture:table", "homedecor:table")
|
||||
minetest.register_alias('table', 'homedecor:table')
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local cutlery_cbox = {
|
||||
type = "fixed",
|
||||
@ -104,6 +104,22 @@ homedecor.register("wine_rack", {
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("dartboard", {
|
||||
description = S("Dartboard"),
|
||||
mesh = "homedecor_dartboard.obj",
|
||||
tiles = { "homedecor_dartboard.png" },
|
||||
inventory_image = "homedecor_dartboard_inv.png",
|
||||
wield_image = "homedecor_dartboard_inv.png",
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {choppy=2,dig_immediate=2,attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("beer_tap", {
|
||||
description = S("Beer tap"),
|
||||
mesh = "homedecor_beer_taps.obj",
|
||||
@ -197,241 +213,20 @@ homedecor.register("soda_machine", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local playername = clicker:get_player_name()
|
||||
local wielditem = clicker:get_wielded_item()
|
||||
local wieldname = wielditem:get_name()
|
||||
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
|
||||
local fdir = node.param2
|
||||
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
|
||||
if wieldname == "currency:minegeld_cent_25" then
|
||||
if wieldname == "homedecor:coin" then
|
||||
wielditem:take_item()
|
||||
clicker:set_wielded_item(wielditem)
|
||||
minetest.spawn_item(pos_drop, "homedecor:soda_can")
|
||||
minetest.sound_play("insert_coin", {
|
||||
pos=pos, max_hear_distance = 5
|
||||
})
|
||||
if not creative.is_enabled_for(playername) then
|
||||
wielditem:take_item()
|
||||
clicker:set_wielded_item(wielditem)
|
||||
return wielditem
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(playername, S("Please insert a coin in the machine."))
|
||||
minetest.chat_send_player(clicker:get_player_name(), S("Please insert a coin in the machine."))
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:coin", "currency:minegeld_cent_25")
|
||||
|
||||
-- coffee!
|
||||
-- coffee!
|
||||
-- coffee!
|
||||
|
||||
local cm_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ 0, -8/16, 0, 7/16, 3/16, 8/16 },
|
||||
{ -4/16, -8/16, -6/16, -1/16, -5/16, -3/16 }
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("coffee_maker", {
|
||||
mesh = "homedecor_coffeemaker.obj",
|
||||
tiles = {
|
||||
"homedecor_coffeemaker_decanter.png",
|
||||
"homedecor_coffeemaker_cup.png",
|
||||
"homedecor_coffeemaker_case.png",
|
||||
},
|
||||
description = S("Coffee Maker"),
|
||||
inventory_image = "homedecor_coffeemaker_inv.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3},
|
||||
selection_box = cm_cbox,
|
||||
node_box = cm_cbox,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
homedecor.register("toaster", {
|
||||
description = S("Toaster"),
|
||||
tiles = { "homedecor_toaster_sides.png" },
|
||||
inventory_image = "homedecor_toaster_inv.png",
|
||||
walkable = false,
|
||||
groups = { snappy=3 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:toaster_loaf", param2 = fdir })
|
||||
minetest.sound_play("toaster", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toaster_loaf", {
|
||||
tiles = {
|
||||
"homedecor_toaster_toploaf.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy=3, not_in_creative_inventory=1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:toaster", param2 = fdir })
|
||||
return itemstack
|
||||
end,
|
||||
drop = "homedecor:toaster"
|
||||
})
|
||||
|
||||
local fdir_to_steampos = {
|
||||
x = { 0.15, 0.275, -0.15, -0.275 },
|
||||
z = { 0.275, -0.15, -0.275, 0.15 }
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "homedecor:coffee_maker",
|
||||
label = "sfx",
|
||||
interval = 2,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local fdir = node.param2
|
||||
if fdir and fdir < 4 then
|
||||
|
||||
local steamx = fdir_to_steampos.x[fdir + 1]
|
||||
local steamz = fdir_to_steampos.z[fdir + 1]
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 1,
|
||||
time = 1,
|
||||
minpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
maxpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
minvel = {x=-0.003, y=0.01, z=-0.003},
|
||||
maxvel = {x=0.003, y=0.01, z=-0.003},
|
||||
minacc = {x=0.0,y=-0.0,z=-0.0},
|
||||
maxacc = {x=0.0,y=0.003,z=-0.0},
|
||||
minexptime = 2,
|
||||
maxexptime = 5,
|
||||
minsize = 1,
|
||||
maxsize = 1.2,
|
||||
collisiondetection = false,
|
||||
texture = "homedecor_steam.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
minetest.register_craftitem(":homedecor:soda_can", {
|
||||
description = S("Soda Can"),
|
||||
inventory_image = "homedecor_soda_can.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bottle_green",
|
||||
recipe = {
|
||||
{ "vessels:glass_bottle", "dye:green" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bottle_brown",
|
||||
recipe = {
|
||||
{ "vessels:glass_bottle", "dye:brown" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:coffee_maker",
|
||||
recipe = {
|
||||
{"basic_materials:plastic_sheet", "bucket:bucket_water", "basic_materials:plastic_sheet"},
|
||||
{"basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet"},
|
||||
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:toaster",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:beer_tap",
|
||||
recipe = {
|
||||
{ "group:stick","default:steel_ingot","group:stick" },
|
||||
{ "homedecor:kitchen_faucet","default:steel_ingot","homedecor:kitchen_faucet" },
|
||||
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:4_bottles_brown",
|
||||
recipe = {
|
||||
"homedecor:bottle_brown",
|
||||
"homedecor:bottle_brown",
|
||||
"homedecor:bottle_brown",
|
||||
"homedecor:bottle_brown"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:4_bottles_green",
|
||||
recipe = {
|
||||
"homedecor:bottle_green",
|
||||
"homedecor:bottle_green",
|
||||
"homedecor:bottle_green",
|
||||
"homedecor:bottle_green"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:4_bottles_multi",
|
||||
recipe = {
|
||||
"homedecor:bottle_brown",
|
||||
"homedecor:bottle_brown",
|
||||
"homedecor:bottle_green",
|
||||
"homedecor:bottle_green",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:wine_rack",
|
||||
recipe = {
|
||||
{ "homedecor:4_bottles_brown", "group:wood", "homedecor:4_bottles_brown" },
|
||||
{ "homedecor:4_bottles_brown", "group:wood", "homedecor:4_bottles_brown" },
|
||||
{ "homedecor:4_bottles_brown", "group:wood", "homedecor:4_bottles_brown" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:soda_machine",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "dye:red", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:copperblock", "default:steel_ingot"},
|
||||
},
|
||||
})
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
-- vectors to place one node next to or behind another
|
||||
|
||||
@ -104,7 +104,7 @@ local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2, poin
|
||||
ctrl_node_def.after_place_node(pos, placer, itemstack, pointed_thing)
|
||||
end
|
||||
|
||||
if not creative.is_enabled_for(placer_name) then
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
@ -211,21 +211,22 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
|
||||
local rightnode = minetest.get_node(rightpos)
|
||||
|
||||
local inv = placer:get_inventory()
|
||||
local lastdye = unifieddyes.last_used_dye[placer_name]
|
||||
|
||||
if leftnode.name == "homedecor:bed_regular" then
|
||||
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
|
||||
local meta = minetest.get_meta(pos)
|
||||
local leftmeta = minetest.get_meta(leftpos)
|
||||
|
||||
local meta = minetest.get_meta(leftpos)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
minetest.swap_node(leftpos, { name = newname, param2 = param2})
|
||||
minetest.set_node(leftpos, { name = newname, param2 = param2})
|
||||
meta:set_string("dye", lastdye)
|
||||
inv:add_item("main", lastdye)
|
||||
elseif rightnode.name == "homedecor:bed_regular" then
|
||||
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
|
||||
local meta = minetest.get_meta(pos)
|
||||
local rightmeta = minetest.get_meta(rightpos)
|
||||
|
||||
local meta = minetest.get_meta(rightpos)
|
||||
minetest.set_node(rightpos, {name = "air"})
|
||||
minetest.swap_node(pos, { name = newname, param2 = param2})
|
||||
minetest.set_node(pos, { name = newname, param2 = param2})
|
||||
meta:set_string("dye", lastdye)
|
||||
inv:add_item("main", lastdye)
|
||||
end
|
||||
|
||||
local toppos = {x=pos.x, y=pos.y+1.0, z=pos.z}
|
||||
@ -234,7 +235,14 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
|
||||
if trybunks and is_buildable_to(placer_name, toppos, topposfwd) then
|
||||
local newname = string.gsub(thisnode.name, "_regular", "_extended")
|
||||
local newparam2 = param2 % 8
|
||||
minetest.swap_node(toppos, { name = thisnode.name, param2 = param2})
|
||||
if inv:contains_item("main", lastdye) then
|
||||
minetest.set_node(toppos, { name = thisnode.name, param2 = param2})
|
||||
if lastdye then inv:remove_item("main", lastdye.." 1") end
|
||||
else
|
||||
minetest.set_node(toppos, { name = thisnode.name, param2 = newparam2})
|
||||
minetest.chat_send_player(placer_name, "Ran out of "..lastdye..", using neutral color.")
|
||||
unifieddyes.last_used_dye[placer_name] = nil
|
||||
end
|
||||
minetest.swap_node(pos, { name = newname, param2 = param2})
|
||||
itemstack:take_item()
|
||||
end
|
||||
@ -257,8 +265,6 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
if not pos then return itemstack end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local meta = itemstack:get_meta()
|
||||
local pindex = meta:get_int("palette_index")
|
||||
|
||||
local abovepos = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
local abovenode = minetest.get_node(abovepos)
|
||||
@ -362,6 +368,14 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
fdir = right_fwd_node.param2
|
||||
pos = fwd_pos
|
||||
new_place_name = string.gsub(right_fwd_node.name, "_diagonal_.-$", "_horizontal")
|
||||
|
||||
-- try to follow a horizontal with another of the same
|
||||
elseif left_node and string.find(left_node.name, "homedecor:banister_.*_horizontal") then
|
||||
fdir = left_node.param2
|
||||
new_place_name = left_node.name
|
||||
elseif right_node and string.find(right_node.name, "homedecor:banister_.*_horizontal") then
|
||||
fdir = right_node.param2
|
||||
new_place_name = right_node.name
|
||||
end
|
||||
|
||||
-- manually invert left-right orientation
|
||||
@ -373,7 +387,7 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.set_node(pos, {name = new_place_name, param2 = fdir+pindex})
|
||||
minetest.set_node(pos, {name = new_place_name, param2 = fdir})
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
@ -1,6 +1,6 @@
|
||||
-- This code supplies an oven/stove. Basically it's just a copy of the default furnace with different textures.
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function swap_node(pos, name)
|
||||
local node = minetest.get_node(pos)
|
22
homedecor/handlers/init.lua
Normal file
@ -0,0 +1,22 @@
|
||||
local handlerpath = homedecor.modpath .. "/handlers/"
|
||||
|
||||
-- nodebox arithmetics and helpers
|
||||
-- (please keep non-generic nodeboxes with their node definition)
|
||||
dofile(handlerpath.."nodeboxes.lua")
|
||||
|
||||
-- expand and unexpand decor
|
||||
dofile(handlerpath.."expansion.lua")
|
||||
|
||||
-- register nodes that cook stuff
|
||||
dofile(handlerpath.."furnaces.lua")
|
||||
|
||||
-- inventory related functionality, like initialization, ownership and spawning locked versions
|
||||
dofile(handlerpath.."inventory.lua")
|
||||
|
||||
-- glue it all together into a registration function
|
||||
dofile(handlerpath.."registration.lua")
|
||||
|
||||
-- some nodes have particle spawners
|
||||
dofile(handlerpath.."water_particles.lua")
|
||||
|
||||
dofile(handlerpath.."sit.lua")
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local default_can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -182,7 +182,7 @@ function homedecor.handle_inventory(name, def, original_def)
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:" .. locked_name,
|
||||
recipe = { "homedecor:" .. name, "basic_materials:padlock" }
|
||||
recipe = { "homedecor:" .. name, "default:steel_ingot" }
|
||||
})
|
||||
end
|
||||
|
@ -91,5 +91,5 @@ function homedecor.register(name, original_def)
|
||||
end
|
||||
|
||||
-- register the actual minetest node
|
||||
minetest.register_node(":homedecor:" .. name, def)
|
||||
minetest.register_node("homedecor:" .. name, def)
|
||||
end
|
@ -30,8 +30,8 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname)
|
||||
end, s_handle)
|
||||
end
|
||||
minetest.delete_particlespawner(id)
|
||||
this_spawner_meta:set_int("active", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("active", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
return
|
||||
end
|
||||
|
||||
@ -71,7 +71,6 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname)
|
||||
amount = 60,
|
||||
time = 0,
|
||||
collisiondetection = true,
|
||||
collision_removal = particledef.die_on_collision,
|
||||
minpos = {x=pos.x - minx, y=pos.y + outlety, z=pos.z - minz},
|
||||
maxpos = {x=pos.x - maxx, y=pos.y + outlety, z=pos.z - maxz},
|
||||
minvel = {x = minvelx, y = velocityy, z = minvelz},
|
||||
@ -110,6 +109,6 @@ function homedecor.stop_particle_spawner(pos)
|
||||
end, s_handle)
|
||||
end
|
||||
|
||||
this_spawner_meta:set_int("active", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("active", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
end
|
126
homedecor/init.lua
Normal file
@ -0,0 +1,126 @@
|
||||
-- Home Decor mod by VanessaE
|
||||
--
|
||||
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
||||
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
||||
-- for helping me figure out the inventories used in the nightstands/dressers.
|
||||
--
|
||||
-- The code for ovens, nightstands, refrigerators are basically modified
|
||||
-- copies of the code for chests and furnaces.
|
||||
|
||||
local modpath = minetest.get_modpath("homedecor")
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor = {
|
||||
modpath = modpath,
|
||||
|
||||
-- infinite stacks
|
||||
expect_infinite_stacks = minetest.settings:get_bool("creative_mode") and not minetest.get_modpath("unified_inventory")
|
||||
}
|
||||
|
||||
-- Determine if the item being pointed at is the underside of a node (e.g a ceiling)
|
||||
function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||
-- most of this is copied from the rotate-and-place function in builtin
|
||||
local unode = core.get_node_or_nil(pointed_thing.under)
|
||||
if not unode then
|
||||
return
|
||||
end
|
||||
local undef = core.registered_nodes[unode.name]
|
||||
if undef and undef.on_rightclick then
|
||||
undef.on_rightclick(pointed_thing.under, unode, placer,
|
||||
itemstack, pointed_thing)
|
||||
return
|
||||
end
|
||||
|
||||
local above = pointed_thing.above
|
||||
local under = pointed_thing.under
|
||||
local iswall = (above.y == under.y)
|
||||
local isceiling = not iswall and (above.y < under.y)
|
||||
local anode = core.get_node_or_nil(above)
|
||||
if not anode then
|
||||
return
|
||||
end
|
||||
local pos = pointed_thing.above
|
||||
local node = anode
|
||||
|
||||
if undef and undef.buildable_to then
|
||||
pos = pointed_thing.under
|
||||
node = unode
|
||||
end
|
||||
|
||||
if core.is_protected(pos, placer:get_player_name()) then
|
||||
core.record_protection_violation(pos,
|
||||
placer:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
local ndef = core.registered_nodes[node.name]
|
||||
if not ndef or not ndef.buildable_to then
|
||||
return
|
||||
end
|
||||
return isceiling, pos
|
||||
end
|
||||
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
homedecor.plain_wood = { name = "homedecor_generic_wood_plain.png", color = 0xffa76820 }
|
||||
homedecor.mahogany_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff7d2506 }
|
||||
homedecor.white_wood = "homedecor_generic_wood_plain.png"
|
||||
homedecor.dark_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff39240f }
|
||||
homedecor.lux_wood = { name = "homedecor_generic_wood_luxury.png", color = 0xff643f23 }
|
||||
|
||||
homedecor.color_black = 0xff303030
|
||||
homedecor.color_dark_grey = 0xff606060
|
||||
homedecor.color_med_grey = 0xffa0a0a0
|
||||
|
||||
-- load different handler subsystems
|
||||
dofile(modpath.."/handlers/init.lua")
|
||||
|
||||
-- load various other components
|
||||
dofile(modpath.."/misc-nodes.lua") -- the catch-all for all misc nodes
|
||||
dofile(modpath.."/tables.lua")
|
||||
dofile(modpath.."/electronics.lua")
|
||||
dofile(modpath.."/shutters.lua")
|
||||
|
||||
dofile(modpath.."/roofing.lua")
|
||||
|
||||
dofile(modpath.."/foyer.lua")
|
||||
|
||||
dofile(modpath.."/doors_and_gates.lua")
|
||||
|
||||
dofile(modpath.."/fences.lua")
|
||||
|
||||
dofile(modpath.."/lighting.lua")
|
||||
|
||||
dofile(modpath.."/kitchen_appliances.lua")
|
||||
dofile(modpath.."/kitchen_furniture.lua")
|
||||
dofile(modpath.."/gastronomy.lua")
|
||||
|
||||
dofile(modpath.."/bathroom_furniture.lua")
|
||||
dofile(modpath.."/bathroom_sanitation.lua")
|
||||
|
||||
dofile(modpath.."/bedroom.lua")
|
||||
|
||||
dofile(modpath.."/laundry.lua")
|
||||
|
||||
dofile(modpath.."/office.lua")
|
||||
|
||||
dofile(modpath.."/clocks.lua")
|
||||
dofile(modpath.."/electrics.lua")
|
||||
|
||||
dofile(modpath.."/window_treatments.lua")
|
||||
|
||||
dofile(modpath.."/furniture.lua")
|
||||
dofile(modpath.."/furniture_medieval.lua")
|
||||
dofile(modpath.."/furniture_recipes.lua")
|
||||
dofile(modpath.."/climate-control.lua")
|
||||
|
||||
dofile(modpath.."/cobweb.lua")
|
||||
dofile(modpath.."/books.lua")
|
||||
dofile(modpath.."/exterior.lua")
|
||||
dofile(modpath.."/trash_cans.lua")
|
||||
dofile(modpath.."/wardrobe.lua")
|
||||
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
||||
print("[HomeDecor] " .. S("Loaded!"))
|
256
homedecor/kitchen_appliances.lua
Normal file
@ -0,0 +1,256 @@
|
||||
-- This file supplies refrigerators
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
-- steel-textured fridge
|
||||
homedecor.register("refrigerator_steel", {
|
||||
mesh = "homedecor_refrigerator.obj",
|
||||
tiles = { "homedecor_refrigerator_steel.png" },
|
||||
inventory_image = "homedecor_refrigerator_steel_inv.png",
|
||||
description = S("Refrigerator (stainless steel)"),
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
selection_box = homedecor.nodebox.slab_y(2),
|
||||
collision_box = homedecor.nodebox.slab_y(2),
|
||||
expand = { top="placeholder" },
|
||||
infotext=S("Refrigerator"),
|
||||
inventory = {
|
||||
size=50,
|
||||
lockable=true,
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple
|
||||
})
|
||||
|
||||
-- white, enameled fridge
|
||||
homedecor.register("refrigerator_white", {
|
||||
mesh = "homedecor_refrigerator.obj",
|
||||
tiles = { "homedecor_refrigerator_white.png" },
|
||||
inventory_image = "homedecor_refrigerator_white_inv.png",
|
||||
description = S("Refrigerator"),
|
||||
groups = {snappy=3},
|
||||
selection_box = homedecor.nodebox.slab_y(2),
|
||||
collision_box = homedecor.nodebox.slab_y(2),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
expand = { top="placeholder" },
|
||||
infotext=S("Refrigerator"),
|
||||
inventory = {
|
||||
size=50,
|
||||
lockable=true,
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_white_bottom", "homedecor:refrigerator_white")
|
||||
minetest.register_alias("homedecor:refrigerator_white_top", "air")
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_steel_bottom", "homedecor:refrigerator_steel")
|
||||
minetest.register_alias("homedecor:refrigerator_steel_top", "air")
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_white_bottom_locked", "homedecor:refrigerator_white_locked")
|
||||
minetest.register_alias("homedecor:refrigerator_white_top_locked", "air")
|
||||
minetest.register_alias("homedecor:refrigerator_locked", "homedecor:refrigerator_white_locked")
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_steel_bottom_locked", "homedecor:refrigerator_steel_locked")
|
||||
minetest.register_alias("homedecor:refrigerator_steel_top_locked", "air")
|
||||
|
||||
-- kitchen "furnaces"
|
||||
homedecor.register_furnace("oven", {
|
||||
description = S("Oven"),
|
||||
tile_format = "homedecor_oven_%s%s.png",
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1.25,
|
||||
})
|
||||
|
||||
homedecor.register_furnace("oven_steel", {
|
||||
description = S("Oven (stainless steel)"),
|
||||
tile_format = "homedecor_oven_steel_%s%s.png",
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1.25,
|
||||
})
|
||||
|
||||
homedecor.register_furnace("microwave_oven", {
|
||||
description = S("Microwave Oven"),
|
||||
tiles = {
|
||||
"homedecor_microwave_top.png", "homedecor_microwave_top.png^[transformR180",
|
||||
"homedecor_microwave_top.png^[transformR270", "homedecor_microwave_top.png^[transformR90",
|
||||
"homedecor_microwave_top.png^[transformR180", "homedecor_microwave_front.png"
|
||||
},
|
||||
tiles_active = {
|
||||
"homedecor_microwave_top.png", "homedecor_microwave_top.png^[transformR180",
|
||||
"homedecor_microwave_top.png^[transformR270", "homedecor_microwave_top.png^[transformR90",
|
||||
"homedecor_microwave_top.png^[transformR180", "homedecor_microwave_front_active.png"
|
||||
},
|
||||
output_slots = 2,
|
||||
output_width = 2,
|
||||
cook_speed = 1.5,
|
||||
extra_nodedef_fields = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.125, 0.5, 0.125, 0.5 },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- coffee!
|
||||
-- coffee!
|
||||
-- coffee!
|
||||
|
||||
local cm_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ 0, -8/16, 0, 7/16, 3/16, 8/16 },
|
||||
{ -4/16, -8/16, -6/16, -1/16, -5/16, -3/16 }
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("coffee_maker", {
|
||||
mesh = "homedecor_coffeemaker.obj",
|
||||
tiles = {
|
||||
"homedecor_coffeemaker_decanter.png",
|
||||
"homedecor_coffeemaker_cup.png",
|
||||
"homedecor_coffeemaker_case.png",
|
||||
},
|
||||
description = S("Coffee Maker"),
|
||||
inventory_image = "homedecor_coffeemaker_inv.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3},
|
||||
selection_box = cm_cbox,
|
||||
node_box = cm_cbox,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
local fdir_to_steampos = {
|
||||
x = { 0.15, 0.275, -0.15, -0.275 },
|
||||
z = { 0.275, -0.15, -0.275, 0.15 }
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "homedecor:coffee_maker",
|
||||
label = "sfx",
|
||||
interval = 2,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local fdir = node.param2
|
||||
if fdir and fdir < 4 then
|
||||
|
||||
local steamx = fdir_to_steampos.x[fdir + 1]
|
||||
local steamz = fdir_to_steampos.z[fdir + 1]
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 1,
|
||||
time = 1,
|
||||
minpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
maxpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
minvel = {x=-0.003, y=0.01, z=-0.003},
|
||||
maxvel = {x=0.003, y=0.01, z=-0.003},
|
||||
minacc = {x=0.0,y=-0.0,z=-0.0},
|
||||
maxacc = {x=0.0,y=0.003,z=-0.0},
|
||||
minexptime = 2,
|
||||
maxexptime = 5,
|
||||
minsize = 1,
|
||||
maxsize = 1.2,
|
||||
collisiondetection = false,
|
||||
texture = "homedecor_steam.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toaster", {
|
||||
description = S("Toaster"),
|
||||
tiles = { "homedecor_toaster_sides.png" },
|
||||
inventory_image = "homedecor_toaster_inv.png",
|
||||
walkable = false,
|
||||
groups = { snappy=3 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:toaster_loaf", param2 = fdir })
|
||||
minetest.sound_play("toaster", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toaster_loaf", {
|
||||
tiles = {
|
||||
"homedecor_toaster_toploaf.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy=3, not_in_creative_inventory=1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:toaster", param2 = fdir })
|
||||
return itemstack
|
||||
end,
|
||||
drop = "homedecor:toaster"
|
||||
})
|
||||
|
||||
|
||||
homedecor.register("dishwasher", {
|
||||
description = S("Dishwasher"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_dishwasher_top.png",
|
||||
"homedecor_dishwasher_bottom.png",
|
||||
"homedecor_dishwasher_sides.png",
|
||||
"homedecor_dishwasher_sides.png^[transformFX",
|
||||
"homedecor_dishwasher_back.png",
|
||||
"homedecor_dishwasher_front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.4375},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.1875, 0.1875},
|
||||
{-0.4375, -0.5, -0.5, 0.4375, 0.4375, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = { type = "regular" },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
local materials = { N_("granite"), N_("marble"), N_("steel"), N_("wood") }
|
||||
|
||||
for _, m in ipairs(materials) do
|
||||
homedecor.register("dishwasher_"..m, {
|
||||
description = S("Dishwasher (@1)", S(m)),
|
||||
tiles = {
|
||||
"homedecor_kitchen_cabinet_top_"..m..".png",
|
||||
"homedecor_dishwasher_bottom.png",
|
||||
"homedecor_dishwasher_sides.png",
|
||||
"homedecor_dishwasher_sides.png^[transformFX",
|
||||
"homedecor_dishwasher_back.png",
|
||||
"homedecor_dishwasher_front.png"
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
157
homedecor/kitchen_furniture.lua
Normal file
@ -0,0 +1,157 @@
|
||||
-- This file supplies Kitchen cabinets and kitchen sink
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local cabinet_sides = "(default_wood.png^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
|
||||
local cabinet_bottom = "(default_wood.png^[colorize:#000000:100)^(homedecor_kitchen_cabinet_bevel.png^[colorize:#46321580)"
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
local counter_materials = { "", N_("granite"), N_("marble"), N_("steel") }
|
||||
|
||||
for _, mat in ipairs(counter_materials) do
|
||||
|
||||
local desc = S("Kitchen Cabinet")
|
||||
local material = ""
|
||||
|
||||
if mat ~= "" then
|
||||
desc = S("Kitchen Cabinet (@1 top)", S(mat))
|
||||
material = "_"..mat
|
||||
end
|
||||
|
||||
homedecor.register("kitchen_cabinet"..material, {
|
||||
description = desc,
|
||||
tiles = { 'homedecor_kitchen_cabinet_top'..material..'.png',
|
||||
cabinet_bottom,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
'homedecor_kitchen_cabinet_front.png'},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
infotext=S("Kitchen Cabinet"),
|
||||
inventory = {
|
||||
size=24,
|
||||
lockable=true,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
local kitchen_cabinet_half_box = homedecor.nodebox.slab_y(0.5, 0.5)
|
||||
homedecor.register("kitchen_cabinet_half", {
|
||||
description = S('Half-height Kitchen Cabinet (on ceiling)'),
|
||||
tiles = {
|
||||
cabinet_sides,
|
||||
cabinet_bottom,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
'homedecor_kitchen_cabinet_front_half.png'
|
||||
},
|
||||
selection_box = kitchen_cabinet_half_box,
|
||||
node_box = kitchen_cabinet_half_box,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
infotext=S("Kitchen Cabinet"),
|
||||
inventory = {
|
||||
size=12,
|
||||
lockable=true,
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("kitchen_cabinet_with_sink", {
|
||||
description = S("Kitchen Cabinet with sink"),
|
||||
mesh = "homedecor_kitchen_sink.obj",
|
||||
tiles = {
|
||||
"homedecor_kitchen_sink_top.png",
|
||||
"homedecor_kitchen_cabinet_front.png",
|
||||
cabinet_sides,
|
||||
cabinet_bottom
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
infotext=S("Under-sink cabinet"),
|
||||
inventory = {
|
||||
size=16,
|
||||
lockable=true,
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, -8/16, 8/16, 6/16, 8/16 },
|
||||
{ -8/16, 6/16, -8/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, 6/16, -8/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 6/16, -8/16, 8/16, 8/16, -6/16 },
|
||||
{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
}
|
||||
},
|
||||
on_destruct = function(pos)
|
||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
end
|
||||
})
|
||||
|
||||
local cp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.375, -0.5, -0.5, 0.375, -0.3125, 0.3125 }
|
||||
}
|
||||
|
||||
homedecor.register("copper_pans", {
|
||||
description = S("Copper pans"),
|
||||
mesh = "homedecor_copper_pans.obj",
|
||||
tiles = { "homedecor_polished_copper.png" },
|
||||
inventory_image = "homedecor_copper_pans_inv.png",
|
||||
groups = { snappy=3 },
|
||||
selection_box = cp_cbox,
|
||||
walkable = false,
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
local kf_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -2/16, -8/16, 1/16, 2/16, -1/16, 8/16 }
|
||||
}
|
||||
|
||||
homedecor.register("kitchen_faucet", {
|
||||
mesh = "homedecor_kitchen_faucet.obj",
|
||||
tiles = { "homedecor_generic_metal_bright.png" },
|
||||
inventory_image = "homedecor_kitchen_faucet_inv.png",
|
||||
description = S("Kitchen Faucet"),
|
||||
groups = {snappy=3},
|
||||
selection_box = kf_cbox,
|
||||
walkable = false,
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
if below and
|
||||
below.name == "homedecor:sink" or
|
||||
below.name == "homedecor:kitchen_cabinet_with_sink" or
|
||||
below.name == "homedecor:kitchen_cabinet_with_sink_locked" then
|
||||
local particledef = {
|
||||
outlet = { x = 0, y = -0.19, z = 0.13 },
|
||||
velocity_x = { min = -0.05, max = 0.05 },
|
||||
velocity_y = -0.3,
|
||||
velocity_z = { min = -0.1, max = 0 },
|
||||
spread = 0
|
||||
}
|
||||
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = homedecor.stop_particle_spawner
|
||||
})
|
||||
|
||||
homedecor.register("paper_towel", {
|
||||
mesh = "homedecor_paper_towel.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_quilted_paper.png",
|
||||
"default_wood.png"
|
||||
},
|
||||
inventory_image = "homedecor_paper_towel_inv.png",
|
||||
description = S("Paper towels"),
|
||||
groups = { snappy=3 },
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.4375, 0.125, 0.0625, 0.4375, 0.4375, 0.5 }
|
||||
},
|
||||
})
|
61
homedecor/laundry.lua
Normal file
@ -0,0 +1,61 @@
|
||||
-- laundry devices
|
||||
|
||||
homedecor.register("washing_machine", {
|
||||
description = "Washing Machine",
|
||||
tiles = {
|
||||
"homedecor_washing_machine_top.png",
|
||||
"homedecor_washing_machine_bottom.png",
|
||||
"homedecor_washing_machine_sides.png",
|
||||
"homedecor_washing_machine_sides.png^[transformFX",
|
||||
"homedecor_washing_machine_back.png",
|
||||
"homedecor_washing_machine_front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.375},
|
||||
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = { type = "regular" },
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
homedecor.register("dryer", {
|
||||
description = "Tumble dryer",
|
||||
tiles = {
|
||||
"homedecor_dryer_top.png",
|
||||
"homedecor_dryer_bottom.png",
|
||||
"homedecor_dryer_sides.png",
|
||||
"homedecor_dryer_sides.png^[transformFX",
|
||||
"homedecor_dryer_back.png",
|
||||
"homedecor_dryer_front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.375},
|
||||
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = { type = "regular" },
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
local ib_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 }
|
||||
}
|
||||
|
||||
homedecor.register("ironing_board", {
|
||||
description = "Ironing board",
|
||||
mesh = "homedecor_ironing_board.obj",
|
||||
tiles = {
|
||||
"wool_grey.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
},
|
||||
expand = {right = "placeholder"},
|
||||
groups = { snappy = 3 },
|
||||
selection_box = ib_cbox,
|
||||
collision_box = ib_cbox
|
||||
})
|
766
homedecor/lighting.lua
Normal file
@ -0,0 +1,766 @@
|
||||
-- This file supplies glowlights
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local glowlight_nodebox = {
|
||||
half = homedecor.nodebox.slab_y(1/2),
|
||||
quarter = homedecor.nodebox.slab_y(1/4),
|
||||
small_cube = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
|
||||
},
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:glowlight_half", {
|
||||
description = S("Thick Glowlight"),
|
||||
tiles = {
|
||||
"homedecor_glowlight_top.png",
|
||||
"homedecor_glowlight_bottom.png",
|
||||
"homedecor_glowlight_thick_sides.png",
|
||||
"homedecor_glowlight_thick_sides.png",
|
||||
"homedecor_glowlight_thick_sides.png",
|
||||
"homedecor_glowlight_thick_sides.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_glowlight_top_overlay.png", color = "white"},
|
||||
"",
|
||||
{ name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"},
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
|
||||
wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }
|
||||
},
|
||||
node_box = glowlight_nodebox.half,
|
||||
groups = { snappy = 3, ud_param2_colorable = 1 },
|
||||
light_source = default.LIGHT_MAX,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:glowlight_quarter", {
|
||||
description = S("Thin Glowlight"),
|
||||
tiles = {
|
||||
"homedecor_glowlight_top.png",
|
||||
"homedecor_glowlight_bottom.png",
|
||||
"homedecor_glowlight_thin_sides.png",
|
||||
"homedecor_glowlight_thin_sides.png",
|
||||
"homedecor_glowlight_thin_sides.png",
|
||||
"homedecor_glowlight_thin_sides.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_glowlight_top_overlay.png", color = "white"},
|
||||
"",
|
||||
{ name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"},
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 },
|
||||
wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 }
|
||||
},
|
||||
node_box = glowlight_nodebox.quarter,
|
||||
groups = { snappy = 3, ud_param2_colorable = 1 },
|
||||
light_source = default.LIGHT_MAX-1,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:glowlight_small_cube", {
|
||||
description = S("Small Glowlight Cube"),
|
||||
tiles = {
|
||||
"homedecor_glowlight_cube_tb.png",
|
||||
"homedecor_glowlight_cube_tb.png",
|
||||
"homedecor_glowlight_cube_sides.png",
|
||||
"homedecor_glowlight_cube_sides.png",
|
||||
"homedecor_glowlight_cube_sides.png",
|
||||
"homedecor_glowlight_cube_sides.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_glowlight_cube_tb_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_cube_tb_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"},
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
drawtype = "nodebox",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 },
|
||||
wall_bottom = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 },
|
||||
wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 }
|
||||
},
|
||||
node_box = glowlight_nodebox.small_cube,
|
||||
groups = { snappy = 3, ud_param2_colorable = 1 },
|
||||
light_source = default.LIGHT_MAX-1,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
homedecor.register("plasma_lamp", {
|
||||
description = S("Plasma Lamp"),
|
||||
drawtype = "mesh",
|
||||
mesh = "plasma_lamp.obj",
|
||||
tiles = {
|
||||
"default_gold_block.png",
|
||||
{
|
||||
name="homedecor_plasma_storm.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
|
||||
}
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
light_source = default.LIGHT_MAX - 1,
|
||||
sunlight_propagates = true,
|
||||
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("plasma_ball", {
|
||||
description = S("Plasma Ball"),
|
||||
mesh = "homedecor_plasma_ball.obj",
|
||||
tiles = {
|
||||
{ name = "homedecor_generic_plastic.png", color = homedecor.color_black },
|
||||
{
|
||||
name = "homedecor_plasma_ball_streamers.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
|
||||
},
|
||||
"homedecor_plasma_ball_glass.png"
|
||||
},
|
||||
inventory_image = "homedecor_plasma_ball_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1875, -0.5, -0.1875, 0.1875, 0, 0.1875 }
|
||||
},
|
||||
walkable = false,
|
||||
use_texture_alpha = true,
|
||||
light_source = default.LIGHT_MAX - 5,
|
||||
sunlight_propagates = true,
|
||||
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
local tc_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1875, -0.5, -0.1875, 0.1875, 0.375, 0.1875 },
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("candle", {
|
||||
description = S("Thick Candle"),
|
||||
mesh = "homedecor_candle_thick.obj",
|
||||
tiles = {
|
||||
'homedecor_candle_sides.png',
|
||||
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
},
|
||||
inventory_image = "homedecor_candle_inv.png",
|
||||
selection_box = tc_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-4,
|
||||
})
|
||||
|
||||
local c_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.125, -0.5, -0.125, 0.125, 0.05, 0.125 },
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("candle_thin", {
|
||||
description = S("Thin Candle"),
|
||||
mesh = "homedecor_candle_thin.obj",
|
||||
tiles = {
|
||||
'homedecor_candle_sides.png',
|
||||
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
},
|
||||
inventory_image = "homedecor_candle_thin_inv.png",
|
||||
selection_box = c_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-4,
|
||||
})
|
||||
|
||||
local cs_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.15625, -0.5, -0.15625, 0.15625, 0.3125, 0.15625 },
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("candlestick_wrought_iron", {
|
||||
description = S("Candlestick (wrought iron)"),
|
||||
mesh = "homedecor_candlestick.obj",
|
||||
tiles = {
|
||||
"homedecor_candle_sides.png",
|
||||
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
"homedecor_generic_metal_wrought_iron.png",
|
||||
},
|
||||
inventory_image = "homedecor_candlestick_wrought_iron_inv.png",
|
||||
selection_box = cs_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-4,
|
||||
})
|
||||
|
||||
homedecor.register("candlestick_brass", {
|
||||
description = S("Candlestick (brass)"),
|
||||
mesh = "homedecor_candlestick.obj",
|
||||
tiles = {
|
||||
"homedecor_candle_sides.png",
|
||||
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
"homedecor_generic_metal_brass.png",
|
||||
},
|
||||
inventory_image = "homedecor_candlestick_brass_inv.png",
|
||||
selection_box = cs_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-4,
|
||||
})
|
||||
|
||||
homedecor.register("wall_sconce", {
|
||||
description = S("Wall sconce"),
|
||||
mesh = "homedecor_wall_sconce.obj",
|
||||
tiles = {
|
||||
'homedecor_candle_sides.png',
|
||||
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
'homedecor_wall_sconce_back.png',
|
||||
'homedecor_generic_metal_wrought_iron.png',
|
||||
},
|
||||
inventory_image = "homedecor_wall_sconce_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1875, -0.25, 0.3125, 0.1875, 0.25, 0.5 }
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-4,
|
||||
})
|
||||
|
||||
local ol_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -5/16, -8/16, -3/16, 5/16, 4/16, 3/16 },
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("oil_lamp", {
|
||||
description = S("Oil lamp (hurricane)"),
|
||||
mesh = "homedecor_oil_lamp.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_metal_brass.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
|
||||
{ name = "homedecor_generic_metal.png", color = 0xffa00000 },
|
||||
"homedecor_oil_lamp_wick.png",
|
||||
{ name = "homedecor_generic_metal.png", color = 0xffa00000 },
|
||||
"homedecor_oil_lamp_glass.png",
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_oil_lamp_inv.png",
|
||||
selection_box = ol_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-3,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("oil_lamp_tabletop", {
|
||||
description = S("Oil Lamp (tabletop)"),
|
||||
mesh = "homedecor_oil_lamp_tabletop.obj",
|
||||
tiles = {"homedecor_oil_lamp_tabletop.png"},
|
||||
inventory_image = "homedecor_oil_lamp_tabletop_inv.png",
|
||||
selection_box = ol_cbox,
|
||||
collision_box = ol_cbox,
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-3,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
local gl_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 },
|
||||
}
|
||||
|
||||
minetest.register_alias("homedecor:wall_lantern", "homedecor:ground_lantern")
|
||||
|
||||
homedecor.register("ground_lantern", {
|
||||
description = S("Ground Lantern"),
|
||||
mesh = "homedecor_ground_lantern.obj",
|
||||
tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" },
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_ground_lantern_inv.png",
|
||||
wield_image = "homedecor_ground_lantern_inv.png",
|
||||
groups = {snappy=3},
|
||||
light_source = 11,
|
||||
selection_box = gl_cbox,
|
||||
walkable = false
|
||||
})
|
||||
|
||||
local hl_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.2, 0.25, 0.5, 0.5 },
|
||||
}
|
||||
|
||||
homedecor.register("hanging_lantern", {
|
||||
description = S("Hanging Lantern"),
|
||||
mesh = "homedecor_hanging_lantern.obj",
|
||||
tiles = { "homedecor_generic_metal_wrought_iron.png", "homedecor_light.png" },
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_hanging_lantern_inv.png",
|
||||
wield_image = "homedecor_hanging_lantern_inv.png",
|
||||
groups = {snappy=3},
|
||||
light_source = 11,
|
||||
selection_box = hl_cbox,
|
||||
walkable = false
|
||||
})
|
||||
|
||||
local cl_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.35, -0.45, -0.35, 0.35, 0.5, 0.35 }
|
||||
}
|
||||
|
||||
homedecor.register("ceiling_lantern", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_ceiling_lantern.obj",
|
||||
tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" },
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_ceiling_lantern_inv.png",
|
||||
description = S("Ceiling Lantern"),
|
||||
groups = {snappy=3},
|
||||
light_source = 11,
|
||||
selection_box = cl_cbox,
|
||||
walkable = false
|
||||
})
|
||||
|
||||
homedecor.register("lattice_lantern_large", {
|
||||
description = S("Lattice lantern (large)"),
|
||||
tiles = { 'homedecor_lattice_lantern_large.png' },
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("lattice_lantern_small", {
|
||||
description = S("Lattice lantern (small)"),
|
||||
tiles = {
|
||||
'homedecor_lattice_lantern_small_tb.png',
|
||||
'homedecor_lattice_lantern_small_tb.png',
|
||||
'homedecor_lattice_lantern_small_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
light_source = default.LIGHT_MAX-1,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
local brightness_tab = {
|
||||
0xffd0d0d0,
|
||||
0xffd8d8d8,
|
||||
0xffe0e0e0,
|
||||
0xffe8e8e8,
|
||||
0xffffffff,
|
||||
}
|
||||
|
||||
-- table lamps and standing lamps
|
||||
|
||||
local repl = {
|
||||
["off"] ="low",
|
||||
["low"] ="med",
|
||||
["med"] ="hi",
|
||||
["hi"] ="max",
|
||||
["max"] ="off",
|
||||
}
|
||||
|
||||
local lamp_colors = {
|
||||
"white",
|
||||
"blue",
|
||||
"green",
|
||||
"pink",
|
||||
"red",
|
||||
"violet",
|
||||
}
|
||||
|
||||
local tlamp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 }
|
||||
}
|
||||
|
||||
local slamp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 }
|
||||
}
|
||||
|
||||
local function reg_lamp(suffix, nxt, light, brightness)
|
||||
|
||||
local wool_brighten = (light or 0) * 15
|
||||
|
||||
homedecor.register("table_lamp_"..suffix, {
|
||||
description = S("Table Lamp"),
|
||||
mesh = "homedecor_table_lamp.obj",
|
||||
tiles = {
|
||||
"wool_grey.png^[colorize:#ffffff:"..wool_brighten,
|
||||
{ name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[brightness] },
|
||||
{ name = "homedecor_generic_wood_red.png", color = 0xffffffff },
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
|
||||
},
|
||||
inventory_image = "homedecor_table_lamp_foot_inv.png^homedecor_table_lamp_top_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
selection_box = tlamp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1,
|
||||
not_in_creative_inventory=((light ~= nil) and 1) or nil,
|
||||
},
|
||||
drop = "homedecor:table_lamp_off",
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "homedecor:table_lamp_"..repl[suffix]
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
homedecor.register("standing_lamp_"..suffix, {
|
||||
description = S("Standing Lamp"),
|
||||
mesh = "homedecor_standing_lamp.obj",
|
||||
tiles = {
|
||||
"wool_grey.png^[colorize:#ffffff:"..wool_brighten,
|
||||
{ name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[brightness] },
|
||||
{ name = "homedecor_generic_wood_red.png", color = 0xffffffff },
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
|
||||
},
|
||||
inventory_image = "homedecor_standing_lamp_foot_inv.png^homedecor_standing_lamp_top_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1,
|
||||
not_in_creative_inventory=((light ~= nil) and 1) or nil,
|
||||
},
|
||||
selection_box = slamp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "homedecor:standing_lamp_"..repl[suffix]
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
expand = { top="air" },
|
||||
})
|
||||
|
||||
-- for old maps that had the original 3dforniture mod
|
||||
minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
|
||||
end
|
||||
|
||||
reg_lamp("off", "low", nil, 1 )
|
||||
reg_lamp("low", "med", 3, 2 )
|
||||
reg_lamp("med", "hi", 7, 3 )
|
||||
reg_lamp("hi", "max", 11, 4 )
|
||||
reg_lamp("max", "off", 14, 5 )
|
||||
|
||||
-- "gooseneck" style desk lamps
|
||||
|
||||
local dlamp_cbox = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 },
|
||||
}
|
||||
|
||||
homedecor.register("desk_lamp", {
|
||||
description = S("Desk Lamp"),
|
||||
mesh = "homedecor_desk_lamp.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_metal.png",
|
||||
"homedecor_generic_metal.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
{ name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[5] },
|
||||
},
|
||||
inventory_image = "homedecor_desk_lamp_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = dlamp_cbox,
|
||||
node_box = dlamp_cbox,
|
||||
walkable = false,
|
||||
groups = {snappy=3, ud_param2_colorable = 1},
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew
|
||||
})
|
||||
|
||||
-- "kitchen"/"dining room" ceiling lamp
|
||||
|
||||
homedecor.register("ceiling_lamp", {
|
||||
description = S("Ceiling Lamp"),
|
||||
mesh = "homedecor_ceiling_lamp.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_metal_brass.png",
|
||||
"homedecor_ceiling_lamp_glass.png",
|
||||
"homedecor_table_standing_lamp_lightbulb.png",
|
||||
{ name = "homedecor_generic_plastic.png", color = 0xff442d04 },
|
||||
},
|
||||
inventory_image = "homedecor_ceiling_lamp_inv.png",
|
||||
light_source = default.LIGHT_MAX,
|
||||
groups = {snappy=3},
|
||||
walkable = false,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:ceiling_lamp_off"})
|
||||
end,
|
||||
})
|
||||
|
||||
homedecor.register("ceiling_lamp_off", {
|
||||
description = S("Ceiling Lamp (off)"),
|
||||
mesh = "homedecor_ceiling_lamp.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_metal_brass.png",
|
||||
"homedecor_ceiling_lamp_glass.png",
|
||||
{ "homedecor_table_standing_lamp_lightbulb.png", color = 0xffd0d0d0 },
|
||||
{ name = "homedecor_generic_plastic.png", color = 0xff442d04 },
|
||||
},
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
walkable = false,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:ceiling_lamp"})
|
||||
end,
|
||||
drop = "homedecor:ceiling_lamp"
|
||||
})
|
||||
|
||||
-- conversion LBM for param2 coloring
|
||||
|
||||
homedecor.old_static_nodes = {
|
||||
"homedecor:glowlight_quarter_white",
|
||||
"homedecor:glowlight_quarter_yellow",
|
||||
"homedecor:glowlight_half_white",
|
||||
"homedecor:glowlight_half_yellow",
|
||||
"homedecor:glowlight_small_cube_white",
|
||||
"homedecor:glowlight_small_cube_yellow"
|
||||
}
|
||||
|
||||
local lamp_power = {"off", "low", "med", "hi", "max"}
|
||||
|
||||
for _, power in ipairs(lamp_power) do
|
||||
for _, color in ipairs(lamp_colors) do
|
||||
table.insert(homedecor.old_static_nodes, "homedecor:table_lamp_"..color.."_"..power)
|
||||
table.insert(homedecor.old_static_nodes, "homedecor:standing_lamp_"..color.."_"..power)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_lighting",
|
||||
label = "Convert homedecor glowlights, table lamps, and standing lamps to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_static_nodes,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local newname
|
||||
local color
|
||||
|
||||
if string.find(name, "small_cube") then
|
||||
newname = "homedecor:glowlight_small_cube"
|
||||
elseif string.find(name, "glowlight_half") then
|
||||
newname = "homedecor:glowlight_half"
|
||||
elseif string.find(name, "glowlight_quarter") then
|
||||
newname = "homedecor:glowlight_quarter"
|
||||
end
|
||||
|
||||
local lampname
|
||||
if string.find(name, "standing_lamp") then
|
||||
lampname = "homedecor:standing_lamp"
|
||||
elseif string.find(name, "table_lamp") then
|
||||
lampname = "homedecor:table_lamp"
|
||||
end
|
||||
if lampname then
|
||||
newname = lampname
|
||||
if string.find(name, "_off") then
|
||||
newname = newname.."_off"
|
||||
elseif string.find(name, "_low") then
|
||||
newname = newname.."_low"
|
||||
elseif string.find(name, "_med") then
|
||||
newname = newname.."_med"
|
||||
elseif string.find(name, "_hi") then
|
||||
newname = newname.."_hi"
|
||||
elseif string.find(name, "_max") then
|
||||
newname = newname.."_max"
|
||||
end
|
||||
end
|
||||
|
||||
if string.find(name, "red") then
|
||||
color = "red"
|
||||
elseif string.find(name, "pink") then
|
||||
color = "pink"
|
||||
elseif string.find(name, "green") then
|
||||
color = "green"
|
||||
elseif string.find(name, "blue") then
|
||||
color = "blue"
|
||||
elseif string.find(name, "yellow") then
|
||||
color = "yellow"
|
||||
elseif string.find(name, "violet") then
|
||||
color = "violet"
|
||||
else
|
||||
color = "white"
|
||||
end
|
||||
|
||||
local paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
|
||||
|
||||
local old_fdir
|
||||
local new_node = newname
|
||||
local new_fdir = 1
|
||||
local param2
|
||||
|
||||
if string.find(name, "glowlight") then
|
||||
paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color, "wallmounted")
|
||||
|
||||
old_fdir = math.floor(node.param2 / 4)
|
||||
|
||||
if old_fdir == 5 then
|
||||
new_fdir = 0
|
||||
elseif old_fdir == 1 then
|
||||
new_fdir = 5
|
||||
elseif old_fdir == 2 then
|
||||
new_fdir = 4
|
||||
elseif old_fdir == 3 then
|
||||
new_fdir = 3
|
||||
elseif old_fdir == 4 then
|
||||
new_fdir = 2
|
||||
elseif old_fdir == 0 then
|
||||
new_fdir = 1
|
||||
end
|
||||
param2 = paletteidx + new_fdir
|
||||
else
|
||||
param2 = paletteidx
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
||||
if string.find(name, "table_lamp") or string.find(name, "standing_lamp") then
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
|
||||
minetest.set_node(pos, { name = new_node, param2 = param2 })
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
||||
|
||||
-- this one's for the small "gooseneck" desk lamps
|
||||
|
||||
homedecor.old_static_desk_lamps = {
|
||||
"homedecor:desk_lamp_red",
|
||||
"homedecor:desk_lamp_blue",
|
||||
"homedecor:desk_lamp_green",
|
||||
"homedecor:desk_lamp_violet",
|
||||
}
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_desk_lamps",
|
||||
label = "Convert homedecor desk lamps to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_static_desk_lamps,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local color = string.sub(name, string.find(name, "_", -8) + 1)
|
||||
|
||||
if color == "green" then
|
||||
color = "medium_green"
|
||||
elseif color == "violet" then
|
||||
color = "magenta"
|
||||
end
|
||||
|
||||
local paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color, "wallmounted")
|
||||
local old_fdir = math.floor(node.param2 % 32)
|
||||
local new_fdir = 3
|
||||
|
||||
if old_fdir == 0 then
|
||||
new_fdir = 3
|
||||
elseif old_fdir == 1 then
|
||||
new_fdir = 4
|
||||
elseif old_fdir == 2 then
|
||||
new_fdir = 2
|
||||
elseif old_fdir == 3 then
|
||||
new_fdir = 5
|
||||
end
|
||||
|
||||
local param2 = paletteidx + new_fdir
|
||||
|
||||
minetest.set_node(pos, { name = "homedecor:desk_lamp", param2 = param2 })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:recolor_lighting",
|
||||
label = "Convert some kinds of lights to use UD extended palette",
|
||||
run_at_every_load = false,
|
||||
nodenames = {
|
||||
"homedecor:table_lamp_off",
|
||||
"homedecor:table_lamp_low",
|
||||
"homedecor:table_lamp_med",
|
||||
"homedecor:table_lamp_hi",
|
||||
"homedecor:table_lamp_max",
|
||||
"homedecor:standing_lamp_off",
|
||||
"homedecor:standing_lamp_low",
|
||||
"homedecor:standing_lamp_med",
|
||||
"homedecor:standing_lamp_hi",
|
||||
"homedecor:standing_lamp_max",
|
||||
},
|
||||
action = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("palette") ~= "ext" then
|
||||
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
end
|
||||
})
|
@ -1,13 +1,7 @@
|
||||
-- Home Decor mod by VanessaE
|
||||
--
|
||||
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
||||
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
||||
-- for helping me figure out the inventories used in the nightstands/dressers.
|
||||
--
|
||||
-- The code for ovens, nightstands, refrigerators are basically modified
|
||||
-- copies of the code for chests and furnaces.
|
||||
|
||||
local S = homedecor.gettext
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
homedecor.register("ceiling_paint", {
|
||||
description = S("Textured Ceiling Paint"),
|
||||
@ -34,9 +28,9 @@ homedecor.register("ceiling_tile", {
|
||||
})
|
||||
|
||||
local rug_types = {
|
||||
{ "small", "homedecor_small_rug.obj" },
|
||||
{ "large", homedecor.box.slab_y(0.0625) },
|
||||
{ "persian", homedecor.box.slab_y(0.0625) },
|
||||
{ N_("small"), "homedecor_small_rug.obj" },
|
||||
{ N_("large"), homedecor.box.slab_y(0.0625) },
|
||||
{ N_("persian"), homedecor.box.slab_y(0.0625) },
|
||||
}
|
||||
|
||||
for _, rt in ipairs(rug_types) do
|
||||
@ -72,7 +66,7 @@ for _, rt in ipairs(rug_types) do
|
||||
})
|
||||
end
|
||||
|
||||
local pot_colors = { "black", "green", "terracotta" }
|
||||
local pot_colors = { N_("black"), N_("green"), N_("terracotta") }
|
||||
|
||||
for _, p in ipairs(pot_colors) do
|
||||
homedecor.register("flower_pot_"..p, {
|
||||
@ -394,6 +388,53 @@ homedecor.register("tool_cabinet", {
|
||||
minetest.register_alias("homedecor:tool_cabinet_bottom", "homedecor:tool_cabinet")
|
||||
minetest.register_alias("homedecor:tool_cabinet_top", "air")
|
||||
|
||||
local pframe_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.18, -0.5, -0.08, 0.18, -0.08, 0.18 }
|
||||
}
|
||||
local n = { 1, 2 }
|
||||
|
||||
for _, i in ipairs(n) do
|
||||
homedecor.register("picture_frame"..i, {
|
||||
description = S("Picture Frame"),
|
||||
mesh = "homedecor_picture_frame.obj",
|
||||
tiles = {
|
||||
"homedecor_picture_frame_image"..i..".png",
|
||||
homedecor.lux_wood,
|
||||
"homedecor_picture_frame_back.png",
|
||||
},
|
||||
inventory_image = "homedecor_picture_frame"..i.."_inv.png",
|
||||
wield_image = "homedecor_picture_frame"..i.."_inv.png",
|
||||
groups = {snappy = 3},
|
||||
selection_box = pframe_cbox,
|
||||
walkable = false,
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
end
|
||||
|
||||
local p_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
for i = 1,20 do
|
||||
homedecor.register("painting_"..i, {
|
||||
description = S("Decorative painting #@1", i),
|
||||
mesh = "homedecor_painting.obj",
|
||||
tiles = {
|
||||
"default_wood.png",
|
||||
"homedecor_blank_canvas.png",
|
||||
"homedecor_painting"..i..".png"
|
||||
},
|
||||
selection_box = p_cbox,
|
||||
walkable = false,
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
homedecor.banister_materials = {
|
||||
{ "wood",
|
||||
S("wood"),
|
||||
@ -442,19 +483,23 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
|
||||
local name, matdesc, tile1, tile2 = unpack(mat)
|
||||
local nodename = "banister_"..name.."_"..side
|
||||
|
||||
local groups = { snappy = 3, not_in_creative_inventory = 1 }
|
||||
local cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -9/16, -3/16, 5/16, 9/16, 24/16, 8/16 }
|
||||
}
|
||||
|
||||
if side == "horizontal" then
|
||||
groups = { snappy = 3 }
|
||||
cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -8/16, -8/16, 5/16, 8/16, 8/16, 8/16 }
|
||||
}
|
||||
else
|
||||
minetest.register_alias(string.gsub("homedecor:"..nodename, "diagonal_", ""), "homedecor:"..nodename)
|
||||
end
|
||||
|
||||
local def = {
|
||||
homedecor.register(nodename, {
|
||||
description = S("Banister for Stairs (@1, @2)", matdesc, sidedesc),
|
||||
mesh = "homedecor_banister_"..side..".obj",
|
||||
tiles = {
|
||||
@ -462,37 +507,12 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
|
||||
tile2,
|
||||
},
|
||||
inventory_image = "homedecor_banister_"..name.."_inv.png",
|
||||
groups = groups,
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
groups = { snappy = 3},
|
||||
on_place = homedecor.place_banister,
|
||||
drop = "homedecor:banister_"..name.."_horizontal",
|
||||
}
|
||||
|
||||
if side ~= "horizontal" then
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
end
|
||||
|
||||
if name == "wood" then
|
||||
def.palette = "unifieddyes_palette_greys.png"
|
||||
def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey"
|
||||
def.groups.ud_param2_colorable = 1
|
||||
def.paramtype2 = "colorfacedir"
|
||||
end
|
||||
homedecor.register(nodename, def)
|
||||
|
||||
if name == "wood" then
|
||||
local nn = "homedecor:"..nodename
|
||||
local def2 = table.copy(minetest.registered_items[nn])
|
||||
def2.tiles = {
|
||||
homedecor.white_wood,
|
||||
homedecor.white_wood
|
||||
}
|
||||
def2.inventory_image = "homedecor_banister_wood_colored_inv.png"
|
||||
def2.groups.not_in_creative_inventory = 1
|
||||
|
||||
unifieddyes.generate_split_palette_nodes(nn, def2, "homedecor:banister_"..name.."_horizontal")
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
@ -586,471 +606,3 @@ minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_node(":homedecor:tatami_mat", {
|
||||
tiles = {
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png"
|
||||
},
|
||||
description = S("Japanese tatami"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
homedecor.register("dartboard", {
|
||||
description = S("Dartboard"),
|
||||
mesh = "homedecor_dartboard.obj",
|
||||
tiles = { "homedecor_dartboard.png" },
|
||||
inventory_image = "homedecor_dartboard_inv.png",
|
||||
wield_image = "homedecor_dartboard_inv.png",
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {choppy=2,dig_immediate=2,attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
-- Crafting for homedecor mod (includes folding) by Vanessa Ezekowitz
|
||||
--
|
||||
-- Mostly my own code; overall template borrowed from game default
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:flower_pot_terracotta",
|
||||
recipe = {
|
||||
{ "homedecor:roof_tile_terracotta", "default:dirt", "homedecor:roof_tile_terracotta" },
|
||||
{ "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:flower_pot_green",
|
||||
recipe = {
|
||||
{ "", "dye:dark_green", "" },
|
||||
{ "basic_materials:plastic_sheet", "default:dirt", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:flower_pot_black",
|
||||
recipe = {
|
||||
{ "dye:black", "dye:black", "dye:black" },
|
||||
{ "basic_materials:plastic_sheet", "default:dirt", "basic_materials:plastic_sheet" },
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:ceiling_paint 20",
|
||||
recipe = {
|
||||
"dye:white",
|
||||
"dye:white",
|
||||
"default:sand",
|
||||
"bucket:bucket_water",
|
||||
},
|
||||
replacements = { { "bucket:bucket_water","bucket:bucket_empty" } }
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:ceiling_tile 10",
|
||||
recipe = {
|
||||
{ "", "dye:white", "" },
|
||||
{ "default:steel_ingot", "default:stone", "default:steel_ingot" },
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:drawer_small",
|
||||
recipe = {
|
||||
{ "group:wood", "default:steel_ingot", "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:drawer_small",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
-- vertical poles/lampposts
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:pole_brass 4",
|
||||
recipe = {
|
||||
{ "", "basic_materials:brass_ingot", "" },
|
||||
{ "", "basic_materials:brass_ingot", "" },
|
||||
{ "", "basic_materials:brass_ingot", "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:pole_wrought_iron 4",
|
||||
recipe = {
|
||||
{ "default:iron_lump", },
|
||||
{ "default:iron_lump", },
|
||||
{ "default:iron_lump", },
|
||||
},
|
||||
})
|
||||
|
||||
-- ===========================================================
|
||||
-- Recipes that require materials from wool (cotton alternate)
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:rug_small 8",
|
||||
recipe = {
|
||||
"wool:red",
|
||||
"wool:yellow",
|
||||
"wool:blue",
|
||||
"wool:black"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:rug_persian 8",
|
||||
recipe = {
|
||||
{ "", "wool:yellow", "" },
|
||||
{ "wool:red", "wool:blue", "wool:red" },
|
||||
{ "", "wool:yellow", "" }
|
||||
},
|
||||
})
|
||||
|
||||
-- cotton versions:
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:rug_small 8",
|
||||
recipe = {
|
||||
"cotton:red",
|
||||
"cotton:yellow",
|
||||
"cotton:blue",
|
||||
"cotton:black"
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:rug_persian 8",
|
||||
recipe = {
|
||||
{ "", "cotton:yellow", "" },
|
||||
{ "cotton:red", "cotton:blue", "cotton:red" },
|
||||
{ "", "cotton:yellow", "" }
|
||||
},
|
||||
})
|
||||
|
||||
-- fuel recipes for same
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:rug_small",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:rug_large 2",
|
||||
recipe = {
|
||||
"homedecor:rug_small",
|
||||
"homedecor:rug_small",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:rug_large",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:rug_persian",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
-- more misc stuff here
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:fishtank",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "homedecor:glowlight_small_cube", "basic_materials:plastic_sheet" },
|
||||
{ "default:glass", "bucket:bucket_water", "default:glass" },
|
||||
{ "default:glass", "building_blocks:gravel_spread", "default:glass" },
|
||||
},
|
||||
replacements = { {"bucket:bucket_water", "bucket:bucket_empty"} }
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:cardboard_box 2",
|
||||
recipe = {
|
||||
{ "default:paper", "", "default:paper" },
|
||||
{ "default:paper", "default:paper", "default:paper" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:cardboard_box_big 2",
|
||||
recipe = {
|
||||
{ "default:paper", "", "default:paper" },
|
||||
{ "default:paper", "", "default:paper" },
|
||||
{ "default:paper", "default:paper", "default:paper" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:openframe_bookshelf",
|
||||
recipe = {
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"default:book", "default:book", "default:book"},
|
||||
{"group:wood", "", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
||||
-- japanese walls and mat
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:japanese_wall_top",
|
||||
recipe = {
|
||||
{"group:stick", "default:paper"},
|
||||
{"default:paper", "group:stick"},
|
||||
{"group:stick", "default:paper"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:japanese_wall_top",
|
||||
recipe = {
|
||||
{"default:paper", "group:stick"},
|
||||
{"group:stick", "default:paper"},
|
||||
{"default:paper", "group:stick"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:japanese_wall_middle",
|
||||
recipe = {
|
||||
{"homedecor:japanese_wall_top"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:japanese_wall_bottom",
|
||||
recipe = {
|
||||
{"homedecor:japanese_wall_middle"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:japanese_wall_top",
|
||||
recipe = {
|
||||
{"homedecor:japanese_wall_bottom"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:tatami_mat",
|
||||
recipe = {
|
||||
{"farming:wheat", "farming:wheat", "farming:wheat"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:pool_table",
|
||||
recipe = {
|
||||
{ "wool:dark_green", "wool:dark_green", "wool:dark_green" },
|
||||
{ "building_blocks:hardwood", "building_blocks:hardwood", "building_blocks:hardwood" },
|
||||
{ "building_blocks:slab_hardwood", "", "building_blocks:slab_hardwood" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:dartboard",
|
||||
recipe = {
|
||||
{"dye:black", "basic_materials:plastic_sheet", "dye:white"},
|
||||
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
|
||||
{"dye:dark_green", "basic_materials:plastic_sheet", "dye:red"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:piano",
|
||||
recipe = {
|
||||
{ "", "basic_materials:steel_wire", "building_blocks:hardwood" },
|
||||
{ "basic_materials:plastic_strip", "basic_materials:steel_wire", "building_blocks:hardwood" },
|
||||
{ "basic_materials:brass_ingot", "default:steelblock", "building_blocks:hardwood" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:wall_shelf 2",
|
||||
recipe = {
|
||||
{ "homedecor:wood_table_small_square", "homedecor:curtainrod_wood", "homedecor:curtainrod_wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:trophy 3",
|
||||
recipe = {
|
||||
{ "default:gold_ingot","","default:gold_ingot" },
|
||||
{ "","default:gold_ingot","" },
|
||||
{ "group:wood","default:gold_ingot","group:wood" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:sportbench",
|
||||
recipe = {
|
||||
{ "stairs:slab_steelblock","homedecor:pole_wrought_iron","stairs:slab_steelblock" },
|
||||
{ "default:steel_ingot","wool:black","default:steel_ingot" },
|
||||
{ "default:steel_ingot","wool:black","default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:skateboard",
|
||||
recipe = {
|
||||
{ "dye:yellow","dye:green","dye:blue" },
|
||||
{ "homedecor:wood_table_small_square","homedecor:wood_table_small_square","homedecor:wood_table_small_square" },
|
||||
{ "default:steel_ingot","","default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:tool_cabinet",
|
||||
recipe = {
|
||||
{ "basic_materials:motor", "default:axe_steel", "default:pick_steel" },
|
||||
{ "default:steel_ingot", "homedecor:drawer_small", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "homedecor:drawer_small", "default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:spiral_staircase",
|
||||
recipe = {
|
||||
{ "default:steelblock", "homedecor:pole_wrought_iron", "" },
|
||||
{ "", "homedecor:pole_wrought_iron", "default:steelblock" },
|
||||
{ "default:steelblock", "homedecor:pole_wrought_iron", "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":homedecor:flower_pot_small", {
|
||||
description = S("Small Flower Pot"),
|
||||
inventory_image = "homedecor_flowerpot_small_inv.png"
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:flower_pot_small",
|
||||
recipe = {
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "", "default:clay_brick", "" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:flower_pot_small 3",
|
||||
recipe = { { "homedecor:flower_pot_terracotta" } }
|
||||
})
|
||||
|
||||
for i in ipairs(homedecor.banister_materials) do
|
||||
|
||||
local name = homedecor.banister_materials[i][1]
|
||||
local topmat = homedecor.banister_materials[i][5]
|
||||
local vertmat = homedecor.banister_materials[i][6]
|
||||
local dye1 = homedecor.banister_materials[i][7]
|
||||
local dye2 = homedecor.banister_materials[i][8]
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:banister_"..name.."_horizontal 2",
|
||||
recipe = {
|
||||
{ topmat, "", dye1 },
|
||||
{ vertmat, topmat, "" },
|
||||
{ dye2, vertmat, topmat }
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "",
|
||||
palette = "split",
|
||||
neutral_node = "homedecor:banister_wood_horizontal",
|
||||
type = "shapeless",
|
||||
output_prefix = "homedecor:banister_wood_horizontal_",
|
||||
output_suffix = "",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE",
|
||||
}
|
||||
})
|
||||
|
||||
-- Japanese-style wood/paper wall pieces and door
|
||||
|
||||
local jp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
||||
}
|
||||
|
||||
minetest.register_node(":homedecor:japanese_wall_top", {
|
||||
description = S("Japanese wall (top)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_wall_japanese_top.obj",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:japanese_wall_middle", {
|
||||
description = S("Japanese wall"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_wall_japanese_middle.obj",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:japanese_wall_bottom", {
|
||||
description = S("Japanese wall (bottom)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_wall_japanese_bottom.obj",
|
||||
tiles = {
|
||||
homedecor.lux_wood,
|
||||
"homedecor_japanese_paper.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|