Charakterbewegungen hinzugefügt, Deko hinzugefügt, Kochrezepte angepasst

This commit is contained in:
N-Nachtigal 2025-05-14 16:36:42 +02:00
parent 95945c0306
commit a0c893ca0b
1124 changed files with 64294 additions and 763 deletions

11
mods/moreblocks/.cdb.json Normal file
View file

@ -0,0 +1,11 @@
{
"type": "MOD",
"name": "moreblocks",
"title": "moreblocks and stairsplus",
"short_description": "adds various blocks to the game",
"repo": "https://github.com/fluxionary/minetest-moreblocks.git",
"website": "https://github.com/fluxionary/minetest-moreblocks",
"issue_tracker": "https://github.com/fluxionary/minetest-moreblocks/issues",
"license": "LGPL-3.0-or-later",
"media_license": "CC-BY-SA-4.0"
}

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
grep $(date -u -I) modpack.conf &&
grep $(date -u -I) invsaw/mod.conf &&
grep $(date -u -I) moreblocks/mod.conf &&
grep $(date -u -I) moreblocks_legacy_recipes/mod.conf &&
grep $(date -u -I) stairs/mod.conf &&
grep $(date -u -I) stairsplus/mod.conf &&
grep $(date -u -I) stairsplus_legacy/mod.conf
exit $?

View file

@ -0,0 +1,14 @@
# See https://editorconfig.org/
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.{lua,luacheckrc}]
indent_style = tab

View file

@ -0,0 +1,34 @@
name: pre-commit
on: [push, pull_request, workflow_dispatch]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: update
run: sudo apt-get update -y
- uses: actions/checkout@master
- uses: actions/setup-python@master
- name: install luarocks
run: sudo apt-get install -y luarocks
- name: add luarocks path
run: echo "$HOME/.luarocks/bin" >> $GITHUB_PATH
- name: luacheck install
run: luarocks install --local luacheck
- name: install cargo
run: sudo apt-get install -y cargo
- name: install stylua
run: cargo install stylua
- name: Install pre-commit
run: pip3 install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files

7
mods/moreblocks/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
/stairsplus/scripts/dump.json
/stairsplus/scripts/pg_connection
/stairsplus/scripts/schems/
/stairsplus/scripts/tmp
/stairsplus/scripts/venv/
/stairsplus/scripts/crap/
/stairsplus/scripts/output

View file

@ -0,0 +1,69 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [ --fix=lf ]
- repo: local
hooks:
- id: detect_debug
name: detect debug
language: pygrep
entry: DEBUG
pass_filenames: true
exclude: .pre-commit-config.yaml
fail_fast: true
- id: date_version
name: date version
language: script
entry: .check_date.sh
files: modpack.conf, mod.conf
always_run: true
fail_fast: true
- id: stylua
name: stylua
language: system
entry: stylua
pass_filenames: true
types: [ file, lua ]
fail_fast: true
- id: luacheck_invsaw
name: luacheck_invsaw
language: system
entry: luacheck
pass_filenames: false
args: [--config,./invsaw/.luacheckrc,-q,./invsaw]
- id: luacheck_moreblocks
name: luacheck_moreblocks
language: system
entry: luacheck
pass_filenames: false
args: [--config,./moreblocks/.luacheckrc,-q,./moreblocks]
- id: luacheck_moreblocks_legacy_recipes
name: luacheck_moreblocks_legacy_recipes
language: system
entry: luacheck
pass_filenames: false
args: [--config,./moreblocks_legacy_recipes/.luacheckrc,-q,./moreblocks_legacy_recipes]
- id: luacheck_stairs
name: luacheck_stairs
language: system
entry: luacheck
pass_filenames: false
args: [--config,./stairs/.luacheckrc,-q,./stairs]
- id: luacheck_stairsplus
name: luacheck_stairsplus
language: system
entry: luacheck
pass_filenames: false
args: [--config,./stairsplus/.luacheckrc,-q,./stairsplus]
- id: luacheck_stairsplus_legacy
name: luacheck_stairsplus_legacy
language: system
entry: luacheck
pass_filenames: false
args: [--config,./stairsplus_legacy/.luacheckrc,-q,./stairsplus_legacy]

168
mods/moreblocks/LICENSE.txt Normal file
View file

@ -0,0 +1,168 @@
this license is for the code.
any non-code media included in this repository is covered by the contents of MEDIA_LICENSE.txt.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
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.
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. Additional Definitions.
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.
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.
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".
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.
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.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
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:
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
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
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:
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.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
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:
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.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
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.
d) Do one of the following:
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.
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.

View file

@ -0,0 +1,427 @@
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.

165
mods/moreblocks/README.md Normal file
View file

