Compare commits
118 Commits
master
...
replace_bi
Author | SHA1 | Date | |
---|---|---|---|
99d58e0876 | |||
59c483fd4f | |||
640cfd3ac7 | |||
cdfbf20ab0 | |||
85569605f5 | |||
a154cb9904 | |||
d55f066686 | |||
252c2bd1d2 | |||
15f62452b8 | |||
577404c850 | |||
a2cbc18351 | |||
9483fee7b3 | |||
1894d91609 | |||
438a1adb32 | |||
e159b843d2 | |||
6e842d9b0d | |||
8287ae2476 | |||
ca2b47492e | |||
f5490e3b58 | |||
bde2082ee1 | |||
d33907ca75 | |||
244d5da0e2 | |||
8de8b889c2 | |||
1d71e2c64e | |||
d3edfbeace | |||
c82ba38e68 | |||
031d5f4e4e | |||
32bab30e1f | |||
7094d8a369 | |||
c990942ba2 | |||
4953b1ba54 | |||
cb2373f089 | |||
1a96ac87a7 | |||
a6dc4890d9 | |||
a5b752f8b2 | |||
4c48e5be29 | |||
a7d0e42cd1 | |||
2e4e4a2412 | |||
1d3751d755 | |||
e2486ca7f5 | |||
98f0c6c20f | |||
54d3b669be | |||
93265656cc | |||
c76fd45a2c | |||
c7d0fd3c53 | |||
a66b82f1f0 | |||
63914caed1 | |||
ba98359dd0 | |||
6df36da4e1 | |||
28ef3e0c4b | |||
680b02f7e2 | |||
a2976c609a | |||
46717958bc | |||
52b2d18523 | |||
bfd08f01c8 | |||
9ed4771515 | |||
3f107a8067 | |||
b3cbd3df2e | |||
b1b4a08834 | |||
f01e4bb55f | |||
7b4f54ead0 | |||
c061ef23cf | |||
d87d8e51f5 | |||
70df655a42 | |||
4876fc1265 | |||
81b2b0898b | |||
a750bac532 | |||
b4b24dedba | |||
622016713e | |||
9963e588d6 | |||
686dd21b9d | |||
47c20dc550 | |||
31e0066238 | |||
3d13053d97 | |||
07b6fc48ea | |||
9a3d101c89 | |||
0d228f705c | |||
229d6aba88 | |||
4e32feaa55 | |||
b9b592af44 | |||
08698ecd60 | |||
45a400f6ce | |||
3dde23cff8 | |||
feb3092d06 | |||
77093e428a | |||
2c7a776c7f | |||
3eb2befaa4 | |||
60c3664cbb | |||
9789d6da3a | |||
0af7b69afa | |||
8350dd0c86 | |||
1ccfeb6214 | |||
b0f742e5c1 | |||
824a77672c | |||
156f068ead | |||
de4de190e5 | |||
6fe2a34fa5 | |||
e5be707c15 | |||
5ca1ed261e | |||
637767f673 | |||
983574c253 | |||
1f79b66442 | |||
0363ed0348 | |||
dd14b2cb04 | |||
5212a756f5 | |||
eaa716df76 | |||
c43375ff7a | |||
b7450d3ad1 | |||
d6d805fb5f | |||
ab9b30778b | |||
d85fb4c64f | |||
3449a6c826 | |||
0f89ab5b44 | |||
e801716f57 | |||
5bfd6c009a | |||
392dbb8b3e | |||
3d3f735bb3 | |||
758a7f34ea |
14
.luacheckrc
Normal file
@ -0,0 +1,14 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
|
||||
read_globals = {
|
||||
"biome_lib",
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"dump",
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
"default",
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
default
|
||||
flowers
|
@ -1,10 +1,10 @@
|
||||
|
||||
-- 3D Mushroom mod by VanessaE
|
||||
--
|
||||
-- License: WTFPL for everything.
|
||||
|
||||
mushroom = {}
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("3dmushrooms")
|
||||
|
||||
minetest.override_item("flowers:mushroom_fertile_brown", {
|
||||
drawtype = "mesh",
|
||||
mesh = "3dmushrooms.obj",
|
||||
@ -13,7 +13,8 @@ minetest.override_item("flowers:mushroom_fertile_brown", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_brown_inv.png"
|
||||
inventory_image = "3dmushrooms_brown_inv.png",
|
||||
wield_image = "3dmushrooms_brown_inv.png"
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:mushroom_brown", {
|
||||
@ -24,7 +25,8 @@ minetest.override_item("flowers:mushroom_brown", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_brown_inv.png"
|
||||
inventory_image = "3dmushrooms_brown_inv.png",
|
||||
wield_image = "3dmushrooms_brown_inv.png"
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:mushroom_fertile_red", {
|
||||
@ -35,7 +37,8 @@ minetest.override_item("flowers:mushroom_fertile_red", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_red_inv.png"
|
||||
inventory_image = "3dmushrooms_red_inv.png",
|
||||
wield_image = "3dmushrooms_red_inv.png"
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:mushroom_red", {
|
||||
@ -46,7 +49,8 @@ minetest.override_item("flowers:mushroom_red", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_red_inv.png"
|
||||
inventory_image = "3dmushrooms_red_inv.png",
|
||||
wield_image = "3dmushrooms_red_inv.png"
|
||||
})
|
||||
|
||||
-- aliases to the default mushrooms
|
||||
@ -65,4 +69,4 @@ minetest.register_alias("mushroom:poison", "flowers:mushroom_red")
|
||||
|
||||
minetest.register_alias("mushroom:identifier", "default:mese_crystal_fragment")
|
||||
|
||||
print("[3D Mushrooms] loaded.")
|
||||
minetest.log("info", S("[3D Mushrooms] loaded."))
|
||||
|
8
3dmushrooms/locale/3dmushrooms.de.tr
Normal file
@ -0,0 +1,8 @@
|
||||
# textdomain: 3dmushrooms
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
|
||||
[3D Mushrooms] loaded.=[3D Mushrooms] geladen.
|
8
3dmushrooms/locale/3dmushrooms.eo.tr
Normal file
@ -0,0 +1,8 @@
|
||||
# textdomain: 3dmushrooms
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
|
||||
[3D Mushrooms] loaded.=[3D Mushrooms] ŝargis.
|
8
3dmushrooms/locale/template.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# textdomain: 3dmushrooms
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
|
||||
[3D Mushrooms] loaded.=
|
2
3dmushrooms/mod.conf
Normal file
@ -0,0 +1,2 @@
|
||||
name = 3dmushrooms
|
||||
depends = default, flowers
|
875
LICENSE
@ -1,336 +1,603 @@
|
||||
Sunflower model and textures by kaeza (CC-BY-SA 3.0).
|
||||
License for code: LGPL 3.0
|
||||
License for media and all other assets: CC-by-SA 4.0
|
||||
|
||||
For the code, Ironzorg's textures, and everything else: WTFPL
|
||||
These licenses apply to all modules and components in this modpack,
|
||||
unless otherwise stated.
|
||||
|
||||
For Mossmanikin's mods (Ferns, Dryplans, and the components
|
||||
from the Undergrowth modpack), and all of my own textures:
|
||||
CC-By-SA 3.0
|
||||
###############################################################################
|
||||
|
||||
----------
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
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
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
0. Additional Definitions.
|
||||
|
||||
This license is also known as "WTFPL"
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
-----------
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
|
||||
CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS
|
||||
PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE
|
||||
WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW
|
||||
IS PROHIBITED.
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND
|
||||
AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS
|
||||
LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS
|
||||
YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE
|
||||
OF SUCH TERMS AND CONDITIONS.
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
1. Definitions
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
"Collective Work" means a work, such as a periodical issue,
|
||||
anthology or encyclopedia, in which the Work in its entirety in
|
||||
unmodified form, along with one or more other contributions,
|
||||
constituting separate and independent works in themselves, are
|
||||
assembled into a collective whole. A work that constitutes a
|
||||
Collective Work will not be considered a Derivative Work (as
|
||||
defined below) for the purposes of this License.
|
||||
"Creative Commons Compatible License" means a license that is
|
||||
listed at http://creativecommons.org/compatiblelicenses that has
|
||||
been approved by Creative Commons as being essentially equivalent
|
||||
to this License, including, at a minimum, because that license:
|
||||
(i) contains terms that have the same purpose, meaning and effect
|
||||
as the License Elements of this License; and, (ii) explicitly
|
||||
permits the relicensing of derivatives of works made available
|
||||
under that license under this License or either a Creative Commons
|
||||
unported license or a Creative Commons jurisdiction license with
|
||||
the same License Elements as this License.
|
||||
"Derivative Work" means a work based upon the Work or upon the
|
||||
Work and other pre-existing works, such as a translation, musical
|
||||
arrangement, dramatization, fictionalization, motion picture
|
||||
version, sound recording, art reproduction, abridgment,
|
||||
condensation, or any other form in which the Work may be recast,
|
||||
transformed, or adapted, except that a work that constitutes a
|
||||
Collective Work will not be considered a Derivative Work for the
|
||||
purpose of this License. For the avoidance of doubt, where the
|
||||
Work is a musical composition or sound recording, the
|
||||
synchronization of the Work in timed-relation with a moving image
|
||||
("synching") will be considered a Derivative Work for the purpose
|
||||
of this License.
|
||||
"License Elements" means the following high-level license
|
||||
attributes as selected by Licensor and indicated in the title of
|
||||
this License: Attribution, ShareAlike.
|
||||
"Licensor" means the individual, individuals, entity or
|
||||
entities that offers the Work under the terms of this License.
|
||||
"Original Author" means the individual, individuals, entity or
|
||||
entities who created the Work.
|
||||
"Work" means the copyrightable work of authorship offered
|
||||
under the terms of this License.
|
||||
"You" means an individual or entity exercising rights under
|
||||
this License who has not previously violated the terms of this
|
||||
License with respect to the Work, or who has received express
|
||||
permission from the Licensor to exercise rights under this License
|
||||
despite a previous violation.
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
2. Fair Use Rights. Nothing in this license is intended to reduce,
|
||||
limit, or restrict any rights arising from fair use, first sale or
|
||||
other limitations on the exclusive rights of the copyright owner
|
||||
under copyright law or other applicable laws.
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this
|
||||
License, Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-exclusive, perpetual (for the duration of the applicable
|
||||
copyright) license to exercise the rights in the Work as stated
|
||||
below:
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
to reproduce the Work, to incorporate the Work into one or
|
||||
more Collective Works, and to reproduce the Work as incorporated
|
||||
in the Collective Works;
|
||||
to create and reproduce Derivative Works provided that any
|
||||
such Derivative Work, including any translation in any medium,
|
||||
takes reasonable steps to clearly label, demarcate or otherwise
|
||||
identify that changes were made to the original Work. For example,
|
||||
a translation could be marked "The original work was translated
|
||||
from English to Spanish," or a modification could indicate "The
|
||||
original work has been modified.";
|
||||
to distribute copies or phonorecords of, display publicly,
|
||||
perform publicly, and perform publicly by means of a digital audio
|
||||
transmission the Work including as incorporated in Collective
|
||||
Works;
|
||||
to distribute copies or phonorecords of, display publicly,
|
||||
perform publicly, and perform publicly by means of a digital audio
|
||||
transmission Derivative Works.
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
For the avoidance of doubt, where the Work is a musical
|
||||
composition:
|
||||
Performance Royalties Under Blanket Licenses. Licensor
|
||||
waives the exclusive right to collect, whether individually or, in
|
||||
the event that Licensor is a member of a performance rights
|
||||
society (e.g. ASCAP, BMI, SESAC), via that society, royalties for
|
||||
the public performance or public digital performance (e.g.
|
||||
webcast) of the Work.
|
||||
Mechanical Rights and Statutory Royalties. Licensor waives
|
||||
the exclusive right to collect, whether individually or via a
|
||||
music rights agency or designated agent (e.g. Harry Fox Agency),
|
||||
royalties for any phonorecord You create from the Work ("cover
|
||||
version") and distribute, subject to the compulsory license
|
||||
created by 17 USC Section 115 of the US Copyright Act (or the
|
||||
equivalent in other jurisdictions).
|
||||
Webcasting Rights and Statutory Royalties. For the avoidance
|
||||
of doubt, where the Work is a sound recording, Licensor waives the
|
||||
exclusive right to collect, whether individually or via a
|
||||
performance-rights society (e.g. SoundExchange), royalties for the
|
||||
public digital performance (e.g. webcast) of the Work, subject to
|
||||
the compulsory license created by 17 USC Section 114 of the US
|
||||
Copyright Act (or the equivalent in other jurisdictions).
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
The above rights may be exercised in all media and formats whether
|
||||
now known or hereafter devised. The above rights include the right
|
||||
to make such modifications as are technically necessary to
|
||||
exercise the rights in other media and formats. All rights not
|
||||
expressly granted by Licensor are hereby reserved.
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is
|
||||
expressly made subject to and limited by the following
|
||||
restrictions:
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
You may distribute, publicly display, publicly perform, or
|
||||
publicly digitally perform the Work only under the terms of this
|
||||
License, and You must include a copy of, or the Uniform Resource
|
||||
Identifier for, this License with every copy or phonorecord of the
|
||||
Work You distribute, publicly display, publicly perform, or
|
||||
publicly digitally perform. You may not offer or impose any terms
|
||||
on the Work that restrict the terms of this License or the ability
|
||||
of a recipient of the Work to exercise of the rights granted to
|
||||
that recipient under the terms of the License. You may not
|
||||
sublicense the Work. You must keep intact all notices that refer
|
||||
to this License and to the disclaimer of warranties. When You
|
||||
distribute, publicly display, publicly perform, or publicly
|
||||
digitally perform the Work, You may not impose any technological
|
||||
measures on the Work that restrict the ability of a recipient of
|
||||
the Work from You to exercise of the rights granted to that
|
||||
recipient under the terms of the License. This Section 4(a)
|
||||
applies to the Work as incorporated in a Collective Work, but this
|
||||
does not require the Collective Work apart from the Work itself to
|
||||
be made subject to the terms of this License. If You create a
|
||||
Collective Work, upon notice from any Licensor You must, to the
|
||||
extent practicable, remove from the Collective Work any credit as
|
||||
required by Section 4(c), as requested. If You create a Derivative
|
||||
Work, upon notice from any Licensor You must, to the extent
|
||||
practicable, remove from the Derivative Work any credit as
|
||||
required by Section 4(c), as requested.
|
||||
You may distribute, publicly display, publicly perform, or
|
||||
publicly digitally perform a Derivative Work only under: (i) the
|
||||
terms of this License; (ii) a later version of this License with
|
||||
the same License Elements as this License; (iii) either the
|
||||
Creative Commons (Unported) license or a Creative Commons
|
||||
jurisdiction license (either this or a later license version) that
|
||||
contains the same License Elements as this License (e.g.
|
||||
Attribution-ShareAlike 3.0 (Unported)); (iv) a Creative Commons
|
||||
Compatible License. If you license the Derivative Work under one
|
||||
of the licenses mentioned in (iv), you must comply with the terms
|
||||
of that license. If you license the Derivative Work under the
|
||||
terms of any of the licenses mentioned in (i), (ii) or (iii) (the
|
||||
"Applicable License"), you must comply with the terms of the
|
||||
Applicable License generally and with the following provisions:
|
||||
(I) You must include a copy of, or the Uniform Resource Identifier
|
||||
for, the Applicable License with every copy or phonorecord of each
|
||||
Derivative Work You distribute, publicly display, publicly
|
||||
perform, or publicly digitally perform; (II) You may not offer or
|
||||
impose any terms on the Derivative Works that restrict the terms
|
||||
of the Applicable License or the ability of a recipient of the
|
||||
Work to exercise the rights granted to that recipient under the
|
||||
terms of the Applicable License; (III) You must keep intact all
|
||||
notices that refer to the Applicable License and to the disclaimer
|
||||
of warranties; and, (IV) when You distribute, publicly display,
|
||||
publicly perform, or publicly digitally perform the Work, You may
|
||||
not impose any technological measures on the Derivative Work that
|
||||
restrict the ability of a recipient of the Derivative Work from
|
||||
You to exercise the rights granted to that recipient under the
|
||||
terms of the Applicable License. This Section 4(b) applies to the
|
||||
Derivative Work as incorporated in a Collective Work, but this
|
||||
does not require the Collective Work apart from the Derivative
|
||||
Work itself to be made subject to the terms of the Applicable
|
||||
License.
|
||||
If You distribute, publicly display, publicly perform, or
|
||||
publicly digitally perform the Work (as defined in Section 1
|
||||
above) or any Derivative Works (as defined in Section 1 above) or
|
||||
Collective Works (as defined in Section 1 above), You must, unless
|
||||
a request has been made pursuant to Section 4(a), keep intact all
|
||||
copyright notices for the Work and provide, reasonable to the
|
||||
medium or means You are utilizing: (i) the name of the Original
|
||||
Author (or pseudonym, if applicable) if supplied, and/or (ii) if
|
||||
the Original Author and/or Licensor designate another party or
|
||||
parties (e.g. a sponsor institute, publishing entity, journal) for
|
||||
attribution ("Attribution Parties") in Licensor's copyright
|
||||
notice, terms of service or by other reasonable means, the name of
|
||||
such party or parties; the title of the Work if supplied; to the
|
||||
extent reasonably practicable, the Uniform Resource Identifier, if
|
||||
any, that Licensor specifies to be associated with the Work,
|
||||
unless such URI does not refer to the copyright notice or
|
||||
licensing information for the Work; and, consistent with Section
|
||||
3(b) in the case of a Derivative Work, a credit identifying the
|
||||
use of the Work in the Derivative Work (e.g., "French translation
|
||||
of the Work by Original Author," or "Screenplay based on original
|
||||
Work by Original Author"). The credit required by this Section
|
||||
4(c) may be implemented in any reasonable manner; provided,
|
||||
however, that in the case of a Derivative Work or Collective Work,
|
||||
at a minimum such credit will appear, if a credit for all
|
||||
contributing authors of the Derivative Work or Collective Work
|
||||
appears, then as part of these credits and in a manner at least as
|
||||
prominent as the credits for the other contributing authors. For
|
||||
the avoidance of doubt, You may only use the credit required by
|
||||
this Section for the purpose of attribution in the manner set out
|
||||
above and, by exercising Your rights under this License, You may
|
||||
not implicitly or explicitly assert or imply any connection with,
|
||||
sponsorship or endorsement by the Original Author, Licensor and/or
|
||||
Attribution Parties, as appropriate, of You or Your use of the
|
||||
Work, without the separate, express prior written permission of
|
||||
the Original Author, Licensor and/or Attribution Parties.
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING,
|
||||
LICENSOR OFFERS THE WORK AS-IS AND ONLY TO THE EXTENT OF ANY
|
||||
RIGHTS HELD IN THE LICENSED WORK BY THE LICENSOR. THE LICENSOR
|
||||
MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE
|
||||
WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT
|
||||
LIMITATION, WARRANTIES OF TITLE, MARKETABILITY, MERCHANTIBILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE
|
||||
OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE
|
||||
OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT
|
||||
ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY
|
||||
NOT APPLY TO YOU.
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY
|
||||
APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY
|
||||
LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE
|
||||
OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE
|
||||
WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
7. Termination
|
||||
4. Combined Works.
|
||||
|
||||
This License and the rights granted hereunder will terminate
|
||||
automatically upon any breach by You of the terms of this License.
|
||||
Individuals or entities who have received Derivative Works or
|
||||
Collective Works from You under this License, however, will not
|
||||
have their licenses terminated provided such individuals or
|
||||
entities remain in full compliance with those licenses. Sections
|
||||
1, 2, 5, 6, 7, and 8 will survive any termination of this License.
|
||||
Subject to the above terms and conditions, the license granted
|
||||
here is perpetual (for the duration of the applicable copyright in
|
||||
the Work). Notwithstanding the above, Licensor reserves the right
|
||||
to release the Work under different license terms or to stop
|
||||
distributing the Work at any time; provided, however that any such
|
||||
election will not serve to withdraw this License (or any other
|
||||
license that has been, or is required to be, granted under the
|
||||
terms of this License), and this License will continue in full
|
||||
force and effect unless terminated as stated above.
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
8. Miscellaneous
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
Each time You distribute or publicly digitally perform the
|
||||
Work (as defined in Section 1 above) or a Collective Work (as
|
||||
defined in Section 1 above), the Licensor offers to the recipient
|
||||
a license to the Work on the same terms and conditions as the
|
||||
license granted to You under this License.
|
||||
Each time You distribute or publicly digitally perform a
|
||||
Derivative Work, Licensor offers to the recipient a license to the
|
||||
original Work on the same terms and conditions as the license
|
||||
granted to You under this License.
|
||||
If any provision of this License is invalid or unenforceable
|
||||
under applicable law, it shall not affect the validity or
|
||||
enforceability of the remainder of the terms of this License, and
|
||||
without further action by the parties to this agreement, such
|
||||
provision shall be reformed to the minimum extent necessary to
|
||||
make such provision valid and enforceable.
|
||||
No term or provision of this License shall be deemed waived
|
||||
and no breach consented to unless such waiver or consent shall be
|
||||
in writing and signed by the party to be charged with such waiver
|
||||
or consent.
|
||||
This License constitutes the entire agreement between the
|
||||
parties with respect to the Work licensed here. There are no
|
||||
understandings, agreements or representations with respect to the
|
||||
Work not specified here. Licensor shall not be bound by any
|
||||
additional provisions that may appear in any communication from
|
||||
You. This License may not be modified without the mutual written
|
||||
agreement of the Licensor and You.
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
Creative Commons Notice
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
Creative Commons is not a party to this License, and makes no
|
||||
warranty whatsoever in connection with the Work. Creative Commons
|
||||
will not be liable to You or any party on any legal theory for any
|
||||
damages whatsoever, including without limitation any general,
|
||||
special, incidental or consequential damages arising in connection
|
||||
to this license. Notwithstanding the foregoing two (2) sentences,
|
||||
if Creative Commons has expressly identified itself as the
|
||||
Licensor hereunder, it shall have all rights and obligations of
|
||||
Licensor.
|
||||
d) Do one of the following:
|
||||
|
||||
Except for the limited purpose of indicating to the public
|
||||
that the Work is licensed under the CCPL, Creative Commons does
|
||||
not authorize the use by either party of the trademark "Creative
|
||||
Commons" or any related trademark or logo of Creative Commons
|
||||
without the prior written consent of Creative Commons. Any
|
||||
permitted use will be in compliance with Creative Commons'
|
||||
then-current trademark usage guidelines, as may be published on
|
||||
its website or otherwise made available upon request from time to
|
||||
time. For the avoidance of doubt, this trademark restriction does
|
||||
not form part of this License.
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
Creative Commons may be contacted at
|
||||
http://creativecommons.org/.
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
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
|
||||
|
||||
=======================================================================
|
||||
|
||||
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.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
=======================================================================
|
||||
|
||||
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,3 +0,0 @@
|
||||
default
|
||||
biome_lib
|
||||
flowers_plus?
|
@ -1,9 +0,0 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Along the Shore"
|
||||
local version = "0.0.4"
|
||||
local mname = "along_shore"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
Before Width: | Height: | Size: 234 B |
@ -1,30 +0,0 @@
|
||||
-------------------------------------------------------------
|
||||
Credit for textures of "along_shore"
|
||||
-------------------------------------------------------------
|
||||
(If more than one author is listed the names are in alphabetical order)
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
FOLDER TEXTURE AUTHORS
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
../along_shore/textures along_shore_seaweed_1Darker.png Neuromancer, VanessaE
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
../along_shore/textures/old (along_shore_empty.png) (Mossmanikin)
|
||||
along_shore_lilypads_1.png Mossmanikin, Neuromancer
|
||||
along_shore_lilypads_2.png Mossmanikin, Neuromancer
|
||||
along_shore_lilypads_3.png Mossmanikin, Neuromancer
|
||||
along_shore_lilypads_4.png Mossmanikin, Neuromancer
|
||||
along_shore_pondscum_1.png Neuromancer
|
||||
along_shore_seaweed_1.png Neuromancer, VanessaE
|
||||
along_shore_seaweed_2.png Mossmanikin, Neuromancer, VanessaE
|
||||
along_shore_seaweed_3.png Mossmanikin, Neuromancer, VanessaE
|
||||
along_shore_seaweed_4.png Mossmanikin, Neuromancer, VanessaE
|
||||
flowers_seaweed.png Neuromancer, VanessaE
|
||||
flowers_waterlily.png Mossmanikin, VanessaE
|
||||
flowers_waterlily_22.5.png Mossmanikin, VanessaE
|
||||
flowers_waterlily_45.png Mossmanikin, VanessaE
|
||||
flowers_waterlily_67.5.png Mossmanikin, VanessaE
|
||||
lillypad3Flower16x.png Neuromancer
|
||||
LillyPad3x16.png Neuromancer
|
||||
lillyPad5x16.png Neuromancer
|
||||
MultiLilly16x.png Neuromancer
|
||||
pondscum16xc.png Neuromancer
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
Before Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 543 B |
Before Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 543 B |
@ -1,4 +0,0 @@
|
||||
default
|
||||
biome_lib
|
||||
stonage?
|
||||
sumpf?
|
225
bushes/init.lua
@ -1,44 +1,55 @@
|
||||
-- Bushes Mod by Mossmanikin, Evergreen, & Neuromancer
|
||||
-- The initial code for this was taken from Mossmanikin's Grasses Mod, then heavilly modified by Neuromancer for this mod.
|
||||
-- The initial code for this was taken from Mossmanikin's Grasses Mod,
|
||||
-- then heavilly modified by Neuromancer for this mod.
|
||||
-- Mossmanikin also greatly helped with providing samples for coding.
|
||||
-- bush leaf textures are cc-by-sa 3.0. from VannessaE's moretrees mod. (Leaf texture created by RealBadAngel or VanessaE)
|
||||
-- bush leaf textures are from VannessaE's moretrees mod.
|
||||
-- (Leaf texture created by RealBadAngel or VanessaE)
|
||||
-- Branch textures created by Neuromancer.
|
||||
-- Licence for Code and Non-Bush leaf code is WTFPL.
|
||||
|
||||
abstract_bushes = {}
|
||||
|
||||
minetest.register_node("bushes:youngtree2_bottom", {
|
||||
description = "Young Tree 2 (bottom)",
|
||||
drawtype="nodebox",
|
||||
tiles = {"bushes_youngtree2trunk.png"},
|
||||
inventory_image = "bushes_youngtree2trunk_inv.png",
|
||||
wield_image = "bushes_youngtree2trunk_inv.png",
|
||||
paramtype = "light",
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("bushes")
|
||||
abstract_bushes = {}
|
||||
|
||||
local bushes_bush_rarity = tonumber(minetest.settings:get("bushes_bush_rarity")) or 99.9
|
||||
local bushes_bush_rarity_fertility = tonumber(minetest.settings:get("bushes_bush_rarity_fertility")) or 1.5
|
||||
|
||||
local bushes_youngtrees_rarity = tonumber(minetest.settings:get("bushes_youngtrees_rarity")) or 100
|
||||
local bushes_youngtrees_rarity_fertility = tonumber(minetest.settings:get("bushes_youngtrees_rarity_fertility")) or 0.6
|
||||
|
||||
|
||||
minetest.register_node("bushes:youngtree2_bottom", {
|
||||
description = S("Young Tree 2 (bottom)"),
|
||||
drawtype="nodebox",
|
||||
tiles = {"bushes_youngtree2trunk.png"},
|
||||
inventory_image = "bushes_youngtree2trunk_inv.png",
|
||||
wield_image = "bushes_youngtree2trunk_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
|
||||
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
|
||||
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick'
|
||||
})
|
||||
|
||||
local BushBranchCenter = { {1,1}, {3,2} }
|
||||
|
||||
local BushBranchCenter = { {1,1}, {3,2} }
|
||||
for i in pairs(BushBranchCenter) do
|
||||
local Num = BushBranchCenter[i][1]
|
||||
local TexNum = BushBranchCenter[i][2]
|
||||
local Num = BushBranchCenter[i][1]
|
||||
local TexNum = BushBranchCenter[i][2]
|
||||
minetest.register_node("bushes:bushbranches"..Num, {
|
||||
description = "Bush Branches "..Num,
|
||||
description = S("Bush Branches @1", Num),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"bushes_leaves_"..TexNum..".png",
|
||||
"bushes_branches_center_"..TexNum..".png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -52,41 +63,43 @@ for i in pairs(BushBranchCenter) do
|
||||
},
|
||||
inventory_image = "bushes_branches_center_"..TexNum..".png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick 4'
|
||||
})
|
||||
end
|
||||
|
||||
local BushBranchSide = { {2,1}, {4,2} }
|
||||
local BushBranchSide = { {2,1}, {4,2} }
|
||||
for i in pairs(BushBranchSide) do
|
||||
local Num = BushBranchSide[i][1]
|
||||
local TexNum = BushBranchSide[i][2]
|
||||
local Num = BushBranchSide[i][1]
|
||||
local TexNum = BushBranchSide[i][2]
|
||||
minetest.register_node("bushes:bushbranches"..Num, {
|
||||
description = "Bush Branches "..Num,
|
||||
description = S("Bush Branches @1", Num),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
--[[top]] "bushes_leaves_"..TexNum..".png",
|
||||
--[[top]] "bushes_leaves_"..TexNum..".png",
|
||||
--[[bottom]]"bushes_branches_center_"..TexNum..".png",
|
||||
--[[right]] "bushes_branches_left_"..TexNum..".png",
|
||||
--[[left]] "bushes_branches_right_"..TexNum..".png", -- MM: We could also mirror the previous here,
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
-- { left , bottom , front, right , top , back }
|
||||
{0.137748,-0.491944, 0.5 ,-0.125000,-0.179444,-0.007790}, --NodeBox 1
|
||||
{0.262748,-0.185995, 0.5 ,-0.237252, 0.126505,-0.260269}, --NodeBox 2
|
||||
{0.500000, 0.125000, 0.5 ,-0.500000, 0.500000,-0.500000}, --NodeBox 3
|
||||
-- { left , bottom , front, right , top , back }
|
||||
{0.137748,-0.491944, 0.5 ,-0.125000,-0.179444,-0.007790}, --NodeBox 1
|
||||
{0.262748,-0.185995, 0.5 ,-0.237252, 0.126505,-0.260269}, --NodeBox 2
|
||||
{0.500000, 0.125000, 0.5 ,-0.500000, 0.500000,-0.500000}, --NodeBox 3
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
@ -95,38 +108,41 @@ for i in pairs(BushBranchSide) do
|
||||
},
|
||||
inventory_image = "bushes_branches_right_"..TexNum..".png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick 3'
|
||||
})
|
||||
end
|
||||
|
||||
local BushLeafNode = { {1}, {2}}
|
||||
local BushLeafNode = { {1}, {2}}
|
||||
for i in pairs(BushLeafNode) do
|
||||
local Num = BushLeafNode[i][1]
|
||||
local Num = BushLeafNode[i][1]
|
||||
minetest.register_node("bushes:BushLeaves"..Num, {
|
||||
description = "Bush Leaves "..Num,
|
||||
description = S("Bush Leaves @1", Num),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"bushes_leaves_"..Num..".png"},
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
groups = { -- MM: Should we add leafdecay?
|
||||
groups = { -- MM: Should we add leafdecay?
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
attached_node=1
|
||||
attached_node=1,
|
||||
leaves=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
abstract_bushes.grow_bush = function(pos)
|
||||
local leaf_type = math.random(1,2)
|
||||
local leaf_type = math.random(1,2)
|
||||
local bush_side_height = math.random(0,1)
|
||||
local chance_of_bush_node_right = math.random(1,10)
|
||||
if chance_of_bush_node_right> 5 then
|
||||
@ -144,25 +160,24 @@ abstract_bushes.grow_bush = function(pos)
|
||||
bush_side_height = math.random(0,1)
|
||||
local front_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z+1}
|
||||
abstract_bushes.grow_bush_node(front_pos,2,leaf_type)
|
||||
end
|
||||
end
|
||||
local chance_of_bush_node_back = math.random(1,10)
|
||||
if chance_of_bush_node_back> 5 then
|
||||
bush_side_height = math.random(0,1)
|
||||
local back_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z-1}
|
||||
abstract_bushes.grow_bush_node(back_pos,0,leaf_type)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
|
||||
|
||||
local bush_branch_type = 2
|
||||
|
||||
|
||||
-- MM: I'm not sure if it's slower now than before...
|
||||
if dir ~= 5 and leaf_type == 1 then
|
||||
bush_branch_type = 2
|
||||
@ -178,80 +193,74 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
bush_branch_type = 3
|
||||
dir = 1
|
||||
end
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
|
||||
minetest.swap_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
|
||||
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
|
||||
minetest.set_node(above_right_here, {name="bushes:BushLeaves"..leaf_type})
|
||||
minetest.swap_node(above_right_here, {name="bushes:BushLeaves"..leaf_type})
|
||||
local chance_of_high_leaves = math.random(1,10)
|
||||
if chance_of_high_leaves> 5 then
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
|
||||
minetest.set_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type})
|
||||
minetest.swap_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({rarity = bushes_bush_rarity, rarity_fertility = bushes_bush_rarity_fertility}),
|
||||
min_elevation = 1, -- above sea level
|
||||
},
|
||||
max_count = 15, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_bush
|
||||
)
|
||||
"bushes:bushes",
|
||||
abstract_bushes.grow_bush
|
||||
)
|
||||
|
||||
abstract_bushes.grow_youngtree2 = function(pos)
|
||||
local height = math.random(4,5)
|
||||
abstract_bushes.grow_youngtree2 = function(pos)
|
||||
local height = math.random(4,5)
|
||||
abstract_bushes.grow_youngtree_node2(pos,height)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
local three_above_right_here = {x=pos.x, y=pos.y+4, z=pos.z}
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
if height == 4 then
|
||||
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
|
||||
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
|
||||
minetest.set_node(right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.set_node(above_right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.set_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
|
||||
minetest.set_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
|
||||
minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" })
|
||||
minetest.set_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
|
||||
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
|
||||
minetest.swap_node(right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.swap_node(above_right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.swap_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
|
||||
minetest.swap_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
|
||||
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
|
||||
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({rarity = bushes_youngtrees_rarity, rarity_fertility = bushes_youngtrees_rarity_fertility}),
|
||||
min_elevation = 1, -- above sea level
|
||||
},
|
||||
max_count = 55, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_youngtree2
|
||||
)
|
||||
|
||||
--http://dev.minetest.net/Node_Drawtypes
|
||||
"bushes:youngtrees",
|
||||
abstract_bushes.grow_youngtree2
|
||||
)
|
||||
|
10
bushes/locale/bushes.de.tr
Normal file
@ -0,0 +1,10 @@
|
||||
# textdomain: bushes
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
|
||||
Young Tree 2 (bottom)=Strauch 2 (Ansatz)
|
||||
Bush Branches @1=Buschäste @1
|
||||
Bush Leaves @1=Buschblätter @1
|
10
bushes/locale/bushes.eo.tr
Normal file
@ -0,0 +1,10 @@
|
||||
# textdomain: bushes
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
|
||||
Young Tree 2 (bottom)=Juna Arbo 2 (malsupro)
|
||||
Bush Branches @1=Arbustaj Branĉoj @1
|
||||
Bush Leaves @1=Arbustaj Folioj @1
|
11
bushes/locale/bushes.fr.tr
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: bushes
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# fat115 <fat115@framasoft.org>, 2017.
|
||||
#
|
||||
|
||||
Young Tree 2 (bottom)=Arbuste 2 (bas)
|
||||
Bush Branches @1=Branches de buisson @1
|
||||
Bush Leaves @1=Feuilles de buisson @1
|
10
bushes/locale/template.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# textdomain: bushes
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
|
||||
Young Tree 2 (bottom)=
|
||||
Bush Branches @1=
|
||||
Bush Leaves @1=
|
3
bushes/mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = bushes
|
||||
depends = default, biome_lib
|
||||
optional_depends = stoneage, sumpf
|
17
bushes/settingtypes.txt
Normal file
@ -0,0 +1,17 @@
|
||||
#Bush rarity %
|
||||
bushes_bush_rarity (Bush rarity %) float 99.9 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
bushes_bush_rarity_fertility (Bush rarity fertility reduction %) float 1.5 0 100
|
||||
|
||||
#Bush minimum fertility (-1 to +1)
|
||||
bushes_bush_fertility (Bush minimum fertility) float -0.7 -1 1
|
||||
|
||||
#Youngtree (from bushes mod) rarity %
|
||||
bushes_youngtrees_rarity (Youngtree bush rarity %) float 100 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
bushes_youngtrees_rarity_fertility (Youngtree bush rarity fertility reduction %) float 0.6 0 100
|
||||
|
||||
#Youngtree (from bushes mod) minimum fertility (-1 to +1)
|
||||
bushes_youngtrees_fertility (Youngtree bush minimum fertility) float -0.5 -1 1
|
@ -1,74 +1,92 @@
|
||||
local S = biome_lib.intllib
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("bushes_classic")
|
||||
|
||||
-- Basket
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:basket_empty",
|
||||
recipe = {
|
||||
{ "default:stick", "default:stick", "default:stick" },
|
||||
{ "", "default:stick", "" },
|
||||
},
|
||||
output = "bushes:basket_empty",
|
||||
recipe = {
|
||||
{ "default:stick", "default:stick", "default:stick" },
|
||||
{ "", "default:stick", "" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Sugar
|
||||
|
||||
minetest.register_craftitem(":bushes:sugar", {
|
||||
description = S("Sugar"),
|
||||
inventory_image = "bushes_sugar.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = {food_sugar=1}
|
||||
})
|
||||
if not minetest.registered_items["farming:sugar"] then
|
||||
minetest.register_craftitem(":bushes:sugar", {
|
||||
description = S("Sugar"),
|
||||
inventory_image = "bushes_sugar.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = {food_sugar=1, flammable = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:sugar 1",
|
||||
recipe = {
|
||||
{ "default:papyrus", "default:papyrus" },
|
||||
},
|
||||
})
|
||||
else
|
||||
minetest.register_alias("bushes:sugar", "farming:sugar")
|
||||
end
|
||||
|
||||
-- override farming_plus strawberry and add food_ group
|
||||
if minetest.get_modpath("farming_plus") then
|
||||
|
||||
minetest.override_item("farming_plus:strawberry_item", {
|
||||
groups = {food_strawberry = 1, food_berry = 1, flammable = 2},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:sugar 1",
|
||||
recipe = {
|
||||
{ "default:papyrus", "default:papyrus" },
|
||||
},
|
||||
})
|
||||
|
||||
for i, berry in ipairs(bushes_classic.bushes) do
|
||||
local desc = bushes_classic.bushes_descriptions[i]
|
||||
|
||||
local groups = {food_berry = 1, flammable = 2}
|
||||
|
||||
if berry ~= "mixed_berry" then
|
||||
|
||||
groups["food_" .. berry] = 1
|
||||
|
||||
-- Berry
|
||||
minetest.register_craftitem(":bushes:"..berry, {
|
||||
description = bushes_classic.bushes_descriptions[i][1],
|
||||
inventory_image = "bushes_"..berry..".png",
|
||||
groups = groups,
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
end
|
||||
|
||||
-- Raw pie
|
||||
minetest.register_craftitem(":bushes:"..berry.."_pie_raw", {
|
||||
description = S("Raw "..desc.." pie"),
|
||||
description = bushes_classic.bushes_descriptions[i][2],
|
||||
inventory_image = "bushes_"..berry.."_pie_raw.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
if berry ~= "mixed_berry" then
|
||||
|
||||
if berry == "strawberry" and minetest.registered_nodes["farming_plus:strawberry"] then
|
||||
-- Special case for strawberries, when farming_plus is in use. Use
|
||||
-- the item from that mod, but redefine it so it has the right
|
||||
-- groups and does't look so ugly!
|
||||
minetest.register_craftitem(":farming_plus:strawberry_item", {
|
||||
description = S("Strawberry"),
|
||||
inventory_image = "bushes_"..berry..".png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {berry=1, strawberry=1}
|
||||
})
|
||||
minetest.register_alias("bushes:strawberry", "farming_plus:strawberry_item")
|
||||
else
|
||||
minetest.register_craftitem(":bushes:"..berry, {
|
||||
description = desc,
|
||||
inventory_image = "bushes_"..berry..".png",
|
||||
groups = {berry = 1, [berry] = 1},
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
end
|
||||
minetest.register_craft({
|
||||
output = "bushes:"..berry.."_pie_raw 1",
|
||||
recipe = {
|
||||
{ "group:food_sugar", "farming:flour", "group:food_sugar" },
|
||||
{ "group:"..berry, "group:"..berry, "group:"..berry },
|
||||
{ "group:food_"..berry, "group:food_"..berry, "group:food_"..berry },
|
||||
},
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = "bushes:mixed_berry_pie_raw 2",
|
||||
recipe = {
|
||||
{ "group:food_sugar", "farming:flour", "group:food_sugar" },
|
||||
{ "group:food_berry", "group:food_berry", "group:food_berry" },
|
||||
{ "group:food_berry", "group:food_berry", "group:food_berry" },
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Cooked pie
|
||||
|
||||
minetest.register_craftitem(":bushes:"..berry.."_pie_cooked", {
|
||||
description = S("Cooked "..desc.." pie"),
|
||||
description = bushes_classic.bushes_descriptions[i][3],
|
||||
inventory_image = "bushes_"..berry.."_pie_cooked.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
})
|
||||
@ -80,10 +98,9 @@ for i, berry in ipairs(bushes_classic.bushes) do
|
||||
cooktime = 30,
|
||||
})
|
||||
|
||||
-- slice of pie
|
||||
|
||||
-- Slice of pie
|
||||
minetest.register_craftitem(":bushes:"..berry.."_pie_slice", {
|
||||
description = S("Slice of "..desc.." pie"),
|
||||
description = bushes_classic.bushes_descriptions[i][4],
|
||||
inventory_image = "bushes_"..berry.."_pie_slice.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
@ -96,7 +113,6 @@ for i, berry in ipairs(bushes_classic.bushes) do
|
||||
})
|
||||
|
||||
-- Basket with pies
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:basket_"..berry.." 1",
|
||||
recipe = {
|
||||
@ -105,14 +121,3 @@ for i, berry in ipairs(bushes_classic.bushes) do
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:mixed_berry_pie_raw 2",
|
||||
recipe = {
|
||||
{ "group:food_sugar", "farming:flour", "group:food_sugar" },
|
||||
{ "group:berry", "group:berry", "group:berry" },
|
||||
{ "group:berry", "group:berry", "group:berry" },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
biome_lib
|
||||
farming?
|
||||
farming_plus?
|
@ -1,14 +1,13 @@
|
||||
-- Bushes classic mod originally by unknown
|
||||
-- now maintained by VanessaE
|
||||
--
|
||||
-- License: WTFPL
|
||||
|
||||
local S = biome_lib.intllib
|
||||
|
||||
bushes_classic = {}
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("bushes_classic")
|
||||
|
||||
bushes_classic.bushes = {
|
||||
"strawberry",
|
||||
"strawberry",
|
||||
"blackberry",
|
||||
"blueberry",
|
||||
"raspberry",
|
||||
@ -17,12 +16,12 @@ bushes_classic.bushes = {
|
||||
}
|
||||
|
||||
bushes_classic.bushes_descriptions = {
|
||||
"Strawberry",
|
||||
"Blackberry",
|
||||
"Blueberry",
|
||||
"Raspberry",
|
||||
"Gooseberry",
|
||||
"Mixed Berry"
|
||||
{S("Strawberry"), S("Raw Strawberry pie"), S("Cooked Strawberry pie"), S("Slice of Strawberry pie"), S("Basket with Strawberry pies"), S("Strawberry Bush")},
|
||||
{S("Blackberry"), S("Raw Blackberry pie"), S("Cooked Blackberry pie"), S("Slice of Blackberry pie"), S("Basket with Blackberry pies"), S("Blackberry Bush")},
|
||||
{S("Blueberry"), S("Raw Blueberry pie"), S("Cooked Blueberry pie"), S("Slice of Blueberry pie"), S("Basket with Blueberry pies"), S("Blueberry Bush")},
|
||||
{S("Raspberry"), S("Raw Raspberry pie"), S("Cooked Raspberry pie"), S("Slice of Raspberry pie"), S("Basket with Raspberry pies"), S("Raspberry Bush")},
|
||||
{S("Gooseberry"), S("Raw Gooseberry pie"), S("Cooked Gooseberry pie"), S("Slice of Gooseberry pie"), S("Basket with Gooseberry pies"), S("Gooseberry Bush")},
|
||||
{S("Mixed Berry"), S("Raw Mixed Berry pie"), S("Cooked Mixed Berry pie"), S("Slice of Mixed Berry pie"), S("Basket with Mixed Berry pies"), S("Currently fruitless Bush")}
|
||||
}
|
||||
|
||||
bushes_classic.spawn_list = {}
|
||||
@ -31,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
|
||||
dofile(modpath..'/cooking.lua')
|
||||
dofile(modpath..'/nodes.lua')
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 3600,
|
||||
spawn_plants = bushes_classic.spawn_list,
|
||||
avoid_radius = 10,
|
||||
@ -56,4 +55,4 @@ biome_lib:spawn_on_surfaces({
|
||||
|
||||
minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry")
|
||||
|
||||
print(S("[Bushes] Loaded."))
|
||||
print("[Bushes] Loaded.")
|
||||
|
46
bushes_classic/locale/bushes_classic.de.tr
Normal file
@ -0,0 +1,46 @@
|
||||
# textdomain: bushes_classic
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Xanthin, 2017.
|
||||
#
|
||||
|
||||
Sugar=Zucker
|
||||
Basket with Strawberry pies=Korb mit Erdbeertorten
|
||||
Cooked Strawberry pie=Erdbeertorte
|
||||
Raw Strawberry pie=Rohe Erdbeertorte
|
||||
Slice of Strawberry pie=Erdbeertortenstueck
|
||||
Strawberry=Erdbeere
|
||||
Strawberry Bush=Erdbeerbusch
|
||||
Basket with Blackberry pies=Korb mit Brombeertorten
|
||||
Blackberry=Brombeere
|
||||
Blackberry Bush=Brombeerbusch
|
||||
Cooked Blackberry pie=Brombeertorte
|
||||
Raw Blackberry pie=Rohe Brombeertorte
|
||||
Slice of Blackberry pie=Brombeertortenstueck
|
||||
Basket with Blueberry pies=Korb mit Blaubeertorten
|
||||
Blueberry=Blaubeere
|
||||
Blueberry Bush=Blaubeerbusch
|
||||
Cooked Blueberry pie=Blaubeertorte
|
||||
Raw Blueberry pie=Rohe Blaubeertorte
|
||||
Slice of Blueberry pie=Blaubeertortenstueck
|
||||
Basket with Raspberry pies=Korb mit Himbeertorten
|
||||
Cooked Raspberry pie=Himbeertorte
|
||||
Raspberry=Himbeere
|
||||
Raspberry Bush=Himbeerbusch
|
||||
Raw Raspberry pie=Rohe Himbeertorte
|
||||
Slice of Raspberry pie=Himbeertortenstueck
|
||||
Basket with Gooseberry pies=Korb mit Stachelbeertorten
|
||||
Cooked Gooseberry pie=Stachelbeertorte
|
||||
Gooseberry=Stachelbeere
|
||||
Gooseberry Bush=Stachelbeerbusch
|
||||
Raw Gooseberry pie=Rohe Stachelbeertorte
|
||||
Slice of Gooseberry pie=Stachelbeertortenstueck
|
||||
Basket with Mixed Berry pies=Korb mit Beerenmixtorten
|
||||
Cooked Mixed Berry pie=Beerenmixtorte
|
||||
Currently fruitless Bush=zur Zeit fruechteloser
|
||||
Mixed Berry=Beerenmix
|
||||
Raw Mixed Berry pie=Rohe Beerenmixtorte
|
||||
Slice of Mixed Berry pie=Beerenmixtortenstueck
|
||||
Basket=Korb
|
46
bushes_classic/locale/bushes_classic.eo.tr
Normal file
@ -0,0 +1,46 @@
|
||||
# textdomain: bushes_classic
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
#
|
||||
|
||||
Sugar=Sukero
|
||||
Basket with Strawberry pies=Korbo kun Fragokukoj
|
||||
Cooked Strawberry pie=Kuirita Fragokuko
|
||||
Raw Strawberry pie=Kruda Fragokuko
|
||||
Slice of Strawberry pie=Tranĉaĵo de Fragokuko
|
||||
Strawberry=Frago
|
||||
Strawberry Bush=Fraga Arbusto
|
||||
Basket with Blackberry pies=Korbo kun Rubusokukoj
|
||||
Cooked Blackberry pie=Kuirita Rubusokuko
|
||||
Raw Blackberry pie=Kruda Rubusokuko
|
||||
Slice of Blackberry pie=Tranĉaĵo de Rubusokuko
|
||||
Blackberry=Rubuso
|
||||
Blackberry Bush=Rubusa Arbusto
|
||||
Basket with Blueberry pies=Korbo kun Mirtelokukoj
|
||||
Blueberry=Mirtelo
|
||||
Blueberry Bush=Mirtela Arbusto
|
||||
Cooked Blueberry pie=Kuirita Mirtelokuko
|
||||
Raw Blueberry pie=Kruda Mirtelokuko
|
||||
Slice of Blueberry pie=Tranĉaĵo de Mirtelokuko
|
||||
Basket with Raspberry pies=Korbo kun Frambokukoj
|
||||
Cooked Raspberry pie=Kuirita Frambokuko
|
||||
Raspberry=Frambo
|
||||
Raspberry Bush=Framba Arbusto
|
||||
Raw Raspberry pie=Kruda Frambokuko
|
||||
Slice of Raspberry pie=Tranĉaĵo de Frambokuko
|
||||
Basket with Gooseberry pies=Korbo kun Grosberkuko
|
||||
Cooked Gooseberry pie=Kuirita Grosberkuko
|
||||
Gooseberry=Grosbero
|
||||
Gooseberry Bush=Grosberarbusto
|
||||
Raw Gooseberry pie=Kruda Grosberkuko
|
||||
Slice of Gooseberry pie=Tranĉaĵo de Grosberkuko
|
||||
Basket with Mixed Berry pies=Korbo kun Miksitaj Beraj Kukoj
|
||||
Cooked Mixed Berry pie=Kuirita Miksa Beraj Kukoj
|
||||
Currently fruitless Bush=Nuntempe senfrukta Arbusto
|
||||
Mixed Berry=Miksita Bero
|
||||
Raw Mixed Berry pie=Kruda Miksita Bera Kuko
|
||||
Slice of Mixed Berry pie=Tranĉaĵo de Miksita Bera Kuko
|
||||
Basket=Korbo
|
46
bushes_classic/locale/bushes_classic.es.tr
Normal file
@ -0,0 +1,46 @@
|
||||
# textdomain: bushes_classic
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Carlos Barraza <carlosbarrazaes@gmail.com>, 2017.
|
||||
#
|
||||
|
||||
Sugar=Azúcar
|
||||
Basket with Strawberry pies=Cesta con Pasteles de Frutilla
|
||||
Cooked Strawberry pie=Pastel de Frutilla Cocido
|
||||
Raw Strawberry pie=Pastel de Frutilla Crudo
|
||||
Slice of Strawberry pie=Rebanada de Pastel de Frutilla
|
||||
Strawberry=Frutilla
|
||||
Strawberry Bush=Arbusto de Frutilla
|
||||
Basket with Blackberry pies=Cesta con Pasteles de Mora
|
||||
Blackberry=Mora
|
||||
Blackberry Bush=Arbusto de Mora
|
||||
Cooked Blackberry pie=Pastel de Mora Cocido
|
||||
Raw Blackberry pie=Pastel de Mora Crudo
|
||||
Slice of Blackberry pie=Rebanada de Pastel de Mora
|
||||
Basket with Blueberry pies=Cesta con Pasteles de Arándano
|
||||
Blueberry=Arándano
|
||||
Blueberry Bush=Arbusto de Arándano
|
||||
Cooked Blueberry pie=Pastel de Arándano Cocido
|
||||
Raw Blueberry pie=Pastel de Arándano Crudo
|
||||
Slice of Blueberry pie=Rebanada de Pastel de Arándano
|
||||
Basket with Raspberry pies=Cesta con Pasteles de Frambuesa
|
||||
Cooked Raspberry pie=Pastel de Frambuesa Cocido
|
||||
Raspberry=Frambuesa
|
||||
Raspberry Bush=Arbusto de Frambuesa
|
||||
Raw Raspberry pie=Pastel de Frambuesa Crudo
|
||||
Slice of Raspberry pie=Rebanada de Pastel de Frambuesa
|
||||
Basket with Gooseberry pies=Cesta con Pasteles de Grosella
|
||||
Cooked Gooseberry pie=Pastel de Grosella Cocido
|
||||
Gooseberry=Grosella
|
||||
Gooseberry Bush=Arbusto de Grosella
|
||||
Raw Gooseberry pie=Pastel de Grosella Crudo
|
||||
Slice of Gooseberry pie=Rebanada de Pastel de Grosella
|
||||
Basket with Mixed Berry pies=Cesta con Pasteles de Mezcla de Baya
|
||||
Cooked Mixed Berry pie=Pastel de Mezcla de Bayas Cocido
|
||||
Currently fruitless Bush=Arbusto actualmente infructuoso
|
||||
Mixed Berry=Mezcla de Baya
|
||||
Raw Mixed Berry pie=Pastel de Mezcla de Bayas Cruda
|
||||
Slice of Mixed Berry pie=Rebanada de Pastel de Mezcla de Bayas
|
||||
Basket=Cesta
|
46
bushes_classic/locale/bushes_classic.fr.tr
Normal file
@ -0,0 +1,46 @@
|
||||
# textdomain: bushes_classic
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# fat115 <fat115@framasoft.org>, 2017.
|
||||
#
|
||||
|
||||
Sugar=Sucre
|
||||
Basket with Strawberry pies=Panier de tartes aux fraises
|
||||
Cooked Strawberry pie=Tarte aux fraises (cuite)
|
||||
Raw Strawberry pie=Tarte aux fraises (crue)
|
||||
Slice of Strawberry pie=Part de tarte aux fraises
|
||||
Strawberry=Fraises
|
||||
Strawberry Bush=Buisson de fraises
|
||||
Basket with Blackberry pies=Panier de tartes aux fraises
|
||||
Blackberry=Mûres
|
||||
Blackberry Bush=Buisson de mûres
|
||||
Cooked Blackberry pie=Tarte aux mûres (cuite)
|
||||
Raw Blackberry pie=Tarte aux mûres (crue)
|
||||
Slice of Blackberry pie=Part de tarte aux mûres
|
||||
Basket with Blueberry pies=Panier de tartes aux mûres
|
||||
Blueberry=Myrtilles
|
||||
Blueberry Bush=Buisson de myrtilles
|
||||
Cooked Blueberry pie=Tarte aux myrtilles (cuite)
|
||||
Raw Blueberry pie=Tarte aux myrtilles (crue)
|
||||
Slice of Blueberry pie=Part de tarte aux myrtilles
|
||||
Basket with Raspberry pies=Panier de tartes aux framboises
|
||||
Cooked Raspberry pie=Tarte aux framboises (cuite)
|
||||
Raspberry=Framboises
|
||||
Raspberry Bush=Buisson de framboises
|
||||
Raw Raspberry pie=Tarte aux framboises (crue)
|
||||
Slice of Raspberry pie=Part de tarts aux framboises
|
||||
Basket with Gooseberry pies=Panier de tartes aux groseilles
|
||||
Cooked Gooseberry pie=Tarte aux groseilles (cuite)
|
||||
Gooseberry=Groseilles
|
||||
Gooseberry Bush=Buisson de groseilles
|
||||
Raw Gooseberry pie=Tarte aux groseilles (crue)
|
||||
Slice of Gooseberry pie=Part de tarte aux groseilles
|
||||
Basket with Mixed Berry pies=Panier de tartes aux fruits rouges
|
||||
Cooked Mixed Berry pie=Tarte aux fruits rouges (cuite)
|
||||
Currently fruitless Bush=Buisson sans fruits pour l'instant
|
||||
Mixed Berry=Fruits rouges
|
||||
Raw Mixed Berry pie=Tarte aux fruits rouges (crue)
|
||||
Slice of Mixed Berry pie=Part de tarte aux fruits rouges
|
||||
Basket=Panier
|
46
bushes_classic/locale/bushes_classic.tr.tr
Normal file
@ -0,0 +1,46 @@
|
||||
# textdomain: bushes_classic
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# mahmutelmas06@hotmail.com, 2017.
|
||||
#
|
||||
|
||||
Sugar=Şeker
|
||||
Basket with Strawberry pies=Çilekli pasta sepeti
|
||||
Cooked Strawberry pie=Pişmiş çilekli pasta
|
||||
Raw Strawberry pie=Çilekli çiğ pasta
|
||||
Slice of Strawberry pie=Çilekli pasta dilimi
|
||||
Strawberry=Çilek
|
||||
Strawberry Bush=Çilek fidanı
|
||||
Basket with Blackberry pies=Böğürtlenli pasta sepeti
|
||||
Blackberry=Böğürtlen
|
||||
Blackberry Bush=Böğürtlen fidanı
|
||||
Cooked Blackberry pie=Pişmiş böğürtlenli pasta
|
||||
Raw Blackberry pie=Böğürtlenli çiğ pasta
|
||||
Slice of Blackberry pie=Böğürtlenli pasta dilimi
|
||||
Basket with Blueberry pies=Yaban mersini pastalı sepet
|
||||
Blueberry=Yaban mersini
|
||||
Blueberry Bush=Yaban mersini fidanı
|
||||
Cooked Blueberry pie=Pişmiş yaban mersinli pasta
|
||||
Raw Blueberry pie=Yaban mersinli çiğ pasta
|
||||
Slice of Blueberry pie=Yaban mersinli pasta dilimi
|
||||
Basket with Raspberry pies=Ahududulu pasta sepeti
|
||||
Cooked Raspberry pie=Pişmiş ahududulu pasta
|
||||
Raspberry=Ahududu
|
||||
Raspberry Bush=Ahududu fidanı
|
||||
Raw Raspberry pie=Ahududulu çiğ pasta
|
||||
Slice of Raspberry pie=Ahududulu pasta dilimi
|
||||
Basket with Gooseberry pies=Bektaşi üzümlü pasta sepeti
|
||||
Cooked Gooseberry pie=Pişmiş bektaşi üzümlü pasta
|
||||
Gooseberry=Bektaşi üzümü
|
||||
Gooseberry Bush=Bektaşi üzümü fidanı
|
||||
Raw Gooseberry pie=Bektaşi üzümlü çiğ pasta
|
||||
Slice of Gooseberry pie=Bektaşi üzümlü pasta dilimi
|
||||
Basket with Mixed Berry pies=Dutlu pasta sepeti
|
||||
Cooked Mixed Berry pie=Pişmiş dutlu pasta
|
||||
Currently fruitless Bush=Fidanı şu anda meyvesiz
|
||||
Mixed Berry=Dut
|
||||
Raw Mixed Berry pie=Dutlu çiğ pasta
|
||||
Slice of Mixed Berry pie=Dutlu pasta dilimi
|
||||
Basket=Sepet
|
@ -1,43 +0,0 @@
|
||||
# Translation by Xanthin
|
||||
|
||||
Strawberry = Erdbeere
|
||||
Blackberry = Brombeere
|
||||
Blueberry = Blaubeere
|
||||
Raspberry = Himbeere
|
||||
Gooseberry = Stachelbeere
|
||||
Mixed Berry = Beerenmix
|
||||
Basket with Strawberry Pies = Korb mit Erdbeertorten
|
||||
Basket with Blackberry Pies = Korb mit Brombeertorten
|
||||
Basket with Blueberry Pies = Korb mit Blaubeertorten
|
||||
Basket with Raspberry Pies = Korb mit Himbeertorten
|
||||
Basket with Gooseberry Pies = Korb mit Stachelbeertorten
|
||||
Basket with Mixed Berry Pies = Korb mit Beerenmixtorten
|
||||
currently fruitless = zur Zeit fruechteloser
|
||||
Strawberry Bush = Erdbeerbusch
|
||||
Blackberry Bush = Brombeerbusch
|
||||
Blueberry Bush = Blaubeerbusch
|
||||
Raspberry Bush = Himbeerbusch
|
||||
Gooseberry Bush = Stachelbeerbusch
|
||||
Mixed Berry Bush = Beerenmixbusch
|
||||
Basket = Korb
|
||||
Sugar = Zucker
|
||||
Raw Strawberry pie = Rohe Erdbeertorte
|
||||
Raw Blackberry pie = Rohe Brombeertorte
|
||||
Raw Blueberry pie = Rohe Blaubeertorte
|
||||
Raw Raspberry pie = Rohe Himbeertorte
|
||||
Raw Gooseberry pie = Rohe Stachelbeertorte
|
||||
Raw Mixed Berry pie = Rohe Beerenmixtorte
|
||||
Cooked Strawberry pie = Erdbeertorte
|
||||
Cooked Blackberry pie = Brombeertorte
|
||||
Cooked Blueberry pie = Blaubeertorte
|
||||
Cooked Raspberry pie = Himbeertorte
|
||||
Cooked Gooseberry pie = Stachelbeertorte
|
||||
Cooked Mixed Berry pie = Beerenmixtorte
|
||||
Slice of Strawberry pie = Erdbeertortenstueck
|
||||
Slice of Blackberry pie = Brombeertortenstueck
|
||||
Slice of Blueberry pie = Blaubeertortenstueck
|
||||
Slice of Raspberry pie = Himbeertortenstueck
|
||||
Slice of Gooseberry pie = Stachelbeertortenstueck
|
||||
Slice of Mixed Berry pie = Beerenmixtortenstueck
|
||||
|
||||
[Bushes] Loaded. = [Bushes] Geladen.
|
@ -1,43 +0,0 @@
|
||||
# Template
|
||||
|
||||
Strawberry = Fraise
|
||||
Blackberry = Mûre
|
||||
Blueberry = Myrtille
|
||||
Raspberry = Framboise
|
||||
Gooseberry = Groseille
|
||||
Mixed Berry = Mélange de baies
|
||||
Basket with Strawberry Pies = Panier de tartes aux fraises
|
||||
Basket with Blackberry Pies = Panier de tartes aux mûres
|
||||
Basket with Blueberry Pies = Panier de tartes aux myrtilles
|
||||
Basket with Raspberry Pies = Panier de tartes aux framboises
|
||||
Basket with Gooseberry Pies = Panier de tartes aux groseilles
|
||||
Basket with Mixed Berry Pies = Panier de tartes au mélange de baies
|
||||
currently fruitless = actuellement sans fruit
|
||||
Strawberry Bush = Buisson à fraise
|
||||
Blackberry Bush = Buisson à mûre
|
||||
Blueberry Bush = Buisson à myrtille
|
||||
Raspberry Bush = Buisson à framboise
|
||||
Gooseberry Bush = Buisson à groseille
|
||||
Mixed Berry Bush = Buisson de baies mélangées
|
||||
Basket = Panier
|
||||
Sugar = Sucre
|
||||
Raw Strawberry pie = Tarte crue aux fraises
|
||||
Raw Blackberry pie = Tarte crue aux mûres
|
||||
Raw Blueberry pie = Tarte crue aux myrtilles
|
||||
Raw Raspberry pie = Tarte crue aux framboises
|
||||
Raw Gooseberry pie = Tarte crue aux groseilles
|
||||
Raw Mixed Berry pie = Tarte crue au mélange de baies
|
||||
Cooked Strawberry pie = Tarte cuite aux fraises
|
||||
Cooked Blackberry pie = Tarte cuite aux mûres
|
||||
Cooked Blueberry pie = Tarte cuite aux myrtilles
|
||||
Cooked Raspberry pie = Tarte cuite aux framboises
|
||||
Cooked Gooseberry pie = Tarte cuite aux groseilles
|
||||
Cooked Mixed Berry pie = Tarte cuite au mélange de baies
|
||||
Slice of Strawberry pie = Part de tarte aux fraises
|
||||
Slice of Blackberry pie = Part de tarte aux mûres
|
||||
Slice of Blueberry pie = Part de tarte aux myrtilles
|
||||
Slice of Raspberry pie = Part de tarts aux framboises
|
||||
Slice of Gooseberry pie = Part de tarte aux groseilles
|
||||
Slice of Mixed Berry pie = Part de tarte au mélange de baies
|
||||
|
||||
[Bushes] Loaded. = [Buissons] Chargés.
|
@ -1,43 +1,46 @@
|
||||
# Template
|
||||
# textdomain: bushes_classic
|
||||
|
||||
Strawberry =
|
||||
Blackberry =
|
||||
Blueberry =
|
||||
Raspberry =
|
||||
Gooseberry =
|
||||
Mixed Berry =
|
||||
Basket with Strawberry Pies =
|
||||
Basket with Blackberry Pies =
|
||||
Basket with Blueberry Pies =
|
||||
Basket with Raspberry Pies =
|
||||
Basket with Gooseberry Pies =
|
||||
Basket with Mixed Berry Pies =
|
||||
currently fruitless =
|
||||
Strawberry Bush =
|
||||
Blackberry Bush =
|
||||
Blueberry Bush =
|
||||
Raspberry Bush =
|
||||
Gooseberry Bush =
|
||||
Mixed Berry Bush =
|
||||
Basket =
|
||||
Sugar =
|
||||
Raw Strawberry pie =
|
||||
Raw Blackberry pie =
|
||||
Raw Blueberry pie =
|
||||
Raw Raspberry pie =
|
||||
Raw Gooseberry pie =
|
||||
Raw Mixed Berry pie =
|
||||
Cooked Strawberry pie =
|
||||
Cooked Blackberry pie =
|
||||
Cooked Blueberry pie =
|
||||
Cooked Raspberry pie =
|
||||
Cooked Gooseberry pie =
|
||||
Cooked Mixed Berry pie =
|
||||
Slice of Strawberry pie =
|
||||
Slice of Blackberry pie =
|
||||
Slice of Blueberry pie =
|
||||
Slice of Raspberry pie =
|
||||
Slice of Gooseberry pie =
|
||||
Slice of Mixed Berry pie =
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
|
||||
[Bushes] Loaded. =
|
||||
Sugar=
|
||||
Basket with Strawberry pies=
|
||||
Cooked Strawberry pie=
|
||||
Raw Strawberry pie=
|
||||
Slice of Strawberry pie=
|
||||
Strawberry=
|
||||
Strawberry Bush=
|
||||
Basket with Blackberry pies=
|
||||
Blackberry=
|
||||
Blackberry Bush=
|
||||
Cooked Blackberry pie=
|
||||
Raw Blackberry pie=
|
||||
Slice of Blackberry pie=
|
||||
Basket with Blueberry pies=
|
||||
Blueberry=
|
||||
Blueberry Bush=
|
||||
Cooked Blueberry pie=
|
||||
Raw Blueberry pie=
|
||||
Slice of Blueberry pie=
|
||||
Basket with Raspberry pies=
|
||||
Cooked Raspberry pie=
|
||||
Raspberry=
|
||||
Raspberry Bush=
|
||||
Raw Raspberry pie=
|
||||
Slice of Raspberry pie=
|
||||
Basket with Gooseberry pies=
|
||||
Cooked Gooseberry pie=
|
||||
Gooseberry=
|
||||
Gooseberry Bush=
|
||||
Raw Gooseberry pie=
|
||||
Slice of Gooseberry pie=
|
||||
Basket with Mixed Berry pies=
|
||||
Cooked Mixed Berry pie=
|
||||
Currently fruitless Bush=
|
||||
Mixed Berry=
|
||||
Raw Mixed Berry pie=
|
||||
Slice of Mixed Berry pie=
|
||||
Basket=
|
||||
|
@ -1,44 +0,0 @@
|
||||
# Turkish translation
|
||||
# mahmutelmas06@hotmail.com
|
||||
|
||||
Strawberry = Çilek
|
||||
Blackberry = Böğürtlen
|
||||
Blueberry = Yaban mersini
|
||||
Raspberry = Ahududu
|
||||
Gooseberry = Bektaşi üzümü
|
||||
Mixed Berry = Dut
|
||||
Basket with Strawberry Pies = Çilekli pasta sepeti
|
||||
Basket with Blackberry Pies = Böğürtlenli pasta sepeti
|
||||
Basket with Blueberry Pies = Yaban mersini pastalı sepet
|
||||
Basket with Raspberry Pies = Ahududulu pasta sepeti
|
||||
Basket with Gooseberry Pies = Bektaşi üzümlü pasta sepeti
|
||||
Basket with Mixed Berry Pies = Dutlu pasta sepeti
|
||||
currently fruitless = şu anda meyvesiz
|
||||
Strawberry Bush = Çilek fidanı
|
||||
Blackberry Bush = Böğürtlen fidanı
|
||||
Blueberry Bush = Yaban mersini fidanı
|
||||
Raspberry Bush = Ahududu fidanı
|
||||
Gooseberry Bush = Bektaşi üzümü fidanı
|
||||
Mixed Berry Bush = Dut fidanı
|
||||
Basket = Sepet
|
||||
Sugar = Şeker
|
||||
Raw Strawberry pie = Çilekli çiğ pasta
|
||||
Raw Blackberry pie = Böğürtlenli çiğ pasta
|
||||
Raw Blueberry pie = Yaban mersinli çiğ pasta
|
||||
Raw Raspberry pie = Ahududulu çiğ pasta
|
||||
Raw Gooseberry pie = Bektaşi üzümlü çiğ pasta
|
||||
Raw Mixed Berry pie = Dutlu çiğ pasta
|
||||
Cooked Strawberry pie = Pişmiş çilekli pasta
|
||||
Cooked Blackberry pie = Pişmiş böğürtlenli pasta
|
||||
Cooked Blueberry pie = Pişmiş yaban mersinli pasta
|
||||
Cooked Raspberry pie = Pişmiş ahududulu pasta
|
||||
Cooked Gooseberry pie = Pişmiş bektaşi üzümlü pasta
|
||||
Cooked Mixed Berry pie = Pişmiş dutlu pasta
|
||||
Slice of Strawberry pie = Çilekli pasta dilimi
|
||||
Slice of Blackberry pie = Böğürtlenli pasta dilimi
|
||||
Slice of Blueberry pie = Yaban mersinli pasta dilimi
|
||||
Slice of Raspberry pie = Ahududulu pasta dilimi
|
||||
Slice of Gooseberry pie = Bektaşi üzümlü pasta dilimi
|
||||
Slice of Mixed Berry pie = Dutlu pasta dilimi
|
||||
|
||||
[Bushes] Loaded. = [Bushes] yüklendi.
|
3
bushes_classic/mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = bushes_classic
|
||||
depends = biome_lib
|
||||
optional_depends = farming, farming_plus
|
@ -1,4 +1,5 @@
|
||||
local S = biome_lib.intllib
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("bushes_classic")
|
||||
|
||||
plantlife_bushes = {}
|
||||
|
||||
@ -11,7 +12,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
-- find out which bush type we are dealing with
|
||||
local bush_name = ""
|
||||
local can_harvest = false
|
||||
|
||||
|
||||
if oldnode.name == "bushes:fruitless_bush" then
|
||||
-- this bush has not grown fruits yet (but will eventually)
|
||||
bush_name = oldmetadata.fields.bush_type
|
||||
@ -46,7 +47,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
elseif groupcaps.snappy then
|
||||
|
||||
-- plant a new bush without fruits
|
||||
minetest.set_node(pos, {type = "node", name = "bushes:fruitless_bush"})
|
||||
minetest.swap_node(pos, {type = "node", name = "bushes:fruitless_bush"})
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string('bush_type', bush_name)
|
||||
|
||||
@ -62,7 +63,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
|
||||
-- with a chance of 1/3, return 2 bushes
|
||||
local amount
|
||||
if math.random(1,3) == 1 then
|
||||
if can_harvest and math.random(1,3) == 1 then
|
||||
amount = "2"
|
||||
else
|
||||
amount = "1"
|
||||
@ -113,7 +114,7 @@ plantlife_bushes.after_place_node = function(pos, placer, itemstack)
|
||||
return
|
||||
end
|
||||
|
||||
minetest.set_node(pos, {name = "bushes:fruitless_bush"})
|
||||
minetest.swap_node(pos, {name = "bushes:fruitless_bush"})
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("bush_type", name_parts[1])
|
||||
end
|
||||
@ -136,7 +137,7 @@ minetest.register_abm({
|
||||
local is_soil = minetest.get_item_group(dirt.name, "soil") or minetest.get_item_group(dirt.name, "potting_soil")
|
||||
|
||||
if is_soil and (dirt.name == "farming:soil_wet" or math.random(1,3) == 1) then
|
||||
minetest.set_node( pos, {name = "bushes:" .. bush_name .. "_bush"})
|
||||
minetest.swap_node( pos, {name = "bushes:" .. bush_name .. "_bush"})
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -146,10 +147,8 @@ minetest.register_abm({
|
||||
|
||||
for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
|
||||
local desc = bushes_classic.bushes_descriptions[i]
|
||||
|
||||
minetest.register_node(":bushes:basket_"..bush_name, {
|
||||
description = S("Basket with "..desc.." Pies"),
|
||||
description = bushes_classic.bushes_descriptions[i][5],
|
||||
drawtype = "mesh",
|
||||
mesh = "bushes_basket_full.obj",
|
||||
tiles = {
|
||||
@ -167,7 +166,6 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
local groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1}
|
||||
if bush_name == "mixed_berry" then
|
||||
bush_name = "fruitless";
|
||||
desc = S("currently fruitless");
|
||||
texture_top = "bushes_fruitless_bush_top.png"
|
||||
texture_bottom = "bushes_fruitless_bush_bottom.png"
|
||||
groups.not_in_creative_inventory = 1
|
||||
@ -175,9 +173,16 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
texture_top = "bushes_bush_top.png"
|
||||
texture_bottom = "bushes_bush_bottom.png"
|
||||
end
|
||||
|
||||
local node_dig_prediction
|
||||
local node_placement_prediction
|
||||
if bush_name ~= "fruitless" then
|
||||
node_dig_prediction = "bushes:fruitless_bush"
|
||||
node_placement_prediction = "bushes:fruitless_bush"
|
||||
end
|
||||
|
||||
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
|
||||
description = S(desc.." Bush"),
|
||||
description = bushes_classic.bushes_descriptions[i][6],
|
||||
drawtype = "mesh",
|
||||
mesh = "bushes_bush.obj",
|
||||
tiles = {"bushes_bush_"..bush_name..".png"},
|
||||
@ -187,6 +192,8 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
groups = groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "",
|
||||
node_dig_prediction = node_dig_prediction,
|
||||
node_placement_prediction = node_placement_prediction,
|
||||
after_dig_node = function( pos, oldnode, oldmetadata, digger )
|
||||
return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger);
|
||||
end,
|
||||
@ -210,5 +217,3 @@ minetest.register_node(":bushes:basket_empty", {
|
||||
paramtype2 = "facedir",
|
||||
groups = { dig_immediate = 3 },
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
default
|
||||
|
@ -1,9 +1,14 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Cave Stuff"
|
||||
local version = "0.0.3"
|
||||
local version = "0.0.3"
|
||||
local mname = "cavestuff"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
cavestuff = {}
|
||||
|
||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
|
||||
|
||||
|
11
cavestuff/locale/cavestuff.de.tr
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
#
|
||||
|
||||
Pebble=Kieselstein
|
||||
Desert Pebble=Wüstenkiesel
|
||||
Stalactite=Stalaktit
|
11
cavestuff/locale/cavestuff.eo.tr
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
#
|
||||
|
||||
Pebble=Ŝtoneto
|
||||
Desert Pebble=Dezerta Ŝtoneto
|
||||
Stalactite=Stalaktito
|
11
cavestuff/locale/cavestuff.fr.tr
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# fat115 <fat115@framasoft.org>, 2017.
|
||||
#
|
||||
|
||||
Pebble=Caillou
|
||||
Desert Pebble=Caillou du désert
|
||||
Stalactite=Stalactite
|
11
cavestuff/locale/template.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
|
||||
Pebble=
|
||||
Desert Pebble=
|
||||
Stalactite=
|
@ -1,52 +1,65 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if maxp.y >= 2 and minp.y <= 0 then
|
||||
-- Generate pebbles
|
||||
local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
|
||||
-- Assume X and Z lengths are equal
|
||||
local divlen = 16
|
||||
local divs = (maxp.x-minp.x)/divlen+1;
|
||||
for divx=0,divs-1 do
|
||||
for divz=0,divs-1 do
|
||||
local x0 = minp.x + math.floor((divx+0)*divlen)
|
||||
local z0 = minp.z + math.floor((divz+0)*divlen)
|
||||
local x1 = minp.x + math.floor((divx+1)*divlen)
|
||||
local z1 = minp.z + math.floor((divz+1)*divlen)
|
||||
-- Determine pebble amount from perlin noise
|
||||
local pebble_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 2 * 2)
|
||||
-- Find random positions for pebbles based on this random
|
||||
local pr = PseudoRandom(seed+1)
|
||||
for i=0,pebble_amount do
|
||||
local x = pr:next(x0, x1)
|
||||
local z = pr:next(z0, z1)
|
||||
-- Find ground level (0...15)
|
||||
local ground_y = nil
|
||||
for y=30,0,-1 do
|
||||
if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
|
||||
ground_y = y
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if ground_y then
|
||||
local p = {x=x,y=ground_y+1,z=z}
|
||||
local nn = minetest.get_node(p).name
|
||||
-- Check if the node can be replaced
|
||||
if minetest.registered_nodes[nn] and
|
||||
minetest.registered_nodes[nn].buildable_to then
|
||||
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
|
||||
-- If desert sand, add dry shrub
|
||||
if nn == "default:dirt_with_grass" then
|
||||
minetest.set_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
|
||||
elseif nn == "default:desert_sand" then
|
||||
minetest.set_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:pebble_1",
|
||||
"cavestuff:pebble_2"
|
||||
},
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:desert_pebble_1",
|
||||
"cavestuff:desert_pebble_2"
|
||||
},
|
||||
place_on = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
||||
|
2
cavestuff/mod.conf
Normal file
@ -0,0 +1,2 @@
|
||||
name = cavestuff
|
||||
depends = default,biome_lib
|
@ -1,3 +1,6 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
--Rocks
|
||||
|
||||
local cbox = {
|
||||
@ -6,68 +9,68 @@ local cbox = {
|
||||
}
|
||||
|
||||
minetest.register_node("cavestuff:pebble_1",{
|
||||
description = "Pebble",
|
||||
description = S("Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..math.random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
drop = "cavestuff:pebble_1",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
description = "Desert Pebble",
|
||||
description = S("Desert Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..math.random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:desert_pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
drop = "cavestuff:desert_pebble_1",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, not_in_creative__inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Staclactites
|
||||
@ -76,25 +79,40 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
drawtype="nodebox",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
groups = {cracky=3,attached_node=1},
|
||||
description = "Stalactite",
|
||||
description = S("Stalactite"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.425000,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.162500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.275000,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
|
||||
{-0.187500,-0.425000,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.162500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.275000,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,0.837500,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pt = pointed_thing
|
||||
if minetest.get_node(pt.under).name=="default:stone"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
|
||||
minetest.set_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
|
||||
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||
local base = pointed_thing.under
|
||||
local place = vector.add(base, dir)
|
||||
local above = vector.add(place, dir)
|
||||
|
||||
if not placer then return end
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(place, playername)
|
||||
or minetest.is_protected(above, playername) then
|
||||
minetest.record_protection_violation(place, playername)
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.get_node(base).name == "default:stone"
|
||||
and minetest.get_node(place).name == "air"
|
||||
and minetest.get_node(above).name == "air"
|
||||
then
|
||||
minetest.swap_node(place, {
|
||||
name = "cavestuff:stalactite_"..math.random(1,3),
|
||||
param2 = minetest.dir_to_wallmounted(vector.multiply(dir, -1))
|
||||
})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
@ -113,10 +131,10 @@ minetest.register_node("cavestuff:stalactite_2",{
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.112500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.675000,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-0.975000,0.037500,0.037500,0.500000,-0.025000},
|
||||
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.112500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.675000,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,0.975000,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -129,17 +147,14 @@ minetest.register_node("cavestuff:stalactite_3",{
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.037500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.437500,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-1.237500,0.037500,0.037500,0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.037500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.437500,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,1.237500,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
--Stalagmites
|
||||
|
||||
|
||||
|
||||
|
@ -1,360 +1,359 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Looked at code from: darkage, default, farming, sickle, stairs
|
||||
-- Dependencies: default, farming
|
||||
-- Supports: flint, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Short Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = "default:dirt",
|
||||
recipe = {
|
||||
{"dryplants:grass_short"},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Cut Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- grass recipes (remove roots)
|
||||
minetest.register_craft({
|
||||
output = "dryplants:grass",
|
||||
recipe = {
|
||||
{"default:grass_1"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "dryplants:grass",
|
||||
recipe = {
|
||||
{"default:junglegrass"},
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("sumpf") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "dryplants:grass",
|
||||
recipe = {
|
||||
{"sumpf:gras"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Sickle
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = "dryplants:sickle",
|
||||
recipe = {
|
||||
{"group:stone",""},
|
||||
{"", "default:stick"},
|
||||
{"default:stick",""}
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("flint") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "dryplants:sickle",
|
||||
recipe = {
|
||||
{"flint:flintstone",""},
|
||||
{"", "default:stick"},
|
||||
{"default:stick",""}
|
||||
}
|
||||
})
|
||||
end
|
||||
if minetest.get_modpath("stoneage") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "dryplants:sickle",
|
||||
recipe = {
|
||||
{"stoneage:silex",""},
|
||||
{"", "default:stick"},
|
||||
{"default:stick",""}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Hay
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "dryplants:hay",
|
||||
recipe = "dryplants:grass",
|
||||
cooktime = 2,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:hay",
|
||||
burntime = 1,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- papyrus -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"default:papyrus","default:papyrus"},
|
||||
{"default:papyrus","default:papyrus"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace_sapling -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
|
||||
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace_top -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_top","dryplants:reedmace_top"},
|
||||
{"dryplants:reedmace_top","dryplants:reedmace_top"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace","dryplants:reedmace"},
|
||||
{"dryplants:reedmace","dryplants:reedmace"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace_bottom -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
|
||||
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
local ReeD = {
|
||||
{"wetreed"},
|
||||
{"reed"}
|
||||
}
|
||||
for i in pairs(ReeD) do
|
||||
local reed = "dryplants:"..ReeD[i][1]
|
||||
local slab = reed.."_slab"
|
||||
local roof = reed.."_roof"
|
||||
local corner = roof.."_corner"
|
||||
local corner_2 = corner.."_2"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Block
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- slab -> block
|
||||
output = reed,
|
||||
recipe = {
|
||||
{slab},
|
||||
{slab},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- roof -> block
|
||||
output = reed,
|
||||
recipe = {
|
||||
{roof},
|
||||
{roof},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner -> block
|
||||
type = "shapeless",
|
||||
output = reed.." 3",
|
||||
recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
|
||||
})
|
||||
minetest.register_craft({ -- corner_2 -> block
|
||||
type = "shapeless",
|
||||
output = reed.." 3",
|
||||
recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> slab
|
||||
output = slab.." 6",
|
||||
recipe = {
|
||||
{reed,reed,reed},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- roof -> slab
|
||||
output = slab,
|
||||
recipe = {
|
||||
{roof},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner -> slab
|
||||
output = slab.." 3",
|
||||
recipe = {
|
||||
{corner,corner},
|
||||
{corner,corner},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner_2 -> slab
|
||||
output = slab.." 3",
|
||||
recipe = {
|
||||
{corner_2,corner_2},
|
||||
{corner_2,corner_2},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> roof
|
||||
output = roof.." 4",
|
||||
recipe = {
|
||||
{reed,""},
|
||||
{"",reed},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- block -> roof
|
||||
output = roof.." 4",
|
||||
recipe = {
|
||||
{"",reed},
|
||||
{reed,""},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- slab -> roof
|
||||
output = roof,
|
||||
recipe = {
|
||||
{slab},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> corner
|
||||
output = corner.." 8",
|
||||
recipe = {
|
||||
{"",reed,""},
|
||||
{reed,"",reed},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner_2 -> corner
|
||||
output = corner,
|
||||
recipe = {
|
||||
{corner_2},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> corner_2
|
||||
output = corner_2.." 8",
|
||||
recipe = {
|
||||
{reed,"",reed},
|
||||
{"",reed,""},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner -> corner_2
|
||||
output = corner_2,
|
||||
recipe = {
|
||||
{corner},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- hay -> reed
|
||||
output = "dryplants:reed 2",
|
||||
recipe = {
|
||||
{"dryplants:hay","dryplants:hay"},
|
||||
{"dryplants:hay","dryplants:hay"},
|
||||
}
|
||||
})
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed -> reed
|
||||
type = "cooking",
|
||||
output = "dryplants:reed",
|
||||
recipe = "dryplants:wetreed",
|
||||
cooktime = 2,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed",
|
||||
burntime = 4,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_slab -> reed_slab
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_slab",
|
||||
recipe = "dryplants:wetreed_slab",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_slab",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_roof -> reed_roof
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_roof",
|
||||
recipe = "dryplants:wetreed_roof",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_roof",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_roof_corner",
|
||||
recipe = "dryplants:wetreed_roof_corner",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_roof_corner",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_roof_corner_2",
|
||||
recipe = "dryplants:wetreed_roof_corner_2",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_roof_corner_2",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dandelion Leave
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[minetest.register_craftitem("dryplants:dandelion_leave", {
|
||||
description = "Dandelion Leave",
|
||||
inventory_image = "dryplants_dandelion_leave.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "dryplants:dandelion_leave 4",
|
||||
recipe = {"flowers:dandelion_yellow"},
|
||||
replacements = {
|
||||
{"flowers:dandelion_yellow", "dye:yellow"}
|
||||
},
|
||||
})]]
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- Looked at code from: darkage, default, farming, sickle, stairs
|
||||
-- Dependencies: default, farming
|
||||
-- Supports: flint, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Short Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = "default:dirt",
|
||||
recipe = {
|
||||
{"dryplants:grass_short"},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Cut Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- grass recipes (remove roots)
|
||||
minetest.register_craft({
|
||||
output = "dryplants:grass",
|
||||
recipe = {
|
||||
{"default:grass_1"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "dryplants:grass",
|
||||
recipe = {
|
||||
{"default:junglegrass"},
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("sumpf") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "dryplants:grass",
|
||||
recipe = {
|
||||
{"sumpf:gras"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Sickle
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = "dryplants:sickle",
|
||||
recipe = {
|
||||
{"group:stone",""},
|
||||
{"", "default:stick"},
|
||||
{"default:stick",""}
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("flint") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "dryplants:sickle",
|
||||
recipe = {
|
||||
{"flint:flintstone",""},
|
||||
{"", "default:stick"},
|
||||
{"default:stick",""}
|
||||
}
|
||||
})
|
||||
end
|
||||
if minetest.get_modpath("stoneage") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "dryplants:sickle",
|
||||
recipe = {
|
||||
{"stoneage:silex",""},
|
||||
{"", "default:stick"},
|
||||
{"default:stick",""}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Hay
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "dryplants:hay",
|
||||
recipe = "dryplants:grass",
|
||||
cooktime = 2,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:hay",
|
||||
burntime = 1,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- papyrus -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"default:papyrus","default:papyrus"},
|
||||
{"default:papyrus","default:papyrus"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace_sapling -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
|
||||
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace_top -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_top","dryplants:reedmace_top"},
|
||||
{"dryplants:reedmace_top","dryplants:reedmace_top"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace","dryplants:reedmace"},
|
||||
{"dryplants:reedmace","dryplants:reedmace"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- reedmace_bottom -> wetreed
|
||||
output = "dryplants:wetreed 2",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
|
||||
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
local ReeD = {
|
||||
{"wetreed"},
|
||||
{"reed"}
|
||||
}
|
||||
for i in pairs(ReeD) do
|
||||
local reed = "dryplants:"..ReeD[i][1]
|
||||
local slab = reed.."_slab"
|
||||
local roof = reed.."_roof"
|
||||
local corner = roof.."_corner"
|
||||
local corner_2 = corner.."_2"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Block
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- slab -> block
|
||||
output = reed,
|
||||
recipe = {
|
||||
{slab},
|
||||
{slab},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- roof -> block
|
||||
output = reed,
|
||||
recipe = {
|
||||
{roof},
|
||||
{roof},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner -> block
|
||||
type = "shapeless",
|
||||
output = reed.." 3",
|
||||
recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
|
||||
})
|
||||
minetest.register_craft({ -- corner_2 -> block
|
||||
type = "shapeless",
|
||||
output = reed.." 3",
|
||||
recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> slab
|
||||
output = slab.." 6",
|
||||
recipe = {
|
||||
{reed,reed,reed},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- roof -> slab
|
||||
output = slab,
|
||||
recipe = {
|
||||
{roof},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner -> slab
|
||||
output = slab.." 3",
|
||||
recipe = {
|
||||
{corner,corner},
|
||||
{corner,corner},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner_2 -> slab
|
||||
output = slab.." 3",
|
||||
recipe = {
|
||||
{corner_2,corner_2},
|
||||
{corner_2,corner_2},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> roof
|
||||
output = roof.." 4",
|
||||
recipe = {
|
||||
{reed,""},
|
||||
{"",reed},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- block -> roof
|
||||
output = roof.." 4",
|
||||
recipe = {
|
||||
{"",reed},
|
||||
{reed,""},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- slab -> roof
|
||||
output = roof,
|
||||
recipe = {
|
||||
{slab},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> corner
|
||||
output = corner.." 8",
|
||||
recipe = {
|
||||
{"",reed,""},
|
||||
{reed,"",reed},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner_2 -> corner
|
||||
output = corner,
|
||||
recipe = {
|
||||
{corner_2},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- block -> corner_2
|
||||
output = corner_2.." 8",
|
||||
recipe = {
|
||||
{reed,"",reed},
|
||||
{"",reed,""},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- corner -> corner_2
|
||||
output = corner_2,
|
||||
recipe = {
|
||||
{corner},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- hay -> reed
|
||||
output = "dryplants:reed 2",
|
||||
recipe = {
|
||||
{"dryplants:hay","dryplants:hay"},
|
||||
{"dryplants:hay","dryplants:hay"},
|
||||
}
|
||||
})
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed -> reed
|
||||
type = "cooking",
|
||||
output = "dryplants:reed",
|
||||
recipe = "dryplants:wetreed",
|
||||
cooktime = 2,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed",
|
||||
burntime = 4,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_slab -> reed_slab
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_slab",
|
||||
recipe = "dryplants:wetreed_slab",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_slab",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_roof -> reed_roof
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_roof",
|
||||
recipe = "dryplants:wetreed_roof",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_roof",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_roof_corner",
|
||||
recipe = "dryplants:wetreed_roof_corner",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_roof_corner",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--cooking
|
||||
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
|
||||
type = "cooking",
|
||||
output = "dryplants:reed_roof_corner_2",
|
||||
recipe = "dryplants:wetreed_roof_corner_2",
|
||||
cooktime = 1,
|
||||
})
|
||||
--fuel
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "dryplants:reed_roof_corner_2",
|
||||
burntime = 2,
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dandelion Leave
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[minetest.register_craftitem("dryplants:dandelion_leave", {
|
||||
description = "Dandelion Leave",
|
||||
inventory_image = "dryplants_dandelion_leave.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "dryplants:dandelion_leave 4",
|
||||
recipe = {"flowers:dandelion_yellow"},
|
||||
replacements = {
|
||||
{"flowers:dandelion_yellow", "dye:yellow"}
|
||||
},
|
||||
})]]
|
||||
|
@ -1,3 +0,0 @@
|
||||
default
|
||||
biome_lib
|
||||
farming?
|
@ -1,203 +1,207 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Grasses" -- former "Dry plants"
|
||||
local version = "0.1.5"
|
||||
local mname = "dryplants"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- textures & ideas partly by Neuromancer
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: default, farming
|
||||
-- Looked at code from: darkage, sickle, stairs
|
||||
-- Dependencies: default, farming, biome_lib
|
||||
-- Supports:
|
||||
-----------------------------------------------------------------------------------------------
|
||||
abstract_dryplants = {}
|
||||
|
||||
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
|
||||
dofile(minetest.get_modpath("dryplants").."/settings.txt")
|
||||
dofile(minetest.get_modpath("dryplants").."/reed.lua")
|
||||
if REEDMACE_GENERATES == true then
|
||||
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
|
||||
end
|
||||
if SMALL_JUNCUS_GENERATES == true then
|
||||
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
|
||||
end
|
||||
if EXTRA_TALL_GRASS_GENERATES == true then
|
||||
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
|
||||
end
|
||||
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Sickle
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local function sickle_can_break(pos, deff, player)
|
||||
local def = ItemStack({name=deff.name}):get_definition()
|
||||
|
||||
if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
|
||||
minetest.log("info", player:get_player_name() .. " tried to sickle "
|
||||
.. def.name .. " which is not diggable "
|
||||
.. minetest.pos_to_string(pos))
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
minetest.log("action", player:get_player_name()
|
||||
.. " tried to sickle " .. def.name
|
||||
.. " at protected position "
|
||||
.. minetest.pos_to_string(pos))
|
||||
minetest.record_protection_violation(pos, player:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
-- turns nodes with group flora=1 & flower=0 into cut grass
|
||||
local function sickle_on_use(itemstack, user, pointed_thing, uses)
|
||||
local pt = pointed_thing
|
||||
-- check if pointing at a node
|
||||
if not pt then
|
||||
return
|
||||
end
|
||||
if pt.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local under = minetest.get_node(pt.under)
|
||||
local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
||||
local above = minetest.get_node(above_pos)
|
||||
|
||||
-- return if any of the nodes is not registered
|
||||
if not minetest.registered_nodes[under.name] then
|
||||
return
|
||||
end
|
||||
if not minetest.registered_nodes[above.name] then
|
||||
return
|
||||
end
|
||||
|
||||
if not sickle_can_break(pt.under, under, user) then
|
||||
return
|
||||
end
|
||||
-- check if something that can be cut using fine tools
|
||||
if minetest.get_item_group(under.name, "snappy") > 0 then
|
||||
-- check if flora but no flower
|
||||
if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
|
||||
-- turn the node into cut grass, wear out item and play sound
|
||||
minetest.set_node(pt.under, {name="dryplants:grass"})
|
||||
else -- otherwise dig the node
|
||||
if not minetest.node_dig(pt.under, under, user) then
|
||||
return
|
||||
end
|
||||
end
|
||||
minetest.sound_play("default_dig_crumbly", {
|
||||
pos = pt.under,
|
||||
gain = 0.5,
|
||||
})
|
||||
itemstack:add_wear(65535/(uses-1))
|
||||
return itemstack
|
||||
elseif string.find(under.name, "default:dirt_with_grass") then
|
||||
if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
|
||||
return
|
||||
end
|
||||
minetest.set_node(pt.under, {name="dryplants:grass_short"})
|
||||
minetest.set_node(above_pos, {name="dryplants:grass"})
|
||||
minetest.sound_play("default_dig_crumbly", {
|
||||
pos = pt.under,
|
||||
gain = 0.5,
|
||||
})
|
||||
itemstack:add_wear(65535/(uses-1))
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
-- the tool
|
||||
minetest.register_tool("dryplants:sickle", {
|
||||
description = "Sickle",
|
||||
inventory_image = "dryplants_sickle.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
return sickle_on_use(itemstack, user, pointed_thing, 220)
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Cut Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:grass", {
|
||||
description = "Cut Grass",
|
||||
inventory_image = "dryplants_grass.png",
|
||||
wield_image = "dryplants_grass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"dryplants_grass.png"},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Cut Grass becomes Hay over time
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_abm({
|
||||
nodenames = {"dryplants:grass"},
|
||||
interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
minetest.set_node(pos, {name="dryplants:hay"})
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Hay
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:hay", {
|
||||
description = "Hay",
|
||||
inventory_image = "dryplants_hay.png",
|
||||
wield_image = "dryplants_hay.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"dryplants_hay.png"},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Short Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:grass_short", {
|
||||
description = "Short Grass",
|
||||
tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
|
||||
--drop = 'default:dirt',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Short Grass becomes Dirt with Grass over time
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_abm({
|
||||
nodenames = {"dryplants:grass_short"},
|
||||
interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
|
||||
chance = 100/GRASS_REGROWING_CHANCE,
|
||||
action = function(pos)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Grasses" -- former "Dry plants"
|
||||
local version = "0.1.5"
|
||||
local mname = "dryplants"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- textures & ideas partly by Neuromancer
|
||||
|
||||
-- Contains code from: default, farming
|
||||
-- Looked at code from: darkage, sickle, stairs
|
||||
-- Dependencies: default, farming, biome_lib
|
||||
-- Supports:
|
||||
-----------------------------------------------------------------------------------------------
|
||||
abstract_dryplants = {}
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("dryplants")
|
||||
|
||||
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
|
||||
dofile(minetest.get_modpath("dryplants").."/settings.txt")
|
||||
dofile(minetest.get_modpath("dryplants").."/reed.lua")
|
||||
if REEDMACE_GENERATES == true then
|
||||
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
|
||||
end
|
||||
if SMALL_JUNCUS_GENERATES == true then
|
||||
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
|
||||
end
|
||||
if EXTRA_TALL_GRASS_GENERATES == true then
|
||||
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
|
||||
end
|
||||
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Sickle
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local function sickle_can_break(pos, deff, player)
|
||||
local def = ItemStack({name=deff.name}):get_definition()
|
||||
|
||||
if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
|
||||
minetest.log("info", player:get_player_name() .. " tried to sickle "
|
||||
.. def.name .. " which is not diggable "
|
||||
.. minetest.pos_to_string(pos))
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
minetest.log("action", player:get_player_name()
|
||||
.. " tried to sickle " .. def.name
|
||||
.. " at protected position "
|
||||
.. minetest.pos_to_string(pos))
|
||||
minetest.record_protection_violation(pos, player:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
-- turns nodes with group flora=1 & flower=0 into cut grass
|
||||
local function sickle_on_use(itemstack, user, pointed_thing, uses)
|
||||
local pt = pointed_thing
|
||||
-- check if pointing at a node
|
||||
if not pt then
|
||||
return
|
||||
end
|
||||
if pt.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local under = minetest.get_node(pt.under)
|
||||
local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
||||
local above = minetest.get_node(above_pos)
|
||||
|
||||
-- return if any of the nodes is not registered
|
||||
if not minetest.registered_nodes[under.name] then
|
||||
return
|
||||
end
|
||||
if not minetest.registered_nodes[above.name] then
|
||||
return
|
||||
end
|
||||
|
||||
if not sickle_can_break(pt.under, under, user) then
|
||||
return
|
||||
end
|
||||
-- check if something that can be cut using fine tools
|
||||
if minetest.get_item_group(under.name, "snappy") > 0 then
|
||||
-- check if flora but no flower
|
||||
if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
|
||||
-- turn the node into cut grass, wear out item and play sound
|
||||
minetest.swap_node(pt.under, {name="dryplants:grass"})
|
||||
else -- otherwise dig the node
|
||||
if not minetest.node_dig(pt.under, under, user) then
|
||||
return
|
||||
end
|
||||
end
|
||||
minetest.sound_play("default_dig_crumbly", {
|
||||
pos = pt.under,
|
||||
gain = 0.5,
|
||||
})
|
||||
itemstack:add_wear(65535/(uses-1))
|
||||
return itemstack
|
||||
elseif string.find(under.name, "default:dirt_with_grass") then
|
||||
if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
|
||||
return
|
||||
end
|
||||
minetest.swap_node(pt.under, {name="dryplants:grass_short"})
|
||||
minetest.swap_node(above_pos, {name="dryplants:grass"})
|
||||
minetest.sound_play("default_dig_crumbly", {
|
||||
pos = pt.under,
|
||||
gain = 0.5,
|
||||
})
|
||||
itemstack:add_wear(65535/(uses-1))
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
-- the tool
|
||||
minetest.register_tool("dryplants:sickle", {
|
||||
description = S("Sickle"),
|
||||
inventory_image = "dryplants_sickle.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
return sickle_on_use(itemstack, user, pointed_thing, 220)
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Cut Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:grass", {
|
||||
description = S("Cut Grass"),
|
||||
inventory_image = "dryplants_grass.png",
|
||||
wield_image = "dryplants_grass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"dryplants_grass.png"},
|
||||
use_texture_alpha = "clip",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Cut Grass becomes Hay over time
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_abm({
|
||||
nodenames = {"dryplants:grass"},
|
||||
interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
minetest.swap_node(pos, {name="dryplants:hay"})
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Hay
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:hay", {
|
||||
description = S("Hay"),
|
||||
inventory_image = "dryplants_hay.png",
|
||||
wield_image = "dryplants_hay.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"dryplants_hay.png"},
|
||||
use_texture_alpha = "clip",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Short Grass
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:grass_short", {
|
||||
description = S("Short Grass"),
|
||||
tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
|
||||
--drop = 'default:dirt',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Short Grass becomes Dirt with Grass over time
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_abm({
|
||||
nodenames = {"dryplants:grass_short"},
|
||||
interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
|
||||
chance = 100/GRASS_REGROWING_CHANCE,
|
||||
action = function(pos)
|
||||
-- Only become dirt with grass if no cut grass or hay lies on top
|
||||
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
|
||||
minetest.set_node(pos, {name="default:dirt_with_grass"})
|
||||
minetest.swap_node(pos, {name="default:dirt_with_grass"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
@ -4,28 +4,30 @@
|
||||
-- by Mossmanikin
|
||||
-- textures & ideas partly by Neuromancer
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("dryplants")
|
||||
|
||||
abstract_dryplants.grow_juncus = function(pos)
|
||||
local juncus_type = math.random(2,3)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
if juncus_type == 2 then
|
||||
minetest.set_node(right_here, {name="dryplants:juncus_02"})
|
||||
minetest.swap_node(right_here, {name="dryplants:juncus_02"})
|
||||
else
|
||||
minetest.set_node(right_here, {name="dryplants:juncus"})
|
||||
minetest.swap_node(right_here, {name="dryplants:juncus"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node("dryplants:juncus", {
|
||||
description = "Juncus",
|
||||
description = S("Juncus"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_juncus_03.png"},
|
||||
inventory_image = "dryplants_juncus_inv.png",
|
||||
@ -45,8 +47,8 @@ minetest.register_node("dryplants:juncus", {
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(pointed_thing.above, playername) or
|
||||
minetest.is_protected(pointed_thing.under, playername) then
|
||||
if minetest.is_protected(pointed_thing.above, playername) or
|
||||
minetest.is_protected(pointed_thing.under, playername) then
|
||||
minetest.chat_send_player(playername, "Someone else owns that spot.")
|
||||
return
|
||||
end
|
||||
@ -54,9 +56,9 @@ minetest.register_node("dryplants:juncus", {
|
||||
local juncus_type = math.random(2,3)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if juncus_type == 2 then
|
||||
minetest.set_node(right_here, {name="dryplants:juncus_02"})
|
||||
minetest.swap_node(right_here, {name="dryplants:juncus_02"})
|
||||
else
|
||||
minetest.set_node(right_here, {name="dryplants:juncus"})
|
||||
minetest.swap_node(right_here, {name="dryplants:juncus"})
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
@ -65,9 +67,9 @@ minetest.register_node("dryplants:juncus", {
|
||||
end,
|
||||
})
|
||||
minetest.register_node("dryplants:juncus_02", {
|
||||
description = "Juncus",
|
||||
description = S("Juncus"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_juncus_02.png"},
|
||||
walkable = false,
|
||||
@ -90,44 +92,42 @@ minetest.register_node("dryplants:juncus_02", {
|
||||
-- GENERATE SMALL JUNCUS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"default:sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"default:sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - JUNCUS_NEAR_WATER_RARITY}),
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK,
|
||||
rarity = 101 - JUNCUS_NEAR_WATER_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_juncus
|
||||
"dryplants:juncus_near_water",
|
||||
abstract_dryplants.grow_juncus
|
||||
)
|
||||
-- at dunes/beach
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
"default:sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
--"sumpf:peat",
|
||||
--"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
"default:sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
--"sumpf:peat",
|
||||
--"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK, rarity = 101 - JUNCUS_AT_BEACH_RARITY}),
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK,
|
||||
rarity = 101 - JUNCUS_AT_BEACH_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_juncus
|
||||
"dryplants:junces_at_beach",
|
||||
abstract_dryplants.grow_juncus
|
||||
)
|
||||
|
28
dryplants/locale/dryplants.de.tr
Normal file
@ -0,0 +1,28 @@
|
||||
# textdomain: dryplants
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
#
|
||||
|
||||
Sickle=Sichel
|
||||
Cut Grass=Gras schneiden
|
||||
Hay=Heu
|
||||
Short Grass=Kurzes Gras
|
||||
Juncus=Binsen
|
||||
Wet Reed=Nasses Schilf
|
||||
Wet Reed Slab=Nasse Schilfstufe
|
||||
Wet Reed Roof=Nasses Schilfdach
|
||||
Wet Reed Roof Corner=Nasser Schilfdachwinkel
|
||||
Wet Reed Roof Corner 2=Nasser Schilfdachwinkel 2
|
||||
Reed=Schilf
|
||||
Reed Slab=Schilfstufe
|
||||
Reed Roof=Schilfdach
|
||||
Reed Roof Corner=Schilfdachwinkel
|
||||
Reed Roof Corner 2=Schilfdachwinkel
|
||||
Reedmace=Rohrkolben
|
||||
Reedmace, height: 1=Rohrkolben, Höhe: 1
|
||||
Reedmace, height: 2=Rohrkolben, Höhe: 2
|
||||
Reedmace, height: 3=Rohrkolben, Höhe: 3
|
||||
Reedmace, height: 3 & Spikes=Rohrkolben, Höhe: 3 & Rispe
|
28
dryplants/locale/dryplants.eo.tr
Normal file
@ -0,0 +1,28 @@
|
||||
# textdomain: dryplants
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
#
|
||||
|
||||
Sickle=
|
||||
Cut Grass=Tranĉita Herbenon
|
||||
Hay=Fojno
|
||||
Short Grass=Mallonga Herbo
|
||||
Juncus=Junko
|
||||
Wet Reed=Malseka Kano
|
||||
Wet Reed Slab=Slabo de Malseka Kano
|
||||
Wet Reed Roof=Tegmento de Malseka Kano
|
||||
Wet Reed Roof Corner=Tegmentangulo de Malseka Kano
|
||||
Wet Reed Roof Corner 2=Tegmentangulo 2 de Malseka Kano
|
||||
Reed=Kano
|
||||
Reed Slab=Slabo de Kano
|
||||
Reed Roof=Tegmento de Kano
|
||||
Reed Roof Corner=Tegmentangulo de Kano
|
||||
Reed Roof Corner 2=Tegmentangulo 2 de Kano
|
||||
Reedmace=Tifeo
|
||||
Reedmace, height: 1=Tifeo, alteco: 1
|
||||
Reedmace, height: 2=Tifeo, alteco: 2
|
||||
Reedmace, height: 3=Tifeo, alteco: 3
|
||||
Reedmace, height: 3 & Spikes=Tifeo, alteco: 3 & Pikiloj
|
28
dryplants/locale/dryplants.fr.tr
Normal file
@ -0,0 +1,28 @@
|
||||
# textdomain: dryplants
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# fat115 <fat115@framasoft.org>, 2017.
|
||||
#
|
||||
|
||||
Sickle=Faucille
|
||||
Cut Grass=Herbe coupée
|
||||
Hay=Foin
|
||||
Short Grass=Herbes courtes
|
||||
Juncus=Joncs
|
||||
Wet Reed=Bloc de roseau humide
|
||||
Wet Reed Slab=Dalle en roseau humide
|
||||
Wet Reed Roof=Toit en roseau humide
|
||||
Wet Reed Roof Corner=Angle de toit en roseau humide
|
||||
Wet Reed Roof Corner 2=Angle de toit en roseau humide 2
|
||||
Reed=Roseau
|
||||
Reed Slab=Dalle en roseau
|
||||
Reed Roof=Toit en roseau
|
||||
Reed Roof Corner=Angle de toit en roseau
|
||||
Reed Roof Corner 2=Angle de toit en roseau 2
|
||||
Reedmace=Roseau
|
||||
Reedmace, height: 1=Roseau, 1 de hauteur
|
||||
Reedmace, height: 2=Roseau, 2 de hauteur
|
||||
Reedmace, height: 3=Roseau, 3 de hauteur
|
||||
Reedmace, height: 3 & Spikes=Roseau, 3 de hauteur avec panicules
|
28
dryplants/locale/template.txt
Normal file
@ -0,0 +1,28 @@
|
||||
# textdomain: dryplants
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
|
||||
Sickle=
|
||||
Cut Grass=
|
||||
Hay=
|
||||
Short Grass=
|
||||
Juncus=
|
||||
Wet Reed=
|
||||
Wet Reed Slab=
|
||||
Wet Reed Roof=
|
||||
Wet Reed Roof Corner=
|
||||
Wet Reed Roof Corner 2=
|
||||
Reed=
|
||||
Reed Slab=
|
||||
Reed Roof=
|
||||
Reed Roof Corner=
|
||||
Reed Roof Corner 2=
|
||||
Reedmace=
|
||||
Reedmace, height: 1=
|
||||
Reedmace, height: 2=
|
||||
Reedmace, height: 3=
|
||||
Reedmace, height: 3 & Spikes=
|
@ -3,24 +3,22 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_grass_variation = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y, z=pos.z}
|
||||
minetest.set_node(right_here, {name="dryplants:grass_short"})
|
||||
minetest.swap_node(right_here, {name="dryplants:grass_short"})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
},
|
||||
max_count = 4800,
|
||||
rarity = 25,
|
||||
"default:dirt_with_grass",
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = 4800, rarity = 25}),
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"dryplants:grass",
|
||||
abstract_dryplants.grow_grass_variation
|
||||
)
|
||||
|
3
dryplants/mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = dryplants
|
||||
depends = default, biome_lib
|
||||
optional_depends = farming
|
@ -1,33 +1,29 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Grasses - More Tall Grass 0.0.2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_grass = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local grass_size = math.random(1,5)
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
minetest.set_node(right_here, {name="default:grass_"..grass_size})
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = TALL_GRASS_PER_MAPBLOCK,
|
||||
rarity = 101 - TALL_GRASS_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_grass
|
||||
)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Grasses - More Tall Grass 0.0.2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"default:grass_1",
|
||||
"default:grass_2",
|
||||
"default:grass_3",
|
||||
"default:grass_4",
|
||||
"default:grass_5"
|
||||
},
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = TALL_GRASS_PER_MAPBLOCK, rarity = 101 - TALL_GRASS_RARITY}),
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
y_min = 1,
|
||||
y_max = 48
|
||||
})
|
@ -1,380 +1,382 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dry Plants - Reed 0.0.5
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Looked at code from: darkage, default, stairs
|
||||
-- Dependencies: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_alias("stairs:stair_wetreed", "dryplants:wetreed_roof")
|
||||
minetest.register_alias("stairs:slab_wetreed", "dryplants:wetreed_slab")
|
||||
minetest.register_alias("stairs:stair_reed", "dryplants:reed_roof")
|
||||
minetest.register_alias("stairs:slab_reed", "dryplants:reed_slab")
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed", {
|
||||
description = "Wet Reed",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_slab", {
|
||||
description = "Wet Reed Slab",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_roof", {
|
||||
description = "Wet Reed Roof",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
if AUTO_ROOF_CORNER == true then
|
||||
|
||||
local CoRNeR = {
|
||||
-- MaTeRiaL
|
||||
{"wetreed"},
|
||||
{"reed"}
|
||||
}
|
||||
|
||||
for i in pairs(CoRNeR) do
|
||||
|
||||
local MaTeRiaL = CoRNeR[i][1]
|
||||
local roof = "dryplants:"..MaTeRiaL.."_roof"
|
||||
local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
|
||||
local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {roof},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
|
||||
local node_east = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z })
|
||||
local node_west = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z })
|
||||
local node_north = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
-- corner 1
|
||||
if ((node_west.name == roof and node_west.param2 == 0)
|
||||
or (node_west.name == corner and node_west.param2 == 1))
|
||||
and ((node_north.name == roof and node_north.param2 == 3)
|
||||
or (node_north.name == corner and node_north.param2 == 3))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner, param2=0})
|
||||
end
|
||||
|
||||
if ((node_north.name == roof and node_north.param2 == 1)
|
||||
or (node_north.name == corner and node_north.param2 == 2))
|
||||
and ((node_east.name == roof and node_east.param2 == 0)
|
||||
or (node_east.name == corner and node_east.param2 == 0))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner, param2=1})
|
||||
end
|
||||
|
||||
if ((node_east.name == roof and node_east.param2 == 2)
|
||||
or (node_east.name == corner and node_east.param2 == 3))
|
||||
and ((node_south.name == roof and node_south.param2 == 1)
|
||||
or (node_south.name == corner and node_south.param2 == 1))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner, param2=2})
|
||||
end
|
||||
|
||||
if ((node_south.name == roof and node_south.param2 == 3)
|
||||
or (node_south.name == corner and node_south.param2 == 0))
|
||||
and ((node_west.name == roof and node_west.param2 == 2)
|
||||
or (node_west.name == corner and node_west.param2 == 2))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner, param2=3})
|
||||
end
|
||||
-- corner 2
|
||||
if ((node_west.name == roof and node_west.param2 == 2)
|
||||
or (node_west.name == corner_2 and node_west.param2 == 1))
|
||||
and ((node_north.name == roof and node_north.param2 == 1)
|
||||
or (node_north.name == corner_2 and node_north.param2 == 3))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner_2, param2=0})
|
||||
end
|
||||
|
||||
if ((node_north.name == roof and node_north.param2 == 3)
|
||||
or (node_north.name == corner_2 and node_north.param2 == 2))
|
||||
and ((node_east.name == roof and node_east.param2 == 2)
|
||||
or (node_east.name == corner_2 and node_east.param2 == 0))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner_2, param2=1})
|
||||
end
|
||||
|
||||
if ((node_east.name == roof and node_east.param2 == 0)
|
||||
or (node_east.name == corner_2 and node_east.param2 == 3))
|
||||
and ((node_south.name == roof and node_south.param2 == 3)
|
||||
or (node_south.name == corner_2 and node_south.param2 == 1))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner_2, param2=2})
|
||||
end
|
||||
|
||||
if ((node_south.name == roof and node_south.param2 == 1)
|
||||
or (node_south.name == corner_2 and node_south.param2 == 0))
|
||||
and ((node_west.name == roof and node_west.param2 == 0)
|
||||
or (node_west.name == corner_2 and node_west.param2 == 2))
|
||||
then
|
||||
minetest.set_node(pos, {name=corner_2, param2=3})
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_roof_corner", {
|
||||
description = "Wet Reed Roof Corner",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_roof_corner_2", {
|
||||
description = "Wet Reed Roof Corner 2",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed becomes (dry) Reed over time
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if REED_WILL_DRY == true then
|
||||
|
||||
local DRyiNG = {
|
||||
-- WeT DRy
|
||||
{"dryplants:wetreed", "dryplants:reed"},
|
||||
{"dryplants:wetreed_slab", "dryplants:reed_slab"},
|
||||
{"dryplants:wetreed_roof", "dryplants:reed_roof"},
|
||||
{"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"},
|
||||
{"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"}
|
||||
}
|
||||
for i in pairs(DRyiNG) do
|
||||
|
||||
local WeT = DRyiNG[i][1]
|
||||
local DRy = DRyiNG[i][2]
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {WeT},
|
||||
interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
local direction = minetest.get_node(pos).param2
|
||||
minetest.set_node(pos, {name=DRy, param2=direction})
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed", {
|
||||
description = "Reed",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_slab", {
|
||||
description = "Reed Slab",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_roof", {
|
||||
description = "Reed Roof",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_roof_corner", {
|
||||
description = "Reed Roof Corner",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_roof_corner_2", {
|
||||
description = "Reed Roof Corner 2",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dry Plants - Reed 0.0.5
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- Looked at code from: darkage, default, stairs
|
||||
-- Dependencies: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("dryplants")
|
||||
|
||||
minetest.register_alias("stairs:stair_wetreed", "dryplants:wetreed_roof")
|
||||
minetest.register_alias("stairs:slab_wetreed", "dryplants:wetreed_slab")
|
||||
minetest.register_alias("stairs:stair_reed", "dryplants:reed_roof")
|
||||
minetest.register_alias("stairs:slab_reed", "dryplants:reed_slab")
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed", {
|
||||
description = S("Wet Reed"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_slab", {
|
||||
description = S("Wet Reed Slab"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_roof", {
|
||||
description = S("Wet Reed Roof"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
if AUTO_ROOF_CORNER == true then
|
||||
|
||||
local CoRNeR = {
|
||||
-- MaTeRiaL
|
||||
{"wetreed"},
|
||||
{"reed"}
|
||||
}
|
||||
|
||||
for i in pairs(CoRNeR) do
|
||||
|
||||
local MaTeRiaL = CoRNeR[i][1]
|
||||
local roof = "dryplants:"..MaTeRiaL.."_roof"
|
||||
local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
|
||||
local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {roof},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
|
||||
local node_east = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z })
|
||||
local node_west = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z })
|
||||
local node_north = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
-- corner 1
|
||||
if ((node_west.name == roof and node_west.param2 == 0)
|
||||
or (node_west.name == corner and node_west.param2 == 1))
|
||||
and ((node_north.name == roof and node_north.param2 == 3)
|
||||
or (node_north.name == corner and node_north.param2 == 3))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner, param2=0})
|
||||
end
|
||||
|
||||
if ((node_north.name == roof and node_north.param2 == 1)
|
||||
or (node_north.name == corner and node_north.param2 == 2))
|
||||
and ((node_east.name == roof and node_east.param2 == 0)
|
||||
or (node_east.name == corner and node_east.param2 == 0))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner, param2=1})
|
||||
end
|
||||
|
||||
if ((node_east.name == roof and node_east.param2 == 2)
|
||||
or (node_east.name == corner and node_east.param2 == 3))
|
||||
and ((node_south.name == roof and node_south.param2 == 1)
|
||||
or (node_south.name == corner and node_south.param2 == 1))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner, param2=2})
|
||||
end
|
||||
|
||||
if ((node_south.name == roof and node_south.param2 == 3)
|
||||
or (node_south.name == corner and node_south.param2 == 0))
|
||||
and ((node_west.name == roof and node_west.param2 == 2)
|
||||
or (node_west.name == corner and node_west.param2 == 2))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner, param2=3})
|
||||
end
|
||||
-- corner 2
|
||||
if ((node_west.name == roof and node_west.param2 == 2)
|
||||
or (node_west.name == corner_2 and node_west.param2 == 1))
|
||||
and ((node_north.name == roof and node_north.param2 == 1)
|
||||
or (node_north.name == corner_2 and node_north.param2 == 3))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner_2, param2=0})
|
||||
end
|
||||
|
||||
if ((node_north.name == roof and node_north.param2 == 3)
|
||||
or (node_north.name == corner_2 and node_north.param2 == 2))
|
||||
and ((node_east.name == roof and node_east.param2 == 2)
|
||||
or (node_east.name == corner_2 and node_east.param2 == 0))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner_2, param2=1})
|
||||
end
|
||||
|
||||
if ((node_east.name == roof and node_east.param2 == 0)
|
||||
or (node_east.name == corner_2 and node_east.param2 == 3))
|
||||
and ((node_south.name == roof and node_south.param2 == 3)
|
||||
or (node_south.name == corner_2 and node_south.param2 == 1))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner_2, param2=2})
|
||||
end
|
||||
|
||||
if ((node_south.name == roof and node_south.param2 == 1)
|
||||
or (node_south.name == corner_2 and node_south.param2 == 0))
|
||||
and ((node_west.name == roof and node_west.param2 == 0)
|
||||
or (node_west.name == corner_2 and node_west.param2 == 2))
|
||||
then
|
||||
minetest.swap_node(pos, {name=corner_2, param2=3})
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_roof_corner", {
|
||||
description = S("Wet Reed Roof Corner"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:wetreed_roof_corner_2", {
|
||||
description = S("Wet Reed Roof Corner 2"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed_wet.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wet Reed becomes (dry) Reed over time
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if REED_WILL_DRY == true then
|
||||
|
||||
local DRyiNG = {
|
||||
-- WeT DRy
|
||||
{"dryplants:wetreed", "dryplants:reed"},
|
||||
{"dryplants:wetreed_slab", "dryplants:reed_slab"},
|
||||
{"dryplants:wetreed_roof", "dryplants:reed_roof"},
|
||||
{"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"},
|
||||
{"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"}
|
||||
}
|
||||
for i in pairs(DRyiNG) do
|
||||
|
||||
local WeT = DRyiNG[i][1]
|
||||
local DRy = DRyiNG[i][2]
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {WeT},
|
||||
interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
local direction = minetest.get_node(pos).param2
|
||||
minetest.swap_node(pos, {name=DRy, param2=direction})
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed", {
|
||||
description = S("Reed"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Slab
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_slab", {
|
||||
description = S("Reed Slab"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_roof", {
|
||||
description = S("Reed Roof"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof Corner
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_roof_corner", {
|
||||
description = S("Reed Roof Corner"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Reed Roof Corner 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reed_roof_corner_2", {
|
||||
description = S("Reed Roof Corner 2"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
@ -4,9 +4,8 @@
|
||||
-- by Mossmanikin
|
||||
-- textures & ideas partly by Neuromancer
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default, trees
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default, trees
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- NOTES (from wikipedia, some of this might get implemented)
|
||||
@ -18,6 +17,9 @@
|
||||
-- Typha stems and leaves can be used to make paper
|
||||
-- The seed hairs were used by some Native American groups as tinder for starting fires
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("dryplants")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- REEDMACE SHAPES
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -31,18 +33,18 @@ abstract_dryplants.grow_reedmace = function(pos)
|
||||
if minetest.get_node(pos_01).name == "air" -- bug fix
|
||||
or minetest.get_node(pos_01).name == "dryplants:reedmace_sapling" then
|
||||
if minetest.get_node(pos_02).name ~= "air" then
|
||||
minetest.set_node(pos_01, {name="dryplants:reedmace_top"})
|
||||
minetest.swap_node(pos_01, {name="dryplants:reedmace_top"})
|
||||
elseif minetest.get_node(pos_03).name ~= "air" then
|
||||
minetest.set_node(pos_01, {name="dryplants:reedmace_height_2"})
|
||||
minetest.swap_node(pos_01, {name="dryplants:reedmace_height_2"})
|
||||
elseif size == 1 then
|
||||
minetest.set_node(pos_01, {name="dryplants:reedmace_top"})
|
||||
minetest.swap_node(pos_01, {name="dryplants:reedmace_top"})
|
||||
elseif size == 2 then
|
||||
minetest.set_node(pos_01, {name="dryplants:reedmace_height_2"})
|
||||
minetest.swap_node(pos_01, {name="dryplants:reedmace_height_2"})
|
||||
elseif size == 3 then
|
||||
if spikes == 1 then
|
||||
minetest.set_node(pos_01, {name="dryplants:reedmace_height_3_spikes"})
|
||||
minetest.swap_node(pos_01, {name="dryplants:reedmace_height_3_spikes"})
|
||||
else
|
||||
minetest.set_node(pos_01, {name="dryplants:reedmace_height_3"})
|
||||
minetest.swap_node(pos_01, {name="dryplants:reedmace_height_3"})
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -58,19 +60,19 @@ abstract_dryplants.grow_reedmace_water = function(pos)
|
||||
minetest.add_entity(pos_01, "dryplants:reedmace_water_entity")
|
||||
if minetest.get_node(pos_02).name == "air" then -- bug fix
|
||||
if minetest.get_node(pos_03).name ~= "air" then
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_top"})
|
||||
minetest.swap_node(pos_02, {name="dryplants:reedmace_top"})
|
||||
elseif minetest.get_node(pos_04).name ~= "air" then
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_height_2"})
|
||||
minetest.swap_node(pos_02, {name="dryplants:reedmace_height_2"})
|
||||
elseif size == 1 then
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_top"})
|
||||
minetest.swap_node(pos_02, {name="dryplants:reedmace_top"})
|
||||
elseif size == 2 then
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_height_2"})
|
||||
minetest.swap_node(pos_02, {name="dryplants:reedmace_height_2"})
|
||||
elseif size == 3 then
|
||||
if spikes == 1 then
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_height_3_spikes"})
|
||||
minetest.swap_node(pos_02, {name="dryplants:reedmace_height_3_spikes"})
|
||||
else
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_height_3"})
|
||||
end
|
||||
minetest.swap_node(pos_02, {name="dryplants:reedmace_height_3"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -79,7 +81,7 @@ end
|
||||
-- REEDMACE SPIKES
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_spikes", {
|
||||
description = "Reedmace",
|
||||
description = S("Reedmace"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_spikes.png"},
|
||||
@ -101,7 +103,7 @@ minetest.register_node("dryplants:reedmace_spikes", {
|
||||
-- REEDMACE height: 1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_top", {
|
||||
description = "Reedmace, height: 1",
|
||||
description = S("Reedmace, height: 1"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_top.png"},
|
||||
@ -123,9 +125,9 @@ minetest.register_node("dryplants:reedmace_top", {
|
||||
-- REEDMACE height: 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_height_2", {
|
||||
description = "Reedmace, height: 2",
|
||||
description = S("Reedmace, height: 2"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_height_2.png"},
|
||||
inventory_image = "dryplants_reedmace_top.png",
|
||||
@ -146,9 +148,9 @@ minetest.register_node("dryplants:reedmace_height_2", {
|
||||
-- REEDMACE height: 3
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_height_3", {
|
||||
description = "Reedmace, height: 3",
|
||||
description = S("Reedmace, height: 3"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_height_3.png"},
|
||||
inventory_image = "dryplants_reedmace_top.png",
|
||||
@ -169,9 +171,9 @@ minetest.register_node("dryplants:reedmace_height_3", {
|
||||
-- REEDMACE height: 3 & Spikes
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_height_3_spikes", {
|
||||
description = "Reedmace, height: 3 & Spikes",
|
||||
description = S("Reedmace, height: 3 & Spikes"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_height_3_spikes.png"},
|
||||
inventory_image = "dryplants_reedmace_top.png",
|
||||
@ -192,7 +194,7 @@ minetest.register_node("dryplants:reedmace_height_3_spikes", {
|
||||
-- REEDMACE STEMS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace", {
|
||||
description = "Reedmace",
|
||||
description = S("Reedmace"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace.png"},
|
||||
@ -212,8 +214,8 @@ minetest.register_node("dryplants:reedmace", {
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "dryplants:reedmace_top"
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"dryplants:reedmace_sapling")
|
||||
end
|
||||
end,
|
||||
@ -222,7 +224,7 @@ minetest.register_node("dryplants:reedmace", {
|
||||
-- REEDMACE BOTTOM
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_bottom", {
|
||||
description = "Reedmace",
|
||||
description = S("Reedmace"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_bottom.png"},
|
||||
@ -241,10 +243,10 @@ minetest.register_node("dryplants:reedmace_bottom", {
|
||||
},
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "dryplants:reedmace"
|
||||
if node.name == "dryplants:reedmace"
|
||||
or node.name == "dryplants:reedmace_top"
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"dryplants:reedmace_sapling")
|
||||
end
|
||||
end,
|
||||
@ -253,7 +255,7 @@ minetest.register_node("dryplants:reedmace_bottom", {
|
||||
-- REEDMACE "SAPLING" (the drop from the above)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_sapling", {
|
||||
description = "Reedmace",
|
||||
description = S("Reedmace"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_sapling.png"},
|
||||
@ -262,7 +264,8 @@ minetest.register_node("dryplants:reedmace_sapling", {
|
||||
groups = {
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
attached_node=1
|
||||
attached_node=1,
|
||||
sapling=1,
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -277,13 +280,13 @@ minetest.register_abm({
|
||||
chance = 100/REEDMACE_GROWING_CHANCE,
|
||||
action = function(pos, node, _, _)
|
||||
if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z }).name, "default:water")
|
||||
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water")
|
||||
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water")
|
||||
or string.find(minetest.get_node({x = pos.x - 1, y = pos.y, z = pos.z }).name, "default:water")
|
||||
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z - 1}).name, "default:water") then
|
||||
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z - 1}).name, "default:water") then
|
||||
if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then
|
||||
abstract_dryplants.grow_reedmace_water({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
end
|
||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z}, {name="default:water_source"})
|
||||
minetest.swap_node({x=pos.x, y=pos.y, z=pos.z}, {name="default:water_source"})
|
||||
else
|
||||
abstract_dryplants.grow_reedmace({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
end
|
||||
@ -293,7 +296,7 @@ minetest.register_abm({
|
||||
-- REEDMACE WATER (for entity)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("dryplants:reedmace_water", {
|
||||
description = "Reedmace",
|
||||
description = S("Reedmace"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_water.png"},
|
||||
@ -325,7 +328,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- SPAWN REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[biome_lib:spawn_on_surfaces({
|
||||
--[[biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = {"dryplants:reedmace_sapling"},
|
||||
spawn_chance = 400,
|
||||
@ -346,66 +349,63 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-- GENERATE REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_NEAR_WATER_RARITY}),
|
||||
--rarity = 60,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK,
|
||||
rarity = 101 - REEDMACE_NEAR_WATER_RARITY,
|
||||
--rarity = 60,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_reedmace
|
||||
"dryplants:reedmace_near_water",
|
||||
abstract_dryplants.grow_reedmace
|
||||
)
|
||||
-- in water
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = REEDMACE_IN_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_IN_WATER_RARITY}),
|
||||
--rarity = 35,
|
||||
min_elevation = 0, -- a bit below sea level
|
||||
max_elevation = 0, -- ""
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = REEDMACE_IN_WATER_PER_MAPBLOCK,
|
||||
rarity = 101 - REEDMACE_IN_WATER_RARITY,
|
||||
--rarity = 35,
|
||||
min_elevation = 0, -- a bit below sea level
|
||||
max_elevation = 0, -- ""
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_reedmace_water
|
||||
"dryplants:reedmace_in_water",
|
||||
abstract_dryplants.grow_reedmace_water
|
||||
)
|
||||
-- for oases & tropical beaches & tropical swamps
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:sand",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:sand",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK, 101 - REEDMACE_FOR_OASES_RARITY}),
|
||||
--rarity = 10,
|
||||
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
ncount = 1,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:desert_sand","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK,
|
||||
rarity = 101 - REEDMACE_FOR_OASES_RARITY,
|
||||
--rarity = 10,
|
||||
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
ncount = 1,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:desert_sand","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_reedmace
|
||||
"dryplants:reemace_oases",
|
||||
abstract_dryplants.grow_reedmace
|
||||
)
|
||||
|
@ -1,104 +1,109 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Ferns - Crafting 0.0.5
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- (by Mossmanikin)
|
||||
-- License (everything): WTFPL
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "ferns:fiddlehead 3",
|
||||
recipe = {"ferns:fern_01"},
|
||||
replacements = {
|
||||
{"ferns:fern_01", "ferns:ferntuber"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "ferns:fiddlehead 3",
|
||||
recipe = {"ferns:tree_fern_leaves"},
|
||||
replacements = {
|
||||
{"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
|
||||
},
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- FIDDLEHEAD
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
|
||||
|
||||
minetest.register_craftitem("ferns:fiddlehead", {
|
||||
description = "Fiddlehead",
|
||||
inventory_image = "ferns_fiddlehead.png",
|
||||
on_use = minetest.item_eat(-1), -- slightly poisonous when raw
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "ferns:fiddlehead_roasted",
|
||||
recipe = "ferns:fiddlehead",
|
||||
cooktime = 1,
|
||||
})
|
||||
minetest.register_craftitem("ferns:fiddlehead_roasted", {
|
||||
description = "Roasted Fiddlehead",
|
||||
inventory_image = "ferns_fiddlehead_roasted.png",
|
||||
on_use = minetest.item_eat(1), -- edible when cooked
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- FERN TUBER
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
|
||||
|
||||
minetest.register_craftitem("ferns:ferntuber", {
|
||||
description = "Fern Tuber",
|
||||
inventory_image = "ferns_ferntuber.png",
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "ferns:ferntuber_roasted",
|
||||
recipe = "ferns:ferntuber",
|
||||
cooktime = 3,
|
||||
})
|
||||
|
||||
minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
|
||||
|
||||
minetest.register_craftitem("ferns:ferntuber_roasted", {
|
||||
description = "Roasted Fern Tuber",
|
||||
inventory_image = "ferns_ferntuber_roasted.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "dye:green",
|
||||
recipe = {"group:horsetail"},
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:pick_wood",
|
||||
recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:shovel_wood",
|
||||
recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:axe_wood",
|
||||
recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:sword_wood",
|
||||
recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:hoe_wood",
|
||||
recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
|
||||
})]]
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Ferns - Crafting 0.0.5
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- (by Mossmanikin)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
local fern1 = minetest.registered_items["default:fern_1"] or false
|
||||
fern1 = (fern1 and fern1.name) or "ferns:fern_01"
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "ferns:fiddlehead 3",
|
||||
recipe = {"ferns:fern_01"},
|
||||
replacements = {
|
||||
{fern1, "ferns:ferntuber"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "ferns:fiddlehead 3",
|
||||
recipe = {"ferns:tree_fern_leaves"},
|
||||
replacements = {
|
||||
{"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
|
||||
},
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- FIDDLEHEAD
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
|
||||
|
||||
minetest.register_craftitem("ferns:fiddlehead", {
|
||||
description = S("Fiddlehead"),
|
||||
inventory_image = "ferns_fiddlehead.png",
|
||||
on_use = minetest.item_eat(-1), -- slightly poisonous when raw
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "ferns:fiddlehead_roasted",
|
||||
recipe = "ferns:fiddlehead",
|
||||
cooktime = 1,
|
||||
})
|
||||
minetest.register_craftitem("ferns:fiddlehead_roasted", {
|
||||
description = S("Roasted Fiddlehead"),
|
||||
inventory_image = "ferns_fiddlehead_roasted.png",
|
||||
on_use = minetest.item_eat(1), -- edible when cooked
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- FERN TUBER
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
|
||||
|
||||
minetest.register_craftitem("ferns:ferntuber", {
|
||||
description = S("Fern Tuber"),
|
||||
inventory_image = "ferns_ferntuber.png",
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "ferns:ferntuber_roasted",
|
||||
recipe = "ferns:ferntuber",
|
||||
cooktime = 3,
|
||||
})
|
||||
|
||||
minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
|
||||
|
||||
minetest.register_craftitem("ferns:ferntuber_roasted", {
|
||||
description = S("Roasted Fern Tuber"),
|
||||
inventory_image = "ferns_ferntuber_roasted.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "dye:green",
|
||||
recipe = {"group:horsetail"},
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:pick_wood",
|
||||
recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:shovel_wood",
|
||||
recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:axe_wood",
|
||||
recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:sword_wood",
|
||||
recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:hoe_wood",
|
||||
recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
|
||||
})]]
|
||||
|
@ -1,2 +0,0 @@
|
||||
default
|
||||
biome_lib
|
411
ferns/fern.lua
@ -1,196 +1,215 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Ferns - Fern 0.1.0
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default, flowers, painting, trees
|
||||
-- Dependencies: biome_lib
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- some inspiration from here
|
||||
-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
|
||||
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_lady_fern == true)
|
||||
|
||||
-- Maintain backward compatibilty
|
||||
minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
|
||||
minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
|
||||
minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
|
||||
minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
|
||||
|
||||
local nodenames = {}
|
||||
|
||||
local function create_nodes()
|
||||
local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
|
||||
local vscales = { 1, 2, 2.2 }
|
||||
local descs = { "Lady-fern (Athyrium)", nil, nil }
|
||||
|
||||
for i = 1, 3 do
|
||||
local node_on_place = nil
|
||||
if i == 1 then
|
||||
node_on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random fern
|
||||
local stack = ItemStack("ferns:fern_0"..math.random(1,4))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
|
||||
end
|
||||
end
|
||||
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
|
||||
minetest.register_node(nodenames[i], {
|
||||
description = descs[i] or ("Lady-fern (Athyrium) " .. string.format("%02d", i)),
|
||||
inventory_image = "ferns_fern.png",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = vscales[i],
|
||||
paramtype = "light",
|
||||
tiles = { images[i] },
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
|
||||
},
|
||||
drop = "ferns:fern_01",
|
||||
on_place = node_on_place
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Init
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
create_nodes()
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
biome_lib:register_generate_plant({ -- near trees (woodlands)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 30,
|
||||
rarity = 62,--63,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"group:tree"},
|
||||
near_nodes_size = 3,--4,
|
||||
near_nodes_vertical = 2,--3,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 <20>C (too hot?)
|
||||
temp_min = 0.75, -- -12 <20>C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
biome_lib:register_generate_plant({ -- near stone (mountains)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"group:falling_node",
|
||||
--"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 35,
|
||||
rarity = 40,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"group:stone"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 16,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 <20>C (too hot?)
|
||||
temp_min = 0.75, -- -12 <20>C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 1200,--1600, -- maybe too much? :D
|
||||
rarity = 25,--15,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"default:stone_with_iron",
|
||||
--"default:stone_with_copper",
|
||||
--"default:stone_with_mese",
|
||||
--"default:stone_with_gold",
|
||||
--"default:stone_with_diamond",
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver"
|
||||
--"moreores:mineral_mithril"
|
||||
},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 4,--5,--6,
|
||||
near_nodes_count = 2,--3,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 <20>C (too hot?)
|
||||
temp_min = 0.75, -- -12 <20>C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 70,
|
||||
rarity = 25,--15,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"default:stone"
|
||||
},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 2,--6,
|
||||
near_nodes_count = 3,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 <20>C (too hot?)
|
||||
temp_min = 0.75, -- -12 <20>C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Ferns - Fern 0.1.0
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default, flowers, painting, trees
|
||||
-- Dependencies: biome_lib
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- some inspiration from here
|
||||
-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
|
||||
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_lady_fern == true)
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
|
||||
-- Maintain backward compatibilty
|
||||
-- minetest-0.5: Begin
|
||||
local default_ferns = minetest.registered_items["default:fern_1"] or false
|
||||
if default_ferns then
|
||||
minetest.register_alias("ferns:fern_03", "default:fern_3")
|
||||
minetest.register_alias("ferns:fern_02", "default:fern_2")
|
||||
minetest.register_alias("ferns:fern_01", "default:fern_1")
|
||||
end
|
||||
-- minetest-0.5: End
|
||||
minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
|
||||
minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
|
||||
minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
|
||||
minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
|
||||
|
||||
local nodenames = {}
|
||||
|
||||
local function create_nodes()
|
||||
local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
|
||||
local vscales = { 1, math.sqrt(8), math.sqrt(11) }
|
||||
local descs = { S("Lady-fern (Athyrium)"), nil, nil }
|
||||
|
||||
for i = 1, 3 do
|
||||
local node_on_place = nil
|
||||
if i == 1 then
|
||||
node_on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random fern
|
||||
local stack = ItemStack("ferns:fern_0"..math.random(1,4))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
|
||||
end
|
||||
end
|
||||
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
|
||||
minetest.register_node(nodenames[i], {
|
||||
description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
|
||||
inventory_image = "ferns_fern.png",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = vscales[i],
|
||||
paramtype = "light",
|
||||
tiles = { images[i] },
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
|
||||
},
|
||||
drop = "ferns:fern_01",
|
||||
on_place = node_on_place
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Init
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if default_ferns then
|
||||
for i = 1, 3 do
|
||||
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
|
||||
end
|
||||
else
|
||||
create_nodes()
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 30,
|
||||
rarity = 62,--63,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"group:tree"},
|
||||
near_nodes_size = 3,--4,
|
||||
near_nodes_vertical = 2,--3,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"group:falling_node",
|
||||
--"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 35,
|
||||
rarity = 40,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"group:stone"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 16,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 1200,--1600, -- maybe too much? :D
|
||||
rarity = 25,--15,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"default:stone_with_iron",
|
||||
--"default:stone_with_copper",
|
||||
--"default:stone_with_mese",
|
||||
--"default:stone_with_gold",
|
||||
--"default:stone_with_diamond",
|
||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver"
|
||||
--"moreores:mineral_mithril"
|
||||
},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 4,--5,--6,
|
||||
near_nodes_count = 2,--3,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 70,
|
||||
rarity = 25,--15,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"default:stone"
|
||||
},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 2,--6,
|
||||
near_nodes_count = 3,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
@ -2,26 +2,46 @@
|
||||
-- Ferns - Giant Tree Fern 0.1.1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: 4seasons, default
|
||||
-- Supports: vines
|
||||
-- Supports: vines
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_giant_treefern == true)
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
-- lot of code, lot to load
|
||||
|
||||
function abstract_ferns.can_grow_giant_tree_fern(pos)
|
||||
local node_name = minetest.get_node(pos).name
|
||||
if node_name ~= "air" and node_name ~= "ferns:sapling_giant_tree_fern" and node_name ~= "default:junglegrass" then
|
||||
return false
|
||||
end
|
||||
|
||||
local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
|
||||
if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
local light = minetest.get_node_light(pos, 0.5)
|
||||
if light <= 8 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
abstract_ferns.grow_giant_tree_fern = function(pos)
|
||||
local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(pos_01).name ~= "air"
|
||||
and minetest.get_node(pos_01).name ~= "ferns:sapling_giant_tree_fern"
|
||||
and minetest.get_node(pos_01).name ~= "default:junglegrass" then
|
||||
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(pos_aux).name
|
||||
if name ~= "air" and name ~= "ferns:sapling_giant_tree_fern"
|
||||
and name ~= "default:junglegrass" then
|
||||
return
|
||||
end
|
||||
|
||||
local size = math.random(12,16) -- min of range must be >= 4
|
||||
|
||||
|
||||
local leafchecks = {
|
||||
{
|
||||
direction = 3,
|
||||
@ -61,32 +81,41 @@ abstract_ferns.grow_giant_tree_fern = function(pos)
|
||||
}
|
||||
}
|
||||
|
||||
local brk = false
|
||||
for i = 1, size-3 do
|
||||
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"})
|
||||
end
|
||||
minetest.set_node({x = pos.x, y = pos.y + size-2, z = pos.z}, {name="ferns:fern_trunk_big_top"})
|
||||
minetest.set_node({x = pos.x, y = pos.y + size-1, z = pos.z}, {name="ferns:tree_fern_leaves_giant"})
|
||||
|
||||
-- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result
|
||||
|
||||
-- assert(#leafchecks == 4)
|
||||
for i = 1, 4 do
|
||||
local positions = leafchecks[i].positions
|
||||
local rot = leafchecks[i].direction
|
||||
local endpos = 4 -- If the loop below adds all intermediate leaves then the "terminating" leaf will be at positions[4]
|
||||
-- assert(#positions == 4)
|
||||
-- add leaves so long as the destination nodes are air
|
||||
for j = 1, 3 do
|
||||
if minetest.get_node(positions[j]).name == "air" then
|
||||
minetest.set_node(positions[j], {name="ferns:tree_fern_leave_big"})
|
||||
else
|
||||
endpos = j
|
||||
break
|
||||
end
|
||||
pos_aux.y = pos.y + i
|
||||
local name = minetest.get_node(pos_aux).name
|
||||
if not (name == "air" or (i == 1 and name == "ferns:sapling_giant_tree_fern")) then
|
||||
brk = true
|
||||
break
|
||||
end
|
||||
-- add the terminating leaf if required and possible
|
||||
if endpos == 4 and minetest.get_node(positions[endpos]).name == "air" then
|
||||
minetest.set_node(positions[endpos], {name="ferns:tree_fern_leave_big_end", param2=rot})
|
||||
minetest.swap_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"})
|
||||
end
|
||||
if not brk then
|
||||
minetest.swap_node({x = pos.x, y = pos.y + size-2, z = pos.z}, {name="ferns:fern_trunk_big_top"})
|
||||
minetest.swap_node({x = pos.x, y = pos.y + size-1, z = pos.z}, {name="ferns:tree_fern_leaves_giant"})
|
||||
|
||||
-- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result
|
||||
|
||||
-- assert(#leafchecks == 4)
|
||||
for i = 1, 4 do
|
||||
local positions = leafchecks[i].positions
|
||||
local rot = leafchecks[i].direction
|
||||
local endpos = 4 -- If the loop below adds all intermediate leaves then the "terminating" leaf will be at positions[4]
|
||||
-- assert(#positions == 4)
|
||||
-- add leaves so long as the destination nodes are air
|
||||
for j = 1, 3 do
|
||||
if minetest.get_node(positions[j]).name == "air" then
|
||||
minetest.swap_node(positions[j], {name="ferns:tree_fern_leave_big"})
|
||||
else
|
||||
endpos = j
|
||||
break
|
||||
end
|
||||
end
|
||||
-- add the terminating leaf if required and possible
|
||||
if endpos == 4 and minetest.get_node(positions[endpos]).name == "air" then
|
||||
minetest.swap_node(positions[endpos], {name="ferns:tree_fern_leave_big_end", param2=rot})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -95,9 +124,9 @@ end
|
||||
-- GIANT TREE FERN LEAVES
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:tree_fern_leaves_giant", {
|
||||
description = "Tree Fern Crown (Dicksonia)",
|
||||
description = S("Tree Fern Crown (Dicksonia)"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = math.sqrt(8),
|
||||
visual_scale = math.sqrt(11),
|
||||
wield_scale = {x=0.175, y=0.175, z=0.175},
|
||||
paramtype = "light",
|
||||
tiles = {"ferns_fern_tree_giant.png"},
|
||||
@ -137,7 +166,7 @@ minetest.register_node("ferns:tree_fern_leaves_giant", {
|
||||
-- GIANT TREE FERN LEAVE PART
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:tree_fern_leave_big", {
|
||||
description = "Giant Tree Fern Leaves",
|
||||
description = S("Giant Tree Fern Leaves"),
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
@ -152,17 +181,26 @@ minetest.register_node("ferns:tree_fern_leave_big", {
|
||||
},
|
||||
drop = "",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_destruct = function(pos,oldnode)
|
||||
for _, d in pairs({{x=-1,z=0},{x=1,z=0},{x=0,z=-1},{x=0,z=1}}) do
|
||||
local node = minetest.get_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
|
||||
if node.name == "ferns:tree_fern_leave_big" then
|
||||
minetest.dig_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- GIANT TREE FERN LEAVE END
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:tree_fern_leave_big_end", {
|
||||
description = "Giant Tree Fern Leave End",
|
||||
description = S("Giant Tree Fern Leave End"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = { "ferns_tree_fern_leave_big_end.png" },
|
||||
use_texture_alpha = "clip",
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -187,7 +225,7 @@ minetest.register_node("ferns:tree_fern_leave_big_end", {
|
||||
-- GIANT TREE FERN TRUNK TOP
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:fern_trunk_big_top", {
|
||||
description = "Giant Fern Trunk",
|
||||
description = S("Giant Fern Trunk"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
@ -195,6 +233,7 @@ minetest.register_node("ferns:fern_trunk_big_top", {
|
||||
"ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
|
||||
"ferns_fern_trunk_big.png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- {left, bottom, front, right, top, back }
|
||||
@ -224,7 +263,7 @@ minetest.register_node("ferns:fern_trunk_big_top", {
|
||||
-- GIANT TREE FERN TRUNK
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:fern_trunk_big", {
|
||||
description = "Giant Fern Trunk",
|
||||
description = S("Giant Fern Trunk"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
@ -232,6 +271,7 @@ minetest.register_node("ferns:fern_trunk_big", {
|
||||
"ferns_fern_trunk_big_top.png",
|
||||
"ferns_fern_trunk_big.png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
|
||||
@ -244,8 +284,8 @@ minetest.register_node("ferns:fern_trunk_big", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"ferns:fern_trunk_big")
|
||||
end
|
||||
end,
|
||||
@ -255,13 +295,13 @@ minetest.register_node("ferns:fern_trunk_big", {
|
||||
-- GIANT TREE FERN SAPLING
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:sapling_giant_tree_fern", {
|
||||
description = "Giant Tree Fern Sapling",
|
||||
description = S("Giant Tree Fern Sapling"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"ferns_sapling_tree_fern_giant.png"},
|
||||
inventory_image = "ferns_sapling_tree_fern_giant.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -275,7 +315,9 @@ minetest.register_abm({
|
||||
interval = 1000,
|
||||
chance = 4,
|
||||
action = function(pos, node, _, _)
|
||||
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
if abstract_ferns.can_grow_giant_tree_fern(pos) then
|
||||
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
@ -285,9 +327,10 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
"default:sand",
|
||||
"default:desert_sand"--,
|
||||
--"dryplants:grass_short"
|
||||
@ -310,7 +353,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
@ -321,7 +364,7 @@ if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||
neighbors = {"default:desert_sand"},
|
||||
ncount = 1,
|
||||
min_elevation = 1,
|
||||
near_nodes = {"default:water_source"},
|
||||
near_nodes = {"default:water_source", "default:river_water_source"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
|
@ -2,15 +2,16 @@
|
||||
-- Archae Plantae - Horsetail 0.0.5
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default, flowers, trees
|
||||
-- Dependencies: biome_lib
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-- Dependencies: biome_lib
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_horsetails == true)
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- HORSETAIL (EQUISETUM)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -33,13 +34,13 @@ local function create_nodes()
|
||||
local node_drop = "ferns:horsetail_04"
|
||||
|
||||
if i == 1 then
|
||||
node_desc = "Young Horsetail (Equisetum)"
|
||||
node_desc = S("Young Horsetail (Equisetum)")
|
||||
node_on_use = minetest.item_eat(1) -- young ones edible https://en.wikipedia.org/wiki/Equisetum
|
||||
node_drop = node_name
|
||||
elseif i == 4 then
|
||||
node_desc = "Horsetail (Equisetum)"
|
||||
node_desc = S("Horsetail (Equisetum)")
|
||||
else
|
||||
node_desc = "Horsetail (Equisetum) ".. string.format("%02d", i)
|
||||
node_desc = S("Horsetail (Equisetum)").." ".. string.format("%02d", i)
|
||||
end
|
||||
|
||||
node_names[i] = node_name
|
||||
@ -74,12 +75,13 @@ create_nodes()
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = node_names,
|
||||
spawn_chance = 400,
|
||||
spawn_surfaces = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"dryplants:grass_short",
|
||||
@ -89,7 +91,7 @@ if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||
},
|
||||
seed_diff = 329,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","default:gravel"},
|
||||
near_nodes = {"default:water_source","default:river_water_source","default:gravel"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
@ -102,9 +104,10 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 35,
|
||||
@ -125,8 +128,8 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 <EFBFBD>C
|
||||
temp_min = 0.53, -- 0 <EFBFBD>C, dies back in winter
|
||||
temp_max = -0.5, -- 55 °C
|
||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||
--random_facedir = { 0, 179 },
|
||||
},
|
||||
node_names
|
||||
@ -134,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:gravel", -- roots go deep
|
||||
"default:mossycobble",
|
||||
@ -147,8 +150,8 @@ if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 <EFBFBD>C
|
||||
temp_min = 0.53, -- 0 <EFBFBD>C, dies back in winter
|
||||
temp_max = -0.5, -- 55 °C
|
||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||
--random_facedir = { 0, 179 },
|
||||
},
|
||||
node_names
|
||||
|
@ -1,14 +1,16 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Ferns" -- former "Archae Plantae"
|
||||
local version = "0.2.0"
|
||||
local version = "0.2.1"
|
||||
local mname = "ferns" -- former "archaeplantae"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- (by Mossmanikin)
|
||||
-- License (everything): WTFPL
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_ferns = {}
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
|
||||
dofile(minetest.get_modpath("ferns").."/settings.lua")
|
||||
|
||||
if abstract_ferns.config.enable_lady_fern == true then
|
||||
|
23
ferns/locale/ferns.de.tr
Normal file
@ -0,0 +1,23 @@
|
||||
# textdomain: ferns
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
#
|
||||
|
||||
|
||||
Fiddlehead=Geigenkopf
|
||||
Roasted Fiddlehead=Gerösteter Geigenkopf
|
||||
Fern Tuber=Farnknolle
|
||||
Roasted Fern Tuber=Geröstete Farnknolle
|
||||
Lady-fern (Athyrium)=Frauenfarn (Athyrium)
|
||||
Tree Fern Crown (Dicksonia)=Baumfarnkrone (Dicksonia)
|
||||
Giant Tree Fern Leaves=Riesige Baumfarnblätter
|
||||
Giant Tree Fern Leave End=Riesiges Baumfarnblattende
|
||||
Giant Fern Trunk=Riesiger Baumfarnstamm
|
||||
Giant Tree Fern Sapling=Riesiger Baumfarnsetzling
|
||||
Young Horsetail (Equisetum)=Junger Schachtelhalm (Equisetum)
|
||||
Horsetail (Equisetum)=Schachtelhalm (Equisetum)
|
||||
Fern Trunk (Dicksonia)=Farnstamm (Dicksonia)
|
||||
Tree Fern Sapling (Dicksonia)=Baumfarnsetzling (Dicksonia)
|
23
ferns/locale/ferns.eo.tr
Normal file
@ -0,0 +1,23 @@
|
||||
# textdomain: ferns
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
#
|
||||
|
||||
|
||||
Fiddlehead=Filika Supro
|
||||
Roasted Fiddlehead=Rostita Filika Supro
|
||||
Fern Tuber=Filika Tubero
|
||||
Roasted Fern Tuber=Rostita Filika Tubero
|
||||
Lady-fern (Athyrium)=Afiriumo (Athyrium)
|
||||
Tree Fern Crown (Dicksonia)=Krono de Arba Filiko
|
||||
Giant Tree Fern Leaves=Folioj de Giganta Arba Filiko
|
||||
Giant Tree Fern Leave End=Folifino de Giganta Arba Filiko
|
||||
Giant Fern Trunk=Trunko de Giganta Arba Filiko
|
||||
Giant Tree Fern Sapling=Arbido de Giganta Arba Filiko
|
||||
Young Horsetail (Equisetum)=Juna Ekvizeto (Equisetum)
|
||||
Horsetail (Equisetum)=Ekvizeto (Equisetum)
|
||||
Fern Trunk (Dicksonia)=Trunko de Arba Filiko (Dicksonia)
|
||||
Tree Fern Sapling (Dicksonia)=Arbido de Arba Filiko (Dicksonia)
|
22
ferns/locale/ferns.fr.tr
Normal file
@ -0,0 +1,22 @@
|
||||
# textdomain: ferns
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# fat115 <fat115@framasoft.org>, 2017.
|
||||
#
|
||||
|
||||
Fiddlehead=Crosse de fougère
|
||||
Roasted Fiddlehead=Crosse de fougère rôtie
|
||||
Fern Tuber=Tubercule de fougère
|
||||
Roasted Fern Tuber=Tubercule de fougère rôti
|
||||
Lady-fern (Athyrium)=Fougère (Athyrium)
|
||||
Tree Fern Crown (Dicksonia)=Fougère en couronne (Dicksonia)
|
||||
Giant Tree Fern Leaves=Feuilles de fougère géante
|
||||
Giant Tree Fern Leave End=Feuilles de fougère géante (extrémité)
|
||||
Giant Fern Trunk=Tronc de fougère géante
|
||||
Giant Tree Fern Sapling=Pousse de fougère géante
|
||||
Young Horsetail (Equisetum)=Pousse de prêle (Equisetum)
|
||||
Horsetail (Equisetum)=Prêle (Equisetum)
|
||||
Fern Trunk (Dicksonia)=Tronc de fougère en couronne (Dicksonia)
|
||||
Tree Fern Sapling (Dicksonia)=Pousse de fougère en couronne (Dicksonia)
|
23
ferns/locale/template.txt
Normal file
@ -0,0 +1,23 @@
|
||||
# textdomain: ferns
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
|
||||
|
||||
Fiddlehead=
|
||||
Roasted Fiddlehead=
|
||||
Fern Tuber=
|
||||
Roasted Fern Tuber=
|
||||
Lady-fern (Athyrium)=
|
||||
Tree Fern Crown (Dicksonia)=
|
||||
Giant Tree Fern Leaves=
|
||||
Giant Tree Fern Leave End=
|
||||
Giant Fern Trunk=
|
||||
Giant Tree Fern Sapling=
|
||||
Young Horsetail (Equisetum)=
|
||||
Horsetail (Equisetum)=
|
||||
Fern Trunk (Dicksonia)=
|
||||
Tree Fern Sapling (Dicksonia)=
|
2
ferns/mod.conf
Normal file
@ -0,0 +1,2 @@
|
||||
name = ferns
|
||||
depends = default, biome_lib
|
@ -1,6 +1,6 @@
|
||||
-- In case you don't wanna have errors:
|
||||
|
||||
-- Only change what's behind a "=" (or "--").
|
||||
-- Only change what's behind a "=" (or "--").
|
||||
-- Don't use caps (behind a "=").
|
||||
|
||||
-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
|
||||
@ -31,12 +31,12 @@ abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a
|
||||
--
|
||||
-- Horsetails
|
||||
abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
|
||||
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
|
||||
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
|
||||
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
|
||||
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
|
||||
--
|
||||
-- Tree_Fern
|
||||
abstract_ferns.config.enable_treeferns_in_jungle = true
|
||||
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
|
||||
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
|
||||
--
|
||||
-- Giant_Tree_Fern
|
||||
abstract_ferns.config.enable_giant_treeferns_in_jungle = true
|
||||
|
@ -2,39 +2,65 @@
|
||||
-- Ferns - Tree Fern 0.1.1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default , trees
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default , trees
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
|
||||
assert(abstract_ferns.config.enable_treefern == true)
|
||||
|
||||
function abstract_ferns.can_grow_tree_fern(pos)
|
||||
local node_name = minetest.get_node(pos).name
|
||||
if node_name ~= "air" and node_name ~= "ferns:sapling_tree_fern" and node_name ~= "default:junglegrass" then
|
||||
return false
|
||||
end
|
||||
|
||||
local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
|
||||
if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
local light = minetest.get_node_light(pos, 0.5)
|
||||
if light <= 8 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
abstract_ferns.grow_tree_fern = function(pos)
|
||||
|
||||
local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(pos_01).name ~= "air"
|
||||
and minetest.get_node(pos_01).name ~= "ferns:sapling_tree_fern"
|
||||
and minetest.get_node(pos_01).name ~= "default:junglegrass" then
|
||||
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(pos_aux).name
|
||||
if name ~= "air" and name ~= "ferns:sapling_tree_fern"
|
||||
and name ~= "default:junglegrass" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local size = math.random(1, 4) + math.random(1, 4)
|
||||
if (size > 5) then
|
||||
size = 10 - size
|
||||
end
|
||||
size = size + 1
|
||||
local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)]
|
||||
|
||||
|
||||
local i = 1
|
||||
while (i < size-1) do
|
||||
if minetest.get_node({x = pos.x, y = pos.y + i + 1, z = pos.z}).name ~= "air" then
|
||||
local brk = false
|
||||
while (i < size) do
|
||||
pos_aux.y = pos.y + i
|
||||
name = minetest.get_node(pos_aux).name
|
||||
if not (name == "air" or (i == 1 and name == "ferns:sapling_tree_fern")) then
|
||||
brk = true
|
||||
break
|
||||
end
|
||||
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = "ferns:fern_trunk" })
|
||||
minetest.swap_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = "ferns:fern_trunk" })
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = crown })
|
||||
if not brk then
|
||||
minetest.swap_node({x = pos.x, y = pos.y + i - 1, z = pos.z}, { name = crown })
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -44,9 +70,9 @@ end
|
||||
-- TODO: Both of these nodes look the same?
|
||||
|
||||
minetest.register_node("ferns:tree_fern_leaves", {
|
||||
description = "Tree Fern Crown (Dicksonia)",
|
||||
description = S("Tree Fern Crown (Dicksonia)"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
--tiles = {"[combine:32x32:0,0=top_left.png:0,16=bottom_left.png:16,0=top_right.png:16,16=bottom_right.png"},
|
||||
@ -80,7 +106,7 @@ minetest.register_node("ferns:tree_fern_leaves", {
|
||||
})
|
||||
minetest.register_node("ferns:tree_fern_leaves_02", {
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 2,
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"ferns_fern_big.png"},
|
||||
walkable = false,
|
||||
@ -113,7 +139,7 @@ minetest.register_node("ferns:tree_fern_leaves_02", {
|
||||
-- FERN TRUNK
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:fern_trunk", {
|
||||
description = "Fern Trunk (Dicksonia)",
|
||||
description = S("Fern Trunk (Dicksonia)"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
@ -121,6 +147,7 @@ minetest.register_node("ferns:fern_trunk", {
|
||||
"ferns_fern_trunk_top.png",
|
||||
"ferns_fern_trunk.png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
||||
@ -133,8 +160,8 @@ minetest.register_node("ferns:fern_trunk", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"ferns:fern_trunk")
|
||||
end
|
||||
end,
|
||||
@ -144,14 +171,14 @@ minetest.register_node("ferns:fern_trunk", {
|
||||
-- TREE FERN SAPLING
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("ferns:sapling_tree_fern", {
|
||||
description = "Tree Fern Sapling (Dicksonia)",
|
||||
description = S("Tree Fern Sapling (Dicksonia)"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"ferns_sapling_tree_fern.png"},
|
||||
inventory_image = "ferns_sapling_tree_fern.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -164,7 +191,9 @@ minetest.register_abm({
|
||||
interval = 1000,
|
||||
chance = 4,
|
||||
action = function(pos, node, _, _)
|
||||
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
if abstract_ferns.can_grow_tree_fern(pos) then
|
||||
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
@ -174,9 +203,10 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
"default:sand",
|
||||
"default:desert_sand",
|
||||
},
|
||||
@ -202,7 +232,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
@ -213,7 +243,7 @@ if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||
neighbors = {"default:desert_sand"},
|
||||
ncount = 1,
|
||||
min_elevation = 1,
|
||||
near_nodes = {"default:water_source"},
|
||||
near_nodes = {"default:water_source","default:river_water_source"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
|
@ -1,2 +0,0 @@
|
||||
biome_lib
|
||||
farming?
|
@ -1,24 +0,0 @@
|
||||
Changelog
|
||||
---------
|
||||
|
||||
2012-08-06: Tweaked selection boxes on all nodes. Tweaked seaweed to use
|
||||
signlike instead of raillike drawtype, (still forced to only spawn flat as
|
||||
usual). Adjusted light level limits to give it more time to grow. Created
|
||||
this changelog file using github commit messages as the basis. Shrunk the
|
||||
geranium flower down a bit to better match the others.
|
||||
|
||||
2012-08-03: Tuned out the random-numbers-inside-ABM stuff. Uses the ABM's
|
||||
chance setting instead. Should be approximately the same as before, but
|
||||
hopefully using a tad less CPU. Minor tweak to ABM interval/growing delay.
|
||||
|
||||
2012-08-01: Added blue geranium to the collection of flowers.
|
||||
|
||||
2012-07-31: Disable debug by default.
|
||||
|
||||
2012-07-30: many updates over the course of the day - first commit, removed
|
||||
some redundant files, added wield/inventory image entries for each item, to
|
||||
force the game to draw them properly (these shouldn't be needed, must be a
|
||||
bug). Tweaked spawn code so that the radius check also includes the name of
|
||||
the item being spawned as well as items in group:flower, that way all items can
|
||||
have a radius test, and not just those in group:flower. Fiddled with the spawn
|
||||
rates a bit.
|
@ -1,479 +0,0 @@
|
||||
local S = biome_lib.intllib
|
||||
|
||||
-- This file supplies a few additional plants and some related crafts
|
||||
-- for the plantlife modpack. Last revision: 2013-04-24
|
||||
|
||||
flowers_plus = {}
|
||||
|
||||
local SPAWN_DELAY = 1000
|
||||
local SPAWN_CHANCE = 200
|
||||
local flowers_seed_diff = 329
|
||||
local lilies_max_count = 320
|
||||
local lilies_rarity = 33
|
||||
local seaweed_max_count = 320
|
||||
local seaweed_rarity = 33
|
||||
local sunflowers_max_count = 10
|
||||
local sunflowers_rarity = 25
|
||||
|
||||
-- register the various rotations of waterlilies
|
||||
|
||||
local lilies_list = {
|
||||
{ nil , nil , 1 },
|
||||
{ "225", "22.5" , 2 },
|
||||
{ "45" , "45" , 3 },
|
||||
{ "675", "67.5" , 4 },
|
||||
{ "s1" , "small_1" , 5 },
|
||||
{ "s2" , "small_2" , 6 },
|
||||
{ "s3" , "small_3" , 7 },
|
||||
{ "s4" , "small_4" , 8 },
|
||||
}
|
||||
|
||||
for i in ipairs(lilies_list) do
|
||||
local deg1 = ""
|
||||
local deg2 = ""
|
||||
local lily_groups = {snappy = 3,flammable=2,flower=1}
|
||||
|
||||
if lilies_list[i][1] ~= nil then
|
||||
deg1 = "_"..lilies_list[i][1]
|
||||
deg2 = "_"..lilies_list[i][2]
|
||||
lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
|
||||
end
|
||||
|
||||
minetest.register_node(":flowers:waterlily"..deg1, {
|
||||
description = S("Waterlily"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"flowers_waterlily"..deg2..".png",
|
||||
"flowers_waterlily"..deg2..".png^[transformFY"
|
||||
},
|
||||
inventory_image = "flowers_waterlily.png",
|
||||
wield_image = "flowers_waterlily.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
groups = lily_groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
|
||||
},
|
||||
buildable_to = true,
|
||||
|
||||
liquids_pointable = true,
|
||||
drop = "flowers:waterlily",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local keys=placer:get_player_control()
|
||||
local pt = pointed_thing
|
||||
|
||||
local place_pos = nil
|
||||
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
||||
local under_node = minetest.get_node(pt.under)
|
||||
local above_node = minetest.get_node(pt.above)
|
||||
local top_node = minetest.get_node(top_pos)
|
||||
|
||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if under_node.name ~= "default:water_source" then
|
||||
place_pos = pt.under
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
return
|
||||
end
|
||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
||||
place_pos = pt.above
|
||||
end
|
||||
|
||||
if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
|
||||
|
||||
local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
|
||||
|
||||
if not keys["sneak"] then
|
||||
local node = minetest.get_node(pt.under)
|
||||
local waterlily = math.random(1,8)
|
||||
if waterlily == 1 then
|
||||
nodename = "flowers:waterlily"
|
||||
elseif waterlily == 2 then
|
||||
nodename = "flowers:waterlily_225"
|
||||
elseif waterlily == 3 then
|
||||
nodename = "flowers:waterlily_45"
|
||||
elseif waterlily == 4 then
|
||||
nodename = "flowers:waterlily_675"
|
||||
elseif waterlily == 5 then
|
||||
nodename = "flowers:waterlily_s1"
|
||||
elseif waterlily == 6 then
|
||||
nodename = "flowers:waterlily_s2"
|
||||
elseif waterlily == 7 then
|
||||
nodename = "flowers:waterlily_s3"
|
||||
elseif waterlily == 8 then
|
||||
nodename = "flowers:waterlily_s4"
|
||||
end
|
||||
minetest.set_node(place_pos, {name = nodename, param2 = math.random(0,3) })
|
||||
else
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
minetest.set_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
|
||||
end
|
||||
|
||||
if not biome_lib.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local algae_list = { {nil}, {2}, {3}, {4} }
|
||||
|
||||
for i in ipairs(algae_list) do
|
||||
local num = ""
|
||||
local algae_groups = {snappy = 3,flammable=2,flower=1}
|
||||
|
||||
if algae_list[i][1] ~= nil then
|
||||
num = "_"..algae_list[i][1]
|
||||
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
|
||||
end
|
||||
|
||||
minetest.register_node(":flowers:seaweed"..num, {
|
||||
description = S("Seaweed"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"flowers_seaweed"..num..".png",
|
||||
"flowers_seaweed"..num..".png^[transformFY"
|
||||
},
|
||||
inventory_image = "flowers_seaweed_2.png",
|
||||
wield_image = "flowers_seaweed_2.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
groups = algae_groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
|
||||
},
|
||||
buildable_to = true,
|
||||
|
||||
liquids_pointable = true,
|
||||
drop = "flowers:seaweed",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local keys=placer:get_player_control()
|
||||
local pt = pointed_thing
|
||||
|
||||
local place_pos = nil
|
||||
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
||||
local under_node = minetest.get_node(pt.under)
|
||||
local above_node = minetest.get_node(pt.above)
|
||||
local top_node = minetest.get_node(top_pos)
|
||||
|
||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if under_node.name ~= "default:water_source" then
|
||||
place_pos = pt.under
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
return
|
||||
end
|
||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
||||
place_pos = pt.above
|
||||
end
|
||||
|
||||
if not minetest.is_protected(place_pos, placer:get_player_name()) then
|
||||
|
||||
local nodename = "default:cobble" -- :D
|
||||
|
||||
if not keys["sneak"] then
|
||||
--local node = minetest.get_node(pt.under)
|
||||
local seaweed = math.random(1,4)
|
||||
if seaweed == 1 then
|
||||
nodename = "flowers:seaweed"
|
||||
elseif seaweed == 2 then
|
||||
nodename = "flowers:seaweed_2"
|
||||
elseif seaweed == 3 then
|
||||
nodename = "flowers:seaweed_3"
|
||||
elseif seaweed == 4 then
|
||||
nodename = "flowers:seaweed_4"
|
||||
end
|
||||
minetest.set_node(place_pos, {name = nodename, param2 = math.random(0,3) })
|
||||
else
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
minetest.set_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
|
||||
end
|
||||
|
||||
if not biome_lib.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local box = {
|
||||
type="fixed",
|
||||
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
|
||||
}
|
||||
|
||||
local sunflower_drop = "farming:seed_wheat"
|
||||
if minetest.registered_items["farming:seed_spelt"] then
|
||||
sunflower_drop = "farming:seed_spelt"
|
||||
end
|
||||
|
||||
minetest.register_node(":flowers:sunflower", {
|
||||
description = "Sunflower",
|
||||
drawtype = "mesh",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
inventory_image = "flowers_sunflower_inv.png",
|
||||
mesh = "flowers_sunflower.obj",
|
||||
tiles = { "flowers_sunflower.png" },
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = true,
|
||||
groups = { dig_immediate=3, flora=1, flammable=3 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = box,
|
||||
collision_box = box,
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {sunflower_drop}, rarity = 8},
|
||||
{items = {"flowers:sunflower"}},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
local extra_aliases = {
|
||||
"waterlily",
|
||||
"waterlily_225",
|
||||
"waterlily_45",
|
||||
"waterlily_675",
|
||||
"seaweed"
|
||||
}
|
||||
|
||||
for i in ipairs(extra_aliases) do
|
||||
local flower = extra_aliases[i]
|
||||
minetest.register_alias("flowers:flower_"..flower, "flowers:"..flower)
|
||||
end
|
||||
|
||||
minetest.register_alias( "trunks:lilypad" , "flowers:waterlily_s1" )
|
||||
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
|
||||
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
|
||||
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
|
||||
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )
|
||||
minetest.register_alias( "along_shore:pondscum_1" , "flowers:seaweed" )
|
||||
minetest.register_alias( "along_shore:seaweed_1" , "flowers:seaweed" )
|
||||
minetest.register_alias( "along_shore:seaweed_2" , "flowers:seaweed_2" )
|
||||
minetest.register_alias( "along_shore:seaweed_3" , "flowers:seaweed_3" )
|
||||
minetest.register_alias( "along_shore:seaweed_4" , "flowers:seaweed_4" )
|
||||
|
||||
-- ongen registrations
|
||||
|
||||
flowers_plus.grow_waterlily = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
for i in ipairs(lilies_list) do
|
||||
local chance = math.random(1,8)
|
||||
local ext = ""
|
||||
local num = lilies_list[i][3]
|
||||
|
||||
if lilies_list[i][1] ~= nil then
|
||||
ext = "_"..lilies_list[i][1]
|
||||
end
|
||||
|
||||
if chance == num then
|
||||
minetest.set_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:water_source"},
|
||||
max_count = lilies_max_count,
|
||||
rarity = lilies_rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 4,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
temp_max = -0.22,
|
||||
temp_min = 0.22,
|
||||
},
|
||||
flowers_plus.grow_waterlily
|
||||
)
|
||||
|
||||
flowers_plus.grow_seaweed = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
minetest.set_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:water_source"},
|
||||
max_count = seaweed_max_count,
|
||||
rarity = seaweed_rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 4,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
|
||||
-- seaweed at beaches
|
||||
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:water_source"},
|
||||
max_count = seaweed_max_count,
|
||||
rarity = seaweed_rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:sand"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_vertical = 0,
|
||||
near_nodes_count = 3,
|
||||
plantlife_limit = -0.9,
|
||||
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
|
||||
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
|
||||
},
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:sand"},
|
||||
max_count = seaweed_max_count*2,
|
||||
rarity = seaweed_rarity/2,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:water_source"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_vertical = 0,
|
||||
near_nodes_count = 3,
|
||||
plantlife_limit = -0.9,
|
||||
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
|
||||
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
|
||||
},
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
avoid_nodes = { "flowers:sunflower" },
|
||||
max_count = sunflowers_max_count,
|
||||
rarity = sunflowers_rarity,
|
||||
min_elevation = 0,
|
||||
plantlife_limit = -0.9,
|
||||
temp_max = 0.53,
|
||||
random_facedir = {0,3},
|
||||
},
|
||||
"flowers:sunflower"
|
||||
)
|
||||
|
||||
-- spawn ABM registrations
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
spawn_delay = SPAWN_DELAY/2,
|
||||
spawn_plants = {
|
||||
"flowers:waterlily",
|
||||
"flowers:waterlily_225",
|
||||
"flowers:waterlily_45",
|
||||
"flowers:waterlily_675",
|
||||
"flowers:waterlily_s1",
|
||||
"flowers:waterlily_s2",
|
||||
"flowers:waterlily_s3",
|
||||
"flowers:waterlily_s4"
|
||||
},
|
||||
avoid_radius = 2.5,
|
||||
spawn_chance = SPAWN_CHANCE*4,
|
||||
spawn_surfaces = {"default:water_source"},
|
||||
avoid_nodes = {"group:flower", "group:flora" },
|
||||
seed_diff = flowers_seed_diff,
|
||||
light_min = 9,
|
||||
depth_max = 2,
|
||||
random_facedir = {0,3}
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
spawn_surfaces = {"default:water_source"},
|
||||
avoid_nodes = {"group:flower", "group:flora"},
|
||||
seed_diff = flowers_seed_diff,
|
||||
light_min = 4,
|
||||
light_max = 10,
|
||||
neighbors = {"default:dirt_with_grass"},
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
spawn_surfaces = {"default:dirt_with_grass"},
|
||||
avoid_nodes = {"group:flower", "group:flora" },
|
||||
seed_diff = flowers_seed_diff,
|
||||
light_min = 4,
|
||||
light_max = 10,
|
||||
neighbors = {"default:water_source"},
|
||||
ncount = 1,
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
spawn_surfaces = {"default:stone"},
|
||||
avoid_nodes = {"group:flower", "group:flora" },
|
||||
seed_diff = flowers_seed_diff,
|
||||
light_min = 4,
|
||||
light_max = 10,
|
||||
neighbors = {"default:water_source"},
|
||||
ncount = 6,
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:sunflower"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
spawn_surfaces = {"default:dirt_with_grass"},
|
||||
avoid_nodes = {"group:flower", "flowers:sunflower"},
|
||||
seed_diff = flowers_seed_diff,
|
||||
light_min = 11,
|
||||
light_max = 14,
|
||||
min_elevation = 0,
|
||||
plantlife_limit = -0.9,
|
||||
temp_max = 0.53,
|
||||
random_facedir = {0,3},
|
||||
avoid_radius = 5
|
||||
})
|
||||
|
||||
-- Cotton plants are now provided by the default "farming" mod.
|
||||
-- old cotton plants -> farming cotton stage 8
|
||||
-- cotton wads -> string (can be crafted into wool blocks)
|
||||
-- potted cotton plants -> potted white dandelions
|
||||
|
||||
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
|
||||
minetest.register_alias("flowers:flower_cotton", "farming:cotton_8")
|
||||
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_dandelion_white")
|
||||
minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion_white")
|
||||
minetest.register_alias("flowers:cotton", "farming:string")
|
||||
minetest.register_alias("flowers:cotton_wad", "farming:string")
|
||||
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")
|
||||
|
||||
print(S("[Flowers] Loaded."))
|
@ -1,13 +0,0 @@
|
||||
# Translation by Xanthin
|
||||
|
||||
Waterlily = Seerose
|
||||
Seaweed = Seetang
|
||||
Potted Rose = Eingetopfte Rose
|
||||
Potted Tulip = Eingetopfte Tulpe
|
||||
Potted Yellow Dandelion = Eingetopfter Loewenzahn
|
||||
Potted White Dandelion = Eingetopfte Pusteblume
|
||||
Potted Blue Geranium = Eingetopfte blaue Geranie
|
||||
Potted Viola = Eingetopftes Veilchen
|
||||
Flower Pot = Blumentopf
|
||||
|
||||
[Flowers] Loaded. = [Flowers] Geladen.
|
@ -1,13 +0,0 @@
|
||||
# Template
|
||||
|
||||
Waterlily = Nénuphar
|
||||
Seaweed = Algues
|
||||
Potted Rose = Rose en pot
|
||||
Potted Tulip = Tulipe en pot
|
||||
Potted Yellow Dandelion = Pissenlit jaune en pot
|
||||
Potted White Dandelion = Pissenlit blanc en pot
|
||||
Potted Blue Geranium = Géranium bleu en pot
|
||||
Potted Viola = Violette en pot
|
||||
Flower Pot = Fleurs en pot
|
||||
|
||||
[Flowers] Loaded. = [Fleurs] Chargées.
|
@ -1,13 +0,0 @@
|
||||
# Template
|
||||
|
||||
Waterlily =
|
||||
Seaweed =
|
||||
Potted Rose =
|
||||
Potted Tulip =
|
||||
Potted Yellow Dandelion =
|
||||
Potted White Dandelion =
|
||||
Potted Blue Geranium =
|
||||
Potted Viola =
|
||||
Flower Pot =
|
||||
|
||||
[Flowers] Loaded. =
|
@ -1,14 +0,0 @@
|
||||
# Turkish translation
|
||||
# mahmutelmas06@hotmail.com
|
||||
|
||||
Waterlily = Nilüfer
|
||||
Seaweed = Deniz yosunu
|
||||
Potted Rose = Saksı gülü
|
||||
Potted Tulip = Saksı lalesi
|
||||
Potted Yellow Dandelion = Sarı hindiba
|
||||
Potted White Dandelion = Beyaz hindiba
|
||||
Potted Blue Geranium = Mavi hindiba
|
||||
Potted Viola = Saksı Menekşesi
|
||||
Flower Pot = Saksı
|
||||
|
||||
[Flowers] Loaded. = [Flowers] yüklendi.
|
@ -1,3 +0,0 @@
|
||||
minetest.register_alias("junglegrass:shortest", "air")
|
||||
minetest.register_alias("junglegrass:short", "air")
|
||||
minetest.register_alias("junglegrass:medium", "air")
|
1
modpack.conf
Normal file
@ -0,0 +1 @@
|
||||
min_minetest_version = 5.2.0
|
@ -1,2 +0,0 @@
|
||||
default
|
||||
biome_lib
|
@ -1,15 +1,16 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Mole Hills"
|
||||
local version = "0.0.3"
|
||||
local mname = "molehills"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Idea by Sokomine
|
||||
-- Code & textures by Mossmanikin
|
||||
|
||||
abstract_molehills = {}
|
||||
|
||||
dofile(minetest.get_modpath("molehills").."/molehills_settings.txt")
|
||||
local molehills_rarity = tonumber(minetest.settings:get("molehills_rarity")) or 99.5
|
||||
local molehills_rarity_fertility = tonumber(minetest.settings:get("molehills_rarity_fertility")) or 1
|
||||
local molehills_fertility = tonumber(minetest.settings:get("molehills_fertility")) or -0.6
|
||||
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("molehills")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- NoDe
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -22,9 +23,10 @@ local mh_cbox = {
|
||||
minetest.register_node("molehills:molehill",{
|
||||
drawtype = "mesh",
|
||||
mesh = "molehill_molehill.obj",
|
||||
description = "Mole Hill",
|
||||
description = S("Mole Hill"),
|
||||
inventory_image = "molehills_side.png",
|
||||
tiles = { "molehills_dirt.png" },
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
selection_box = mh_cbox,
|
||||
collision_box = mh_cbox,
|
||||
@ -47,32 +49,27 @@ minetest.register_craft({ -- molehills --> dirt
|
||||
-- GeNeRaTiNG
|
||||
-----------------------------------------------------------------------------------------------
|
||||
abstract_molehills.place_molehill = function(pos)
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z-1}).name ~= "air" then
|
||||
minetest.set_node(right_here, {name="molehills:molehill"})
|
||||
minetest.swap_node(right_here, {name="molehills:molehill"})
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Molehills_Max_Count,
|
||||
rarity = Molehills_Rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
|
||||
avoid_radius = 4,
|
||||
plantlife_limit = -0.3,
|
||||
},
|
||||
abstract_molehills.place_molehill
|
||||
pl.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
noise_params = pl.generate_noise_params({rarity = molehills_rarity, rarity_fertility = molehills_rarity_fertility}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"},
|
||||
avoid_radius = 4,
|
||||
},
|
||||
"molehills:molehills",
|
||||
abstract_molehills.place_molehill
|
||||
)
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|