@ -0,0 +1,165 @@
# moreblocks and stairsplus
more blocks for [minetest](https://www.minetest.net/), a free and open source infinite
world block sandbox game.
![Screenshot](https://github.com/fluxionary/minetest-moreblocks/raw/bugfixes/screenshot.png)
stairsplus adds a large variety of new shapes for registered nodes:
![Screenshot](https://github.com/fluxionary/minetest-moreblocks/raw/bugfixes/screenshot2.png)
![Screenshot](https://github.com/fluxionary/minetest-moreblocks/raw/bugfixes/screenshot3.png)
this is a fork of the version maintained by the minetest-mods group at https://github.com/minetest-mods/moreblocks.
it provides numerous new features and bugfixes and is designed to reduce the number of registered nodes, to avoid
the node ID limit.
# mods in the pack
## moreblocks
defines a bunch of new kinds of nodes. provides an API for creating variants of some nodes.
## moreblocks_legacy_recipes
provided to keep compatibility w/ recipe changes from older versions of moreblocks. disabled by default.
## stairsplus
allows the creation of 49 new shapes for registered nodes. provides an API for registering new shapes.
## stairsplus_legacy
stairsplus registrations for various mods which were formerly done automatically as part of moreblocks.
## stairs
overrides the stairs mod from minetest_game to use stairsplus behind the scenes, to avoid duplication of nodes.
## invsaw
adds a button in unified_inventory that allows you to use the circular saw interface if you are
playing creatively, or have a circular saw item in your inventory and have the right priv
(`interact`, by default).
invsaw was taken from [cheapie's invsaw mod](https://forum.minetest.net/viewtopic.php?t=14736), which
itself borrowed heavily from an older version of this mod. Flux decided to just add it here because it
needed to be fully rewritten to be compatible w/ their modifications to the stairsplus API.
# documentation
## for players
use of a decent inventory manager (e.g.
[unified_inventory](https://content.minetest.net/packages/RealBadAngel/unified_inventory/) or
[i3](https://content.minetest.net/packages/jp/i3/)) will help you figure out how to craft various nodes.
## for admins
### minetest version compatibility
more blocks is only tested against up-to-date minetest. Issues arising in older versions will generally not be fixed.
### legacy mode
the 2023-02-01 release of moreblocks introduces a "legacy" mode, which is on by default, and is meant to
allow new servers to not commit to creating as many nodes as older versions, while not breaking anything
on existing servers. See `settingtypes.txt` for available settings.
by defaul the 2023-02-01 release disables certain recipe overrides that were part of moreblocks 2.*. to re-enable
them, set `moreblocks_legacy_recipes.enabled = true`.
### settings
see `settingtypes.txt` for available settings.
### dependencies
moreblocks and stairsplus do not have hard dependencies on other mods. invsaw depends on `unified_inventory`
and stairsplus.
### compatability
moreblocks currently supports resources from a number of mods and minetest_game. without these installed,
some things may not be craftable, may have low-quality textures, or may not have "node sounds" registered.
if available, resources will be used from `bucket`, `default`, `rhotator`, `screwdriver`, and `vessels`.
if the `stairsplus_legacy` mod is enabled, stairsplus nodes will automatically be registered for the following
mods, if they are available: `basic_materials`, `default`, `farming`, `gloopblocks`, `prefab`, `technic`,
and `wool`.
### stairsplus whitelist mode
stairsplus can add a *lot* of nodes to the world - it comes with 49 shape variants! this can lead to big problems,
because minetest can only handle 32767 different kinds of nodes at the same time. that means, you can at maximum
create all possible variants for 655 distinct nodes. even fewer variations are possible if you want to use other
mods at the same time.
in order to reduce the number of registered nodes, stairsplus can be run in *whitelist mode*, which means that only
nodes listed in a certain file (`$WORLDPATH/stairsplus.whitelist`) will actually get registered (see note 1 below).
to enable whitelist mode, set `stairsplus.whitelist_mode = true` in minetest.conf.
additionally stairsplus comes w/ tools to automatically create a whitelist for existing worlds, so that server
operators can reap the benefits of whitelist mode without ending up w/ tons of "unknown" nodes. first, before enabling
whitelist mode, run the `/dump_stairsplus_registered_nodes` command to generate `$WORLDPATH/stairsplus_dump.json`,
which will be used in the next step. generating this file should be quick and painless.
the next step is *not* necessarily quick and painless. you will need to run a provided python script, located at
`moreblocks/stairsplus/scripts/create_whitelist.py`. this script can only process sqlite and postgres map backends.
additionally, this script only works w/ map serialization version 29, introduced with minetest 5.7.0. if you are
not running 5.7.0, you will have to upgrade and migrate your database (`--recompress`). additionally, while the script
is fairly efficient and makes use of multiple threads, it is still slow, and you will have to shut your server down
for the duration of the execution of this script, or run it against a backup database.
the script requires several non-standard python modules be installed, listed in
`moreblocks/stairsplus/scripts/requirements.txt`.
to run the script against a sqlite database, execute
```bash
python create_whitelist.py -s $WORLDPATH/map.sqlite $WORLDPATH/stairsplus_dump.json
```
for postgres, fill in the correct connection string for your database:
```bash
python create_whitelist.py -p "host=127.0.0.1 user=minetest password=pass dbname=minetest" $WORLDPATH/stairsplus_dump.json
```
both of these commands will generate `$WORLDPATH/stairsplus.whitelist` if successful. while running, an estimate
of how much more time is needed for the script to complete will be provided.
notes:
1. micro_\*_8 variants are always registered, as they are fundamental to the functionality of the mod.
### migrating schemas
stairsplus also comes with a script which can migrate blocks in minetest schemas and worldedit save files to their new
names in stairsplus. without this, trying to load schemas saved while using old stairsplus may cause a server crash.
first, create the `stairsplus_dump.json` file mentioned in whitelist mode. next, run
```bash
python translate_schems.py $WORLDPATH/stairsplus_dump.json $WORLDPATH/schems
```
## for mod makers
See moreblocks/API.md and stairsplus/API.md.
# license
## moreblocks, stairsplus, stairsplus_legacy, moreblocks_legacy_recipes
* © 2011-2022 Hugo Locurcio and contributors under the zlib license
* © 2023- fluxionary under the LGPL v3+
- unless otherwise specified, textures are licensed under
[CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).
- `moreblocks_copperpatina.png` was created by pithydon, and is licensed under
[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
- `stairsplus_saw_button.png` CC BY-SA 3.0 Unported
## invsaw
* © 2022 cheapie and contributors under the zlib license
* © 2023- fluxionary under the LGPL v3+

View file

@ -0,0 +1,657 @@
std = "lua51+luajit+minetest+invsaw"
unused_args = false
max_line_length = 120
stds.minetest = {
read_globals = {
"DIR_DELIM",
"dump",
"dump2",
math = {
fields = {
abs = {},
acos = {},
asin = {},
atan = {},
atan2 = {},
ceil = {},
cos = {},
cosh = {},
deg = {},
exp = {},
factorial = {},
floor = {},
fmod = {},
frexp = {},
huge = {},
hypot = {},
ldexp = {},
log = {},
log10 = {},
max = {},
min = {},
modf = {},
pi = {},
pow = {},
rad = {},
random = {},
randomseed = {},
round = {},
sign = {},
sin = {},
sinh = {},
sqrt = {},
tan = {},
tanh = {},
},
},
table = {
fields = {
copy = {},
concat = {},
foreach = {},
foreachi = {},
getn = {},
indexof = {},
insert = {},
insert_all = {},
key_value_swap = {},
maxn = {},
move = {},
remove = {},
shuffle = {},
sort = {},
},
},
string = {
fields = {
byte = {},
char = {},
dump = {},
find = {},
format = {},
gmatch = {},
len = {},
lower = {},
match = {},
rep = {},
reverse = {},
split = {},
sub = {},
trim = {},
upper = {},
},
},
vector = {
fields = {
add = {},
angle = {},
apply = {},
check = {},
combine = {},
copy = {},
cross = {},
dir_to_rotation = {},
direction = {},
distance = {},
divide = {},
dot = {},
equals = {},
floor = {},
from_string = {},
length = {},
metatable = {},
multiply = {},
new = {},
normalize = {},
offset = {},
rotate = {},
rotate_around_axis = {},
round = {},
sort = {},
subtract = {},
to_string = {},
zero = {},
},
},
ItemStack = {
fields = {
add_item = {},
add_wear = {},
add_wear_by_uses = {},
clear = {},
get_count = {},
get_definition = {},
get_description = {},
get_free_space = {},
get_meta = {},
get_metadata = {},
get_name = {},
get_short_description = {},
get_stack_max = {},
get_tool_capabilities = {},
get_wear = {},
is_empty = {},
is_known = {},
item_fits = {},
peek_item = {},
replace = {},
set_count = {},
set_metadata = {},
set_name = {},
set_wear = {},
take_item = {},
to_string = {},
to_table = {},
},
},
PerlinNoise = {
fields = {
get_2d = {},
get_3d = {},
},
},
PerlinNoiseMap = {
fields = {
calc_2d_map = {},
calc_3d_map = {},
get_2d_map = {},
get_2d_map_flat = {},
get_3d_map = {},
get_3d_map_flat = {},
get_map_slice = {},
},
},
PseudoRandom = {
fields = {
next = {},
},
},
PcgRandom = {
fields = {
next = {},
rand_normal_dist = {},
},
},
SecureRandom = {
fields = {
next_bytes = {},
},
},
Settings = {
fields = {
get = {},
get_bool = {},
get_flags = {},
get_names = {},
get_np_group = {},
remove = {},
set = {},
set_bool = {},
set_np_group = {},
to_table = {},
write = {},
},
},
VoxelArea = {
fields = {
MaxEdge = {},
MinEdge = {},
contains = {},
containsi = {},
containsp = {},
getExtent = {},
getVolume = {},
index = {},
indexp = {},
iter = {},
iterp = {},
new = {},
position = {},
ystride = {},
zstride = {},
},
},
VoxelManip = {
fields = {
calc_lighting = {},
get_data = {},
get_emerged_area = {},
get_light_data = {},
get_node_at = {},
get_param2_data = {},
read_from_map = {},
set_data = {},
set_light_data = {},
set_lighting = {},
set_node_at = {},
set_param2_data = {},
update_liquids = {},
update_map = {},
was_modified = {},
write_to_map = {},
},
},
minetest = {
fields = {
CONTENT_AIR = {},
CONTENT_IGNORE = {},
CONTENT_UNKNOWN = {},
EMERGE_CANCELLED = {},
EMERGE_ERRORED = {},
EMERGE_FROM_DISK = {},
EMERGE_FROM_MEMORY = {},
EMERGE_GENERATED = {},
LIGHT_MAX = {},
MAP_BLOCKSIZE = {},
PLAYER_MAX_BREATH_DEFAULT = {},
PLAYER_MAX_HP_DEFAULT = {},
add_entity = {},
add_item = {},
add_node = {},
add_node_level = {},
add_particle = {},
add_particlespawner = {},
after = {},
async_event_handler = {},
async_jobs = {},
auth_reload = {},
ban_player = {},
builtin_auth_handler = {},
bulk_set_node = {},
calculate_knockback = {},
callback_origins = {},
cancel_shutdown_requests = {},
chat_send_all = {},
chat_send_player = {},
chatcommands = {},
check_for_falling = {},
check_password_entry = {},
check_player_privs = {},
check_single_for_falling = {},
clear_craft = {},
clear_objects = {},
clear_registered_biomes = {},
clear_registered_decorations = {},
clear_registered_ores = {},
clear_registered_schematics = {},
close_formspec = {},
colorize = {},
colorspec_to_bytes = {},
colorspec_to_colorstring = {},
compare_block_status = {},
compress = {},
cpdir = {},
craft_predict = {},
craftitemdef_default = {},
create_detached_inventory = {},
create_detached_inventory_raw = {},
create_schematic = {},
debug = {},
decode_base64 = {},
decompress = {},
delete_area = {},
delete_particlespawner = {},
deserialize = {},
detached_inventories = {},
dig_node = {},
dir_to_facedir = {},
dir_to_wallmounted = {},
dir_to_yaw = {},
disconnect_player = {},
do_async_callback = {},
do_item_eat = {},
dynamic_add_media = {},
dynamic_media_callbacks = {},
emerge_area = {},
encode_base64 = {},
encode_png = {},
env = {},
explode_scrollbar_event = {},
explode_table_event = {},
explode_textlist_event = {},
facedir_to_dir = {},
features = {},
find_node_near = {},
find_nodes_in_area = {},
find_nodes_in_area_under_air = {},
find_nodes_with_meta = {},
find_path = {},
fix_light = {},
forceload_block = {},
forceload_free_block = {},
format_chat_message = {},
formspec_escape = {},
generate_decorations = {},
generate_ores = {},
get_all_craft_recipes = {},
get_artificial_light = {},
get_auth_handler = {},
get_background_escape_sequence = {},
get_ban_description = {},
get_ban_list = {},
get_biome_data = {},
get_biome_id = {},
get_biome_name = {},
get_builtin_path = {},
get_color_escape_sequence = {},
get_connected_players = {},
get_content_id = {},
get_craft_recipe = {},
get_craft_result = {},
get_current_modname = {},
get_day_count = {},
get_decoration_id = {},
get_dig_params = {},
get_dir_list = {},
get_gametime = {},
get_gen_notify = {},
get_heat = {},
get_hit_params = {},
get_humidity = {},
get_inventory = {},
get_item_group = {},
get_last_run_mod = {},
get_mapgen_object = {},
get_mapgen_params = {},
get_mapgen_setting = {},
get_mapgen_setting_noiseparams = {},
get_meta = {},
get_mod_storage = {},
get_modnames = {},
get_modpath = {},
get_name_from_content_id = {},
get_natural_light = {},
get_node = {},
get_node_drops = {},
get_node_group = {},
get_node_level = {},
get_node_light = {},
get_node_max_level = {},
get_node_or_nil = {},
get_node_timer = {},
get_noiseparams = {},
get_objects_in_area = {},
get_objects_inside_radius = {},
get_password_hash = {},
get_perlin = {},
get_perlin_map = {},
get_player_by_name = {},
get_player_information = {},
get_player_ip = {},
get_player_privs = {},
get_player_radius_area = {},
get_pointed_thing_position = {},
get_position_from_hash = {},
get_server_max_lag = {},
get_server_status = {},
get_server_uptime = {},
get_spawn_level = {},
get_timeofday = {},
get_tool_wear_after_use = {},
get_translated_string = {},
get_translator = {},
get_us_time = {},
get_user_path = {},
get_version = {},
get_voxel_manip = {},
get_worldpath = {},
global_exists = {},
handle_async = {},
handle_node_drops = {},
has_feature = {},
hash_node_position = {},
hud_replace_builtin = {},
inventorycube = {},
is_area_protected = {},
is_colored_paramtype = {},
is_creative_enabled = {},
is_nan = {},
is_player = {},
is_protected = {},
is_singleplayer = {},
is_yes = {},
item_drop = {},
item_eat = {},
item_place = {},
item_place_node = {},
item_place_object = {},
item_secondary_use = {},
itemstring_with_color = {},
itemstring_with_palette = {},
kick_player = {},
line_of_sight = {},
load_area = {},
log = {},
luaentities = {},
mkdir = {},
mod_channel_join = {},
mvdir = {},
node_dig = {},
node_punch = {},
nodedef_default = {},
noneitemdef_default = {},
notify_authentication_modified = {},
object_refs = {},
on_craft = {},
override_chatcommand = {},
override_item = {},
parse_coordinates = {},
parse_json = {},
parse_relative_number = {},
place_node = {},
place_schematic = {},
place_schematic_on_vmanip = {},
player_exists = {},
pointed_thing_to_face_pos = {},
pos_to_string = {},
print = {},
privs_to_string = {},
punch_node = {},
raillike_group = {},
raycast = {},
read_schematic = {},
record_protection_violation = {},
register_abm = {},
register_alias = {},
register_alias_force = {},
register_allow_player_inventory_action = {},
register_async_dofile = {},
register_authentication_handler = {},
register_biome = {},
register_can_bypass_userlimit = {},
register_chatcommand = {},
register_craft = {},
register_craft_predict = {},
register_craftitem = {},
register_decoration = {},
register_entity = {},
register_globalstep = {},
register_item = {},
register_lbm = {},
register_node = {},
register_on_auth_fail = {},
register_on_authplayer = {},
register_on_chat_message = {},
register_on_chatcommand = {},
register_on_cheat = {},
register_on_craft = {},
register_on_dieplayer = {},
register_on_dignode = {},
register_on_generated = {},
register_on_item_eat = {},
register_on_joinplayer = {},
register_on_leaveplayer = {},
register_on_liquid_transformed = {},
register_on_mapgen_init = {},
register_on_modchannel_message = {},
register_on_mods_loaded = {},
register_on_newplayer = {},
register_on_placenode = {},
register_on_player_hpchange = {},
register_on_player_inventory_action = {},
register_on_player_receive_fields = {},
register_on_prejoinplayer = {},
register_on_priv_grant = {},
register_on_priv_revoke = {},
register_on_protection_violation = {},
register_on_punchnode = {},
register_on_punchplayer = {},
register_on_respawnplayer = {},
register_on_rightclickplayer = {},
register_on_shutdown = {},
register_ore = {},
register_playerevent = {},
register_privilege = {},
register_schematic = {},
register_tool = {},
registered_abms = {other_fields = true},
registered_aliases = {other_fields = true},
registered_allow_player_inventory_actions = {other_fields = true},
registered_biomes = {other_fields = true},
registered_can_bypass_userlimit = {other_fields = true},
registered_chatcommands = {other_fields = true},
registered_craft_predicts = {other_fields = true},
registered_craftitems = {other_fields = true},
registered_decorations = {other_fields = true},
registered_entities = {other_fields = true},
registered_globalsteps = {other_fields = true},
registered_items = {other_fields = true},
registered_lbms = {other_fields = true},
registered_nodes = {other_fields = true},
registered_on_authplayers = {other_fields = true},
registered_on_chat_messages = {other_fields = true},
registered_on_chatcommands = {other_fields = true},
registered_on_cheats = {other_fields = true},
registered_on_crafts = {other_fields = true},
registered_on_dieplayers = {other_fields = true},
registered_on_dignodes = {other_fields = true},
registered_on_generateds = {other_fields = true},
registered_on_item_eats = {other_fields = true},
registered_on_joinplayers = {other_fields = true},
registered_on_leaveplayers = {other_fields = true},
registered_on_liquid_transformed = {other_fields = true},
registered_on_modchannel_message = {other_fields = true},
registered_on_mods_loaded = {other_fields = true},
registered_on_newplayers = {other_fields = true},
registered_on_placenodes = {other_fields = true},
registered_on_player_hpchange = {other_fields = true},
registered_on_player_hpchanges = {other_fields = true},
registered_on_player_inventory_actions = {other_fields = true},
registered_on_player_receive_fields = {other_fields = true},
registered_on_prejoinplayers = {other_fields = true},
registered_on_priv_grant = {other_fields = true},
registered_on_priv_revoke = {other_fields = true},
registered_on_protection_violation = {other_fields = true},
registered_on_punchnodes = {other_fields = true},
registered_on_punchplayers = {other_fields = true},
registered_on_respawnplayers = {other_fields = true},
registered_on_rightclickplayers = {other_fields = true},
registered_on_shutdown = {other_fields = true},
registered_ores = {other_fields = true},
registered_playerevents = {other_fields = true},
registered_privileges = {other_fields = true},
registered_tools = {other_fields = true},
remove_detached_inventory = {},
remove_detached_inventory_raw = {},
remove_node = {},
remove_player = {},
remove_player_auth = {},
request_http_api = {},
request_insecure_environment = {},
request_shutdown = {},
rgba = {},
rmdir = {},
rollback_get_last_node_actor = {},
rollback_get_node_actions = {},
rollback_punch_callbacks = {},
rollback_revert_actions_by = {},
rotate_and_place = {},
rotate_node = {},
run_callbacks = {},
run_priv_callbacks = {},
safe_file_write = {},
send_join_message = {},
send_leave_message = {},
serialize = {},
serialize_roundtrip = {},
serialize_schematic = {},
set_gen_notify = {},
set_last_run_mod = {},
set_mapgen_params = {},
set_mapgen_setting = {},
set_mapgen_setting_noiseparams = {},
set_node = {},
set_node_level = {},
set_noiseparams = {},
set_player_password = {},
set_player_privs = {},
set_timeofday = {},
setting_get = {},
setting_get_pos = {},
setting_getbool = {},
setting_save = {},
setting_set = {},
setting_setbool = {},
settings = {
fields = {
get = {},
get_bool = {},
get_np_group = {},
get_flags = {},
set = {},
set_bool = {},
set_np_group = {},
remove = {},
get_names = {},
write = {},
to_table = {},
},
},
sha1 = {},
show_formspec = {},
show_general_help_formspec = {},
show_privs_help_formspec = {},
sound_fade = {},
sound_play = {},
sound_stop = {},
spawn_falling_node = {},
spawn_item = {},
spawn_tree = {},
string_to_area = {},
string_to_pos = {},
string_to_privs = {},
strip_background_colors = {},
strip_colors = {},
strip_foreground_colors = {},
strip_param2_color = {},
swap_node = {},
tooldef_default = {},
transforming_liquid_add = {},
translate = {},
unban_player_or_ip = {},
unregister_biome = {},
unregister_chatcommand = {},
unregister_item = {},
wallmounted_to_dir = {},
wrap_text = {},
write_json = {},
yaw_to_dir = {},
},
},
}
}
stds.invsaw = {
globals = {
"invsaw",
},
read_globals = {
"fmod",
"stairsplus",
"unified_inventory",
},
}

View file

@ -0,0 +1,32 @@
local server_is_creative = minetest.settings:get_bool("creative_mode", false)
function invsaw.has_saw_in_inventory(player)
local inv = player:get_inventory()
return inv:contains_item("main", invsaw.settings.saw_item)
end
function invsaw.can_use_saw(player)
return (
server_is_creative
or minetest.check_player_privs(player, invsaw.settings.creative_priv)
or minetest.check_player_privs(player, invsaw.settings.priv)
)
end
function invsaw.allow_use_saw(player)
return (
server_is_creative
or minetest.check_player_privs(player, invsaw.settings.creative_priv)
or (minetest.check_player_privs(player, invsaw.settings.priv) and invsaw.has_saw_in_inventory(player))
)
end
function invsaw.check_use_status(player)
if invsaw.can_use_saw(player) then
invsaw.initialize_inventory(player)
else
invsaw.drop_inventory(player)
end
end
minetest.register_on_joinplayer(invsaw.check_use_status)

View file

@ -0,0 +1,29 @@
local station = stairsplus.api.station
local circular_saw = stairsplus.api.circular_saw
function invsaw.show_formspec(player)
local name = player:get_player_name()
local meta = player:get_meta()
local inv = player:get_inventory()
minetest.show_formspec(name, "invsaw", circular_saw.build_formspec(meta, inv))
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
local meta = player:get_meta()
local inv = player:get_inventory()
if fields.saw then
if invsaw.allow_use_saw(player) then
invsaw.show_formspec(player)
end
return true
elseif station.on_receive_fields(meta, inv, formname, fields, player) then
if invsaw.allow_use_saw(player) then
invsaw.show_formspec(player)
end
return true
end
end)

View file

@ -0,0 +1,9 @@
invsaw = fmod.create()
invsaw.users = {}
invsaw.dofile("privs")
invsaw.dofile("api")
invsaw.dofile("inventory")
invsaw.dofile("formspec")
invsaw.dofile("unified_inventory")

View file

@ -0,0 +1,78 @@
local station = stairsplus.api.station
function invsaw.initialize_inventory(player)
local meta = player:get_meta()
local inv = player:get_inventory()
station.initialize_metadata(meta, inv, { "legacy" })
station.initialize_inventory(inv, { "legacy" })
end
function invsaw.drop_inventory(player)
local pos = player:get_pos()
local inv = player:get_inventory()
for _, listname in ipairs({ "stairsplus:input", "stairsplus:micro", "stairsplus:recycle" }) do
for i = 1, inv:get_size(listname) do
local item = inv:get_stack(listname, i)
if not item:is_empty() then
minetest.add_item(pos, item)
end
end
inv:set_size(listname, 0)
end
inv:set_size("stairsplus:output", 0)
end
local function is_stairsplus_inventory(listname)
return (
listname == "stairsplus:input"
or listname == "stairsplus:micro"
or listname == "stairsplus:recycle"
or listname == "stairsplus:output"
)
end
minetest.register_allow_player_inventory_action(function(player, action, inv, info)
local meta = player:get_meta()
if action == "move" then
local from_is_stairsplus = is_stairsplus_inventory(info.from_list)
local to_is_stairsplus = is_stairsplus_inventory(info.to_list)
if from_is_stairsplus and to_is_stairsplus then
return station.allow_inventory_move(
meta,
inv,
info.from_list,
info.from_index,
info.to_list,
info.to_index,
info.count,
player
)
elseif to_is_stairsplus then
local stack = inv:get_stack(info.from_list, info.from_index)
return station.allow_inventory_put(meta, inv, info.to_list, info.to_index, stack, player)
end
elseif action == "put" and is_stairsplus_inventory(info.listname) then
return station.allow_inventory_put(meta, inv, info.listname, info.index, info.stack, player)
end
end)
minetest.register_on_player_inventory_action(function(player, action, inv, info)
local meta = player:get_meta()
if action == "move" and is_stairsplus_inventory(info.from_list) and not is_stairsplus_inventory(info.to_list) then
local stack = inv:get_stack(info.to_list, info.to_index)
stack:set_count(info.count)
station.on_inventory_take(meta, inv, info.from_list, info.from_index, stack, player)
elseif
action == "move"
and not is_stairsplus_inventory(info.from_list)
and is_stairsplus_inventory(info.to_list)
then
local stack = inv:get_stack(info.from_list, info.from_index)
station.on_inventory_put(meta, inv, info.to_list, info.to_index, stack, player)
elseif action == "put" and is_stairsplus_inventory(info.listname) then
station.on_inventory_put(meta, inv, info.listname, info.index, info.stack, player)
elseif action == "take" and is_stairsplus_inventory(info.listname) then
station.on_inventory_take(meta, inv, info.listname, info.index, info.stack, player)
end
end)

View file

@ -0,0 +1,3 @@
# textdomain: invsaw
Circular Saw=

View file

@ -0,0 +1,3 @@
# textdomain: invsaw
Circular Saw=Циркулярная пила

View file

@ -0,0 +1,9 @@
name = invsaw
title = inventory saw
description = "circular saw in the unified inventory"
website = https://content.minetest.net/packages/rheo/moreblocks/.
author = Hugo Locurcio, fluxionary, others (see commit log)
license = LGPL-3.0-or-later
media_license = CC-BY-SA-4.0
version = 2024-12-23
depends = fmod, stairsplus, unified_inventory

View file

@ -0,0 +1,48 @@
-- luacheck: globals minetest
local creative_priv = invsaw.settings.creative_priv
local priv = invsaw.settings.priv
local function on_priv_change(name)
local player = minetest.get_player_by_name(name)
if player then
invsaw.check_use_status(player)
end
end
local function override_on_priv_change(old)
return function(name, cause)
on_priv_change(name)
if old then
old(name, cause)
end
end
end
if minetest.registered_privileges[priv] then
local def = minetest.registered_privileges[priv]
def.on_grant = override_on_priv_change(def.on_grant)
def.on_revoke = override_on_priv_change(def.on_revoke)
else
minetest.register_privilege(priv, {
description = "Allow use of the circular saw in inventory",
give_to_singleplayer = true,
give_to_admin = false,
on_grant = on_priv_change,
on_revoke = on_priv_change,
})
end
if minetest.registered_privileges[creative_priv] then
local def = minetest.registered_privileges[creative_priv]
def.on_grant = override_on_priv_change(def.on_grant)
def.on_revoke = override_on_priv_change(def.on_revoke)
else
minetest.register_privilege(creative_priv, {
description = "Allow use of the inventory saw creatively",
give_to_singleplayer = true,
give_to_admin = false,
on_grant = on_priv_change,
on_revoke = on_priv_change,
})
end

View file

@ -0,0 +1,8 @@
# Will be created if it doesn't already exist
invsaw.priv (Priv to use the inventory saw) string interact
# Will be created if it doesn't already exist
invsaw.creative_priv (Priv to use the inventory saw w/out a saw item) string creative
# The item that a normal player has to have to use the saw in inventory
invsaw.saw_item (Saw item) string stairsplus:circular_saw

View file

@ -0,0 +1,10 @@
local ui = unified_inventory
ui.register_button("saw", {
type = "image",
image = "stairsplus_saw_button.png",
tooltip = invsaw.S("Circular Saw"),
condition = function(player)
return invsaw.allow_use_saw(player)
end,
})

View file

@ -0,0 +1,11 @@
name = moreblocks
title = moreblocks and stairsplus
description = adds various blocks to the game
website = https://content.minetest.net/packages/rheo/moreblocks/.
author = rheo
license = LGPL-3.0-or-later
media_license = CC-BY-SA-4.0
version = 2024-12-23
min_minetest_version = 5.7.0
supported_games = *
release = 29489

View file

@ -0,0 +1,659 @@
std = "lua51+luajit+minetest+moreblocks"
unused_args = false
max_line_length = 120
stds.minetest = {
read_globals = {
"DIR_DELIM",
"dump",
"dump2",
math = {
fields = {
abs = {},
acos = {},
asin = {},
atan = {},
atan2 = {},
ceil = {},
cos = {},
cosh = {},
deg = {},
exp = {},
factorial = {},
floor = {},
fmod = {},
frexp = {},
huge = {},
hypot = {},
ldexp = {},
log = {},
log10 = {},
max = {},
min = {},
modf = {},
pi = {},
pow = {},
rad = {},
random = {},
randomseed = {},
round = {},
sign = {},
sin = {},
sinh = {},
sqrt = {},
tan = {},
tanh = {},
},
},
table = {
fields = {
copy = {},
concat = {},
foreach = {},
foreachi = {},
getn = {},
indexof = {},
insert = {},
insert_all = {},
key_value_swap = {},
maxn = {},
move = {},
remove = {},
shuffle = {},
sort = {},
},
},
string = {
fields = {
byte = {},
char = {},
dump = {},
find = {},
format = {},
gmatch = {},
len = {},
lower = {},
match = {},
rep = {},
reverse = {},
split = {},
sub = {},
trim = {},
upper = {},
},
},
vector = {
fields = {
add = {},
angle = {},
apply = {},
check = {},
combine = {},
copy = {},
cross = {},
dir_to_rotation = {},
direction = {},
distance = {},
divide = {},
dot = {},
equals = {},
floor = {},
from_string = {},
length = {},
metatable = {},
multiply = {},
new = {},
normalize = {},
offset = {},
rotate = {},
rotate_around_axis = {},
round = {},
sort = {},
subtract = {},
to_string = {},
zero = {},
},
},
ItemStack = {
fields = {
add_item = {},
add_wear = {},
add_wear_by_uses = {},
clear = {},
get_count = {},
get_definition = {},
get_description = {},
get_free_space = {},
get_meta = {},
get_metadata = {},
get_name = {},
get_short_description = {},
get_stack_max = {},
get_tool_capabilities = {},
get_wear = {},
is_empty = {},
is_known = {},
item_fits = {},
peek_item = {},
replace = {},
set_count = {},
set_metadata = {},
set_name = {},
set_wear = {},
take_item = {},
to_string = {},
to_table = {},
},
},
PerlinNoise = {
fields = {
get_2d = {},
get_3d = {},
},
},
PerlinNoiseMap = {
fields = {
calc_2d_map = {},
calc_3d_map = {},
get_2d_map = {},
get_2d_map_flat = {},
get_3d_map = {},
get_3d_map_flat = {},
get_map_slice = {},
},
},
PseudoRandom = {
fields = {
next = {},
},
},
PcgRandom = {
fields = {
next = {},
rand_normal_dist = {},
},
},
SecureRandom = {
fields = {
next_bytes = {},
},
},
Settings = {
fields = {
get = {},
get_bool = {},
get_flags = {},
get_names = {},
get_np_group = {},
remove = {},
set = {},
set_bool = {},
set_np_group = {},
to_table = {},
write = {},
},
},
VoxelArea = {
fields = {
MaxEdge = {},
MinEdge = {},
contains = {},
containsi = {},
containsp = {},
getExtent = {},
getVolume = {},
index = {},
indexp = {},
iter = {},
iterp = {},
new = {},
position = {},
ystride = {},
zstride = {},
},
},
VoxelManip = {
fields = {
calc_lighting = {},
get_data = {},
get_emerged_area = {},
get_light_data = {},
get_node_at = {},
get_param2_data = {},
read_from_map = {},
set_data = {},
set_light_data = {},
set_lighting = {},
set_node_at = {},
set_param2_data = {},
update_liquids = {},
update_map = {},
was_modified = {},
write_to_map = {},
},
},
minetest = {
fields = {
CONTENT_AIR = {},
CONTENT_IGNORE = {},
CONTENT_UNKNOWN = {},
EMERGE_CANCELLED = {},
EMERGE_ERRORED = {},
EMERGE_FROM_DISK = {},
EMERGE_FROM_MEMORY = {},
EMERGE_GENERATED = {},
LIGHT_MAX = {},
MAP_BLOCKSIZE = {},
PLAYER_MAX_BREATH_DEFAULT = {},
PLAYER_MAX_HP_DEFAULT = {},
add_entity = {},
add_item = {},
add_node = {},
add_node_level = {},
add_particle = {},
add_particlespawner = {},
after = {},
async_event_handler = {},
async_jobs = {},
auth_reload = {},
ban_player = {},
builtin_auth_handler = {},
bulk_set_node = {},
calculate_knockback = {},
callback_origins = {},
cancel_shutdown_requests = {},
chat_send_all = {},
chat_send_player = {},
chatcommands = {},
check_for_falling = {},
check_password_entry = {},
check_player_privs = {},
check_single_for_falling = {},
clear_craft = {},
clear_objects = {},
clear_registered_biomes = {},
clear_registered_decorations = {},
clear_registered_ores = {},
clear_registered_schematics = {},
close_formspec = {},
colorize = {},
colorspec_to_bytes = {},
colorspec_to_colorstring = {},
compare_block_status = {},
compress = {},
cpdir = {},
craft_predict = {},
craftitemdef_default = {},
create_detached_inventory = {},
create_detached_inventory_raw = {},
create_schematic = {},
debug = {},
decode_base64 = {},
decompress = {},
delete_area = {},
delete_particlespawner = {},
deserialize = {},
detached_inventories = {},
dig_node = {},
dir_to_facedir = {},
dir_to_wallmounted = {},
dir_to_yaw = {},
disconnect_player = {},
do_async_callback = {},
do_item_eat = {},
dynamic_add_media = {},
dynamic_media_callbacks = {},
emerge_area = {},
encode_base64 = {},
encode_png = {},
env = {},
explode_scrollbar_event = {},
explode_table_event = {},
explode_textlist_event = {},
facedir_to_dir = {},
features = {},
find_node_near = {},
find_nodes_in_area = {},
find_nodes_in_area_under_air = {},
find_nodes_with_meta = {},
find_path = {},
fix_light = {},
forceload_block = {},
forceload_free_block = {},
format_chat_message = {},
formspec_escape = {},
generate_decorations = {},
generate_ores = {},
get_all_craft_recipes = {},
get_artificial_light = {},
get_auth_handler = {},
get_background_escape_sequence = {},
get_ban_description = {},
get_ban_list = {},
get_biome_data = {},
get_biome_id = {},
get_biome_name = {},
get_builtin_path = {},
get_color_escape_sequence = {},
get_connected_players = {},
get_content_id = {},
get_craft_recipe = {},
get_craft_result = {},
get_current_modname = {},
get_day_count = {},
get_decoration_id = {},
get_dig_params = {},
get_dir_list = {},
get_gametime = {},
get_gen_notify = {},
get_heat = {},
get_hit_params = {},
get_humidity = {},
get_inventory = {},
get_item_group = {},
get_last_run_mod = {},
get_mapgen_object = {},
get_mapgen_params = {},
get_mapgen_setting = {},
get_mapgen_setting_noiseparams = {},
get_meta = {},
get_mod_storage = {},
get_modnames = {},
get_modpath = {},
get_name_from_content_id = {},
get_natural_light = {},
get_node = {},
get_node_drops = {},
get_node_group = {},
get_node_level = {},
get_node_light = {},
get_node_max_level = {},
get_node_or_nil = {},
get_node_timer = {},
get_noiseparams = {},
get_objects_in_area = {},
get_objects_inside_radius = {},
get_password_hash = {},
get_perlin = {},
get_perlin_map = {},
get_player_by_name = {},
get_player_information = {},
get_player_ip = {},
get_player_privs = {},
get_player_radius_area = {},
get_pointed_thing_position = {},
get_position_from_hash = {},
get_server_max_lag = {},
get_server_status = {},
get_server_uptime = {},
get_spawn_level = {},
get_timeofday = {},
get_tool_wear_after_use = {},
get_translated_string = {},
get_translator = {},
get_us_time = {},
get_user_path = {},
get_version = {},
get_voxel_manip = {},
get_worldpath = {},
global_exists = {},
handle_async = {},
handle_node_drops = {},
has_feature = {},
hash_node_position = {},
hud_replace_builtin = {},
inventorycube = {},
is_area_protected = {},
is_colored_paramtype = {},
is_creative_enabled = {},
is_nan = {},
is_player = {},
is_protected = {},
is_singleplayer = {},
is_yes = {},
item_drop = {},
item_eat = {},
item_place = {},
item_place_node = {},
item_place_object = {},
item_secondary_use = {},
itemstring_with_color = {},
itemstring_with_palette = {},
kick_player = {},
line_of_sight = {},
load_area = {},
log = {},
luaentities = {},
mkdir = {},
mod_channel_join = {},
mvdir = {},
node_dig = {},
node_punch = {},
nodedef_default = {},
noneitemdef_default = {},
notify_authentication_modified = {},
object_refs = {},
on_craft = {},
override_chatcommand = {},
override_item = {},
parse_coordinates = {},
parse_json = {},
parse_relative_number = {},
place_node = {},
place_schematic = {},
place_schematic_on_vmanip = {},
player_exists = {},
pointed_thing_to_face_pos = {},
pos_to_string = {},
print = {},
privs_to_string = {},
punch_node = {},
raillike_group = {},
raycast = {},
read_schematic = {},
record_protection_violation = {},
register_abm = {},
register_alias = {},
register_alias_force = {},
register_allow_player_inventory_action = {},
register_async_dofile = {},
register_authentication_handler = {},
register_biome = {},
register_can_bypass_userlimit = {},
register_chatcommand = {},
register_craft = {},
register_craft_predict = {},
register_craftitem = {},
register_decoration = {},
register_entity = {},
register_globalstep = {},
register_item = {},
register_lbm = {},
register_node = {},
register_on_auth_fail = {},
register_on_authplayer = {},
register_on_chat_message = {},
register_on_chatcommand = {},
register_on_cheat = {},
register_on_craft = {},
register_on_dieplayer = {},
register_on_dignode = {},
register_on_generated = {},
register_on_item_eat = {},
register_on_joinplayer = {},
register_on_leaveplayer = {},
register_on_liquid_transformed = {},
register_on_mapgen_init = {},
register_on_modchannel_message = {},
register_on_mods_loaded = {},
register_on_newplayer = {},
register_on_placenode = {},
register_on_player_hpchange = {},
register_on_player_inventory_action = {},
register_on_player_receive_fields = {},
register_on_prejoinplayer = {},
register_on_priv_grant = {},
register_on_priv_revoke = {},
register_on_protection_violation = {},
register_on_punchnode = {},
register_on_punchplayer = {},
register_on_respawnplayer = {},
register_on_rightclickplayer = {},
register_on_shutdown = {},
register_ore = {},
register_playerevent = {},
register_privilege = {},
register_schematic = {},
register_tool = {},
registered_abms = {other_fields = true},
registered_aliases = {other_fields = true},
registered_allow_player_inventory_actions = {other_fields = true},
registered_biomes = {other_fields = true},
registered_can_bypass_userlimit = {other_fields = true},
registered_chatcommands = {other_fields = true},
registered_craft_predicts = {other_fields = true},
registered_craftitems = {other_fields = true},
registered_decorations = {other_fields = true},
registered_entities = {other_fields = true},
registered_globalsteps = {other_fields = true},
registered_items = {other_fields = true},
registered_lbms = {other_fields = true},
registered_nodes = {other_fields = true},
registered_on_authplayers = {other_fields = true},
registered_on_chat_messages = {other_fields = true},
registered_on_chatcommands = {other_fields = true},
registered_on_cheats = {other_fields = true},
registered_on_crafts = {other_fields = true},
registered_on_dieplayers = {other_fields = true},
registered_on_dignodes = {other_fields = true},
registered_on_generateds = {other_fields = true},
registered_on_item_eats = {other_fields = true},
registered_on_joinplayers = {other_fields = true},
registered_on_leaveplayers = {other_fields = true},
registered_on_liquid_transformed = {other_fields = true},
registered_on_modchannel_message = {other_fields = true},
registered_on_mods_loaded = {other_fields = true},
registered_on_newplayers = {other_fields = true},
registered_on_placenodes = {other_fields = true},
registered_on_player_hpchange = {other_fields = true},
registered_on_player_hpchanges = {other_fields = true},
registered_on_player_inventory_actions = {other_fields = true},
registered_on_player_receive_fields = {other_fields = true},
registered_on_prejoinplayers = {other_fields = true},
registered_on_priv_grant = {other_fields = true},
registered_on_priv_revoke = {other_fields = true},
registered_on_protection_violation = {other_fields = true},
registered_on_punchnodes = {other_fields = true},
registered_on_punchplayers = {other_fields = true},
registered_on_respawnplayers = {other_fields = true},
registered_on_rightclickplayers = {other_fields = true},
registered_on_shutdown = {other_fields = true},
registered_ores = {other_fields = true},
registered_playerevents = {other_fields = true},
registered_privileges = {other_fields = true},
registered_tools = {other_fields = true},
remove_detached_inventory = {},
remove_detached_inventory_raw = {},
remove_node = {},
remove_player = {},
remove_player_auth = {},
request_http_api = {},
request_insecure_environment = {},
request_shutdown = {},
rgba = {},
rmdir = {},
rollback_get_last_node_actor = {},
rollback_get_node_actions = {},
rollback_punch_callbacks = {},
rollback_revert_actions_by = {},
rotate_and_place = {},
rotate_node = {},
run_callbacks = {},
run_priv_callbacks = {},
safe_file_write = {},
send_join_message = {},
send_leave_message = {},
serialize = {},
serialize_roundtrip = {},
serialize_schematic = {},
set_gen_notify = {},
set_last_run_mod = {},
set_mapgen_params = {},
set_mapgen_setting = {},
set_mapgen_setting_noiseparams = {},
set_node = {},
set_node_level = {},
set_noiseparams = {},
set_player_password = {},
set_player_privs = {},
set_timeofday = {},
setting_get = {},
setting_get_pos = {},
setting_getbool = {},
setting_save = {},
setting_set = {},
setting_setbool = {},
settings = {
fields = {
get = {},
get_bool = {},
get_np_group = {},
get_flags = {},
set = {},
set_bool = {},
set_np_group = {},
remove = {},
get_names = {},
write = {},
to_table = {},
},
},
sha1 = {},
show_formspec = {},
show_general_help_formspec = {},
show_privs_help_formspec = {},
sound_fade = {},
sound_play = {},
sound_stop = {},
spawn_falling_node = {},
spawn_item = {},
spawn_tree = {},
string_to_area = {},
string_to_pos = {},
string_to_privs = {},
strip_background_colors = {},
strip_colors = {},
strip_foreground_colors = {},
strip_param2_color = {},
swap_node = {},
tooldef_default = {},
transforming_liquid_add = {},
translate = {},
unban_player_or_ip = {},
unregister_biome = {},
unregister_chatcommand = {},
unregister_item = {},
wallmounted_to_dir = {},
wrap_text = {},
write_json = {},
yaw_to_dir = {},
},
},
}
}
stds.moreblocks = {
globals = {
"moreblocks",
},
read_globals = {
"default",
"fmod",
"futil",
"stairs",
"stairsplus",
},
}

View file

@ -0,0 +1,9 @@
* `moreblocks.api.register_all_faces(itemstring, base, [redef])`
Register an "All Faces" variant of a tree.
* `moreblocks.api.register_no_faces(itemstring, base, [redef])`
Register a "No Faces" variant of a tree.
* `moreblocks.api.register_trap(itemstring, base, [redef])`
Register a "Trap" variant of a node. A trap variant is a non-solid node that looks like the original.

View file

@ -0,0 +1,135 @@
local cm = moreblocks.resources.craft_materials
-- More Blocks aliases:
minetest.register_alias("sweeper", "moreblocks:sweeper")
if cm.stick then
minetest.register_alias("jungle_stick", cm.stick)
minetest.register_alias("moreblocks:jungle_stick", cm.stick)
end
-- Old block/item replacement:
if cm.mossycobble then
minetest.register_alias("moreblocks:oerkkiblock", cm.mossycobble)
end
if cm.screwdriver then
minetest.register_alias("moreblocks:screwdriver", cm.screwdriver)
end
-- Node and item renaming:
if cm.stone_brick then
minetest.register_alias("moreblocks:stone_bricks", cm.stone_brick)
minetest.register_alias("moreblocks:stonebrick", cm.stone_brick)
end
if cm.jungle_wood then
minetest.register_alias("moreblocks:junglewood", cm.jungle_wood)
minetest.register_alias("moreblocks:jungle_wood", cm.jungle_wood)
end
if cm.fence_jungle_wood then
minetest.register_alias("moreblocks:fence_junglewood", cm.fence_jungle_wood)
minetest.register_alias("moreblocks:fence_jungle_wood", cm.fence_jungle_wood)
end
minetest.register_alias("moreblocks:horizontaltree", "moreblocks:horizontal_tree")
minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizontal_jungle_tree")
minetest.register_alias("moreblocks:stonesquare", "moreblocks:stone_tile")
minetest.register_alias("moreblocks:circlestonebrick", "moreblocks:circle_stone_bricks")
minetest.register_alias("moreblocks:ironstonebrick", "moreblocks:iron_stone_bricks")
minetest.register_alias("moreblocks:coalstone", "moreblocks:coal_stone")
minetest.register_alias("moreblocks:ironstone", "moreblocks:iron_stone")
minetest.register_alias("moreblocks:woodtile", "moreblocks:wood_tile")
minetest.register_alias("moreblocks:woodtile_full", "moreblocks:wood_tile_full")
minetest.register_alias("moreblocks:woodtile_centered", "moreblocks:wood_tile_centered")
minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:wood_tile_up", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:woodtile_down", "moreblocks:wood_tile_down")
minetest.register_alias("moreblocks:woodtile_left", "moreblocks:wood_tile_left")
minetest.register_alias("moreblocks:woodtile_right", "moreblocks:wood_tile_right")
minetest.register_alias("moreblocks:coalglass", "moreblocks:coal_glass")
minetest.register_alias("moreblocks:ironglass", "moreblocks:iron_glass")
minetest.register_alias("moreblocks:glowglass", "moreblocks:glow_glass")
minetest.register_alias("moreblocks:superglowglass", "moreblocks:super_glow_glass")
minetest.register_alias("moreblocks:trapglass", "moreblocks:trap_glass")
minetest.register_alias("moreblocks:trapstone", "moreblocks:trap_stone")
minetest.register_alias("moreblocks:cactuschecker", "moreblocks:cactus_checker")
minetest.register_alias("moreblocks:coalchecker", "moreblocks:coal_checker")
minetest.register_alias("moreblocks:ironchecker", "moreblocks:iron_checker")
minetest.register_alias("moreblocks:cactusbrick", "moreblocks:cactus_brick")
minetest.register_alias("moreblocks:cleanglass", "moreblocks:clean_glass")
minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf")
minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick")
minetest.register_alias("moreblocks:splitstonesquare", "moreblocks:split_stone_tile")
minetest.register_alias("moreblocks:allfacestree", "moreblocks:all_faces_tree")
minetest.register_alias("moreblocks:empty_bookshelf", "moreblocks:empty_shelf")
minetest.register_alias("moreblocks:split_stone_tile_alt", "moreblocks:checker_stone_tile")
if moreblocks.has.stairsplus and cm.jungle_wood then
stairsplus.api.register_alias_all("moreblocks:jungle_wood", cm.jungle_wood)
end
if moreblocks.has.stairsplus then
stairsplus.api.register_alias_all("moreblocks:split_stone_tile_alt", "moreblocks:checker_stone_tile")
end
minetest.register_lbm({
name = "moreblocks:reduce_wood_tile_redundancy",
nodenames = {
"moreblocks:wood_tile_left",
"moreblocks:wood_tile_down",
"moreblocks:wood_tile_right",
"moreblocks:wood_tile_flipped",
},
action = function(pos, node)
if node.name == "moreblocks:wood_tile_left" then
minetest.set_node(pos, { name = "moreblocks:wood_tile_offset", param2 = 1 })
elseif node.name == "moreblocks:wood_tile_down" then
minetest.set_node(pos, { name = "moreblocks:wood_tile_offset", param2 = 2 })
elseif node.name == "moreblocks:wood_tile_right" then
minetest.set_node(pos, { name = "moreblocks:wood_tile_offset", param2 = 3 })
else
-- wood_tile_flipped
minetest.set_node(pos, { name = "moreblocks:wood_tile", param2 = 1 })
end
moreblocks.log("action", "LBM replaced %s at %s", node.name, minetest.pos_to_string(pos))
end,
})
local horizontal_tree_convert_facedir = { 7, 12, 9, 18 }
if cm.tree then
minetest.register_lbm({
name = "moreblocks:reduce_horizontal_tree_redundancy",
nodenames = {
"moreblocks:horizontal_tree",
},
action = function(pos, node)
node.name = cm.tree
node.param2 = node.param2 < 3 and node.param2 or 0
minetest.set_node(pos, {
name = node.name,
param2 = horizontal_tree_convert_facedir[node.param2 + 1],
})
moreblocks.log("action", "LBM replaced %s at %s", node.name, minetest.pos_to_string(pos))
end,
})
end
if cm.jungle_tree then
minetest.register_lbm({
name = "moreblocks:reduce_horizontal_jungle_tree_redundancy",
nodenames = {
"moreblocks:horizontal_jungle_tree",
},
action = function(pos, node)
node.name = cm.jungle_tree
node.param2 = node.param2 < 3 and node.param2 or 0
minetest.set_node(pos, {
name = node.name,
param2 = horizontal_tree_convert_facedir[node.param2 + 1],
})
moreblocks.log("action", "LBM replaced %s at %s", node.name, minetest.pos_to_string(pos))
end,
})
end

View file

@ -0,0 +1,28 @@
local S = moreblocks.S
function moreblocks.api.register_all_faces(itemstring, base, redef)
local def = table.copy(minetest.registered_nodes[base])
def.tiles = { def.tiles[1] }
def.description = S("All-faces @1", def.description)
if def.short_description then
def.short_description = S("All-faces @1", def.short_description)
end
redef = redef or {}
for k, v in pairs(redef) do
def[k] = v
end
minetest.register_node(itemstring, def)
minetest.register_craft({
output = itemstring .. " 8",
recipe = {
{ base, base, base },
{ base, "", base },
{ base, base, base },
},
})
end

View file

@ -0,0 +1,5 @@
moreblocks.api = {}
moreblocks.dofile("api", "all_faces")
moreblocks.dofile("api", "no_faces")
moreblocks.dofile("api", "trap")

View file

@ -0,0 +1,28 @@
local S = moreblocks.S
function moreblocks.api.register_no_faces(itemstring, base, redef)
local def = table.copy(minetest.registered_nodes[base])
def.tiles = { def.tiles[3] }
def.description = S("No-faces @1", def.description)
if def.short_description then
def.short_description = S("No-faces @1", def.short_description)
end
redef = redef or {}
for k, v in pairs(redef) do
def[k] = v
end
minetest.register_node(itemstring, def)
minetest.register_craft({
output = itemstring .. " 9",
recipe = {
{ base, base, base },
{ base, base, base },
{ base, base, base },
},
})
end

View file

@ -0,0 +1,43 @@
local S = moreblocks.S
local cm = moreblocks.resources.craft_materials
local outline_trap_nodes = moreblocks.settings.outline_trap_nodes
function moreblocks.api.register_trap(itemstring, base, redef)
local def = table.copy(minetest.registered_nodes[base])
def.description = S("Trap @1", def.description)
if def.short_description then
def.short_description = S("Trap @1", def.short_description)
end
if outline_trap_nodes then
for i, tile in ipairs(def.tiles) do
def.tiles[i] = tile .. "^moreblocks_trap_box.png"
end
end
if def.drawtype ~= "glasslike_framed_optional" then
def.drawtype = "glasslike_framed"
end
def.walkable = false
def.paramtype = "light"
def.is_ground_content = false
redef = redef or {}
for k, v in pairs(redef) do
def[k] = v
end
minetest.register_node(itemstring, def)
if cm.trap_material then
minetest.register_craft({
output = itemstring,
type = "shapeless",
recipe = { cm.trap_material, base },
})
end
end

View file

@ -0,0 +1,576 @@
local cm = moreblocks.resources.craft_materials
if cm.stick and cm.dry_shrub then
minetest.register_craft({
output = cm.stick,
recipe = { { cm.dry_shrub } },
})
end
if cm.stick then
minetest.register_craft({
output = cm.stick,
recipe = { { "group:sapling" } },
})
end
if cm.stick and cm.wood then
minetest.register_craft({
output = cm.wood,
recipe = {
{ cm.stick, cm.stick },
{ cm.stick, cm.stick },
},
})
end
if cm.dirt_with_grass and cm.jungle_grass and cm.dirt then
minetest.register_craft({
output = cm.dirt_with_grass,
type = "shapeless",
recipe = { cm.jungle_grass, cm.dirt },
})
end
if cm.mossy_cobble and cm.jungle_grass and cm.cobble then
minetest.register_craft({
output = cm.mossy_cobble,
type = "shapeless",
recipe = { cm.jungle_grass, cm.cobble },
})
end
minetest.register_craft({
output = "moreblocks:wood_tile 9",
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "group:wood", "group:wood", "group:wood" },
{ "group:wood", "group:wood", "group:wood" },
},
})
-- This must be registered after `moreblocks:wood_tile` to avoid recipe conflicts,
-- since `moreblocks:wood_tile` is part of `group:wood`
minetest.register_craft({
output = "moreblocks:wood_tile_center 9",
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "group:wood", "moreblocks:wood_tile", "group:wood" },
{ "group:wood", "group:wood", "group:wood" },
},
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile",
recipe = { "moreblocks:wood_tile_flipped" },
})
minetest.register_craft({
output = "moreblocks:wood_tile_full 4",
recipe = {
{ "moreblocks:wood_tile", "moreblocks:wood_tile" },
{ "moreblocks:wood_tile", "moreblocks:wood_tile" },
},
})
if cm.stick then
minetest.register_craft({
output = "moreblocks:wood_tile_offset",
recipe = {
{ cm.stick },
{ "moreblocks:wood_tile_center" },
},
})
end
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile_offset",
recipe = { "moreblocks:wood_tile_down" },
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile_offset",
recipe = { "moreblocks:wood_tile_left" },
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile_offset",
recipe = { "moreblocks:wood_tile_right" },
})
if cm.stone and cm.coal_lump then
minetest.register_craft({
output = "moreblocks:circle_stone_bricks 5",
recipe = {
{ "", cm.stone, "" },
{ cm.stone, cm.coal_lump, cm.stone },
{ "", cm.stone, "" },
},
})
end
if cm.jungle_grass and cm.stick then
minetest.register_craft({
output = "moreblocks:sweeper 4",
recipe = {
{ cm.jungle_grass },
{ cm.stick },
},
})
end
if cm.cobble and cm.stone then
minetest.register_craft({
output = "moreblocks:stone_tile 9",
recipe = {
{ cm.cobble, cm.cobble, cm.cobble },
{ cm.cobble, cm.stone, cm.cobble },
{ cm.cobble, cm.cobble, cm.cobble },
},
})
end
minetest.register_craft({
output = "moreblocks:split_stone_tile",
recipe = {
{ "moreblocks:stone_tile" },
},
})
minetest.register_craft({
output = "moreblocks:checker_stone_tile",
recipe = {
{ "moreblocks:split_stone_tile" },
},
})
-- When approaching the below craft, loop back to cobblestone, which can then be used to craft stone tiles again
if cm.cobble then
minetest.register_craft({
output = cm.cobble,
recipe = {
{ "moreblocks:checker_stone_tile" },
},
})
end
if cm.stone and cm.brick then
minetest.register_craft({
output = "moreblocks:grey_bricks 2",
type = "shapeless",
recipe = { cm.stone, cm.brick },
})
end
if cm.stone_brick and cm.brick then
minetest.register_craft({
output = "moreblocks:grey_bricks 2",
type = "shapeless",
recipe = { cm.stone_brick, cm.brick },
})
end
if cm.bookshelf and cm.book then
minetest.register_craft({
output = "moreblocks:empty_shelf",
type = "shapeless",
recipe = { "moreblocks:sweeper", cm.bookshelf },
replacements = { { cm.bookshelf, cm.book .. " 3" } },
-- When obtaining an empty shelf, return the books used in it as well
})
end
if cm.vessels_shelf and cm.glass_bottle then
minetest.register_craft({
output = "moreblocks:empty_shelf",
type = "shapeless",
recipe = { "moreblocks:sweeper", cm.vessels_shelf },
replacements = { { cm.vessels_shelf, cm.glass_bottle .. " 3" } },
})
end
if cm.book and cm.bookshelf then
minetest.register_craft({
type = "shapeless",
output = cm.bookshelf,
recipe = { "moreblocks:empty_shelf", cm.book, cm.book, cm.book },
})
end
minetest.register_craft({
output = "moreblocks:empty_shelf",
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "", "", "" },
{ "group:wood", "group:wood", "group:wood" },
},
})
minetest.register_craft({
output = "moreblocks:coal_stone_bricks 4",
recipe = {
{ "moreblocks:coal_stone", "moreblocks:coal_stone" },
{ "moreblocks:coal_stone", "moreblocks:coal_stone" },
},
})
minetest.register_craft({
output = "moreblocks:iron_stone_bricks 4",
recipe = {
{ "moreblocks:iron_stone", "moreblocks:iron_stone" },
{ "moreblocks:iron_stone", "moreblocks:iron_stone" },
},
})
minetest.register_craft({
output = "moreblocks:plankstone 4",
recipe = {
{ "group:stone", "group:wood" },
{ "group:wood", "group:stone" },
},
})
minetest.register_craft({
output = "moreblocks:plankstone 4",
recipe = {
{ "group:wood", "group:stone" },
{ "group:stone", "group:wood" },
},
})
if cm.coal_lump and cm.stone then
minetest.register_craft({
output = "moreblocks:coal_checker 4",
recipe = {
{ cm.stone, cm.coal_lump },
{ cm.coal_lump, cm.stone },
},
})
minetest.register_craft({
output = "moreblocks:coal_checker 4",
recipe = {
{ cm.coal_lump, cm.stone },
{ cm.stone, cm.coal_lump },
},
})
end
if cm.steel_ingot and cm.stone then
minetest.register_craft({
output = "moreblocks:iron_checker 4",
recipe = {
{ cm.steel_ingot, cm.stone },
{ cm.stone, cm.steel_ingot },
},
})
minetest.register_craft({
output = "moreblocks:iron_checker 4",
recipe = {
{ cm.stone, cm.steel_ingot },
{ cm.steel_ingot, cm.stone },
},
})
end
if cm.chest and cm.chest_locked then
if cm.steel_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = { cm.steel_ingot, cm.chest },
})
end
if cm.copper_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = { cm.copper_ingot, cm.chest },
})
end
if cm.bronze_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = { cm.bronze_ingot, cm.chest },
})
end
if cm.gold_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = { cm.gold_ingot, cm.chest },
})
end
end
if cm.glass and cm.steel_ingot then
minetest.register_craft({
output = "moreblocks:iron_glass",
type = "shapeless",
recipe = { cm.steel_ingot, cm.glass },
})
minetest.register_craft({
output = cm.glass,
type = "shapeless",
recipe = { cm.steel_ingot, "moreblocks:coal_glass" },
})
end
if cm.glass and cm.coal_lump then
minetest.register_craft({
output = cm.glass,
type = "shapeless",
recipe = { cm.coal_lump, "moreblocks:iron_glass" },
})
minetest.register_craft({
output = "moreblocks:coal_glass",
type = "shapeless",
recipe = { cm.coal_lump, cm.glass },
})
end
if cm.glass then
minetest.register_craft({
output = "moreblocks:clean_glass",
type = "shapeless",
recipe = { "moreblocks:sweeper", cm.glass },
})
end
minetest.register_craft({
output = "moreblocks:trap_clean_glass",
type = "shapeless",
recipe = { "moreblocks:sweeper", "moreblocks:trap_glass" },
})
if cm.glass and cm.torch then
minetest.register_craft({
output = "moreblocks:glow_glass",
type = "shapeless",
recipe = { cm.torch, cm.glass },
})
end
if cm.torch then
minetest.register_craft({
output = "moreblocks:clean_glow_glass",
type = "shapeless",
recipe = { cm.torch, "moreblocks:clean_glass" },
})
end
minetest.register_craft({
output = "moreblocks:clean_glow_glass",
type = "shapeless",
recipe = { "moreblocks:sweeper", "moreblocks:glow_glass" },
})
minetest.register_craft({
output = "moreblocks:trap_clean_glow_glass",
type = "shapeless",
recipe = { "moreblocks:sweeper", "moreblocks:trap_glow_glass" },
})
if cm.torch and cm.glass then
minetest.register_craft({
output = "moreblocks:super_glow_glass",
type = "shapeless",
recipe = { cm.torch, cm.torch, cm.glass },
})
end
if cm.torch then
minetest.register_craft({
output = "moreblocks:super_glow_glass",
type = "shapeless",
recipe = { cm.torch, "moreblocks:glow_glass" },
})
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = { cm.torch, cm.torch, "moreblocks:clean_glass" },
})
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = { cm.torch, "moreblocks:clean_glow_glass" },
})
end
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = { "moreblocks:sweeper", "moreblocks:super_glow_glass" },
})
minetest.register_craft({
output = "moreblocks:trap_clean_super_glow_glass",
type = "shapeless",
recipe = { "moreblocks:sweeper", "moreblocks:trap_super_glow_glass" },
})
if cm.coal_lump and cm.stone then
minetest.register_craft({
output = "moreblocks:coal_stone",
type = "shapeless",
recipe = { cm.coal_lump, cm.stone },
})
minetest.register_craft({
output = cm.stone,
type = "shapeless",
recipe = { cm.coal_lump, "moreblocks:iron_stone" },
})
end
if cm.stone and cm.steel_ingot then
minetest.register_craft({
output = cm.stone,
type = "shapeless",
recipe = { cm.steel_ingot, "moreblocks:coal_stone" },
})
minetest.register_craft({
output = "moreblocks:iron_stone",
type = "shapeless",
recipe = { cm.steel_ingot, cm.stone },
})
end
if cm.cactus and cm.brick then
minetest.register_craft({
output = "moreblocks:cactus_brick",
type = "shapeless",
recipe = { cm.cactus, cm.brick },
})
end
if cm.cactus and cm.stone then
minetest.register_craft({
output = "moreblocks:cactus_checker 4",
recipe = {
{ cm.cactus, cm.stone },
{ cm.stone, cm.cactus },
},
})
minetest.register_craft({
output = "moreblocks:cactus_checker 4",
recipe = {
{ cm.stone, cm.cactus },
{ cm.cactus, cm.stone },
},
})
end
if cm.jungle_grass then
minetest.register_craft({
output = "moreblocks:rope 3",
recipe = {
{ cm.jungle_grass },
{ cm.jungle_grass },
{ cm.jungle_grass },
},
})
end
if cm.dirt then
minetest.register_craft({
output = "moreblocks:dirt_compressed",
recipe = {
{ cm.dirt, cm.dirt, cm.dirt },
{ cm.dirt, cm.dirt, cm.dirt },
{ cm.dirt, cm.dirt, cm.dirt },
},
})
minetest.register_craft({
output = cm.dirt .. " 9",
recipe = { { "moreblocks:dirt_compressed" } },
})
end
if cm.cobble then
minetest.register_craft({
output = "moreblocks:cobble_compressed",
recipe = {
{ cm.cobble, cm.cobble, cm.cobble },
{ cm.cobble, cm.cobble, cm.cobble },
{ cm.cobble, cm.cobble, cm.cobble },
},
})
minetest.register_craft({
output = cm.cobble .. " 9",
recipe = {
{ "moreblocks:cobble_compressed" },
},
})
end
if cm.desert_cobble then
minetest.register_craft({
output = "moreblocks:desert_cobble_compressed",
recipe = {
{ cm.desert_cobble, cm.desert_cobble, cm.desert_cobble },
{ cm.desert_cobble, cm.desert_cobble, cm.desert_cobble },
{ cm.desert_cobble, cm.desert_cobble, cm.desert_cobble },
},
})
minetest.register_craft({
output = cm.desert_cobble .. " 9",
recipe = {
{ "moreblocks:desert_cobble_compressed" },
},
})
end
if cm.pine_tree then
minetest.register_craft({
type = "cooking",
output = "moreblocks:tar",
recipe = cm.pine_tree,
})
end
if cm.copper_block and cm.bucket_empty then
minetest.register_craft({
type = "shapeless",
output = "moreblocks:copperpatina",
recipe = { "group:water_bucket", cm.copper_block },
replacements = {
{ "group:water_bucket", cm.bucket_empty },
},
})
end
if cm.copper_block then
minetest.register_craft({
type = "shapeless",
output = "moreblocks:copperpatina",
recipe = { "group:water", cm.copper_block },
})
end
if cm.copper_ingot then
minetest.register_craft({
output = cm.copper_ingot .. " 9",
recipe = {
{ "moreblocks:copperpatina" },
},
})
end

View file

@ -0,0 +1,9 @@
moreblocks = fmod.create()
moreblocks.dofile("resources", "init")
moreblocks.dofile("api", "init")
moreblocks.dofile("items")
moreblocks.dofile("nodes")
moreblocks.dofile("crafting")
moreblocks.dofile("aliases")

View file

@ -0,0 +1,7 @@
-- Items
local S = moreblocks.S
minetest.register_craftitem("moreblocks:sweeper", {
description = S("Sweeper"),
inventory_image = "moreblocks_sweeper.png",
})

View file

@ -0,0 +1,50 @@
# textdomain: moreblocks
# German translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Xanthin, 2014.
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] geladen.
#: nodes.lua
All-faces @1=allseitiger @1
No-faces @1=
Cactus Brick=Kaktusziegel
Cactus Checker=Kaktus-Mosaik
Centered Wooden Tile=Holzfliese mittig
Checker Stone Tile=Stein-Mosaik
Circle Stone Bricks=Kreissteinziegel
Clean Glass=Klares Glas
Coal Checker=Kohlen-Mosaik
Coal Glass=Kohleglas
Clean Super Glow Glass=
Trap @1=@1falle
Clean Glow Glass=
Coal Stone=Kohlestein
Coal Stone Bricks=Kohlesteinziegel
Compressed Cobblestone=Gepresster Kopfsteinpflaster
Compressed Desert Cobblestone=
Compressed Dirt=Gepresste Erde
Copper Patina Block=Kupfer Edelrostblock
Empty Shelf=Leeres Regal
Full Wooden Tile=Vollholzfliese
Glow Glass=Leuchtglas
Iron Checker=Metall-Mosaik
Iron Glass=metallisiertes Glas
Iron Stone=Eisenstein
Iron Stone Bricks=Eisensteinziegel
Plankstone=Brettstein
Rope=Seil
Split Stone Tile=Geteilte Steinfliese
Stone Bricks=Steinziegel
Stone Tile=Steinfliese
Super Glow Glass=Superleuchtglas
Sweeper=Besen
Tar=Teer
Wooden Tile=Holzfliese
Offset Wooden Tile=Holzfliese versetzt

View file

@ -0,0 +1,47 @@
# textdomain: moreblocks
# Spanish translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# kaeza, 2013.
# CodeXP <codexp@gmx.net>, 2018.
# Carlos Barraza 2020.
#: nodes.lua
All-faces @1=@1, todas las caras
No-faces @1=
Cactus Brick=Ladrillos de Cactus
Cactus Checker=Cuadros de Cactus
Centered Wooden Tile=Parqué Centrado
Checker Stone Tile=Cuadros de Baldosa de Piedra
Circle Stone Bricks=Bloques de Piedra Circulares
Clean Glass=Cristal Limpio
Coal Checker=Cuadros de Carbón
Coal Glass=Cristal con Carbón
Clean Super Glow Glass=Cristal Súper Brillante Limpio
Trap @1=@1 Falso
Clean Glow Glass=Cristal Brillante Limpio
Coal Stone=Carbón y Piedra
Coal Stone Bricks=Ladrillos de Piedra de Carbon
Compressed Cobblestone=Adoquín Comprimido
Compressed Desert Cobblestone=Adoquín del Desierto Comprimido
Compressed Dirt=Tierra Comprimida
Copper Patina Block=Bloque de Pátina de Cobre
Empty Shelf=Estante vacio
Full Wooden Tile=Parqué Completo
Glow Glass=Cristal Brillante
Iron Checker=Cuadros de Hierro
Iron Glass=Cristal con Hierro
Iron Stone=Hierro y Piedra
Iron Stone Bricks=Ladrillo de Piedra de Hierro
Plankstone=Tablones de piedra
Rope=Soga
Split Stone Tile=Baldosas de Piedra Partida
Stone Bricks=Ladrillos de Piedra
Stone Tile=Baldosa de Piedra
Super Glow Glass=Cristal Súper Brillante
Sweeper=Limpiador
Tar=Alquitrán
Wooden Tile=Parqué
Offset Wooden Tile=Parqué Ajustado

View file

@ -0,0 +1,51 @@
# textdomain: moreblocks
# French translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Hugo Locurcio <hugo.locurcio@hugo.pro>, 2013-2019.
# Jat15, 2013.
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] a été chargé.
#: nodes.lua
All-faces @1=@1 (toutes faces)
No-faces @1=
Cactus Brick=Briques de cactus
Cactus Checker=Damier en cactus
Centered Wooden Tile=Dalle en bois centrée
Checker Stone Tile=Damier de dalle en pierre
Circle Stone Bricks=Briques en pierre circulaires
Clean Glass=Verre propre
Coal Checker=Damier en charbon
Coal Glass=Verre de charbon
Clean Super Glow Glass=
Trap @1=@1 traversable
Clean Glow Glass=
Coal Stone=Pierre de charbon
Coal Stone Bricks=Briques en pierre de charbon
Compressed Cobblestone=Pierre taillée compressée
Compressed Desert Cobblestone=
Compressed Dirt=Terre compressée
Copper Patina Block=Bloc de patine de cuivre
Empty Shelf=Étagère vide
Full Wooden Tile=Dalle en bois complète
Glow Glass=Verre brillant
Iron Checker=Damier de fer
Iron Glass=Verre de fer
Iron Stone=Pierre de fer
Iron Stone Bricks=Briques en pierre de fer
Plankstone=Pierre-bois
Rope=Corde
Split Stone Tile=Dalle en pierre découpée
Stone Bricks=Briques en pierre
Stone Tile=Dalle en pierre
Super Glow Glass=Verre très brillant
Sweeper=Balai
Tar=Bitume
Wooden Tile=Dalle en bois
Offset Wooden Tile=Dalle en bois décalée

View file

@ -0,0 +1,50 @@
# textdomain: moreblocks
# Italian translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Emon, 2016.
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] caricato.
#: nodes.lua
All-faces @1=@1 su ogni lato
No-faces @1=
Cactus Brick=Mattoni di cactus
Cactus Checker=Scacchiera in cactus
Centered Wooden Tile=Mattonella in legno centrata
Checker Stone Tile=
Circle Stone Bricks=Mattoni concentrici in pietra
Clean Glass=Vetro pulito
Coal Checker=Scacchiera in carbone
Coal Glass=Vetro e carbone
Clean Super Glow Glass=
Trap @1=@1 trappola
Clean Glow Glass=
Coal Stone=Pietra in carbone
Coal Stone Bricks=Mattoni di pietra in carbone
Compressed Cobblestone=
Compressed Desert Cobblestone=
Compressed Dirt=
Copper Patina Block=
Empty Shelf=Scaffale Vuoto
Full Wooden Tile=Mattonella in legno pieno
Glow Glass=Vetro luminoso
Iron Checker=Scacchiera in ferro
Iron Glass=Vetro e ferro
Iron Stone=Pietra in ferro
Iron Stone Bricks=Mattoni di pietra in ferro
Plankstone=Pietra e legno
Rope=Corda
Split Stone Tile=Mattonella in pietra divisa
Stone Bricks=
Stone Tile=Mattonella in pietra
Super Glow Glass=Super vetro luminoso
Sweeper=Spazzola
Tar=
Wooden Tile=Mattonella in legno
Offset Wooden Tile=

View file

@ -0,0 +1,50 @@
# textdomain: moreblocks
# Polish translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# mat9117, 2019
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] załadowane.
#: nodes.lua
All-faces @1=Wielostronna tekstura @1
No-faces @1=
Cactus Brick=Kaktusowa cegła
Cactus Checker=Kaktusowa szachownica
Centered Wooden Tile=Wyśrodkowany drewniany kafelek
Checker Stone Tile=Kamienna szachownica
Circle Stone Bricks=Okrągłe kamienne cegły
Clean Glass=Czyste szkło
Coal Checker=Węglowa szachownica
Coal Glass=Szkło węglowe
Clean Super Glow Glass=
Trap @1=@1 pułapka
Clean Glow Glass=
Coal Stone=Kamień węglowy
Coal Stone Bricks=Węglowe kamienne cegły
Compressed Cobblestone=Skompresowany bruk
Compressed Desert Cobblestone=
Compressed Dirt=Skompresowana ziemia
Copper Patina Block=Blok patynowanej miedzi
Empty Shelf=Pusta półka
Full Wooden Tile=Pełny drewniany kafelek
Glow Glass=Świecące szkło
Iron Checker=Żelazna szachownica
Iron Glass=Żelazne szkło
Iron Stone=Żelazny kamień
Iron Stone Bricks=Żelazne kamienne cegły
Plankstone=Deskokamień
Rope=Lina
Split Stone Tile=Kamienny blok kafelkowy
Stone Bricks=Kamienne cegły
Stone Tile=Kamienny kafelek
Super Glow Glass=Super świecące szkło
Sweeper=Miotła
Tar=Smoła
Wooden Tile=Drewniany kafelek
Offset Wooden Tile=

View file

@ -0,0 +1,53 @@
# textdomain: moreblocks
# Russian translation for MOREBLOCKS minetest mod.
# Copyright (C) 2018 Hugo Locurcio and contributors
# This file is distributed under the same license as the MOREBLOCKS package.
# CodeXP <codexp@gmx.net>, 2018.
#
#, fuzzy
#: circular_saw.lua
#: init.lua
[MOD] moreblocks loaded.=[MOD] moreblocks загружен.
#: nodes.lua
All-faces @1=Всесторонняя @1
No-faces @1=Цельная @1
Cactus Brick=Кирпич из кактуса
Cactus Checker=Мозаика из кактуса
Centered Wooden Tile=Центрированная деревянная плитка
Checker Stone Tile=Каменная шахматная плитка
Circle Stone Bricks=Круглые каменные кирпичи
Clean Glass=Чистое стекло
Coal Checker=Угольная мозаика
Coal Glass=Угольное стекло
Clean Super Glow Glass=Чистое супер светящееся стекло
Trap @1=@1 (рамка)
Clean Glow Glass=Чистое светящееся стекло
Coal Stone=Угольный камень
Coal Stone Bricks=Угольно-каменные кирпичи
Compressed Cobblestone=Прессованный булыжник
Compressed Desert Cobblestone=Прессованный пустынный булыжник
Compressed Dirt=Прессованная земля
Copper Patina Block=Медный патинированный блок
Empty Shelf=Пустая полка
Full Wooden Tile=Деревянная мозаика
Glow Glass=Светящееся стекло
Iron Checker=Железная мозаика
Iron Glass=Металлизированное стекло
Iron Stone=Железный камень
Iron Stone Bricks=Железно-каменный кирпич
Plankstone=Железно-деревянная мозаика
Rope=Верёвка
Split Stone Tile=Половинный камень - плитка
Stone Bricks=Каменный кирпич
Stone Tile=Каменная плитка
Super Glow Glass=Супер светящееся стекло
Sweeper=Метёлка
Tar=Смола
Wooden Tile=Деревянная плитка
Offset Wooden Tile=Деревянная плитка (сверху)

View file

@ -0,0 +1,40 @@
# textdomain: moreblocks
#: nodes.lua
All-faces @1=
Cactus Brick=
Cactus Checker=
Centered Wooden Tile=
Checker Stone Tile=
Circle Stone Bricks=
Clean Glass=
Coal Checker=
Coal Glass=
Clean Super Glow Glass=
Trap @1=
Clean Glow Glass=
Coal Stone=
Coal Stone Bricks=
Compressed Cobblestone=
Compressed Desert Cobblestone=
Compressed Dirt=
Copper Patina Block=
Empty Shelf=
Full Wooden Tile=
Glow Glass=
Iron Checker=
Iron Glass=
Iron Stone=
Iron Stone Bricks=
No-faces @1=
Plankstone=
Rope=
Split Stone Tile=
Stone Bricks=
Stone Tile=
Super Glow Glass=
Sweeper=
Tar=
Wooden Tile=
Offset Wooden Tile=

View file

@ -0,0 +1,45 @@
# textdomain: moreblocks
# zh_CN translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# IFRFSX <IFRFSX@protonmail.com>, 2020.
#: nodes.lua
All-faces @1=全切面@1树木方块
No-faces @1=
Cactus Brick=仙人掌砖
Cactus Checker=仙人掌棋盘方块
Centered Wooden Tile=居中的木瓦
Checker Stone Tile=棋盘石瓦
Circle Stone Bricks=圆石砖
Clean Glass=干净的玻璃
Coal Checker=棋盘煤块
Coal Glass=煤玻璃
Clean Super Glow Glass=
Trap @1=陷阱@1
Clean Glow Glass=
Coal Stone=煤炭石
Coal Stone Bricks=煤炭石砖
Compressed Cobblestone=压缩圆石
Compressed Desert Cobblestone=
Compressed Dirt=压缩土
Copper Patina Block=铜绿方块
Empty Shelf=空书架
Full Wooden Tile=全木瓦
Glow Glass=发光玻璃
Iron Checker=棋盘铁方块
Iron Glass=铁玻璃
Iron Stone=铁石
Iron Stone Bricks=铁石砖
Plankstone=板石
Rope=绳子
Split Stone Tile=裂石砖
Stone Bricks=石砖
Stone Tile=石瓦
Super Glow Glass=超级发光玻璃
Sweeper=清扫器
Tar=焦油
Wooden Tile=木瓦
Offset Wooden Tile=胶合木瓦

View file

@ -0,0 +1,45 @@
# textdomain: moreblocks
# zh_TW translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# IFRFSX <IFRFSX@protonmail.com>, 2020.
#: nodes.lua
All-faces @1=全切面@1樹木方塊
No-faces @1=
Cactus Brick=仙人掌磚
Cactus Checker=仙人掌棋盤方塊
Centered Wooden Tile=居中的木瓦
Checker Stone Tile=棋盤石瓦
Circle Stone Bricks=圓石磚
Clean Glass=乾淨的玻璃
Coal Checker=棋盤煤塊
Coal Glass=煤玻璃
Clean Super Glow Glass=
Trap @1=陷阱@1
Clean Glow Glass=
Coal Stone=煤炭石
Coal Stone Bricks=煤炭石磚
Compressed Cobblestone=壓縮圓石
Compressed Desert Cobblestone=
Compressed Dirt=壓縮土
Copper Patina Block=銅綠方塊
Empty Shelf=空書架
Full Wooden Tile=全木瓦
Glow Glass=發光玻璃
Iron Checker=棋盤鐵方塊
Iron Glass=鐵玻璃
Iron Stone=鐵石
Iron Stone Bricks=鐵石磚
Plankstone=板石
Rope=繩子
Split Stone Tile=裂石磚
Stone Bricks=石磚
Stone Tile=石瓦
Super Glow Glass=超級發光玻璃
Sweeper=清掃器
Tar=焦油
Wooden Tile=木瓦
Offset Wooden Tile=膠合木瓦

View file

@ -0,0 +1,10 @@
name = moreblocks
title = more blocks
description = adds various blocks to the game.
website = https://content.minetest.net/packages/rheo/moreblocks/.
author = Hugo Locurcio, fluxionary, others (see commit log)
license = LGPL-3.0-or-later
media_license = CC-BY-SA-4.0
version = 2024-12-23
depends = fmod, futil
optional_depends = bucket, default, rhotator, screwdriver, stairs, stairsplus, vessels

View file

@ -0,0 +1,483 @@
local S = moreblocks.S
local cm = moreblocks.resources.craft_materials
local t = moreblocks.resources.textures
local modname = moreblocks.modname
local sound_dirt = moreblocks.resources.sounds.dirt
local sound_wood = moreblocks.resources.sounds.wood
local sound_stone = moreblocks.resources.sounds.stone
local sound_glass = moreblocks.resources.sounds.glass
local sound_leaves = moreblocks.resources.sounds.leaves
local sound_metal = moreblocks.resources.sounds.metal
local function is_glasslike(def)
return #def.tiles > 1 and (def.drawtype == "glasslike_framed" or def.drawtype == "glasslike_framed_optional")
end
local function register_stairs(name, def)
local itemstring = ("%s:%s"):format(modname, name)
-- Use the primary tile for all sides of cut glasslike nodes.
-- This makes them easier to see
if is_glasslike(def) then
def = table.copy(def)
def.tiles = { def.tiles[1] }
end
if moreblocks.has.stairsplus then
if stairsplus.settings.legacy_mode then
stairsplus.api.register_group(itemstring, "legacy")
else
stairsplus.api.register_group(itemstring, "common")
end
elseif moreblocks.has.stairs then
stairs.register_stair_and_slab(
("%s_%s"):format(modname, name),
itemstring,
def.groups,
def.tiles,
S("@1 Stair", def.description),
S("@1 Slab", def.description),
def.sounds,
true
)
end
end
local function tile_tiles(tex)
return { tex, tex, tex, tex, tex .. "^[transformR90", tex .. "^[transformR90" }
end
local function register_with_stairs(name, def)
local itemstring = ("%s:%s"):format(modname, name)
def.tiles = def.tiles or { ("%s_%s.png"):format(modname, name) }
minetest.register_node(itemstring, def)
minetest.register_alias(name, itemstring)
register_stairs(name, def)
end
local function register_no_stairs(name, def)
local itemstring = ("%s:%s"):format(modname, name)
def.tiles = def.tiles or { ("%s_%s.png"):format(modname, name) }
minetest.register_node(itemstring, def)
minetest.register_alias(name, itemstring)
end
local function register_all_faces(name, base)
name = "all_faces_" .. name
local itemstring = ("%s:%s"):format(modname, name)
moreblocks.api.register_all_faces(itemstring, base)
register_stairs(name, minetest.registered_nodes[itemstring])
minetest.register_alias(name, itemstring)
end
local function register_no_faces(name, base)
name = "no_faces_" .. name
local itemstring = ("%s:%s"):format(modname, name)
moreblocks.api.register_no_faces(itemstring, base)
register_stairs(name, minetest.registered_nodes[itemstring])
minetest.register_alias(name, itemstring)
end
local function register_trap(name, base)
name = "trap_" .. name
local itemstring = ("%s:%s"):format(modname, name)
moreblocks.api.register_trap(itemstring, base)
minetest.register_alias(name, itemstring)
end
register_with_stairs("wood_tile", {
description = S("Wooden Tile"),
groups = { wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
is_ground_content = false,
paramtype2 = "facedir",
place_param2 = 0,
tiles = tile_tiles(("%s^moreblocks_wood_tile.png"):format(t.wood)),
sounds = sound_wood,
})
register_with_stairs("wood_tile_center", {
description = S("Centered Wooden Tile"),
groups = { wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
is_ground_content = false,
tiles = {
("%s^moreblocks_wood_tile_center.png"):format(t.wood),
},
sounds = sound_wood,
})
register_with_stairs("wood_tile_full", {
description = S("Full Wooden Tile"),
groups = { wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
is_ground_content = false,
tiles = tile_tiles("moreblocks_wood_tile_full.png"),
sounds = sound_wood,
})
register_no_stairs("wood_tile_offset", {
description = S("Offset Wooden Tile"),
paramtype2 = "facedir",
place_param2 = 0,
groups = { wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
is_ground_content = false,
tiles = {
("%s^moreblocks_wood_tile_offset.png"):format(t.wood),
},
sounds = sound_wood,
})
register_with_stairs("circle_stone_bricks", {
description = S("Circle Stone Bricks"),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("grey_bricks", {
description = S("Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = { cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("coal_stone_bricks", {
description = S("Coal Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("iron_stone_bricks", {
description = S("Iron Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("stone_tile", {
description = S("Stone Tile"),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("split_stone_tile", {
description = S("Split Stone Tile"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {
"moreblocks_split_stone_tile_top.png",
"moreblocks_split_stone_tile.png",
},
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("checker_stone_tile", {
description = S("Checker Stone Tile"),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("tar", {
description = S("Tar"),
groups = { cracky = 2, tar_block = 1 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("dirt_compressed", {
description = S("Compressed Dirt"),
groups = { crumbly = 2 },
is_ground_content = false,
sounds = sound_dirt,
})
register_with_stairs("cobble_compressed", {
description = S("Compressed Cobblestone"),
groups = { cracky = 1 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("desert_cobble_compressed", {
description = S("Compressed Desert Cobblestone"),
groups = { cracky = 1 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("plankstone", {
description = S("Plankstone"),
paramtype2 = "facedir",
place_param2 = 0,
groups = { cracky = 3 },
is_ground_content = false,
tiles = tile_tiles("moreblocks_plankstone.png"),
sounds = sound_stone,
})
register_with_stairs("iron_glass", {
description = S("Iron Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#DEDEDE"):format(t.glass),
("%s^[colorize:#DEDEDE"):format(t.glass_detail),
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("coal_glass", {
description = S("Coal Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#828282"):format(t.glass),
("%s^[colorize:#828282"):format(t.glass_detail),
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("clean_glass", {
description = S("Clean Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
"moreblocks_clean_glass.png",
"moreblocks_clean_glass_detail.png",
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("cactus_brick", {
description = S("Cactus Brick"),
paramtype2 = "facedir",
place_param2 = 0,
groups = { cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("cactus_checker", {
description = S("Cactus Checker"),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
tiles = tile_tiles(("%s^moreblocks_cactus_checker.png"):format(t.stone)),
sounds = sound_stone,
})
register_no_stairs("empty_shelf", {
description = S("Empty Shelf"),
paramtype2 = "facedir",
tiles = {
t.wood,
t.wood,
t.wood,
t.wood,
"moreblocks_empty_shelf.png",
"moreblocks_empty_shelf.png",
},
groups = { choppy = 3, oddly_breakable_by_hand = 2, flammable = 3 },
is_ground_content = false,
sounds = sound_wood,
furnace_burntime = 15,
})
register_with_stairs("coal_stone", {
description = S("Coal Stone"),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("iron_stone", {
description = S("Iron Stone"),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("coal_checker", {
description = S("Coal Checker"),
tiles = tile_tiles(("%s^moreblocks_coal_checker.png"):format(t.stone)),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("iron_checker", {
description = S("Iron Checker"),
tiles = tile_tiles(("%s^moreblocks_iron_checker.png"):format(t.stone)),
groups = { stone = 1, cracky = 3 },
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("glow_glass", {
description = S("Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#E9CD61"):format(t.glass),
("%s^[colorize:#E9CD61"):format(t.glass_detail),
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = 11,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("super_glow_glass", {
description = S("Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#FFFF78"):format(t.glass),
("%s^[colorize:#FFFF78"):format(t.glass_detail),
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = minetest.LIGHT_MAX,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("clean_glow_glass", {
description = S("Clean Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
"moreblocks_clean_glass.png^[colorize:#E9CD61",
"moreblocks_clean_glass_detail.png^[colorize:#E9CD61",
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = 11,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("clean_super_glow_glass", {
description = S("Clean Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
"moreblocks_clean_glass.png^[colorize:#FFFF78",
"moreblocks_clean_glass_detail.png^[colorize:#FFFF78",
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = minetest.LIGHT_MAX,
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
sounds = sound_glass,
})
register_with_stairs("copperpatina", {
description = S("Copper Patina Block"),
groups = { cracky = 1, level = 2 },
is_ground_content = false,
sounds = sound_metal,
})
register_no_stairs("rope", {
description = S("Rope"),
drawtype = "signlike",
inventory_image = "moreblocks_rope.png",
wield_image = "moreblocks_rope.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
paramtype2 = "wallmounted",
walkable = false,
climbable = true,
selection_box = { type = "wallmounted" },
groups = { snappy = 3, flammable = 2 },
sounds = sound_leaves,
})
register_trap("clean_glass", "moreblocks:clean_glass")
register_trap("clean_glow_glass", "moreblocks:clean_glow_glass")
register_trap("clean_super_glow_glass", "moreblocks:clean_super_glow_glass")
if cm.stone then
register_trap("stone", cm.stone)
end
if cm.desert_stone then
register_trap("desert_stone", cm.desert_stone)
end
if cm.glass then
register_trap("glass", cm.glass)
register_trap("glow_glass", "moreblocks:glow_glass")
register_trap("super_glow_glass", "moreblocks:super_glow_glass")
end
if cm.obsidian_glass then
register_trap("obsidian_glass", cm.obsidian_glass)
end
if cm.obsidian then
register_trap("obsidian", cm.obsidian)
end
if cm.obsidian then
register_trap("obsidian", cm.obsidian)
end
if cm.sandstone then
register_trap("sandstone", cm.sandstone)
end
if cm.tree then
register_all_faces("tree", cm.tree)
register_no_faces("tree", cm.tree)
end
if cm.jungle_tree then
register_all_faces("jungle_tree", cm.jungle_tree)
register_no_faces("jungle_tree", cm.jungle_tree)
end
if cm.pine_tree then
register_all_faces("pine_tree", cm.pine_tree)
register_no_faces("pine_tree", cm.pine_tree)
end
if cm.acacia_tree then
register_all_faces("acacia_tree", cm.acacia_tree)
register_no_faces("acacia_tree", cm.acacia_tree)
end
if cm.aspen_tree then
register_all_faces("aspen_tree", cm.aspen_tree)
register_no_faces("aspen_tree", cm.aspen_tree)
end

View file

@ -0,0 +1,68 @@
local table_set_all = futil.table.set_all
moreblocks.resources.craft_materials = {}
if moreblocks.has.bucket then
table_set_all(moreblocks.resources.craft_materials, {
bucket_empty = "bucket:bucket_empty",
})
end
if moreblocks.has.default then
table_set_all(moreblocks.resources.craft_materials, {
acacia_tree = "default:acacia_tree",
aspen_tree = "default:aspen_tree",
book = "default:book",
bookshelf = "default:bookshelf",
brick = "default:brick",
bronze_ingot = "default:bronze_ingot",
cactus = "default:cactus",
chest = "default:chest",
chest_locked = "default:chest_locked",
coal_lump = "default:coal_lump",
cobble = "default:cobble",
copper_block = "default:copperblock",
copper_ingot = "default:copper_ingot",
desert_cobble = "default:desert_cobble",
desert_stone = "default:desert_stone",
dirt = "default:dirt",
dirt_with_grass = "default:dirt_with_grass",
dry_shrub = "default:dry_shrub",
fence_jungle_wood = "default:fence_junglewood",
glass = "default:glass",
gold_ingot = "default:gold_ingot",
jungle_grass = "default:junglegrass",
jungle_tree = "default:jungletree",
jungle_wood = "default:junglewood",
mossy_cobble = "default:mossycobble",
obsidian = "default:obsidian",
obsidian_glass = "default:obsidian_glass",
pine_tree = "default:pine_tree",
sandstone = "default:sandstone",
steel_ingot = "default:steel_ingot",
stick = "default:stick",
stone_brick = "default:stonebrick",
stone = "default:stone",
torch = "default:torch",
trap_material = "default:mese_crystal_fragment",
tree = "default:tree",
wood = "default:wood",
})
end
if moreblocks.has.screwdriver then
table_set_all(moreblocks.resources.craft_materials, {
screwdriver = "screwdriver:screwdriver",
})
elseif moreblocks.has.rhotator then
table_set_all(moreblocks.resources.craft_materials, {
screwdriver = "rhotator:screwdriver_multi",
})
end
if moreblocks.has.vessels then
table_set_all(moreblocks.resources.craft_materials, {
glass_bottle = "vessels:glass_bottle",
vessels_shelf = "vessels:shelf",
})
end

View file

@ -0,0 +1,5 @@
moreblocks.resources = {}
moreblocks.dofile("resources", "craft_materials")
moreblocks.dofile("resources", "sounds")
moreblocks.dofile("resources", "textures")

View file

@ -0,0 +1,14 @@
local table_set_all = futil.table.set_all
moreblocks.resources.sounds = {}
if moreblocks.has.default then
table_set_all(moreblocks.resources.sounds, {
dirt = default.node_sound_dirt_defaults(),
glass = default.node_sound_glass_defaults(),
leaves = default.node_sound_leaves_defaults(),
metal = default.node_sound_metal_defaults(),
stone = default.node_sound_stone_defaults(),
wood = default.node_sound_wood_defaults(),
})
end

View file

@ -0,0 +1,51 @@
local table_set_all = futil.table.set_all
moreblocks.resources.textures = {
desert_stone = "[combine:16x16^[noalpha^[colorize:#85513e",
glass = ([[
[combine:16x16
:0,0=\[combine\:1x16\^[noalpha\^[colorize\:#FFF
:0,0=\[combine\:16x1\^[noalpha\^[colorize\:#FFF
:0,15=\[combine\:16x1\^[noalpha\^[colorize\:#FFF
:15,0=\[combine\:1x16\^[noalpha\^[colorize\:#FFF
]]):gsub("%s", ""),
glass_detail = ([[
[combine:16x16
:0,0=\[combine\:1x16\^[noalpha\^[colorize\:#FFF
:0,0=\[combine\:16x1\^[noalpha\^[colorize\:#FFF
:0,15=\[combine\:16x1\^[noalpha\^[colorize\:#FFF
:15,0=\[combine\:1x16\^[noalpha\^[colorize\:#FFF
]]):gsub("%s", ""),
obsidian = "default_obsidian.png",
obsidian_glass = ([[
[combine:16x16
:0,0=\[combine\:1x16\^[noalpha\^[colorize\:#000
:0,0=\[combine\:16x1\^[noalpha\^[colorize\:#000
:0,15=\[combine\:16x1\^[noalpha\^[colorize\:#000
:15,0=\[combine\:1x16\^[noalpha\^[colorize\:#000
]]):gsub("%s", ""),
obsidian_glass_detail = ([[
[combine:16x16
:0,0=\[combine\:1x16\^[noalpha\^[colorize\:#000
:0,0=\[combine\:16x1\^[noalpha\^[colorize\:#000
:0,15=\[combine\:16x1\^[noalpha\^[colorize\:#000
:15,0=\[combine\:1x16\^[noalpha\^[colorize\:#000
]]):gsub("%s", ""),
sandstone = "default_sandstone.png",
stone = "[combine:16x16^[noalpha^[colorize:#686463",
wood = "[combine:16x16^[noalpha^[colorize:#654321",
}
if moreblocks.has.default then
table_set_all(moreblocks.resources.textures, {
desert_stone = "default_desert_stone.png",
glass = "default_glass.png",
glass_detail = "default_glass_detail.png",
obsidian = "default_obsidian.png",
obsidian_glass = "default_obsidian_glass.png",
obsidian_glass_detail = "default_obsidian_glass_detail.png",
sandstone = "default_sandstone.png",
stone = "default_stone.png",
wood = "default_wood.png",
})
end

View file

@ -0,0 +1,2 @@
# Add a yellow outline around trap nodes, to make them visibly distinct
moreblocks.outline_trap_nodes (Outline trap nodes) bool true

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

View file

@ -0,0 +1,654 @@
std = "lua51+luajit+minetest+moreblocks_legacy_recipes"
unused_args = false
max_line_length = 120
stds.minetest = {
read_globals = {
"DIR_DELIM",
"dump",
"dump2",
math = {
fields = {
abs = {},
acos = {},
asin = {},
atan = {},
atan2 = {},
ceil = {},
cos = {},
cosh = {},
deg = {},
exp = {},
factorial = {},
floor = {},
fmod = {},
frexp = {},
huge = {},
hypot = {},
ldexp = {},
log = {},
log10 = {},
max = {},
min = {},
modf = {},
pi = {},
pow = {},
rad = {},
random = {},
randomseed = {},
round = {},
sign = {},
sin = {},
sinh = {},
sqrt = {},
tan = {},
tanh = {},
},
},
table = {
fields = {
copy = {},
concat = {},
foreach = {},
foreachi = {},
getn = {},
indexof = {},
insert = {},
insert_all = {},
key_value_swap = {},
maxn = {},
move = {},
remove = {},
shuffle = {},
sort = {},
},
},
string = {
fields = {
byte = {},
char = {},
dump = {},
find = {},
format = {},
gmatch = {},
len = {},
lower = {},
match = {},
rep = {},
reverse = {},
split = {},
sub = {},
trim = {},
upper = {},
},
},
vector = {
fields = {
add = {},
angle = {},
apply = {},
check = {},
combine = {},
copy = {},
cross = {},
dir_to_rotation = {},
direction = {},
distance = {},
divide = {},
dot = {},
equals = {},
floor = {},
from_string = {},
length = {},
metatable = {},
multiply = {},
new = {},
normalize = {},
offset = {},
rotate = {},
rotate_around_axis = {},
round = {},
sort = {},
subtract = {},
to_string = {},
zero = {},
},
},
ItemStack = {
fields = {
add_item = {},
add_wear = {},
add_wear_by_uses = {},
clear = {},
get_count = {},
get_definition = {},
get_description = {},
get_free_space = {},
get_meta = {},
get_metadata = {},
get_name = {},
get_short_description = {},
get_stack_max = {},
get_tool_capabilities = {},
get_wear = {},
is_empty = {},
is_known = {},
item_fits = {},
peek_item = {},
replace = {},
set_count = {},
set_metadata = {},
set_name = {},
set_wear = {},
take_item = {},
to_string = {},
to_table = {},
},
},
PerlinNoise = {
fields = {
get_2d = {},
get_3d = {},
},
},
PerlinNoiseMap = {
fields = {
calc_2d_map = {},
calc_3d_map = {},
get_2d_map = {},
get_2d_map_flat = {},
get_3d_map = {},
get_3d_map_flat = {},
get_map_slice = {},
},
},
PseudoRandom = {
fields = {
next = {},
},
},
PcgRandom = {
fields = {
next = {},
rand_normal_dist = {},
},
},
SecureRandom = {
fields = {
next_bytes = {},
},
},
Settings = {
fields = {
get = {},
get_bool = {},
get_flags = {},
get_names = {},
get_np_group = {},
remove = {},
set = {},
set_bool = {},
set_np_group = {},
to_table = {},
write = {},
},
},
VoxelArea = {
fields = {
MaxEdge = {},
MinEdge = {},
contains = {},
containsi = {},
containsp = {},
getExtent = {},
getVolume = {},
index = {},
indexp = {},
iter = {},
iterp = {},
new = {},
position = {},
ystride = {},
zstride = {},
},
},
VoxelManip = {
fields = {
calc_lighting = {},
get_data = {},
get_emerged_area = {},
get_light_data = {},
get_node_at = {},
get_param2_data = {},
read_from_map = {},
set_data = {},
set_light_data = {},
set_lighting = {},
set_node_at = {},
set_param2_data = {},
update_liquids = {},
update_map = {},
was_modified = {},
write_to_map = {},
},
},
minetest = {
fields = {
CONTENT_AIR = {},
CONTENT_IGNORE = {},
CONTENT_UNKNOWN = {},
EMERGE_CANCELLED = {},
EMERGE_ERRORED = {},
EMERGE_FROM_DISK = {},
EMERGE_FROM_MEMORY = {},
EMERGE_GENERATED = {},
LIGHT_MAX = {},
MAP_BLOCKSIZE = {},
PLAYER_MAX_BREATH_DEFAULT = {},
PLAYER_MAX_HP_DEFAULT = {},
add_entity = {},
add_item = {},
add_node = {},
add_node_level = {},
add_particle = {},
add_particlespawner = {},
after = {},
async_event_handler = {},
async_jobs = {},
auth_reload = {},
ban_player = {},
builtin_auth_handler = {},
bulk_set_node = {},
calculate_knockback = {},
callback_origins = {},
cancel_shutdown_requests = {},
chat_send_all = {},
chat_send_player = {},
chatcommands = {},
check_for_falling = {},
check_password_entry = {},
check_player_privs = {},
check_single_for_falling = {},
clear_craft = {},
clear_objects = {},
clear_registered_biomes = {},
clear_registered_decorations = {},
clear_registered_ores = {},
clear_registered_schematics = {},
close_formspec = {},
colorize = {},
colorspec_to_bytes = {},
colorspec_to_colorstring = {},
compare_block_status = {},
compress = {},
cpdir = {},
craft_predict = {},
craftitemdef_default = {},
create_detached_inventory = {},
create_detached_inventory_raw = {},
create_schematic = {},
debug = {},
decode_base64 = {},
decompress = {},
delete_area = {},
delete_particlespawner = {},
deserialize = {},
detached_inventories = {},
dig_node = {},
dir_to_facedir = {},
dir_to_wallmounted = {},
dir_to_yaw = {},
disconnect_player = {},
do_async_callback = {},
do_item_eat = {},
dynamic_add_media = {},
dynamic_media_callbacks = {},
emerge_area = {},
encode_base64 = {},
encode_png = {},
env = {},
explode_scrollbar_event = {},
explode_table_event = {},
explode_textlist_event = {},
facedir_to_dir = {},
features = {},
find_node_near = {},
find_nodes_in_area = {},
find_nodes_in_area_under_air = {},
find_nodes_with_meta = {},
find_path = {},
fix_light = {},
forceload_block = {},
forceload_free_block = {},
format_chat_message = {},
formspec_escape = {},
generate_decorations = {},
generate_ores = {},
get_all_craft_recipes = {},
get_artificial_light = {},
get_auth_handler = {},
get_background_escape_sequence = {},
get_ban_description = {},
get_ban_list = {},
get_biome_data = {},
get_biome_id = {},
get_biome_name = {},
get_builtin_path = {},
get_color_escape_sequence = {},
get_connected_players = {},
get_content_id = {},
get_craft_recipe = {},
get_craft_result = {},
get_current_modname = {},
get_day_count = {},
get_decoration_id = {},
get_dig_params = {},
get_dir_list = {},
get_gametime = {},
get_gen_notify = {},
get_heat = {},
get_hit_params = {},
get_humidity = {},
get_inventory = {},
get_item_group = {},
get_last_run_mod = {},
get_mapgen_object = {},
get_mapgen_params = {},
get_mapgen_setting = {},
get_mapgen_setting_noiseparams = {},
get_meta = {},
get_mod_storage = {},
get_modnames = {},
get_modpath = {},
get_name_from_content_id = {},
get_natural_light = {},
get_node = {},
get_node_drops = {},
get_node_group = {},
get_node_level = {},
get_node_light = {},
get_node_max_level = {},
get_node_or_nil = {},
get_node_timer = {},
get_noiseparams = {},
get_objects_in_area = {},
get_objects_inside_radius = {},
get_password_hash = {},
get_perlin = {},
get_perlin_map = {},
get_player_by_name = {},
get_player_information = {},
get_player_ip = {},
get_player_privs = {},
get_player_radius_area = {},
get_pointed_thing_position = {},
get_position_from_hash = {},
get_server_max_lag = {},
get_server_status = {},
get_server_uptime = {},
get_spawn_level = {},
get_timeofday = {},
get_tool_wear_after_use = {},
get_translated_string = {},
get_translator = {},
get_us_time = {},
get_user_path = {},
get_version = {},
get_voxel_manip = {},
get_worldpath = {},
global_exists = {},
handle_async = {},
handle_node_drops = {},
has_feature = {},
hash_node_position = {},
hud_replace_builtin = {},
inventorycube = {},
is_area_protected = {},
is_colored_paramtype = {},
is_creative_enabled = {},
is_nan = {},
is_player = {},
is_protected = {},
is_singleplayer = {},
is_yes = {},
item_drop = {},
item_eat = {},
item_place = {},
item_place_node = {},
item_place_object = {},
item_secondary_use = {},
itemstring_with_color = {},
itemstring_with_palette = {},
kick_player = {},
line_of_sight = {},
load_area = {},
log = {},
luaentities = {},
mkdir = {},
mod_channel_join = {},
mvdir = {},
node_dig = {},
node_punch = {},
nodedef_default = {},
noneitemdef_default = {},
notify_authentication_modified = {},
object_refs = {},
on_craft = {},
override_chatcommand = {},
override_item = {},
parse_coordinates = {},
parse_json = {},
parse_relative_number = {},
place_node = {},
place_schematic = {},
place_schematic_on_vmanip = {},
player_exists = {},
pointed_thing_to_face_pos = {},
pos_to_string = {},
print = {},
privs_to_string = {},
punch_node = {},
raillike_group = {},
raycast = {},
read_schematic = {},
record_protection_violation = {},
register_abm = {},
register_alias = {},
register_alias_force = {},
register_allow_player_inventory_action = {},
register_async_dofile = {},
register_authentication_handler = {},
register_biome = {},
register_can_bypass_userlimit = {},
register_chatcommand = {},
register_craft = {},
register_craft_predict = {},
register_craftitem = {},
register_decoration = {},
register_entity = {},
register_globalstep = {},
register_item = {},
register_lbm = {},
register_node = {},
register_on_auth_fail = {},
register_on_authplayer = {},
register_on_chat_message = {},
register_on_chatcommand = {},
register_on_cheat = {},
register_on_craft = {},
register_on_dieplayer = {},
register_on_dignode = {},
register_on_generated = {},
register_on_item_eat = {},
register_on_joinplayer = {},
register_on_leaveplayer = {},
register_on_liquid_transformed = {},
register_on_mapgen_init = {},
register_on_modchannel_message = {},
register_on_mods_loaded = {},
register_on_newplayer = {},
register_on_placenode = {},
register_on_player_hpchange = {},
register_on_player_inventory_action = {},
register_on_player_receive_fields = {},
register_on_prejoinplayer = {},
register_on_priv_grant = {},
register_on_priv_revoke = {},
register_on_protection_violation = {},
register_on_punchnode = {},
register_on_punchplayer = {},
register_on_respawnplayer = {},
register_on_rightclickplayer = {},
register_on_shutdown = {},
register_ore = {},
register_playerevent = {},
register_privilege = {},
register_schematic = {},
register_tool = {},
registered_abms = {other_fields = true},
registered_aliases = {other_fields = true},
registered_allow_player_inventory_actions = {other_fields = true},
registered_biomes = {other_fields = true},
registered_can_bypass_userlimit = {other_fields = true},
registered_chatcommands = {other_fields = true},
registered_craft_predicts = {other_fields = true},
registered_craftitems = {other_fields = true},
registered_decorations = {other_fields = true},
registered_entities = {other_fields = true},
registered_globalsteps = {other_fields = true},
registered_items = {other_fields = true},
registered_lbms = {other_fields = true},
registered_nodes = {other_fields = true},
registered_on_authplayers = {other_fields = true},
registered_on_chat_messages = {other_fields = true},
registered_on_chatcommands = {other_fields = true},
registered_on_cheats = {other_fields = true},
registered_on_crafts = {other_fields = true},
registered_on_dieplayers = {other_fields = true},
registered_on_dignodes = {other_fields = true},
registered_on_generateds = {other_fields = true},
registered_on_item_eats = {other_fields = true},
registered_on_joinplayers = {other_fields = true},
registered_on_leaveplayers = {other_fields = true},
registered_on_liquid_transformed = {other_fields = true},
registered_on_modchannel_message = {other_fields = true},
registered_on_mods_loaded = {other_fields = true},
registered_on_newplayers = {other_fields = true},
registered_on_placenodes = {other_fields = true},
registered_on_player_hpchange = {other_fields = true},
registered_on_player_hpchanges = {other_fields = true},
registered_on_player_inventory_actions = {other_fields = true},
registered_on_player_receive_fields = {other_fields = true},
registered_on_prejoinplayers = {other_fields = true},
registered_on_priv_grant = {other_fields = true},
registered_on_priv_revoke = {other_fields = true},
registered_on_protection_violation = {other_fields = true},
registered_on_punchnodes = {other_fields = true},
registered_on_punchplayers = {other_fields = true},
registered_on_respawnplayers = {other_fields = true},
registered_on_rightclickplayers = {other_fields = true},
registered_on_shutdown = {other_fields = true},
registered_ores = {other_fields = true},
registered_playerevents = {other_fields = true},
registered_privileges = {other_fields = true},
registered_tools = {other_fields = true},
remove_detached_inventory = {},
remove_detached_inventory_raw = {},
remove_node = {},
remove_player = {},
remove_player_auth = {},
request_http_api = {},
request_insecure_environment = {},
request_shutdown = {},
rgba = {},
rmdir = {},
rollback_get_last_node_actor = {},
rollback_get_node_actions = {},
rollback_punch_callbacks = {},
rollback_revert_actions_by = {},
rotate_and_place = {},
rotate_node = {},
run_callbacks = {},
run_priv_callbacks = {},
safe_file_write = {},
send_join_message = {},
send_leave_message = {},
serialize = {},
serialize_roundtrip = {},
serialize_schematic = {},
set_gen_notify = {},
set_last_run_mod = {},
set_mapgen_params = {},
set_mapgen_setting = {},
set_mapgen_setting_noiseparams = {},
set_node = {},
set_node_level = {},
set_noiseparams = {},
set_player_password = {},
set_player_privs = {},
set_timeofday = {},
setting_get = {},
setting_get_pos = {},
setting_getbool = {},
setting_save = {},
setting_set = {},
setting_setbool = {},
settings = {
fields = {
get = {},
get_bool = {},
get_np_group = {},
get_flags = {},
set = {},
set_bool = {},
set_np_group = {},
remove = {},
get_names = {},
write = {},
to_table = {},
},
},
sha1 = {},
show_formspec = {},
show_general_help_formspec = {},
show_privs_help_formspec = {},
sound_fade = {},
sound_play = {},
sound_stop = {},
spawn_falling_node = {},
spawn_item = {},
spawn_tree = {},
string_to_area = {},
string_to_pos = {},
string_to_privs = {},
strip_background_colors = {},
strip_colors = {},
strip_foreground_colors = {},
strip_param2_color = {},
swap_node = {},
tooldef_default = {},
transforming_liquid_add = {},
translate = {},
unban_player_or_ip = {},
unregister_biome = {},
unregister_chatcommand = {},
unregister_item = {},
wallmounted_to_dir = {},
wrap_text = {},
write_json = {},
yaw_to_dir = {},
},
},
}
}
stds.moreblocks_legacy_recipes = {
globals = {
},
read_globals = {
"fmod",
},
}

View file

@ -0,0 +1,116 @@
-- disabled by default
if not minetest.settings:get_bool("moreblocks_legacy_recipes.enabled", false) then
return
end
local modname = minetest.get_current_modname()
-- Redefine some of the default crafting recipes to be more productive
-- Auxiliary function: take a recipe as returned by get_all_craft_recipes
-- and turn it into a table that can be used to clear a craft or declare a new one
local reconstruct_internal_craft = function(recipe)
local recp = {
{ "", "", "" },
{ "", "", "" },
{ "", "", "" },
}
local width = recipe.width
for idx, item in pairs(recipe.items) do
local row = math.ceil(idx / width)
local col = idx - (row - 1) * width
recp[row][col] = item
end
return recp
end
-- Change the amount produced by recipe by apply func to the old amount
local change_recipe_amount = function(product, recipe, func)
-- if width == 0, this is a shapeless recipe, for which the
-- internal and Lua API recipe table is the same.
-- Otherwise we need to reconstruct the table for the shaped recipe.
local shapeless = (recipe.width == 0)
local recp = shapeless and recipe.items or reconstruct_internal_craft(recipe)
local oldamount = tonumber(recipe.output:match(" [0-9]+$") or "1")
local newamount = func(oldamount)
-- remove old crafting recipe
local redo = { recipe = recp }
-- preserve shapelessness
if shapeless then
redo.type = "shapeless"
end
minetest.clear_craft(redo)
-- new output
redo.output = ("%s %d"):format(product, newamount)
minetest.register_craft(redo)
minetest.log(
"action",
("[MOD]%s: recipe for %s production: %d => %d"):format(modname, product, oldamount, newamount)
)
end
local increase_craft_production = function(product, func)
local recipes = minetest.get_all_craft_recipes(product)
for _, r in pairs(recipes) do
if r.type == "normal" or r.method == "normal" then
change_recipe_amount(product, r, func)
end
end
end
-- Increase the crafting production according to the rules from the table, which is in the form:
-- {
-- { detector, amount changing function }
-- { detector, amount changing function }
-- }
-- TODO: consider exporting this function to other mods
local increase_craft_production_table = function(map_table)
for product, _ in pairs(minetest.registered_items) do
for _, tab in pairs(map_table) do
local detector = tab[1]
local func = tab[2]
if detector(product) then
increase_craft_production(product, func)
-- only apply one boost
break
end
end
end
end
increase_craft_production_table({
{
function(n)
return n:match("^default:sign_wall")
end,
function(old)
return old + 1
end,
},
{
function(n)
return n == "default:paper"
end,
function(old)
return old * 4
end,
},
{
function(n)
return n:match("^carts:.*rail$") or n:match("^default:.*rail$")
end,
function(old)
return old + old / 2
end,
},
})
minetest.register_craft({
type = "toolrepair",
additional_wear = -0.10, -- Tool repair buff (10% bonus instead of 2%).
})

View file

@ -0,0 +1,11 @@
name = moreblocks_legacy_recipes
title = moreblocks legacy recipes
description = adds back recipe changes that used to be part of moreblocks
website = https://content.minetest.net/packages/rheo/moreblocks/.
author = Hugo Locurcio, fluxionary, others (see commit log)
license = LGPL-3.0-or-later
media_license = CC-BY-SA-4.0
version = 2024-12-23
min_minetest_version = 5.6.1
depends = fmod
optional_depends = carts, default

View file

@ -0,0 +1,2 @@
# whether to increase the yield of certain crafting recipes as in moreblocks 2.*
moreblocks_legacy_recipes.enabled (Enable legacy recipes) bool false

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

View file

@ -0,0 +1,92 @@
[invsaw]
# Will be created if it doesn't already exist
invsaw.priv (Priv to use the inventory saw) string interact
# Will be created if it doesn't already exist
invsaw.creative_priv (Priv to use the inventory saw w/out a saw item) string creative
# The item that a normal player has to have to use the saw in inventory
invsaw.saw_item (Saw item) string stairsplus:circular_saw
[moreblocks]
# whether to increase the yield of certain crafting recipes as in moreblocks 2.*
moreblocks_legacy_recipes.enabled (Enable legacy recipes) bool false
# Add a yellow outline around trap nodes, to make them visibly distinct
moreblocks.outline_trap_nodes (Outline trap nodes) bool true
[stairs]
# If true, registering stairs w/out a registered recipe item will still create the stair nodes.
# This is how the stairs mod in minetest game works currently.
# Unfortunately, they will not be craftable.
# By default, trying to do this will create an error.
stairs.legacy_stairs_without_recipeitem (Allow stairs without a base node) bool false
[stairsplus]
# I guess if you want the saw to be creative-only?
stairsplus.circular_saw_crafting (Allow crafting the circular saw) bool true
# Defaults to true if creative_mode is enabled.
stairsplus.ex_nihilo (Saw gives infinite nodes) bool false
# If enabled, Stairs+ nodes will be displayed in the inventory when playing in creative mode.
# Disabling this can speed up loading times for clients as fewer nodes need to be registered in the creative inventory.
stairsplus.in_creative_inventory (Display Stairs+ nodes in creative inventory) bool true
# Whether to show crafting recipes involving Stairs+ nodes (in compatible inventory managers)
stairsplus.in_craft_guide (Show crafting recipes) bool true
# "user" or "world" cause things to look nicer in general, but some nodes look better w/ the "node" style
stairsplus.default_align_style (World align style) enum user node,user,world
# regular stairs shapes
stairsplus.basic_shapes (basic shapes) flags micro_8,slab_8,stair,stair_inner,stair_outer panel_1,slope,slope_half,slope_half_raised,panel_2,slope_inner_cut,slope_inner_half,panel_4,slope_inner_half_raised,slope_inner_cut_half_raised,slope_outer,slope_outer_cut,slope_cut,slope_outer_half,panel_12,slope_outer_half_raised,slope_outer_cut_half_raised,panel_14,panel_15,micro_1,slab_15,slab_two_sides,stair_half,slab_three_sides,stair_right_half,slab_three_sides_u,micro_12,micro_14,slab_2,micro_15,slab_4,micro_2,stair_alt_4,stair_alt_2,stair_alt_1,stair_alt_8,slab_1,slab_12,stair,slope_outer_cut_half,slope_inner_cut_half,slab_14,micro_4,micro_8,slab_8,stair_inner,stair_outer,slope_inner,panel_8
# the most commonly used variants
stairsplus.common_shapes (common shapes) flags micro_8,panel_8,slab_1,slab_8,stair,stair_inner,stair_outer,slope,slope_half,slope_half_raised,slope_inner,slope_inner_cut,slope_inner_half,slope_inner_cut_half,slope_inner_half_raised,slope_inner_cut_half_raised,slope_outer,slope_outer_cut,slope_cut,slope_outer_half,slope_outer_cut_half,slope_outer_half_raised,slope_outer_cut_half_raised panel_1,slope,slope_half,slope_half_raised,panel_2,slope_inner_cut,slope_inner_half,panel_4,slope_inner_half_raised,slope_inner_cut_half_raised,slope_outer,slope_outer_cut,slope_cut,slope_outer_half,panel_12,slope_outer_half_raised,slope_outer_cut_half_raised,panel_14,panel_15,micro_1,slab_15,slab_two_sides,stair_half,slab_three_sides,stair_right_half,slab_three_sides_u,micro_12,micro_14,slab_2,micro_15,slab_4,micro_2,stair_alt_4,stair_alt_2,stair_alt_1,stair_alt_8,slab_1,slab_12,stair,slope_outer_cut_half,slope_inner_cut_half,slab_14,micro_4,micro_8,slab_8,stair_inner,stair_outer,slope_inner,panel_8
# default to registering *all* variants, and some other stuff.
# it is only "safe" to disable this on new servers.
stairsplus.legacy_mode (legacy mode) bool true
# automatically try to rotate nodes when placed. the mechanic is sometimes confusing.
stairsplus.legacy_place_mechanic (use legacy place mecahnic) bool true
# allows crafting shaped nodes in addition to cutting them
stairsplus.crafting_schemata_enabled (enable crafting schemata) bool true
# when set to true, will only register nodes specified in $WORLD_PATH/stairsplus.whitelist
stairsplus.whitelist_mode (whitelist mode) bool false
# this fork changes how groups for stairsplus derivative nodes are computed. normally this is logged, because i don't
# have a better way to communicate this. however, these changes don't cause any actual incompatibility that i'm aware
# of. if you don't want to fix the mods that use moreblocks to be aware of this fork, you can enable this setting
# to remove those log messages.
stairsplus.silence_group_overrides (silence group override log messages) bool false
[stairsplus_legacy]
# enable registering stairsplus nodes for basic_materials
stairsplus_legacy.basic_materials () bool true
# enable registering stairsplus nodes for default
stairsplus_legacy.default () bool true
# enable registering stairsplus nodes for farming
stairsplus_legacy.farming () bool true
# enable registering stairsplus nodes for gloopblocks
stairsplus_legacy.gloopblocks () bool true
# enable registering stairsplus nodes for technic
stairsplus_legacy.technic () bool true
# enable registering stairsplus nodes for prefab
stairsplus_legacy.prefab () bool true
# enable registering stairsplus nodes for wool
stairsplus_legacy.wool () bool true

View file

@ -0,0 +1,656 @@
std = "lua51+luajit+minetest+stairs"
unused_args = false
max_line_length = 120
stds.minetest = {
read_globals = {
"DIR_DELIM",
"dump",
"dump2",
math = {
fields = {
abs = {},
acos = {},
asin = {},
atan = {},
atan2 = {},
ceil = {},
cos = {},
cosh = {},
deg = {},
exp = {},
factorial = {},
floor = {},
fmod = {},
frexp = {},
huge = {},
hypot = {},
ldexp = {},
log = {},
log10 = {},
max = {},
min = {},
modf = {},
pi = {},
pow = {},
rad = {},
random = {},
randomseed = {},
round = {},
sign = {},
sin = {},
sinh = {},
sqrt = {},
tan = {},
tanh = {},
},
},
table = {
fields = {
copy = {},
concat = {},
foreach = {},
foreachi = {},
getn = {},
indexof = {},
insert = {},
insert_all = {},
key_value_swap = {},
maxn = {},
move = {},
remove = {},
shuffle = {},
sort = {},
},
},
string = {
fields = {
byte = {},
char = {},
dump = {},
find = {},
format = {},
gmatch = {},
len = {},
lower = {},
match = {},
rep = {},
reverse = {},
split = {},
sub = {},
trim = {},
upper = {},
},
},
vector = {
fields = {
add = {},
angle = {},
apply = {},
check = {},
combine = {},
copy = {},
cross = {},
dir_to_rotation = {},
direction = {},
distance = {},
divide = {},
dot = {},
equals = {},
floor = {},
from_string = {},
length = {},
metatable = {},
multiply = {},
new = {},
normalize = {},
offset = {},
rotate = {},
rotate_around_axis = {},
round = {},
sort = {},
subtract = {},
to_string = {},
zero = {},
},
},
ItemStack = {
fields = {
add_item = {},
add_wear = {},
add_wear_by_uses = {},
clear = {},
get_count = {},
get_definition = {},
get_description = {},
get_free_space = {},
get_meta = {},
get_metadata = {},
get_name = {},
get_short_description = {},
get_stack_max = {},
get_tool_capabilities = {},
get_wear = {},
is_empty = {},
is_known = {},
item_fits = {},
peek_item = {},
replace = {},
set_count = {},
set_metadata = {},
set_name = {},
set_wear = {},
take_item = {},
to_string = {},
to_table = {},
},
},
PerlinNoise = {
fields = {
get_2d = {},
get_3d = {},
},
},
PerlinNoiseMap = {
fields = {
calc_2d_map = {},
calc_3d_map = {},
get_2d_map = {},
get_2d_map_flat = {},
get_3d_map = {},
get_3d_map_flat = {},
get_map_slice = {},
},
},
PseudoRandom = {
fields = {
next = {},
},
},
PcgRandom = {
fields = {
next = {},
rand_normal_dist = {},
},
},
SecureRandom = {
fields = {
next_bytes = {},
},
},
Settings = {
fields = {
get = {},
get_bool = {},
get_flags = {},
get_names = {},
get_np_group = {},
remove = {},
set = {},
set_bool = {},
set_np_group = {},
to_table = {},
write = {},
},
},
VoxelArea = {
fields = {
MaxEdge = {},
MinEdge = {},
contains = {},
containsi = {},
containsp = {},
getExtent = {},
getVolume = {},
index = {},
indexp = {},
iter = {},
iterp = {},
new = {},
position = {},
ystride = {},
zstride = {},
},
},
VoxelManip = {
fields = {
calc_lighting = {},
get_data = {},
get_emerged_area = {},
get_light_data = {},
get_node_at = {},
get_param2_data = {},
read_from_map = {},
set_data = {},
set_light_data = {},
set_lighting = {},
set_node_at = {},
set_param2_data = {},
update_liquids = {},
update_map = {},
was_modified = {},
write_to_map = {},
},
},
minetest = {
fields = {
CONTENT_AIR = {},
CONTENT_IGNORE = {},
CONTENT_UNKNOWN = {},
EMERGE_CANCELLED = {},
EMERGE_ERRORED = {},
EMERGE_FROM_DISK = {},
EMERGE_FROM_MEMORY = {},
EMERGE_GENERATED = {},
LIGHT_MAX = {},
MAP_BLOCKSIZE = {},
PLAYER_MAX_BREATH_DEFAULT = {},
PLAYER_MAX_HP_DEFAULT = {},
add_entity = {},
add_item = {},
add_node = {},
add_node_level = {},
add_particle = {},
add_particlespawner = {},
after = {},
async_event_handler = {},
async_jobs = {},
auth_reload = {},
ban_player = {},
builtin_auth_handler = {},
bulk_set_node = {},
calculate_knockback = {},
callback_origins = {},
cancel_shutdown_requests = {},
chat_send_all = {},
chat_send_player = {},
chatcommands = {},
check_for_falling = {},
check_password_entry = {},
check_player_privs = {},
check_single_for_falling = {},
clear_craft = {},
clear_objects = {},
clear_registered_biomes = {},
clear_registered_decorations = {},
clear_registered_ores = {},
clear_registered_schematics = {},
close_formspec = {},
colorize = {},
colorspec_to_bytes = {},
colorspec_to_colorstring = {},
compare_block_status = {},
compress = {},
cpdir = {},
craft_predict = {},
craftitemdef_default = {},
create_detached_inventory = {},
create_detached_inventory_raw = {},
create_schematic = {},
debug = {},
decode_base64 = {},
decompress = {},
delete_area = {},
delete_particlespawner = {},
deserialize = {},
detached_inventories = {},
dig_node = {},
dir_to_facedir = {},
dir_to_wallmounted = {},
dir_to_yaw = {},
disconnect_player = {},
do_async_callback = {},
do_item_eat = {},
dynamic_add_media = {},
dynamic_media_callbacks = {},
emerge_area = {},
encode_base64 = {},
encode_png = {},
env = {},
explode_scrollbar_event = {},
explode_table_event = {},
explode_textlist_event = {},
facedir_to_dir = {},
features = {},
find_node_near = {},
find_nodes_in_area = {},
find_nodes_in_area_under_air = {},
find_nodes_with_meta = {},
find_path = {},
fix_light = {},
forceload_block = {},
forceload_free_block = {},
format_chat_message = {},
formspec_escape = {},
generate_decorations = {},
generate_ores = {},
get_all_craft_recipes = {},
get_artificial_light = {},
get_auth_handler = {},
get_background_escape_sequence = {},
get_ban_description = {},
get_ban_list = {},
get_biome_data = {},
get_biome_id = {},
get_biome_name = {},
get_builtin_path = {},
get_color_escape_sequence = {},
get_connected_players = {},
get_content_id = {},
get_craft_recipe = {},
get_craft_result = {},
get_current_modname = {},
get_day_count = {},
get_decoration_id = {},
get_dig_params = {},
get_dir_list = {},
get_gametime = {},
get_gen_notify = {},
get_heat = {},
get_hit_params = {},
get_humidity = {},
get_inventory = {},
get_item_group = {},
get_last_run_mod = {},
get_mapgen_object = {},
get_mapgen_params = {},
get_mapgen_setting = {},
get_mapgen_setting_noiseparams = {},
get_meta = {},
get_mod_storage = {},
get_modnames = {},
get_modpath = {},
get_name_from_content_id = {},
get_natural_light = {},
get_node = {},
get_node_drops = {},
get_node_group = {},
get_node_level = {},
get_node_light = {},
get_node_max_level = {},
get_node_or_nil = {},
get_node_timer = {},
get_noiseparams = {},
get_objects_in_area = {},
get_objects_inside_radius = {},
get_password_hash = {},
get_perlin = {},
get_perlin_map = {},
get_player_by_name = {},
get_player_information = {},
get_player_ip = {},
get_player_privs = {},
get_player_radius_area = {},
get_pointed_thing_position = {},
get_position_from_hash = {},
get_server_max_lag = {},
get_server_status = {},
get_server_uptime = {},
get_spawn_level = {},
get_timeofday = {},
get_tool_wear_after_use = {},
get_translated_string = {},
get_translator = {},
get_us_time = {},
get_user_path = {},
get_version = {},
get_voxel_manip = {},
get_worldpath = {},
global_exists = {},
handle_async = {},
handle_node_drops = {},
has_feature = {},
hash_node_position = {},
hud_replace_builtin = {},
inventorycube = {},
is_area_protected = {},
is_colored_paramtype = {},
is_creative_enabled = {},
is_nan = {},
is_player = {},
is_protected = {},
is_singleplayer = {},
is_yes = {},
item_drop = {},
item_eat = {},
item_place = {},
item_place_node = {},
item_place_object = {},
item_secondary_use = {},
itemstring_with_color = {},
itemstring_with_palette = {},
kick_player = {},
line_of_sight = {},
load_area = {},
log = {},
luaentities = {},
mkdir = {},
mod_channel_join = {},
mvdir = {},
node_dig = {},
node_punch = {},
nodedef_default = {},
noneitemdef_default = {},
notify_authentication_modified = {},
object_refs = {},
on_craft = {},
override_chatcommand = {},
override_item = {},
parse_coordinates = {},
parse_json = {},
parse_relative_number = {},
place_node = {},
place_schematic = {},
place_schematic_on_vmanip = {},
player_exists = {},
pointed_thing_to_face_pos = {},
pos_to_string = {},
print = {},
privs_to_string = {},
punch_node = {},
raillike_group = {},
raycast = {},
read_schematic = {},
record_protection_violation = {},
register_abm = {},
register_alias = {},
register_alias_force = {},
register_allow_player_inventory_action = {},
register_async_dofile = {},
register_authentication_handler = {},
register_biome = {},
register_can_bypass_userlimit = {},
register_chatcommand = {},
register_craft = {},
register_craft_predict = {},
register_craftitem = {},
register_decoration = {},
register_entity = {},
register_globalstep = {},
register_item = {},
register_lbm = {},
register_node = {},
register_on_auth_fail = {},
register_on_authplayer = {},
register_on_chat_message = {},
register_on_chatcommand = {},
register_on_cheat = {},
register_on_craft = {},
register_on_dieplayer = {},
register_on_dignode = {},
register_on_generated = {},
register_on_item_eat = {},
register_on_joinplayer = {},
register_on_leaveplayer = {},
register_on_liquid_transformed = {},
register_on_mapgen_init = {},
register_on_modchannel_message = {},
register_on_mods_loaded = {},
register_on_newplayer = {},
register_on_placenode = {},
register_on_player_hpchange = {},
register_on_player_inventory_action = {},
register_on_player_receive_fields = {},
register_on_prejoinplayer = {},
register_on_priv_grant = {},
register_on_priv_revoke = {},
register_on_protection_violation = {},
register_on_punchnode = {},
register_on_punchplayer = {},
register_on_respawnplayer = {},
register_on_rightclickplayer = {},
register_on_shutdown = {},
register_ore = {},
register_playerevent = {},
register_privilege = {},
register_schematic = {},
register_tool = {},
registered_abms = {other_fields = true},
registered_aliases = {other_fields = true},
registered_allow_player_inventory_actions = {other_fields = true},
registered_biomes = {other_fields = true},
registered_can_bypass_userlimit = {other_fields = true},
registered_chatcommands = {other_fields = true},
registered_craft_predicts = {other_fields = true},
registered_craftitems = {other_fields = true},
registered_decorations = {other_fields = true},
registered_entities = {other_fields = true},
registered_globalsteps = {other_fields = true},
registered_items = {other_fields = true},
registered_lbms = {other_fields = true},
registered_nodes = {other_fields = true},
registered_on_authplayers = {other_fields = true},
registered_on_chat_messages = {other_fields = true},
registered_on_chatcommands = {other_fields = true},
registered_on_cheats = {other_fields = true},
registered_on_crafts = {other_fields = true},
registered_on_dieplayers = {other_fields = true},
registered_on_dignodes = {other_fields = true},
registered_on_generateds = {other_fields = true},
registered_on_item_eats = {other_fields = true},
registered_on_joinplayers = {other_fields = true},
registered_on_leaveplayers = {other_fields = true},
registered_on_liquid_transformed = {other_fields = true},
registered_on_modchannel_message = {other_fields = true},
registered_on_mods_loaded = {other_fields = true},
registered_on_newplayers = {other_fields = true},
registered_on_placenodes = {other_fields = true},
registered_on_player_hpchange = {other_fields = true},
registered_on_player_hpchanges = {other_fields = true},
registered_on_player_inventory_actions = {other_fields = true},
registered_on_player_receive_fields = {other_fields = true},
registered_on_prejoinplayers = {other_fields = true},
registered_on_priv_grant = {other_fields = true},
registered_on_priv_revoke = {other_fields = true},
registered_on_protection_violation = {other_fields = true},
registered_on_punchnodes = {other_fields = true},
registered_on_punchplayers = {other_fields = true},
registered_on_respawnplayers = {other_fields = true},
registered_on_rightclickplayers = {other_fields = true},
registered_on_shutdown = {other_fields = true},
registered_ores = {other_fields = true},
registered_playerevents = {other_fields = true},
registered_privileges = {other_fields = true},
registered_tools = {other_fields = true},
remove_detached_inventory = {},
remove_detached_inventory_raw = {},
remove_node = {},
remove_player = {},
remove_player_auth = {},
request_http_api = {},
request_insecure_environment = {},
request_shutdown = {},
rgba = {},
rmdir = {},
rollback_get_last_node_actor = {},
rollback_get_node_actions = {},
rollback_punch_callbacks = {},
rollback_revert_actions_by = {},
rotate_and_place = {},
rotate_node = {},
run_callbacks = {},
run_priv_callbacks = {},
safe_file_write = {},
send_join_message = {},
send_leave_message = {},
serialize = {},
serialize_roundtrip = {},
serialize_schematic = {},
set_gen_notify = {},
set_last_run_mod = {},
set_mapgen_params = {},
set_mapgen_setting = {},
set_mapgen_setting_noiseparams = {},
set_node = {},
set_node_level = {},
set_noiseparams = {},
set_player_password = {},
set_player_privs = {},
set_timeofday = {},
setting_get = {},
setting_get_pos = {},
setting_getbool = {},
setting_save = {},
setting_set = {},
setting_setbool = {},
settings = {
fields = {
get = {},
get_bool = {},
get_np_group = {},
get_flags = {},
set = {},
set_bool = {},
set_np_group = {},
remove = {},
get_names = {},
write = {},
to_table = {},
},
},
sha1 = {},
show_formspec = {},
show_general_help_formspec = {},
show_privs_help_formspec = {},
sound_fade = {},
sound_play = {},
sound_stop = {},
spawn_falling_node = {},
spawn_item = {},
spawn_tree = {},
string_to_area = {},
string_to_pos = {},
string_to_privs = {},
strip_background_colors = {},
strip_colors = {},
strip_foreground_colors = {},
strip_param2_color = {},
swap_node = {},
tooldef_default = {},
transforming_liquid_add = {},
translate = {},
unban_player_or_ip = {},
unregister_biome = {},
unregister_chatcommand = {},
unregister_item = {},
wallmounted_to_dir = {},
wrap_text = {},
write_json = {},
yaw_to_dir = {},
},
},
}
}
stds.stairs = {
globals = {
"stairs",
},
read_globals = {
"fmod",
"stairsplus",
},
}

View file

@ -0,0 +1,216 @@
local f = string.format
local api = stairsplus.api
local S = stairsplus.S
local legacy = stairs.legacy
local is_legacy_drawtype = stairsplus.compat.is_legacy_drawtype
local is_legacy_paramtype2 = stairsplus.compat.is_legacy_paramtype2
local default_align_style = stairsplus.settings.default_align_style
local legacy_stairs_without_recipeitem = stairs.settings.legacy_stairs_without_recipeitem
function stairs.register_stair(subname, node, groups, tiles, description, sounds, worldaligntex)
if not minetest.registered_nodes[node] then
-- registering a stair for a node that doesn't exist
if legacy_stairs_without_recipeitem then
legacy.register_stair(subname, node, groups, tiles, description, sounds, worldaligntex)
return
else
error(
f(
"attempt to register stairs for unknown node %q. "
.. "set `stairs.legacy_stairs_without_recipeitem = true` in minetest.conf to enable this behavior.",
node
)
)
end
end
local meta = {
align_style = worldaligntex and "world" or default_align_style,
}
if is_legacy_drawtype(node) then
meta.ignore_drawtype = true
end
if is_legacy_paramtype2(node) then
meta.ignore_paramtype2 = true
end
api.register_single(node, "stair", {
groups = groups,
tiles = tiles,
description = description,
sounds = sounds,
}, meta)
minetest.register_alias(("stairs:stair_%s"):format(subname), api.format_name(node, "stair"))
end
function stairs.register_slab(subname, node, groups, tiles, description, sounds, worldaligntex)
if not minetest.registered_nodes[node] then
-- registering a stair for a node that doesn't exist
if legacy_stairs_without_recipeitem then
legacy.register_slab(subname, node, groups, tiles, description, sounds, worldaligntex)
return
else
error(
f(
"attempt to register stairs for unknown node %q. "
.. "set `stairs.legacy_stairs_without_recipeitem = true` in minetest.conf to enable this behavior.",
node
)
)
end
end
local meta = {
align_style = worldaligntex and "world" or default_align_style,
}
if is_legacy_drawtype(node) then
meta.ignore_drawtype = true
end
if is_legacy_paramtype2(node) then
meta.ignore_paramtype2 = true
end
api.register_single(node, "slab_8", {
groups = groups,
tiles = tiles,
description = description,
sounds = sounds,
}, meta)
minetest.register_alias(("stairs:slab_%s"):format(subname), api.format_name(node, "slab_8"))
end
function stairs.register_stair_inner(subname, node, groups, tiles, description, sounds, worldaligntex, full_description)
if not minetest.registered_nodes[node] then
-- registering a stair for a node that doesn't exist
if legacy_stairs_without_recipeitem then
legacy.register_stair_inner(
subname,
node,
groups,
tiles,
description,
sounds,
worldaligntex,
full_description
)
return
else
error(
f(
"attempt to register stairs for unknown node %q. "
.. "set `stairs.legacy_stairs_without_recipeitem = true` in minetest.conf to enable this behavior.",
node
)
)
end
end
local meta = {
align_style = worldaligntex and "world" or default_align_style,
}
if is_legacy_drawtype(node) then
meta.ignore_drawtype = true
end
if is_legacy_paramtype2(node) then
meta.ignore_paramtype2 = true
end
api.register_single(node, "stair_inner", {
groups = groups,
tiles = tiles,
description = full_description or S("Inner @1", description),
sounds = sounds,
}, meta)
minetest.register_alias(("stairs:stair_inner_%s"):format(subname), api.format_name(node, "stair_inner"))
end
function stairs.register_stair_outer(subname, node, groups, tiles, description, sounds, worldaligntex, full_description)
if not minetest.registered_nodes[node] then
-- registering a stair for a node that doesn't exist
if legacy_stairs_without_recipeitem then
legacy.register_stair_outer(
subname,
node,
groups,
tiles,
description,
sounds,
worldaligntex,
full_description
)
return
else
error(
f(
"attempt to register stairs for unknown node %q. "
.. "set `stairs.legacy_stairs_without_recipeitem = true` in minetest.conf to enable this behavior.",
node
)
)
end
end
local meta = {
align_style = worldaligntex and "world" or default_align_style,
}
if is_legacy_drawtype(node) then
meta.ignore_drawtype = true
end
if is_legacy_paramtype2(node) then
meta.ignore_paramtype2 = true
end
api.register_single(node, "stair_outer", {
groups = groups,
tiles = tiles,
description = full_description or S("Outer @1", description),
sounds = sounds,
}, meta)
minetest.register_alias(("stairs:stair_outer_%s"):format(subname), api.format_name(node, "stair_outer"))
end
function stairs.register_stair_and_slab(
subname,
recipeitem,
groups,
images,
desc_stair,
desc_slab,
sounds,
worldaligntex,
desc_stair_inner,
desc_stair_outer
)
stairs.register_stair(subname, recipeitem, groups, images, desc_stair, sounds, worldaligntex)
stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds, worldaligntex)
stairs.register_stair_inner(
subname,
recipeitem,
groups,
images,
desc_stair,
sounds,
worldaligntex,
desc_stair_inner
)
stairs.register_stair_outer(
subname,
recipeitem,
groups,
images,
desc_stair,
sounds,
worldaligntex,
desc_stair_outer
)
end

View file

@ -0,0 +1,4 @@
-- for very, very old worlds...
minetest.register_alias("stairs:stair_pinewood", "stairs:stair_pine_wood")
minetest.register_alias("stairs:slab_pinewood", "stairs:slab_pine_wood")

View file

@ -0,0 +1,6 @@
stairs = fmod.create()
stairs.dofile("util")
stairs.dofile("legacy")
stairs.dofile("api")
stairs.dofile("compat")

View file

@ -0,0 +1,290 @@
local rotate_and_place = minetest.rotate_and_place
local get_node_vars = stairs.util.get_node_vars
local get_stair_images = stairs.util.get_stair_images
local legacy = {}
local nodeboxes = {
stair = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.0, 0.5 },
{ -0.5, 0.0, 0.0, 0.5, 0.5, 0.5 },
},
},
slab = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
},
stair_inner = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.0, 0.5 },
{ -0.5, 0.0, 0.0, 0.5, 0.5, 0.5 },
{ -0.5, 0.0, -0.5, 0.0, 0.5, 0.0 },
},
},
stair_outer = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.0, 0.5 },
{ -0.5, 0.0, 0.0, 0.0, 0.5, 0.5 },
},
},
}
local function register_generic(name, recipeitem, groups, images, description, sounds, worldaligntex, nodebox)
if not nodebox then
error()
end
local light_source, texture_alpha, sunlight = get_node_vars(recipeitem)
local stair_images = get_stair_images(images, worldaligntex)
minetest.register_node(name, {
description = description,
drawtype = "nodebox",
tiles = stair_images,
use_texture_alpha = texture_alpha,
sunlight_propagates = sunlight,
light_source = light_source,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
groups = groups,
sounds = sounds,
node_box = nodebox,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
return rotate_and_place(itemstack, placer, pointed_thing)
end,
})
end
function legacy.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)
local new_groups = table.copy(groups)
new_groups.stair = 1
register_generic(
":stairs:stair_" .. subname,
recipeitem,
new_groups,
images,
description,
sounds,
worldaligntex,
nodeboxes.stair
)
if recipeitem and minetest.registered_nodes[recipeitem] then
-- Recipe matches appearence in inventory
minetest.register_craft({
output = "stairs:stair_" .. subname .. " 8",
recipe = {
{ "", "", recipeitem },
{ "", recipeitem, recipeitem },
{ recipeitem, recipeitem, recipeitem },
},
})
-- Use stairs to craft full blocks again (1:1)
minetest.register_craft({
output = recipeitem .. " 3",
recipe = {
{ "stairs:stair_" .. subname, "stairs:stair_" .. subname },
{ "stairs:stair_" .. subname, "stairs:stair_" .. subname },
},
})
-- Fuel
local baseburntime = minetest.get_craft_result({
method = "fuel",
width = 1,
items = { recipeitem },
}).time
if baseburntime > 0 then
minetest.register_craft({
type = "fuel",
recipe = "stairs:stair_" .. subname,
burntime = math.floor(baseburntime * 0.75),
})
end
end
end
-- Register slab
-- Node will be called stairs:slab_<subname>
function legacy.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)
local new_groups = table.copy(groups)
new_groups.slab = 1
register_generic(
":stairs:slab_" .. subname,
recipeitem,
new_groups,
images,
description,
sounds,
worldaligntex,
nodeboxes.slab
)
if recipeitem and minetest.registered_nodes[recipeitem] then
minetest.register_craft({
output = "stairs:slab_" .. subname .. " 6",
recipe = {
{ recipeitem, recipeitem, recipeitem },
},
})
-- Use 2 slabs to craft a full block again (1:1)
minetest.register_craft({
output = recipeitem,
recipe = {
{ "stairs:slab_" .. subname },
{ "stairs:slab_" .. subname },
},
})
-- Fuel
local baseburntime = minetest.get_craft_result({
method = "fuel",
width = 1,
items = { recipeitem },
}).time
if baseburntime > 0 then
minetest.register_craft({
type = "fuel",
recipe = "stairs:slab_" .. subname,
burntime = math.floor(baseburntime * 0.5),
})
end
end
end
-- Register inner stair
-- Node will be called stairs:stair_inner_<subname>
function legacy.register_stair_inner(
subname,
recipeitem,
groups,
images,
description,
sounds,
worldaligntex,
full_description
)
local new_groups = table.copy(groups)
new_groups.stair = 1
if full_description then
description = full_description
else
description = stairs.S("Inner ") .. description
end
register_generic(
":stairs:stair_inner_" .. subname,
recipeitem,
new_groups,
images,
description,
sounds,
worldaligntex,
nodeboxes.stair_inner
)
if recipeitem and minetest.registered_nodes[recipeitem] then
minetest.register_craft({
output = "stairs:stair_inner_" .. subname .. " 7",
recipe = {
{ "", recipeitem, "" },
{ recipeitem, "", recipeitem },
{ recipeitem, recipeitem, recipeitem },
},
})
-- Fuel
local baseburntime = minetest.get_craft_result({
method = "fuel",
width = 1,
items = { recipeitem },
}).time
if baseburntime > 0 then
minetest.register_craft({
type = "fuel",
recipe = "stairs:stair_inner_" .. subname,
burntime = math.floor(baseburntime * 0.875),
})
end
end
end
-- Register outer stair
-- Node will be called stairs:stair_outer_<subname>
function legacy.register_stair_outer(
subname,
recipeitem,
groups,
images,
description,
sounds,
worldaligntex,
full_description
)
local new_groups = table.copy(groups)
new_groups.stair = 1
if full_description then
description = full_description
else
description = stairs.S("Outer ") .. description
end
register_generic(
":stairs:stair_outer_" .. subname,
recipeitem,
new_groups,
images,
description,
sounds,
worldaligntex,
nodeboxes.stair_outer
)
if recipeitem and minetest.registered_nodes[recipeitem] then
minetest.register_craft({
output = "stairs:stair_outer_" .. subname .. " 6",
recipe = {
{ "", recipeitem, "" },
{ recipeitem, recipeitem, recipeitem },
},
})
-- Fuel
local baseburntime = minetest.get_craft_result({
method = "fuel",
width = 1,
items = { recipeitem },
}).time
if baseburntime > 0 then
minetest.register_craft({
type = "fuel",
recipe = "stairs:stair_outer_" .. subname,
burntime = math.floor(baseburntime * 0.625),
})
end
end
end
stairs.legacy = legacy

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