diff --git a/techpack_modpack/.gitignore b/techpack_modpack/.gitignore
deleted file mode 100644
index 10f4939..0000000
--- a/techpack_modpack/.gitignore
+++ /dev/null
@@ -1,49 +0,0 @@
-# Compiled Lua sources
-luac.out
-
-# luarocks build files
-*.src.rock
-*.zip
-*.tar.gz
-
-# Object files
-*.o
-*.os
-*.ko
-*.obj
-*.elf
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Libraries
-*.lib
-*.a
-*.la
-*.lo
-*.def
-*.exp
-
-# Shared objects (inc. Windows DLLs)
-*.dll
-*.so
-*.so.*
-*.dylib
-
-# Executables
-*.exe
-*.out
-*.app
-*.i*86
-*.x86_64
-*.hex
-
-.buildpath
-.project
-org.eclipse.*
-*.lua.new
-
-test_*.lua
-
-shrink.py
diff --git a/techpack_modpack/COPYING.txt b/techpack_modpack/COPYING.txt
deleted file mode 100644
index 68beccd..0000000
--- a/techpack_modpack/COPYING.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-The TechPack Modpack for Minetest is
-
-Copyright (C) 2017-2018 Joachim Stolberg
-
-License of source code
-----------------------
-
-This program is free software; you can redistribute and/or
-modify it under the terms of the GNU Lesser General Public License version 2.1 or later
-published by the Free Software Foundation.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the
-Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-Boston, MA 02110-1301, USA.
-
-
-License of media (textures, sounds and documentation)
------------------------------------------------------
-
-All textures, sounds and documentation files are licensed under the
-Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
-http://creativecommons.org/licenses/by-sa/3.0/
diff --git a/techpack_modpack/LICENSE.txt b/techpack_modpack/LICENSE.txt
index 4362b49..2beb9e1 100644
--- a/techpack_modpack/LICENSE.txt
+++ b/techpack_modpack/LICENSE.txt
@@ -1,502 +1,662 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
Preamble
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+modification follow.
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
+ TERMS AND CONDITIONS
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
+ 0. Definitions.
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
+ "This License" refers to version 3 of the GNU Affero General Public License.
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
- a) The modified work must itself be a software library.
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
+ 1. Source Code.
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
+ The Corresponding Source for a work in source code form is that
+same work.
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
+ 2. Basic Permissions.
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
+ 4. Conveying Verbatim Copies.
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
+ 5. Conveying Modified Source Versions.
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. 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 not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
+ 6. Conveying Non-Source Forms.
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
+ 13. Remote Network Interaction; Use with the GNU General Public License.
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
+ 14. Revised Versions of this License.
- 13. The Free Software Foundation may publish revised and/or new
-versions of the 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.
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero 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
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
- NO WARRANTY
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
+ How to Apply These Terms to Your New Programs
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
-
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
Copyright (C)
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/techpack_modpack/README.md b/techpack_modpack/README.md
index eeaad8e..c2e8fbc 100644
--- a/techpack_modpack/README.md
+++ b/techpack_modpack/README.md
@@ -1,4 +1,4 @@
-# TechPack V2.02
+# TechPack V2.06
TechPack, a Mining, Crafting, & Farming Modpack for Minetest.
@@ -27,6 +27,7 @@ TechPack is a collection of following Mods:
**The moved/copied nodes will not have valid node numbers, which could lead to a server crash.**
TechPack provides:
+
- lumber tubes to connect 2 nodes
- a Pusher node to pull/push items through tubes
- a Distributor node with 4 output channels to sort incoming items
@@ -64,9 +65,11 @@ TechPack provides:
- a Display node for text outputs of the Controller
- Metal ladders, stairways, and bridges
- Warehouse Boxes in steel, copper, and gold
+- A chest cart for the mod minecart
TechPack supports the following mods:
+
- Farming Redo (Harvester, Fermenter)
- Ethereal (Harvester, Quarry, Fermenter)
- Pipeworks (Gravel Sieve)
@@ -75,12 +78,14 @@ TechPack supports the following mods:
### Configuration
+
The following can be changed in the minetest menu (Settings -> Advanced Settings -> Mods -> tubelib) or directly in 'minetest.conf'
- Maximum number of Forceload Blocks per player
- Enable Basalt Stone (and disable ore generation via Cobblestone generator)
- Machine aging value to calculate the lifetime of machines
Example for 'minetest.conf':
+
```LUA
tubelib_basalt_stone_enabled = false
tubelib_max_num_forceload_blocks = 12
@@ -88,6 +93,7 @@ tubelib_machine_aging_value = 200
```
Example for a v1 compatible 'minetest.conf':
+
```LUA
tubelib_basalt_stone_enabled = false
tubelib_max_num_forceload_blocks = 0
@@ -96,38 +102,64 @@ tubelib_machine_aging_value = 999999
#### Maximum number of Forceload Blocks per player
-Default value is 12.
+
+Default value is 12.
I higher number allows to build larger farms and machines which keep loaded, but increases the server load, too.
But the areas are only loaded when the player is online.
To be able to use e.g. 12 forceloaded blocks per player, the pararamter 'max_forceloaded_blocks' in 'minetest.conf' has to be ajusted.
+
#### Enable Basalt Stone (and disable ore generation via Cobblestone generator)
-The lava/water Cobblestone generator allows to produce infinite Cobblestone. By means of Quarry,
+
+The lava/water Cobblestone generator allows to produce infinite Cobblestone. By means of Quarry,
Grinder, and Gravel Sieve it allows to infinite generate ores.
This can be disabled by means of the setting parameter. If enabled, the Cobblestone
generator generates Basalt instead, which only can be used for building purposes.
+
#### Machine aging value to calculate the lifetime of machines
-Default value is 200.
+
+Default value is 200.
This aging value is used to calculate the lifetime of machines before they go defect.
The value 200 (default) results in a lifetime for standard machines of about 2000 - 8000 item processing cycles (~2-4 hours).
### License
-Copyright (C) 2017-2019 Joachim Stolberg
-Code: Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt
-Textures: CC BY-SA 3.0
+
+Copyright (C) 2017-2021 Joachim Stolberg
+Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
+Textures: CC BY-SA 3.0
+
+
+## Credits
+
+
+### Contributors
+
+- oversword (PR #43, #57, #58, #59, #60, #62, #68, #74, #76, and many more)
+- afkplayer5000 (PR #70, #71)
+- andrenete (PR #37, #66)
+- fluxionary (PR #27, #28, #30, #31, #34, #54)
+- Arigatas (PR #51, #53)
+- realmicu (PR #6, #8, #12)
+- theFox6 (PR #3, #4)
+- superfloh247 (PR #89, #88, #87)
+- SciFurz (via forum)
### Dependencies
-default, doors, intllib, basic_materials
+
+default, doors, intllib, basic_materials
tubelib2 ()
Tubelib Color Lamps optional: unifieddyes
SmartLine Controller optional: mail
Gravelsieve optional: moreores, hopper, pipeworks
tubelib_addons1 optional: unified_inventory
+tubelib_addons13 optional: minecart
+
### History
+
- 2018-03-18 V1.00 * Tubelib, tubelib_addons1, tubelib_addons2, smartline, and gravelsieve combined to one modpack.
- 2018-03-24 V1.01 * Support for Ethereal added
- 2018-03-27 V1.02 * Timer improvements for unloaded areas
@@ -151,9 +183,14 @@ tubelib_addons1 optional: unified_inventory
- 2019-01-27 V2.01 * SaferLua Controller Terminal added
- 2019-01-28 V2.02 * Logic Not added, output reduction on Harvester, Fermenter, and Gravel Sieve
- 2019-04-23 V2.03 * Piston/WorldEdit/replacer detection added, farming and grinder recipes added
+- 2020-11-20 V2.04 * Switch to AGPL v3, adapt to minetest 5.3, add translation support, fix minor bugs
+- 2021-01-24 V2.05 * PR #74, #76: Implement checks for valid connection sides for many nodes
+- 2021-06-06 V2.06 * PR #78 - #89, chest cart added
+- 2021-09-03 V2.07 * FR #103, Add Altitude to harvester menu
## New in v2 (from players point of view)
+
- Almost all machines break after a certain amount of time (switch into the state 'defect') and have to be repaired.
- A Repair Kit is available to repair defect machines.
- A Forceload block (16x16x16) is added which keeps the corresponding area loaded and the machines operational as far as the player is logged in.
@@ -164,6 +201,7 @@ tubelib_addons1 optional: unified_inventory
## New in v2 (from admins point of view)
+
- settingtypes introduced with the following settings: tubelib_max_num_forceload_blocks, tubelib_basalt_stone_enabled, tubelib_machine_aging_value
- the new mods 'techpack_stairway' and 'techpack_warehouse' have to be enabled
- TechPack depends now on the mod 'basic_materials' and 'tubelib2' ()
diff --git a/techpack_modpack/gravelsieve/hammer.lua b/techpack_modpack/gravelsieve/hammer.lua
index bcd8214..caecb34 100644
--- a/techpack_modpack/gravelsieve/hammer.lua
+++ b/techpack_modpack/gravelsieve/hammer.lua
@@ -5,6 +5,8 @@
]]--
+-- Load support for I18n
+local S = gravelsieve.S
gravelsieve.disallow = function(pos, node, user, mode, new_param2)
return false
@@ -40,7 +42,7 @@ gravelsieve.handler = function(itemstack, user, pointed_thing)
end
minetest.register_tool("gravelsieve:hammer", {
- description = "Hammer converts Cobblestone into Gravel",
+ description = S("Hammer converts Cobblestone into Gravel"),
inventory_image = "gravelsieve_hammer.png",
on_use = function(itemstack, user, pointed_thing)
return gravelsieve.handler(itemstack, user, pointed_thing)
diff --git a/techpack_modpack/gravelsieve/init.lua b/techpack_modpack/gravelsieve/init.lua
index cf69717..7e73582 100644
--- a/techpack_modpack/gravelsieve/init.lua
+++ b/techpack_modpack/gravelsieve/init.lua
@@ -7,11 +7,11 @@
Derived from the work of celeron55, Perttu Ahola (furnace)
Pipeworks support added by FiftySix
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
Copyright (C) 2011-2016 celeron55, Perttu Ahola
Copyright (C) 2011-2016 Various Minetest developers and contributors
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
History:
@@ -42,13 +42,17 @@
gravelsieve = {
}
+-- Load support for I18n
+gravelsieve.S = minetest.get_translator("gravelsieve")
+local S = gravelsieve.S
+
dofile(minetest.get_modpath("gravelsieve") .. "/hammer.lua")
local settings_get
if minetest.setting_get then
settings_get = minetest.setting_get
else
- settings_get = function(...) endminetest.settings:get(...) end
+ settings_get = function(...) return minetest.settings:get(...) end
end
gravelsieve.ore_rarity = tonumber(settings_get("gravelsieve_ore_rarity")) or 1.16
gravelsieve.ore_max_elevation = tonumber(settings_get("gravelsieve_ore_max_elevation")) or 0
@@ -56,7 +60,9 @@ gravelsieve.ore_min_elevation = tonumber(settings_get("gravelsieve_ore_min_eleva
local y_spread = math.max(1 + gravelsieve.ore_max_elevation - gravelsieve.ore_min_elevation, 1)
-- Increase the probability over the natural occurrence
-local PROBABILITY_FACTOR = 3
+local PROBABILITY_FACTOR = tonumber(settings_get("gravelsieve_probability_factor")) or 3
+
+local STEP_DELAY = tonumber(settings_get("gravelsieve_step_delay")) or 1.0
-- tubelib aging feature
local AGING_LEVEL1 = nil
@@ -70,6 +76,8 @@ end
gravelsieve.ore_probability = {
}
+gravelsieve.process_probabilities = {}
+
-- Pipeworks support
local pipeworks_after_dig = nil
@@ -80,10 +88,6 @@ if minetest.get_modpath("pipeworks") and pipeworks ~= nil then
pipeworks_after_place = pipeworks.after_place
end
-local function harmonic_sum(a, b)
- return 1 / ((1 / a) + (1 / b))
-end
-
local function calculate_probability(item)
local ymax = math.min(item.y_max, gravelsieve.ore_max_elevation)
local ymin = math.max(item.y_min, gravelsieve.ore_min_elevation)
@@ -91,6 +95,41 @@ local function calculate_probability(item)
item.clust_scarcity / (item.clust_num_ores * ((ymax - ymin) / y_spread))
end
+local function pairs_by_values(t, f)
+ if not f then
+ f = function(a, b) return a > b end
+ end
+ local s = {}
+ for k, v in pairs(t) do
+ table.insert(s, {k, v})
+ end
+ table.sort(s, function(a, b)
+ return f(a[2], b[2])
+ end)
+ local i = 0
+ return function()
+ i = i + 1
+ local v = s[i]
+ if v then
+ return unpack(v)
+ else
+ return nil
+ end
+ end
+end
+
+local function parse_drop(drop)
+ local d, count = drop:match("^%s*(%S+)%s+(%d+)%s*$")
+ if d and count then
+ return d, count
+ end
+ d, count = drop:match("%s*craft%s+\"?([^%s\"]+)\"?%s+(%d+)%s*")
+ if d and count then
+ return d, count
+ end
+ return drop, 1
+end
+
-- collect all registered ores and calculate the probability
local function add_ores()
for _,item in pairs(minetest.registered_ores) do
@@ -104,27 +143,136 @@ local function add_ores()
and item.clust_scarcity ~= nil and item.clust_scarcity > 0
and item.clust_num_ores ~= nil and item.clust_num_ores > 0
and item.y_max ~= nil and item.y_min ~= nil then
+ local count
+ drop, count = parse_drop(drop)
+
local probability = calculate_probability(item)
if probability > 0 then
+ local probabilityFraction = count / probability
local cur_probability = gravelsieve.ore_probability[drop]
if cur_probability then
- gravelsieve.ore_probability[drop] = harmonic_sum(cur_probability, probability)
+ gravelsieve.ore_probability[drop] = cur_probability+probabilityFraction
else
- gravelsieve.ore_probability[drop] = probability
+ gravelsieve.ore_probability[drop] = probabilityFraction
end
end
end
end
end
+ minetest.log("action", "[gravelsieve] ore probabilties:")
local overall_probability = 0.0
- for name,probability in pairs(gravelsieve.ore_probability) do
- minetest.log("info", ("[gravelsieve] %-32s %.02f"):format(name, probability))
- overall_probability = overall_probability + 1.0/probability
+ for name,probability in pairs_by_values(gravelsieve.ore_probability) do
+ minetest.log("action", ("[gravelsieve] %-32s: 1 / %.02f"):format(name, 1.0/probability))
+ overall_probability = overall_probability + probability
end
- minetest.log("info", ("[gravelsieve] Overall probability %f"):format(overall_probability))
+ minetest.log("action", ("[gravelsieve] Overall probability %f"):format(overall_probability))
end
-minetest.after(1, add_ores)
+local function default_configuration()
+ local normal_gravel = "default:gravel"
+ local sieved_gravel = "gravelsieve:sieved_gravel"
+ local gravel_probabilities = table.copy(gravelsieve.ore_probability)
+ local overall_probability = 0
+ for _,v in pairs(gravel_probabilities) do
+ overall_probability = overall_probability+v
+ end
+ local remainder_probability = 0
+ if overall_probability < 1 then
+ remainder_probability = 1-overall_probability
+ end
+ gravel_probabilities[normal_gravel] = remainder_probability/2.0
+ gravel_probabilities[sieved_gravel] = remainder_probability/2.0
+
+ return {
+ [normal_gravel] = gravel_probabilities,
+ [sieved_gravel] = {
+ [sieved_gravel] = 1
+ }
+ }
+end
+
+local function normalize_probabilities(conf)
+ local total = 0
+ for _,val in pairs(conf) do
+ if val >= 0 then
+ total = total + val
+ end
+ end
+ local normalized = {}
+ for key,val in pairs(conf) do
+ if val >= 0 then
+ normalized[key] = val/total
+ end
+ end
+ return normalized
+end
+
+local function normalize_config(current_config)
+ local normalized_config = {}
+ -- Normalize all inputs so their output probabilities always add up to 1
+ for input, output_probabilities in pairs(current_config) do
+ if output_probabilities then
+ normalized_config[input] = normalize_probabilities(output_probabilities)
+ end
+ end
+ return normalized_config
+end
+
+local function merge_config(def_conf, new_conf)
+ local result_conf = table.copy(def_conf)
+ for key,val in pairs(new_conf) do
+ if type(val) == 'table' and type(result_conf[key]) == 'table' then
+ result_conf[key] = merge_config(result_conf[key], val)
+ else
+ result_conf[key] = val
+ end
+ end
+ return result_conf
+end
+
+local function configure_probabilities_step(current_config, funct_or_table)
+ local var_type = type(funct_or_table)
+ local conf
+ if var_type == 'function' then
+ conf = funct_or_table()
+ elseif var_type == 'table' then
+ conf = funct_or_table
+ end
+ if conf then
+ return merge_config(current_config, conf)
+ end
+ return current_config
+end
+
+local configured = false
+local set_probabilities = {default_configuration}
+
+function gravelsieve.set_probabilities(funct_or_table)
+ if configured then
+ -- This is here so you can do hard overrides after everything has loaded if you need to
+ -- Otherwise the order mods are loaded may cause them to override your configs
+ local current_config = gravelsieve.process_probabilities
+ current_config = configure_probabilities_step(current_config, funct_or_table)
+ gravelsieve.process_probabilities = normalize_config(current_config)
+ else
+ -- Build up a list of callbacks to be run after all mods are loaded
+ table.insert(set_probabilities, funct_or_table)
+ end
+end
+
+local function configure_probabilities()
+ configured = true
+ add_ores()
+ local current_config = {}
+
+ -- Run through all configs in order and merge them
+ for _,funct_or_table in ipairs(set_probabilities) do
+ current_config = configure_probabilities_step(current_config, funct_or_table)
+ end
+ gravelsieve.process_probabilities = normalize_config(current_config)
+end
+
+minetest.after(1, configure_probabilities)
local sieve_formspec =
"size[8,8]"..
@@ -197,47 +345,34 @@ local function swap_node(pos, meta, start)
end
-- place ores to dst according to the calculated probability
-local function random_ore(inv, src)
- local num
- for ore, probability in pairs(gravelsieve.ore_probability) do
- if math.random(probability) == 1 then
- local item = ItemStack(ore)
- if inv:room_for_item("dst", item) then
- inv:add_item("dst", item)
- return true -- ore placed
+local function move_random_ore(inv, item)
+ local running_total = 0
+ local probabilities = gravelsieve.process_probabilities[item]
+ local chosen = math.random()
+ for ore, probability in pairs(probabilities) do
+ running_total = running_total + probability
+ if chosen < running_total then
+ local ore_item = ItemStack(ore)
+ if not inv:room_for_item("dst", ore_item) then
+ return false
end
+ inv:add_item("dst", ore_item)
+ return true
end
end
- return false -- gravel has to be moved
+ return false -- Failure, this shouldn't really happen but might due to floating point errors
end
-
-local function add_gravel_to_dst(meta, inv)
- -- maintain a counter for gravel kind selection
- local gravel_cnt = meta:get_int("gravel_cnt") + 1
- meta:set_int("gravel_cnt", gravel_cnt)
-
- if (gravel_cnt % 2) == 0 then -- gravel or sieved gravel?
- inv:add_item("dst", ItemStack("default:gravel")) -- add to dest
- else
- inv:add_item("dst", ItemStack("gravelsieve:sieved_gravel")) -- add to dest
- end
-end
-
-
-- move gravel and ores to dst
-local function move_src2dst(meta, pos, inv, src, dst)
+local function move_src2dst(meta, pos, inv, item, dst)
+ local src = ItemStack(item)
if inv:room_for_item("dst", dst) and inv:contains_item("src", src) then
local res = swap_node(pos, meta, false)
if res then -- time to move one item?
- if src:get_name() == "default:gravel" then -- will we find ore?
- if not random_ore(inv, src) then -- no ore found?
- add_gravel_to_dst(meta, inv)
- end
- else
- inv:add_item("dst", ItemStack("gravelsieve:sieved_gravel")) -- add to dest
+ local processed = move_random_ore(inv, item)
+ if processed then
+ inv:remove_item("src", src)
end
- inv:remove_item("src", src)
end
return true -- process finished
end
@@ -248,19 +383,16 @@ end
local function sieve_node_timer(pos, elapsed)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- local gravel = ItemStack("default:gravel")
- local gravel_sieved = ItemStack("gravelsieve:sieved_gravel")
- if move_src2dst(meta, pos, inv, gravel) then
- aging(pos, meta)
- return true
- elseif move_src2dst(meta, pos, inv, gravel_sieved) then
- aging(pos, meta)
- return true
- else
- minetest.get_node_timer(pos):stop()
- return false
+ for item,probabilities in pairs(gravelsieve.process_probabilities) do
+ if probabilities and move_src2dst(meta, pos, inv, item) then
+ aging(pos, meta)
+ return true
+ end
end
+
+ minetest.get_node_timer(pos):stop()
+ return false
end
@@ -281,7 +413,7 @@ for idx = 0,4 do
local tube_info
if automatic == 0 then
node_name = "gravelsieve:sieve"
- description = "Gravel Sieve"
+ description = S("Gravel Sieve")
tiles_data = {
-- up, down, right, left, back, front
"gravelsieve_gravel.png",
@@ -293,7 +425,7 @@ for idx = 0,4 do
}
else
node_name = "gravelsieve:auto_sieve"
- description = "Automatic Gravel Sieve"
+ description = S("Automatic Gravel Sieve")
tiles_data = {
-- up, down, right, left, back, front
"gravelsieve_gravel.png",
@@ -313,7 +445,7 @@ for idx = 0,4 do
local meta = minetest.get_meta(pos)
swap_node(pos, meta, true)
else
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
end
return inv:add_item("src", stack)
end,
@@ -327,6 +459,7 @@ for idx = 0,4 do
}
end
+ local not_in_creative_inventory
if idx == 3 then
tiles_data[1] = "gravelsieve_top.png"
not_in_creative_inventory = 0
@@ -381,7 +514,7 @@ for idx = 0,4 do
local meta = minetest.get_meta(pos)
swap_node(pos, meta, true)
else
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
end
end,
@@ -396,7 +529,7 @@ for idx = 0,4 do
meta:set_int("gravel_cnt", 0)
end
else
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
end
end,
@@ -405,7 +538,7 @@ for idx = 0,4 do
local meta = minetest.get_meta(pos)
swap_node(pos, meta, true)
else
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
end
end,
@@ -483,7 +616,7 @@ if minetest.global_exists("tubelib") then
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Gravel Sieve")
+ meta:set_string("infotext", S("Gravel Sieve"))
end,
on_dig = function(pos, node, puncher, pointed_thing)
@@ -494,6 +627,10 @@ if minetest.global_exists("tubelib") then
end
end,
+ allow_metadata_inventory_put = allow_metadata_inventory_put,
+ allow_metadata_inventory_move = allow_metadata_inventory_move,
+ allow_metadata_inventory_take = allow_metadata_inventory_take,
+
paramtype = "light",
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
@@ -515,7 +652,7 @@ if minetest.global_exists("tubelib") then
return tubelib.get_item(meta, "dst")
end,
on_push_item = function(pos, side, item)
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
local meta = minetest.get_meta(pos)
return tubelib.put_item(meta, "src", item)
end,
@@ -524,7 +661,7 @@ if minetest.global_exists("tubelib") then
return tubelib.put_item(meta, "dst", item)
end,
on_node_load = function(pos)
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
end,
on_node_repair = function(pos)
local meta = minetest.get_meta(pos)
@@ -535,28 +672,28 @@ if minetest.global_exists("tubelib") then
inv:set_size('src', 1)
inv:set_size('dst', 16)
swap_node(pos, meta, false)
- minetest.get_node_timer(pos):start(1.0)
+ minetest.get_node_timer(pos):start(STEP_DELAY)
return true
end,
})
end
minetest.register_node("gravelsieve:sieved_gravel", {
- description = "Sieved Gravel",
+ description = S("Sieved Gravel"),
tiles = {"default_gravel.png^[brighten"},
groups = {crumbly=2, falling_node=1, not_in_creative_inventory=1},
sounds = default.node_sound_gravel_defaults(),
})
minetest.register_node("gravelsieve:compressed_gravel", {
- description = "Compressed Gravel",
+ description = S("Compressed Gravel"),
tiles = {"gravelsieve_compressed_gravel.png"},
groups = {cracky=2, crumbly = 2, cracky = 2},
sounds = default.node_sound_gravel_defaults(),
})
minetest.register_craft({
- output = "gravelsieve:sieve",
+ output = "gravelsieve:sieve3",
recipe = {
{"group:wood", "", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
@@ -565,10 +702,10 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "gravelsieve:auto_sieve",
+ output = "gravelsieve:auto_sieve3",
type = "shapeless",
recipe = {
- "gravelsieve:sieve", "default:mese_crystal", "default:mese_crystal",
+ "gravelsieve:sieve3", "default:mese_crystal", "default:mese_crystal",
},
})
@@ -615,7 +752,7 @@ end
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("gravelsieve", "compressed_gravel", "gravelsieve:compressed_gravel", {
- description="Compressed Gravel",
+ description=S("Compressed Gravel"),
groups={cracky=2, crumbly=2, choppy=2, not_in_creative_inventory=1},
tiles = {"gravelsieve_compressed_gravel.png"},
sounds = default.node_sound_stone_defaults(),
diff --git a/techpack_modpack/gravelsieve/locale/gravelsieve.de.tr b/techpack_modpack/gravelsieve/locale/gravelsieve.de.tr
new file mode 100644
index 0000000..71d7ee2
--- /dev/null
+++ b/techpack_modpack/gravelsieve/locale/gravelsieve.de.tr
@@ -0,0 +1,14 @@
+# textdomain: gravelsieve
+
+
+
+### hammer.lua ###
+
+Hammer converts Cobblestone into Gravel=Hammer, Zertrümmert Pflasterstein in Kies
+
+### init.lua ###
+
+Automatic Gravel Sieve=Automatisches Kiessieb
+Compressed Gravel=Komprimiertes Kies
+Gravel Sieve=Kiessieb
+Sieved Gravel=Gesiebtes Kies
diff --git a/techpack_modpack/gravelsieve/locale/template.txt b/techpack_modpack/gravelsieve/locale/template.txt
new file mode 100644
index 0000000..bc128d5
--- /dev/null
+++ b/techpack_modpack/gravelsieve/locale/template.txt
@@ -0,0 +1,14 @@
+# textdomain: gravelsieve
+
+
+
+### hammer.lua ###
+
+Hammer converts Cobblestone into Gravel=
+
+### init.lua ###
+
+Automatic Gravel Sieve=
+Compressed Gravel=
+Gravel Sieve=
+Sieved Gravel=
diff --git a/techpack_modpack/gravelsieve/textures/gravelsieve_auto_sieve.png b/techpack_modpack/gravelsieve/textures/gravelsieve_auto_sieve.png
index 2354141..90ef83d 100644
Binary files a/techpack_modpack/gravelsieve/textures/gravelsieve_auto_sieve.png and b/techpack_modpack/gravelsieve/textures/gravelsieve_auto_sieve.png differ
diff --git a/techpack_modpack/gravelsieve/textures/gravelsieve_compressed_gravel.png b/techpack_modpack/gravelsieve/textures/gravelsieve_compressed_gravel.png
index ebdc116..858aebe 100644
Binary files a/techpack_modpack/gravelsieve/textures/gravelsieve_compressed_gravel.png and b/techpack_modpack/gravelsieve/textures/gravelsieve_compressed_gravel.png differ
diff --git a/techpack_modpack/gravelsieve/textures/gravelsieve_gravel.png b/techpack_modpack/gravelsieve/textures/gravelsieve_gravel.png
index 930dc47..8b0597a 100644
Binary files a/techpack_modpack/gravelsieve/textures/gravelsieve_gravel.png and b/techpack_modpack/gravelsieve/textures/gravelsieve_gravel.png differ
diff --git a/techpack_modpack/gravelsieve/textures/gravelsieve_hammer.png b/techpack_modpack/gravelsieve/textures/gravelsieve_hammer.png
index 6c810bf..169efdd 100644
Binary files a/techpack_modpack/gravelsieve/textures/gravelsieve_hammer.png and b/techpack_modpack/gravelsieve/textures/gravelsieve_hammer.png differ
diff --git a/techpack_modpack/gravelsieve/textures/gravelsieve_sieve.png b/techpack_modpack/gravelsieve/textures/gravelsieve_sieve.png
index 753bbfa..dbf785c 100644
Binary files a/techpack_modpack/gravelsieve/textures/gravelsieve_sieve.png and b/techpack_modpack/gravelsieve/textures/gravelsieve_sieve.png differ
diff --git a/techpack_modpack/gravelsieve/textures/gravelsieve_top.png b/techpack_modpack/gravelsieve/textures/gravelsieve_top.png
index 33907aa..32f6159 100644
Binary files a/techpack_modpack/gravelsieve/textures/gravelsieve_top.png and b/techpack_modpack/gravelsieve/textures/gravelsieve_top.png differ
diff --git a/techpack_modpack/i18n.py b/techpack_modpack/i18n.py
new file mode 100644
index 0000000..93938d4
--- /dev/null
+++ b/techpack_modpack/i18n.py
@@ -0,0 +1,450 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Script to generate the template file and update the translation files.
+# Copy the script into the mod or modpack root folder and run it there.
+#
+# Copyright (C) 2019 Joachim Stolberg, 2020 FaceDeer, 2020 Louis Royer
+# LGPLv2.1+
+#
+# See https://github.com/minetest-tools/update_translations for
+# potential future updates to this script.
+
+from __future__ import print_function
+import os, fnmatch, re, shutil, errno
+from sys import argv as _argv
+from sys import stderr as _stderr
+
+# Running params
+params = {"recursive": False,
+ "help": False,
+ "mods": False,
+ "verbose": False,
+ "folders": [],
+ "no-old-file": False
+}
+# Available CLI options
+options = {"recursive": ['--recursive', '-r'],
+ "help": ['--help', '-h'],
+ "mods": ['--installed-mods'],
+ "verbose": ['--verbose', '-v'],
+ "no-old-file": ['--no-old-file']
+}
+
+# Strings longer than this will have extra space added between
+# them in the translation files to make it easier to distinguish their
+# beginnings and endings at a glance
+doublespace_threshold = 60
+
+def set_params_folders(tab: list):
+ '''Initialize params["folders"] from CLI arguments.'''
+ # Discarding argument 0 (tool name)
+ for param in tab[1:]:
+ stop_param = False
+ for option in options:
+ if param in options[option]:
+ stop_param = True
+ break
+ if not stop_param:
+ params["folders"].append(os.path.abspath(param))
+
+def set_params(tab: list):
+ '''Initialize params from CLI arguments.'''
+ for option in options:
+ for option_name in options[option]:
+ if option_name in tab:
+ params[option] = True
+ break
+
+def print_help(name):
+ '''Prints some help message.'''
+ print(f'''SYNOPSIS
+ {name} [OPTIONS] [PATHS...]
+DESCRIPTION
+ {', '.join(options["help"])}
+ prints this help message
+ {', '.join(options["recursive"])}
+ run on all subfolders of paths given
+ {', '.join(options["mods"])}
+ run on locally installed modules
+ {', '.join(options["no-old-file"])}
+ do not create *.old files
+ {', '.join(options["verbose"])}
+ add output information
+''')
+
+
+def main():
+ '''Main function'''
+ set_params(_argv)
+ set_params_folders(_argv)
+ if params["help"]:
+ print_help(_argv[0])
+ elif params["recursive"] and params["mods"]:
+ print("Option --installed-mods is incompatible with --recursive")
+ else:
+ # Add recursivity message
+ print("Running ", end='')
+ if params["recursive"]:
+ print("recursively ", end='')
+ # Running
+ if params["mods"]:
+ print(f"on all locally installed modules in {os.path.abspath('~/.minetest/mods/')}")
+ run_all_subfolders("~/.minetest/mods")
+ elif len(params["folders"]) >= 2:
+ print("on folder list:", params["folders"])
+ for f in params["folders"]:
+ if params["recursive"]:
+ run_all_subfolders(f)
+ else:
+ update_folder(f)
+ elif len(params["folders"]) == 1:
+ print("on folder", params["folders"][0])
+ if params["recursive"]:
+ run_all_subfolders(params["folders"][0])
+ else:
+ update_folder(params["folders"][0])
+ else:
+ print("on folder", os.path.abspath("./"))
+ if params["recursive"]:
+ run_all_subfolders(os.path.abspath("./"))
+ else:
+ update_folder(os.path.abspath("./"))
+
+#group 2 will be the string, groups 1 and 3 will be the delimiters (" or ')
+#See https://stackoverflow.com/questions/46967465/regex-match-text-in-either-single-or-double-quote
+pattern_lua_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
+pattern_lua_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
+pattern_lua_bracketed_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
+pattern_lua_bracketed_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
+
+# Handles "concatenation" .. " of strings"
+pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
+
+pattern_tr = re.compile(r'(.*?[^@])=(.*)')
+pattern_name = re.compile(r'^name[ ]*=[ ]*([^ \n]*)')
+pattern_tr_filename = re.compile(r'\.tr$')
+pattern_po_language_code = re.compile(r'(.*)\.po$')
+
+#attempt to read the mod's name from the mod.conf file. Returns None on failure
+def get_modname(folder):
+ try:
+ with open(os.path.join(folder, "mod.conf"), "r", encoding='utf-8') as mod_conf:
+ for line in mod_conf:
+ match = pattern_name.match(line)
+ if match:
+ return match.group(1)
+ except FileNotFoundError:
+ pass
+ return None
+
+#If there are already .tr files in /locale, returns a list of their names
+def get_existing_tr_files(folder):
+ out = []
+ for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
+ for name in files:
+ if pattern_tr_filename.search(name):
+ out.append(name)
+ return out
+
+# A series of search and replaces that massage a .po file's contents into
+# a .tr file's equivalent
+def process_po_file(text):
+ # The first three items are for unused matches
+ text = re.sub(r'#~ msgid "', "", text)
+ text = re.sub(r'"\n#~ msgstr ""\n"', "=", text)
+ text = re.sub(r'"\n#~ msgstr "', "=", text)
+ # comment lines
+ text = re.sub(r'#.*\n', "", text)
+ # converting msg pairs into "=" pairs
+ text = re.sub(r'msgid "', "", text)
+ text = re.sub(r'"\nmsgstr ""\n"', "=", text)
+ text = re.sub(r'"\nmsgstr "', "=", text)
+ # various line breaks and escape codes
+ text = re.sub(r'"\n"', "", text)
+ text = re.sub(r'"\n', "\n", text)
+ text = re.sub(r'\\"', '"', text)
+ text = re.sub(r'\\n', '@n', text)
+ # remove header text
+ text = re.sub(r'=Project-Id-Version:.*\n', "", text)
+ # remove double-spaced lines
+ text = re.sub(r'\n\n', '\n', text)
+ return text
+
+# Go through existing .po files and, if a .tr file for that language
+# *doesn't* exist, convert it and create it.
+# The .tr file that results will subsequently be reprocessed so
+# any "no longer used" strings will be preserved.
+# Note that "fuzzy" tags will be lost in this process.
+def process_po_files(folder, modname):
+ for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
+ for name in files:
+ code_match = pattern_po_language_code.match(name)
+ if code_match == None:
+ continue
+ language_code = code_match.group(1)
+ tr_name = modname + "." + language_code + ".tr"
+ tr_file = os.path.join(root, tr_name)
+ if os.path.exists(tr_file):
+ if params["verbose"]:
+ print(f"{tr_name} already exists, ignoring {name}")
+ continue
+ fname = os.path.join(root, name)
+ with open(fname, "r", encoding='utf-8') as po_file:
+ if params["verbose"]:
+ print(f"Importing translations from {name}")
+ text = process_po_file(po_file.read())
+ with open(tr_file, "wt", encoding='utf-8') as tr_out:
+ tr_out.write(text)
+
+# from https://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python/600612#600612
+# Creates a directory if it doesn't exist, silently does
+# nothing if it already exists
+def mkdir_p(path):
+ try:
+ os.makedirs(path)
+ except OSError as exc: # Python >2.5
+ if exc.errno == errno.EEXIST and os.path.isdir(path):
+ pass
+ else: raise
+
+# Converts the template dictionary to a text to be written as a file
+# dKeyStrings is a dictionary of localized string to source file sets
+# dOld is a dictionary of existing translations and comments from
+# the previous version of this text
+def strings_to_text(dkeyStrings, dOld, mod_name, header_comments):
+ lOut = [f"# textdomain: {mod_name}\n"]
+ if header_comments is not None:
+ lOut.append(header_comments)
+
+ dGroupedBySource = {}
+
+ for key in dkeyStrings:
+ sourceList = list(dkeyStrings[key])
+ sourceList.sort()
+ sourceString = "\n".join(sourceList)
+ listForSource = dGroupedBySource.get(sourceString, [])
+ listForSource.append(key)
+ dGroupedBySource[sourceString] = listForSource
+
+ lSourceKeys = list(dGroupedBySource.keys())
+ lSourceKeys.sort()
+ for source in lSourceKeys:
+ localizedStrings = dGroupedBySource[source]
+ localizedStrings.sort()
+ lOut.append("")
+ lOut.append(source)
+ lOut.append("")
+ for localizedString in localizedStrings:
+ val = dOld.get(localizedString, {})
+ translation = val.get("translation", "")
+ comment = val.get("comment")
+ if len(localizedString) > doublespace_threshold and not lOut[-1] == "":
+ lOut.append("")
+ if comment != None:
+ lOut.append(comment)
+ lOut.append(f"{localizedString}={translation}")
+ if len(localizedString) > doublespace_threshold:
+ lOut.append("")
+
+
+ unusedExist = False
+ for key in dOld:
+ if key not in dkeyStrings:
+ val = dOld[key]
+ translation = val.get("translation")
+ comment = val.get("comment")
+ # only keep an unused translation if there was translated
+ # text or a comment associated with it
+ if translation != None and (translation != "" or comment):
+ if not unusedExist:
+ unusedExist = True
+ lOut.append("\n\n##### not used anymore #####\n")
+ if len(key) > doublespace_threshold and not lOut[-1] == "":
+ lOut.append("")
+ if comment != None:
+ lOut.append(comment)
+ lOut.append(f"{key}={translation}")
+ if len(key) > doublespace_threshold:
+ lOut.append("")
+ return "\n".join(lOut) + '\n'
+
+# Writes a template.txt file
+# dkeyStrings is the dictionary returned by generate_template
+def write_template(templ_file, dkeyStrings, mod_name):
+ # read existing template file to preserve comments
+ existing_template = import_tr_file(templ_file)
+
+ text = strings_to_text(dkeyStrings, existing_template[0], mod_name, existing_template[2])
+ mkdir_p(os.path.dirname(templ_file))
+ with open(templ_file, "wt", encoding='utf-8') as template_file:
+ template_file.write(text)
+
+
+# Gets all translatable strings from a lua file
+def read_lua_file_strings(lua_file):
+ lOut = []
+ with open(lua_file, encoding='utf-8') as text_file:
+ text = text_file.read()
+ #TODO remove comments here
+
+ text = re.sub(pattern_concat, "", text)
+
+ strings = []
+ for s in pattern_lua_s.findall(text):
+ strings.append(s[1])
+ for s in pattern_lua_bracketed_s.findall(text):
+ strings.append(s)
+ for s in pattern_lua_fs.findall(text):
+ strings.append(s[1])
+ for s in pattern_lua_bracketed_fs.findall(text):
+ strings.append(s)
+
+ for s in strings:
+ s = re.sub(r'"\.\.\s+"', "", s)
+ s = re.sub("@[^@=0-9]", "@@", s)
+ s = s.replace('\\"', '"')
+ s = s.replace("\\'", "'")
+ s = s.replace("\n", "@n")
+ s = s.replace("\\n", "@n")
+ s = s.replace("=", "@=")
+ lOut.append(s)
+ return lOut
+
+# Gets strings from an existing translation file
+# returns both a dictionary of translations
+# and the full original source text so that the new text
+# can be compared to it for changes.
+# Returns also header comments in the third return value.
+def import_tr_file(tr_file):
+ dOut = {}
+ text = None
+ header_comment = None
+ if os.path.exists(tr_file):
+ with open(tr_file, "r", encoding='utf-8') as existing_file :
+ # save the full text to allow for comparison
+ # of the old version with the new output
+ text = existing_file.read()
+ existing_file.seek(0)
+ # a running record of the current comment block
+ # we're inside, to allow preceeding multi-line comments
+ # to be retained for a translation line
+ latest_comment_block = None
+ for line in existing_file.readlines():
+ line = line.rstrip('\n')
+ if line[:3] == "###":
+ if header_comment is None:
+ # Save header comments
+ header_comment = latest_comment_block
+ # Stip textdomain line
+ tmp_h_c = ""
+ for l in header_comment.split('\n'):
+ if not l.startswith("# textdomain:"):
+ tmp_h_c += l + '\n'
+ header_comment = tmp_h_c
+
+ # Reset comment block if we hit a header
+ latest_comment_block = None
+ continue
+ if line[:1] == "#":
+ # Save the comment we're inside
+ if not latest_comment_block:
+ latest_comment_block = line
+ else:
+ latest_comment_block = latest_comment_block + "\n" + line
+ continue
+ match = pattern_tr.match(line)
+ if match:
+ # this line is a translated line
+ outval = {}
+ outval["translation"] = match.group(2)
+ if latest_comment_block:
+ # if there was a comment, record that.
+ outval["comment"] = latest_comment_block
+ latest_comment_block = None
+ dOut[match.group(1)] = outval
+ return (dOut, text, header_comment)
+
+# Walks all lua files in the mod folder, collects translatable strings,
+# and writes it to a template.txt file
+# Returns a dictionary of localized strings to source file sets
+# that can be used with the strings_to_text function.
+def generate_template(folder, mod_name):
+ dOut = {}
+ for root, dirs, files in os.walk(folder):
+ for name in files:
+ if fnmatch.fnmatch(name, "*.lua"):
+ fname = os.path.join(root, name)
+ found = read_lua_file_strings(fname)
+ if params["verbose"]:
+ print(f"{fname}: {str(len(found))} translatable strings")
+
+ for s in found:
+ sources = dOut.get(s, set())
+ sources.add(f"### {os.path.basename(fname)} ###")
+ dOut[s] = sources
+
+ if len(dOut) == 0:
+ return None
+ templ_file = os.path.join(folder, "locale/template.txt")
+ write_template(templ_file, dOut, mod_name)
+ return dOut
+
+# Updates an existing .tr file, copying the old one to a ".old" file
+# if any changes have happened
+# dNew is the data used to generate the template, it has all the
+# currently-existing localized strings
+def update_tr_file(dNew, mod_name, tr_file):
+ if params["verbose"]:
+ print(f"updating {tr_file}")
+
+ tr_import = import_tr_file(tr_file)
+ dOld = tr_import[0]
+ textOld = tr_import[1]
+
+ textNew = strings_to_text(dNew, dOld, mod_name, tr_import[2])
+
+ if textOld and textOld != textNew:
+ print(f"{tr_file} has changed.")
+ if not params["no-old-file"]:
+ shutil.copyfile(tr_file, f"{tr_file}.old")
+
+ with open(tr_file, "w", encoding='utf-8') as new_tr_file:
+ new_tr_file.write(textNew)
+
+# Updates translation files for the mod in the given folder
+def update_mod(folder):
+ print(folder)
+ modname = get_modname(folder)
+ if modname is not None:
+ process_po_files(folder, modname)
+ print(f"Updating translations for {modname}")
+ data = generate_template(folder, modname)
+ if data == None:
+ print(f"No translatable strings found in {modname}")
+ else:
+ for tr_file in get_existing_tr_files(folder):
+ update_tr_file(data, modname, os.path.join(folder, "locale/", tr_file))
+ else:
+ print(f"\033[31mUnable to find modname in folder {folder}.\033[0m", file=_stderr)
+ #exit(1)
+
+# Determines if the folder being pointed to is a mod or a mod pack
+# and then runs update_mod accordingly
+def update_folder(folder):
+ is_modpack = os.path.exists(os.path.join(folder, "modpack.txt")) or os.path.exists(os.path.join(folder, "modpack.conf"))
+ if is_modpack:
+ subfolders = [f.path for f in os.scandir(folder) if f.is_dir()]
+ for subfolder in subfolders:
+ update_mod(subfolder + "/")
+ else:
+ update_mod(folder)
+ print("Done.")
+
+def run_all_subfolders(folder):
+ for modfolder in [f.path for f in os.scandir(folder) if f.is_dir()]:
+ update_folder(modfolder + "/")
+
+
+main()
+
diff --git a/techpack_modpack/lcdlib/mod.conf b/techpack_modpack/lcdlib/mod.conf
new file mode 100644
index 0000000..57e9be7
--- /dev/null
+++ b/techpack_modpack/lcdlib/mod.conf
@@ -0,0 +1 @@
+name=lcdlib
diff --git a/techpack_modpack/lcdlib/textures/font_default_0000.png b/techpack_modpack/lcdlib/textures/font_default_0000.png
index c4784d5..65e43a7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0000.png and b/techpack_modpack/lcdlib/textures/font_default_0000.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0020.png b/techpack_modpack/lcdlib/textures/font_default_0020.png
index 55f4ec3..049fd14 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0020.png and b/techpack_modpack/lcdlib/textures/font_default_0020.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0021.png b/techpack_modpack/lcdlib/textures/font_default_0021.png
index 4aab081..7691a14 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0021.png and b/techpack_modpack/lcdlib/textures/font_default_0021.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0022.png b/techpack_modpack/lcdlib/textures/font_default_0022.png
index ab90948..91f4c5f 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0022.png and b/techpack_modpack/lcdlib/textures/font_default_0022.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0023.png b/techpack_modpack/lcdlib/textures/font_default_0023.png
index 793b19f..9290dc1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0023.png and b/techpack_modpack/lcdlib/textures/font_default_0023.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0024.png b/techpack_modpack/lcdlib/textures/font_default_0024.png
index 33a56f2..cde69d4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0024.png and b/techpack_modpack/lcdlib/textures/font_default_0024.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0025.png b/techpack_modpack/lcdlib/textures/font_default_0025.png
index 042f9f1..703ab16 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0025.png and b/techpack_modpack/lcdlib/textures/font_default_0025.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0026.png b/techpack_modpack/lcdlib/textures/font_default_0026.png
index 354bd5d..6f98d49 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0026.png and b/techpack_modpack/lcdlib/textures/font_default_0026.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0027.png b/techpack_modpack/lcdlib/textures/font_default_0027.png
index e0e0b5c..df31d75 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0027.png and b/techpack_modpack/lcdlib/textures/font_default_0027.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0028.png b/techpack_modpack/lcdlib/textures/font_default_0028.png
index c977b5c..478c2c4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0028.png and b/techpack_modpack/lcdlib/textures/font_default_0028.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0029.png b/techpack_modpack/lcdlib/textures/font_default_0029.png
index f1c4b07..8973488 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0029.png and b/techpack_modpack/lcdlib/textures/font_default_0029.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_002a.png b/techpack_modpack/lcdlib/textures/font_default_002a.png
index 990ef39..2b83a5c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_002a.png and b/techpack_modpack/lcdlib/textures/font_default_002a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_002b.png b/techpack_modpack/lcdlib/textures/font_default_002b.png
index 1a0658b..abce910 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_002b.png and b/techpack_modpack/lcdlib/textures/font_default_002b.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_002c.png b/techpack_modpack/lcdlib/textures/font_default_002c.png
index dbe7d1a..8a624c7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_002c.png and b/techpack_modpack/lcdlib/textures/font_default_002c.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_002d.png b/techpack_modpack/lcdlib/textures/font_default_002d.png
index 2d7f048..f0ff962 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_002d.png and b/techpack_modpack/lcdlib/textures/font_default_002d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_002e.png b/techpack_modpack/lcdlib/textures/font_default_002e.png
index f7724d3..aff49bc 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_002e.png and b/techpack_modpack/lcdlib/textures/font_default_002e.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_002f.png b/techpack_modpack/lcdlib/textures/font_default_002f.png
index afee7ef..4667bf7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_002f.png and b/techpack_modpack/lcdlib/textures/font_default_002f.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0030.png b/techpack_modpack/lcdlib/textures/font_default_0030.png
index 2afc481..470f0b0 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0030.png and b/techpack_modpack/lcdlib/textures/font_default_0030.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0031.png b/techpack_modpack/lcdlib/textures/font_default_0031.png
index 9eb44c3..e84a9d3 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0031.png and b/techpack_modpack/lcdlib/textures/font_default_0031.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0032.png b/techpack_modpack/lcdlib/textures/font_default_0032.png
index 8be04d0..1ef3e84 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0032.png and b/techpack_modpack/lcdlib/textures/font_default_0032.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0033.png b/techpack_modpack/lcdlib/textures/font_default_0033.png
index 6cd7b22..ec9f518 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0033.png and b/techpack_modpack/lcdlib/textures/font_default_0033.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0034.png b/techpack_modpack/lcdlib/textures/font_default_0034.png
index 6560ee7..bc82823 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0034.png and b/techpack_modpack/lcdlib/textures/font_default_0034.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0035.png b/techpack_modpack/lcdlib/textures/font_default_0035.png
index 5d060aa..3ed26c5 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0035.png and b/techpack_modpack/lcdlib/textures/font_default_0035.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0036.png b/techpack_modpack/lcdlib/textures/font_default_0036.png
index 10fc884..6e706a4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0036.png and b/techpack_modpack/lcdlib/textures/font_default_0036.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0037.png b/techpack_modpack/lcdlib/textures/font_default_0037.png
index ab09223..884b48a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0037.png and b/techpack_modpack/lcdlib/textures/font_default_0037.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0038.png b/techpack_modpack/lcdlib/textures/font_default_0038.png
index 4f50194..a1e05bf 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0038.png and b/techpack_modpack/lcdlib/textures/font_default_0038.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0039.png b/techpack_modpack/lcdlib/textures/font_default_0039.png
index 5a06ec0..6443be9 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0039.png and b/techpack_modpack/lcdlib/textures/font_default_0039.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_003a.png b/techpack_modpack/lcdlib/textures/font_default_003a.png
index 548fee2..752e9de 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_003a.png and b/techpack_modpack/lcdlib/textures/font_default_003a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_003b.png b/techpack_modpack/lcdlib/textures/font_default_003b.png
index b6b45a6..77878e8 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_003b.png and b/techpack_modpack/lcdlib/textures/font_default_003b.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_003c.png b/techpack_modpack/lcdlib/textures/font_default_003c.png
index 9dd38e8..0252ab9 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_003c.png and b/techpack_modpack/lcdlib/textures/font_default_003c.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_003d.png b/techpack_modpack/lcdlib/textures/font_default_003d.png
index a0da0a2..af0325a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_003d.png and b/techpack_modpack/lcdlib/textures/font_default_003d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_003e.png b/techpack_modpack/lcdlib/textures/font_default_003e.png
index 97294f0..77fe954 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_003e.png and b/techpack_modpack/lcdlib/textures/font_default_003e.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_003f.png b/techpack_modpack/lcdlib/textures/font_default_003f.png
index 88ee4bd..e94177c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_003f.png and b/techpack_modpack/lcdlib/textures/font_default_003f.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0040.png b/techpack_modpack/lcdlib/textures/font_default_0040.png
index f2cb54a..c7a11d2 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0040.png and b/techpack_modpack/lcdlib/textures/font_default_0040.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0041.png b/techpack_modpack/lcdlib/textures/font_default_0041.png
index c7efc09..5917cc0 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0041.png and b/techpack_modpack/lcdlib/textures/font_default_0041.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0042.png b/techpack_modpack/lcdlib/textures/font_default_0042.png
index 0eb5a91..69a92b3 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0042.png and b/techpack_modpack/lcdlib/textures/font_default_0042.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0043.png b/techpack_modpack/lcdlib/textures/font_default_0043.png
index ea1c7fe..6f68703 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0043.png and b/techpack_modpack/lcdlib/textures/font_default_0043.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0044.png b/techpack_modpack/lcdlib/textures/font_default_0044.png
index 3fead0c..94c0a30 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0044.png and b/techpack_modpack/lcdlib/textures/font_default_0044.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0045.png b/techpack_modpack/lcdlib/textures/font_default_0045.png
index e2d77d4..b6732c3 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0045.png and b/techpack_modpack/lcdlib/textures/font_default_0045.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0046.png b/techpack_modpack/lcdlib/textures/font_default_0046.png
index aff5600..992bdc1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0046.png and b/techpack_modpack/lcdlib/textures/font_default_0046.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0047.png b/techpack_modpack/lcdlib/textures/font_default_0047.png
index c8ba9a8..12340e7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0047.png and b/techpack_modpack/lcdlib/textures/font_default_0047.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0048.png b/techpack_modpack/lcdlib/textures/font_default_0048.png
index f8e58a5..f315c03 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0048.png and b/techpack_modpack/lcdlib/textures/font_default_0048.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0049.png b/techpack_modpack/lcdlib/textures/font_default_0049.png
index f90dedb..53ef0bc 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0049.png and b/techpack_modpack/lcdlib/textures/font_default_0049.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_004a.png b/techpack_modpack/lcdlib/textures/font_default_004a.png
index c481395..32cd569 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_004a.png and b/techpack_modpack/lcdlib/textures/font_default_004a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_004b.png b/techpack_modpack/lcdlib/textures/font_default_004b.png
index fe873f3..1f770e7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_004b.png and b/techpack_modpack/lcdlib/textures/font_default_004b.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_004c.png b/techpack_modpack/lcdlib/textures/font_default_004c.png
index 34f9e81..313ecfe 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_004c.png and b/techpack_modpack/lcdlib/textures/font_default_004c.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_004d.png b/techpack_modpack/lcdlib/textures/font_default_004d.png
index 5b6be1d..f6676fb 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_004d.png and b/techpack_modpack/lcdlib/textures/font_default_004d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_004e.png b/techpack_modpack/lcdlib/textures/font_default_004e.png
index 7459baf..4e28110 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_004e.png and b/techpack_modpack/lcdlib/textures/font_default_004e.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_004f.png b/techpack_modpack/lcdlib/textures/font_default_004f.png
index 5f55a91..1b27777 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_004f.png and b/techpack_modpack/lcdlib/textures/font_default_004f.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0050.png b/techpack_modpack/lcdlib/textures/font_default_0050.png
index e7fdc84..ddfff40 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0050.png and b/techpack_modpack/lcdlib/textures/font_default_0050.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0051.png b/techpack_modpack/lcdlib/textures/font_default_0051.png
index f8a17d1..c3df8ec 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0051.png and b/techpack_modpack/lcdlib/textures/font_default_0051.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0052.png b/techpack_modpack/lcdlib/textures/font_default_0052.png
index 602129c..f93ff7c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0052.png and b/techpack_modpack/lcdlib/textures/font_default_0052.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0053.png b/techpack_modpack/lcdlib/textures/font_default_0053.png
index d0bdfbe..389a62b 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0053.png and b/techpack_modpack/lcdlib/textures/font_default_0053.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0054.png b/techpack_modpack/lcdlib/textures/font_default_0054.png
index 9e27bd4..11ec544 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0054.png and b/techpack_modpack/lcdlib/textures/font_default_0054.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0055.png b/techpack_modpack/lcdlib/textures/font_default_0055.png
index a69f31e..5d15704 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0055.png and b/techpack_modpack/lcdlib/textures/font_default_0055.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0056.png b/techpack_modpack/lcdlib/textures/font_default_0056.png
index 0ac3683..3e6f48a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0056.png and b/techpack_modpack/lcdlib/textures/font_default_0056.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0057.png b/techpack_modpack/lcdlib/textures/font_default_0057.png
index 336f895..cc140d0 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0057.png and b/techpack_modpack/lcdlib/textures/font_default_0057.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0058.png b/techpack_modpack/lcdlib/textures/font_default_0058.png
index fbbb9a7..fe71fb9 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0058.png and b/techpack_modpack/lcdlib/textures/font_default_0058.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0059.png b/techpack_modpack/lcdlib/textures/font_default_0059.png
index 6764390..1d1db03 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0059.png and b/techpack_modpack/lcdlib/textures/font_default_0059.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_005a.png b/techpack_modpack/lcdlib/textures/font_default_005a.png
index 37a67d6..e89b0eb 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_005a.png and b/techpack_modpack/lcdlib/textures/font_default_005a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_005b.png b/techpack_modpack/lcdlib/textures/font_default_005b.png
index c0d79cc..e547c51 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_005b.png and b/techpack_modpack/lcdlib/textures/font_default_005b.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_005c.png b/techpack_modpack/lcdlib/textures/font_default_005c.png
index 71604a6..35fc222 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_005c.png and b/techpack_modpack/lcdlib/textures/font_default_005c.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_005d.png b/techpack_modpack/lcdlib/textures/font_default_005d.png
index ede5d59..040ebe0 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_005d.png and b/techpack_modpack/lcdlib/textures/font_default_005d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_005e.png b/techpack_modpack/lcdlib/textures/font_default_005e.png
index 496ce51..be3bbb1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_005e.png and b/techpack_modpack/lcdlib/textures/font_default_005e.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_005f.png b/techpack_modpack/lcdlib/textures/font_default_005f.png
index 2e78fd2..3cc8d3d 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_005f.png and b/techpack_modpack/lcdlib/textures/font_default_005f.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0060.png b/techpack_modpack/lcdlib/textures/font_default_0060.png
index f73ea27..58500d2 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0060.png and b/techpack_modpack/lcdlib/textures/font_default_0060.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0061.png b/techpack_modpack/lcdlib/textures/font_default_0061.png
index 0373b8d..2121aa8 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0061.png and b/techpack_modpack/lcdlib/textures/font_default_0061.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0062.png b/techpack_modpack/lcdlib/textures/font_default_0062.png
index ceb235f..ba3feeb 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0062.png and b/techpack_modpack/lcdlib/textures/font_default_0062.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0063.png b/techpack_modpack/lcdlib/textures/font_default_0063.png
index 122aa74..cee372c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0063.png and b/techpack_modpack/lcdlib/textures/font_default_0063.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0064.png b/techpack_modpack/lcdlib/textures/font_default_0064.png
index 76e30c5..c5989c1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0064.png and b/techpack_modpack/lcdlib/textures/font_default_0064.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0065.png b/techpack_modpack/lcdlib/textures/font_default_0065.png
index dbfe5d4..7cd370a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0065.png and b/techpack_modpack/lcdlib/textures/font_default_0065.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0066.png b/techpack_modpack/lcdlib/textures/font_default_0066.png
index d2f544f..a63276c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0066.png and b/techpack_modpack/lcdlib/textures/font_default_0066.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0067.png b/techpack_modpack/lcdlib/textures/font_default_0067.png
index f96f287..baf3e88 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0067.png and b/techpack_modpack/lcdlib/textures/font_default_0067.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0068.png b/techpack_modpack/lcdlib/textures/font_default_0068.png
index 2e3872a..1c9e9b4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0068.png and b/techpack_modpack/lcdlib/textures/font_default_0068.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0069.png b/techpack_modpack/lcdlib/textures/font_default_0069.png
index 96f2b80..785cdb5 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0069.png and b/techpack_modpack/lcdlib/textures/font_default_0069.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_006a.png b/techpack_modpack/lcdlib/textures/font_default_006a.png
index b809c9b..a7abd8e 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_006a.png and b/techpack_modpack/lcdlib/textures/font_default_006a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_006b.png b/techpack_modpack/lcdlib/textures/font_default_006b.png
index 3f8616e..ff5f32a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_006b.png and b/techpack_modpack/lcdlib/textures/font_default_006b.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_006c.png b/techpack_modpack/lcdlib/textures/font_default_006c.png
index f90dedb..53ef0bc 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_006c.png and b/techpack_modpack/lcdlib/textures/font_default_006c.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_006d.png b/techpack_modpack/lcdlib/textures/font_default_006d.png
index 3587504..351aeef 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_006d.png and b/techpack_modpack/lcdlib/textures/font_default_006d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_006e.png b/techpack_modpack/lcdlib/textures/font_default_006e.png
index cb518dd..60e089d 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_006e.png and b/techpack_modpack/lcdlib/textures/font_default_006e.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_006f.png b/techpack_modpack/lcdlib/textures/font_default_006f.png
index 55ed047..dd48b6c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_006f.png and b/techpack_modpack/lcdlib/textures/font_default_006f.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0070.png b/techpack_modpack/lcdlib/textures/font_default_0070.png
index 8103e5c..0fdb26f 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0070.png and b/techpack_modpack/lcdlib/textures/font_default_0070.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0071.png b/techpack_modpack/lcdlib/textures/font_default_0071.png
index be35d0d..787418e 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0071.png and b/techpack_modpack/lcdlib/textures/font_default_0071.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0072.png b/techpack_modpack/lcdlib/textures/font_default_0072.png
index 5be4338..7d2bf4c 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0072.png and b/techpack_modpack/lcdlib/textures/font_default_0072.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0073.png b/techpack_modpack/lcdlib/textures/font_default_0073.png
index 9fbf420..b2b2ed2 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0073.png and b/techpack_modpack/lcdlib/textures/font_default_0073.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0074.png b/techpack_modpack/lcdlib/textures/font_default_0074.png
index 65eddbd..dcdbd37 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0074.png and b/techpack_modpack/lcdlib/textures/font_default_0074.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0075.png b/techpack_modpack/lcdlib/textures/font_default_0075.png
index 2314bf5..5ef59c7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0075.png and b/techpack_modpack/lcdlib/textures/font_default_0075.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0076.png b/techpack_modpack/lcdlib/textures/font_default_0076.png
index 4121f57..710703f 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0076.png and b/techpack_modpack/lcdlib/textures/font_default_0076.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0077.png b/techpack_modpack/lcdlib/textures/font_default_0077.png
index 2f8888b..373ecb0 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0077.png and b/techpack_modpack/lcdlib/textures/font_default_0077.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0078.png b/techpack_modpack/lcdlib/textures/font_default_0078.png
index 0389e1c..23541ff 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0078.png and b/techpack_modpack/lcdlib/textures/font_default_0078.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_0079.png b/techpack_modpack/lcdlib/textures/font_default_0079.png
index f915c5d..e3fddb2 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_0079.png and b/techpack_modpack/lcdlib/textures/font_default_0079.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_007a.png b/techpack_modpack/lcdlib/textures/font_default_007a.png
index 69c2b5a..2a92823 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_007a.png and b/techpack_modpack/lcdlib/textures/font_default_007a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_007b.png b/techpack_modpack/lcdlib/textures/font_default_007b.png
index 5f542a5..7606697 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_007b.png and b/techpack_modpack/lcdlib/textures/font_default_007b.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_007c.png b/techpack_modpack/lcdlib/textures/font_default_007c.png
index f90dedb..777f1e4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_007c.png and b/techpack_modpack/lcdlib/textures/font_default_007c.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_007d.png b/techpack_modpack/lcdlib/textures/font_default_007d.png
index ce49e08..b9ee397 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_007d.png and b/techpack_modpack/lcdlib/textures/font_default_007d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_007e.png b/techpack_modpack/lcdlib/textures/font_default_007e.png
index ebe41fe..759b56e 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_007e.png and b/techpack_modpack/lcdlib/textures/font_default_007e.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_008a.png b/techpack_modpack/lcdlib/textures/font_default_008a.png
index b24e1d1..e4f3236 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_008a.png and b/techpack_modpack/lcdlib/textures/font_default_008a.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_008d.png b/techpack_modpack/lcdlib/textures/font_default_008d.png
index 67906ff..fcc3b38 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_008d.png and b/techpack_modpack/lcdlib/textures/font_default_008d.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00a1.png b/techpack_modpack/lcdlib/textures/font_default_00a1.png
index 8779cd2..df91ae3 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00a1.png and b/techpack_modpack/lcdlib/textures/font_default_00a1.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00b1.png b/techpack_modpack/lcdlib/textures/font_default_00b1.png
index d653d3d..2413844 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00b1.png and b/techpack_modpack/lcdlib/textures/font_default_00b1.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00bf.png b/techpack_modpack/lcdlib/textures/font_default_00bf.png
index a7fac34..fec3deb 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00bf.png and b/techpack_modpack/lcdlib/textures/font_default_00bf.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c0.png b/techpack_modpack/lcdlib/textures/font_default_00c0.png
index 1786be5..4652acf 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c0.png and b/techpack_modpack/lcdlib/textures/font_default_00c0.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c1.png b/techpack_modpack/lcdlib/textures/font_default_00c1.png
index d1efa47..f2d7464 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c1.png and b/techpack_modpack/lcdlib/textures/font_default_00c1.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c2.png b/techpack_modpack/lcdlib/textures/font_default_00c2.png
index 1a53c9e..c759ac9 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c2.png and b/techpack_modpack/lcdlib/textures/font_default_00c2.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c3.png b/techpack_modpack/lcdlib/textures/font_default_00c3.png
index e8a45d7..6239ee6 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c3.png and b/techpack_modpack/lcdlib/textures/font_default_00c3.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c4.png b/techpack_modpack/lcdlib/textures/font_default_00c4.png
index d9d2fca..1178423 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c4.png and b/techpack_modpack/lcdlib/textures/font_default_00c4.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c5.png b/techpack_modpack/lcdlib/textures/font_default_00c5.png
index 04afad5..64e5efc 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c5.png and b/techpack_modpack/lcdlib/textures/font_default_00c5.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c6.png b/techpack_modpack/lcdlib/textures/font_default_00c6.png
index c9ae629..7eaf588 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c6.png and b/techpack_modpack/lcdlib/textures/font_default_00c6.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c7.png b/techpack_modpack/lcdlib/textures/font_default_00c7.png
index aecefdc..247fbc4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c7.png and b/techpack_modpack/lcdlib/textures/font_default_00c7.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c8.png b/techpack_modpack/lcdlib/textures/font_default_00c8.png
index 1a845a4..517b63d 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c8.png and b/techpack_modpack/lcdlib/textures/font_default_00c8.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00c9.png b/techpack_modpack/lcdlib/textures/font_default_00c9.png
index 22db41d..cd4f8d8 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00c9.png and b/techpack_modpack/lcdlib/textures/font_default_00c9.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ca.png b/techpack_modpack/lcdlib/textures/font_default_00ca.png
index a9088a7..39aa1aa 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ca.png and b/techpack_modpack/lcdlib/textures/font_default_00ca.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00cb.png b/techpack_modpack/lcdlib/textures/font_default_00cb.png
index c51a567..7058b5a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00cb.png and b/techpack_modpack/lcdlib/textures/font_default_00cb.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00cc.png b/techpack_modpack/lcdlib/textures/font_default_00cc.png
index ac4b91d..a382d73 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00cc.png and b/techpack_modpack/lcdlib/textures/font_default_00cc.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00cd.png b/techpack_modpack/lcdlib/textures/font_default_00cd.png
index f88390b..86339a1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00cd.png and b/techpack_modpack/lcdlib/textures/font_default_00cd.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ce.png b/techpack_modpack/lcdlib/textures/font_default_00ce.png
index 12e1dbd..78583df 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ce.png and b/techpack_modpack/lcdlib/textures/font_default_00ce.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00cf.png b/techpack_modpack/lcdlib/textures/font_default_00cf.png
index a4fea12..b680e2e 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00cf.png and b/techpack_modpack/lcdlib/textures/font_default_00cf.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d0.png b/techpack_modpack/lcdlib/textures/font_default_00d0.png
index acec2ed..50db9f9 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d0.png and b/techpack_modpack/lcdlib/textures/font_default_00d0.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d1.png b/techpack_modpack/lcdlib/textures/font_default_00d1.png
index 85c3eef..912524f 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d1.png and b/techpack_modpack/lcdlib/textures/font_default_00d1.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d2.png b/techpack_modpack/lcdlib/textures/font_default_00d2.png
index c94e047..d7e635f 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d2.png and b/techpack_modpack/lcdlib/textures/font_default_00d2.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d3.png b/techpack_modpack/lcdlib/textures/font_default_00d3.png
index c1de4de..27ae016 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d3.png and b/techpack_modpack/lcdlib/textures/font_default_00d3.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d4.png b/techpack_modpack/lcdlib/textures/font_default_00d4.png
index dfc8df1..a62a3ed 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d4.png and b/techpack_modpack/lcdlib/textures/font_default_00d4.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d5.png b/techpack_modpack/lcdlib/textures/font_default_00d5.png
index b2250e9..3740df7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d5.png and b/techpack_modpack/lcdlib/textures/font_default_00d5.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d6.png b/techpack_modpack/lcdlib/textures/font_default_00d6.png
index cdc2bc4..9b3cd62 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d6.png and b/techpack_modpack/lcdlib/textures/font_default_00d6.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d7.png b/techpack_modpack/lcdlib/textures/font_default_00d7.png
index bdc3b8a..a92ac66 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d7.png and b/techpack_modpack/lcdlib/textures/font_default_00d7.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d8.png b/techpack_modpack/lcdlib/textures/font_default_00d8.png
index 619a2a8..0453191 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d8.png and b/techpack_modpack/lcdlib/textures/font_default_00d8.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00d9.png b/techpack_modpack/lcdlib/textures/font_default_00d9.png
index b652360..607ac14 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00d9.png and b/techpack_modpack/lcdlib/textures/font_default_00d9.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00da.png b/techpack_modpack/lcdlib/textures/font_default_00da.png
index ef4f617..91e5781 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00da.png and b/techpack_modpack/lcdlib/textures/font_default_00da.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00db.png b/techpack_modpack/lcdlib/textures/font_default_00db.png
index 4dbf80f..f63177d 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00db.png and b/techpack_modpack/lcdlib/textures/font_default_00db.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00dc.png b/techpack_modpack/lcdlib/textures/font_default_00dc.png
index 7e45af7..eeaa7c6 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00dc.png and b/techpack_modpack/lcdlib/textures/font_default_00dc.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00dd.png b/techpack_modpack/lcdlib/textures/font_default_00dd.png
index 6b73d17..f194136 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00dd.png and b/techpack_modpack/lcdlib/textures/font_default_00dd.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e0.png b/techpack_modpack/lcdlib/textures/font_default_00e0.png
index 3c4d22f..b9779fe 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e0.png and b/techpack_modpack/lcdlib/textures/font_default_00e0.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e1.png b/techpack_modpack/lcdlib/textures/font_default_00e1.png
index ba0b33d..aeaeaf5 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e1.png and b/techpack_modpack/lcdlib/textures/font_default_00e1.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e2.png b/techpack_modpack/lcdlib/textures/font_default_00e2.png
index 6fa83b6..8ca07ed 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e2.png and b/techpack_modpack/lcdlib/textures/font_default_00e2.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e3.png b/techpack_modpack/lcdlib/textures/font_default_00e3.png
index d7004b4..e2f00bb 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e3.png and b/techpack_modpack/lcdlib/textures/font_default_00e3.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e4.png b/techpack_modpack/lcdlib/textures/font_default_00e4.png
index 0879533..6bcf6fb 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e4.png and b/techpack_modpack/lcdlib/textures/font_default_00e4.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e5.png b/techpack_modpack/lcdlib/textures/font_default_00e5.png
index 37e1b03..698094e 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e5.png and b/techpack_modpack/lcdlib/textures/font_default_00e5.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e6.png b/techpack_modpack/lcdlib/textures/font_default_00e6.png
index 2a40830..70ac70a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e6.png and b/techpack_modpack/lcdlib/textures/font_default_00e6.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e7.png b/techpack_modpack/lcdlib/textures/font_default_00e7.png
index 7febbe1..f0462bd 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e7.png and b/techpack_modpack/lcdlib/textures/font_default_00e7.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e8.png b/techpack_modpack/lcdlib/textures/font_default_00e8.png
index 9782d28..841363e 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e8.png and b/techpack_modpack/lcdlib/textures/font_default_00e8.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00e9.png b/techpack_modpack/lcdlib/textures/font_default_00e9.png
index 01beb74..7752df4 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00e9.png and b/techpack_modpack/lcdlib/textures/font_default_00e9.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ea.png b/techpack_modpack/lcdlib/textures/font_default_00ea.png
index 176ee7e..b549be6 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ea.png and b/techpack_modpack/lcdlib/textures/font_default_00ea.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00eb.png b/techpack_modpack/lcdlib/textures/font_default_00eb.png
index a86d512..f9c4dbc 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00eb.png and b/techpack_modpack/lcdlib/textures/font_default_00eb.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ec.png b/techpack_modpack/lcdlib/textures/font_default_00ec.png
index 36c7564..e86f3a7 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ec.png and b/techpack_modpack/lcdlib/textures/font_default_00ec.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ed.png b/techpack_modpack/lcdlib/textures/font_default_00ed.png
index 2641e23..94f12e8 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ed.png and b/techpack_modpack/lcdlib/textures/font_default_00ed.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ee.png b/techpack_modpack/lcdlib/textures/font_default_00ee.png
index 5e59725..e8a743d 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ee.png and b/techpack_modpack/lcdlib/textures/font_default_00ee.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ef.png b/techpack_modpack/lcdlib/textures/font_default_00ef.png
index 039b397..d2c744f 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ef.png and b/techpack_modpack/lcdlib/textures/font_default_00ef.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00f2.png b/techpack_modpack/lcdlib/textures/font_default_00f2.png
index 2a2080c..f7d1127 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00f2.png and b/techpack_modpack/lcdlib/textures/font_default_00f2.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00f4.png b/techpack_modpack/lcdlib/textures/font_default_00f4.png
index c4d0bf9..4b0cce6 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00f4.png and b/techpack_modpack/lcdlib/textures/font_default_00f4.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00f5.png b/techpack_modpack/lcdlib/textures/font_default_00f5.png
index b3245c7..ec7cec1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00f5.png and b/techpack_modpack/lcdlib/textures/font_default_00f5.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00f6.png b/techpack_modpack/lcdlib/textures/font_default_00f6.png
index e0cc49e..7213c8a 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00f6.png and b/techpack_modpack/lcdlib/textures/font_default_00f6.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00f7.png b/techpack_modpack/lcdlib/textures/font_default_00f7.png
index e457d5e..408687d 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00f7.png and b/techpack_modpack/lcdlib/textures/font_default_00f7.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00f9.png b/techpack_modpack/lcdlib/textures/font_default_00f9.png
index ee852c9..67d16b5 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00f9.png and b/techpack_modpack/lcdlib/textures/font_default_00f9.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00fa.png b/techpack_modpack/lcdlib/textures/font_default_00fa.png
index d642411..97de7e1 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00fa.png and b/techpack_modpack/lcdlib/textures/font_default_00fa.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00fb.png b/techpack_modpack/lcdlib/textures/font_default_00fb.png
index a5eda4c..2861e15 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00fb.png and b/techpack_modpack/lcdlib/textures/font_default_00fb.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00fc.png b/techpack_modpack/lcdlib/textures/font_default_00fc.png
index 980eccc..c7deddd 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00fc.png and b/techpack_modpack/lcdlib/textures/font_default_00fc.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00fd.png b/techpack_modpack/lcdlib/textures/font_default_00fd.png
index a8c7234..b6f45f9 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00fd.png and b/techpack_modpack/lcdlib/textures/font_default_00fd.png differ
diff --git a/techpack_modpack/lcdlib/textures/font_default_00ff.png b/techpack_modpack/lcdlib/textures/font_default_00ff.png
index eb3be1d..d182a29 100644
Binary files a/techpack_modpack/lcdlib/textures/font_default_00ff.png and b/techpack_modpack/lcdlib/textures/font_default_00ff.png differ
diff --git a/techpack_modpack/modpack.conf b/techpack_modpack/modpack.conf
index c8736f4..eb4274a 100644
--- a/techpack_modpack/modpack.conf
+++ b/techpack_modpack/modpack.conf
@@ -1,5 +1 @@
-description = A Mining, Crafting, & Farming Modpack for Minetest
-author = joe7575
-title = TechPack
-release = 1679
name = techpack
diff --git a/techpack_modpack/releasenotes.md b/techpack_modpack/releasenotes.md
index 67a7bf4..6df84b6 100644
--- a/techpack_modpack/releasenotes.md
+++ b/techpack_modpack/releasenotes.md
@@ -1,6 +1,180 @@
# Release Notes for ModPack TechPack [techpack]
+## V2.06.00 (2021-06-06)
+
+### Additions
+- Add chest cart for the mod minecart (optional)
+- Add support for the mod "underch" (#88)
+
+### Removals
+
+### Changes
+- Account for new red & yellow pepper varieties (#86)
+- Pusher improvements (#84, #83)
+
+### Fixes
+- Fix crash with "ethereal:strawberry" (#89)
+
+
+## V2.05.00 (2021-01-24)
+
+### Additions
+
+### Removals
+
+### Changes
+- Pushers only connect from the left & right
+- Detectors only connect from the left & right, still need condition to stop pushing in from the right
+- Funnels refuse to connect from the top
+- Liquid samplers & quarries refuse to connect from the front (left)
+- Black hole push filter replaced with valid_sides logic
+
+### Fixes
+- Pushers can be used to send items into the invalid faces of a node (#72)
+
+
+## V2.04.01 (2020-12-18)
+
+### Additions
+
+### Removals
+
+### Changes
+- Suggestion to check replanting against commonly plantable nodes
+ instead of quarry-able GroundNodes (pull request #60 from oversword)
+- Add a on_blast callback to tubes so they update after being destroyed
+ (pull request #58 from oversword)
+- Disallow non-fuel items to be accepted as fuel quarries and harvesters
+ (pull request #57 from oversword)
+- Check harvester protection for each node it attempts to harvest
+ (pull request #59 from oversword)
+
+### Fixes
+- Warehouse voiding items when both pushing in and pulling out
+ (issue #61, fixed by oversword)
+
+
+
+## V2.04.00 (2020-11-20)
+
+### Additions
+- Add minetest.translator support (issue #56)
+- Add German translation
+- Add new minetest v5 nodes
+
+### Removals
+
+### Changes
+- Switch from LGPL to AGPL v3
+
+### Fixes
+- tubelib_addons2:doorblock works incorrectly (issue #55)
+
+
+
+## V2.03.12 (2020-07-23)
+
+### Additions
+
+### Removals
+
+### Changes
+
+### Fixes
+- string.split bugfix (issue #49)
+
+
+## V2.03.11 (2020-07-21)
+
+### Additions
+
+### Removals
+
+### Changes
+
+### Fixes
+- SaferLua Controller comments bugfix (issue #48)
+- SmartLine Controller bugfix
+
+
+## V2.03.10 (2020-06-06)
+
+### Additions
+
+### Removals
+
+### Changes
+Merged fork from BlockySurvival back to base (pull request #46)
+
+### Fixes
+
+
+
+## V2.03.09 (2020-03-23)
+
+### Additions
+
+### Removals
+
+### Changes
+Tubelib database optimized to reduce the size of the mod storage file (based on issue #41)
+
+### Fixes
+
+
+
+## V2.03.08 (2020-03-03)
+
+### Additions
+
+### Removals
+
+### Changes
+
+### Fixes
+Set Idle state instead of fault when there is no liquid (issue #44)
+
+
+
+## V2.03.07 (2019-09-14)
+
+### Additions
+
+### Removals
+
+### Changes
+
+### Fixes
+- Stack overflow bugfix for the detector from fluxionary (issue #39)
+
+
+
+## V2.03.06 (2019-08-08)
+
+### Additions
+
+### Removals
+
+### Changes
+
+### Fixes
+- Fixes to distributor metadata_inventory functions
+
+
+
+## V2.03.05 (2019-08-06)
+
+### Additions
+- Tubelib_addons3 "HighPerf Funnel" added (see isssue #36)
+
+### Removals
+
+### Changes
+
+### Fixes
+
+
## V2.03.04 (2019-07-20)
diff --git a/techpack_modpack/safer_lua/data_struct.lua b/techpack_modpack/safer_lua/data_struct.lua
index 03bbe82..258c4ef 100644
--- a/techpack_modpack/safer_lua/data_struct.lua
+++ b/techpack_modpack/safer_lua/data_struct.lua
@@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
data_struct.lua:
diff --git a/techpack_modpack/safer_lua/environ.lua b/techpack_modpack/safer_lua/environ.lua
index 4a0fb51..ad43915 100644
--- a/techpack_modpack/safer_lua/environ.lua
+++ b/techpack_modpack/safer_lua/environ.lua
@@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
environ.lua:
@@ -57,7 +57,10 @@ local BASE_ENV = {
rep = string.rep,
sub = string.sub,
upper = string.upper,
- split = string.split,
+ split = function(str, separator, include_empty, max_splits, sep_is_pattern)
+ if separator == "" then separator = " " end
+ return safer_lua.Array(unpack(string.split(str, separator, include_empty, max_splits, sep_is_pattern)))
+ end,
trim = string.trim,
},
tonumber = tonumber,
diff --git a/techpack_modpack/safer_lua/init.lua b/techpack_modpack/safer_lua/init.lua
index f5e75aa..21eed08 100644
--- a/techpack_modpack/safer_lua/init.lua
+++ b/techpack_modpack/safer_lua/init.lua
@@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
environ.lua:
diff --git a/techpack_modpack/safer_lua/scanner.lua b/techpack_modpack/safer_lua/scanner.lua
index 873a332..fdd39aa 100644
--- a/techpack_modpack/safer_lua/scanner.lua
+++ b/techpack_modpack/safer_lua/scanner.lua
@@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
scanner.lua:
@@ -56,7 +56,7 @@ function safer_lua:scanner(text)
self.line = line
self.pos = 1
self.line = trim(self.line)
- self.line = self.line:split("--")[1]
+ self.line = string.split(self.line, "--", true, 1)[1]
table.insert(lToken, idx) -- line number
if self.line then
-- devide line in tokens
diff --git a/techpack_modpack/screenshot.png b/techpack_modpack/screenshot.png
index f1f1149..f8b3cc3 100644
Binary files a/techpack_modpack/screenshot.png and b/techpack_modpack/screenshot.png differ
diff --git a/techpack_modpack/sl_controller/battery.lua b/techpack_modpack/sl_controller/battery.lua
index c9def62..1109dc8 100644
--- a/techpack_modpack/sl_controller/battery.lua
+++ b/techpack_modpack/sl_controller/battery.lua
@@ -3,9 +3,9 @@
sl_controller
=============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
battery.lua:
diff --git a/techpack_modpack/sl_controller/commands.lua b/techpack_modpack/sl_controller/commands.lua
index ca159b5..637fc52 100644
--- a/techpack_modpack/sl_controller/commands.lua
+++ b/techpack_modpack/sl_controller/commands.lua
@@ -3,9 +3,9 @@
sl_controller
=============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
commands.lua:
diff --git a/techpack_modpack/sl_controller/controller.lua b/techpack_modpack/sl_controller/controller.lua
index 8c30f7a..2ee0bac 100644
--- a/techpack_modpack/sl_controller/controller.lua
+++ b/techpack_modpack/sl_controller/controller.lua
@@ -3,9 +3,9 @@
sl_controller
=============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
controller.lua:
diff --git a/techpack_modpack/sl_controller/init.lua b/techpack_modpack/sl_controller/init.lua
index a571476..75cf8cc 100644
--- a/techpack_modpack/sl_controller/init.lua
+++ b/techpack_modpack/sl_controller/init.lua
@@ -3,9 +3,9 @@
sl_controller
=============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
]]--
@@ -17,4 +17,4 @@ dofile(minetest.get_modpath("sl_controller") .. "/controller.lua")
dofile(minetest.get_modpath("sl_controller") .. "/commands.lua")
dofile(minetest.get_modpath("sl_controller") .. "/battery.lua")
dofile(minetest.get_modpath("sl_controller") .. "/server.lua")
-dofile(minetest.get_modpath("sl_controller") .. "/terminal.lua")
\ No newline at end of file
+dofile(minetest.get_modpath("sl_controller") .. "/terminal.lua")
diff --git a/techpack_modpack/sl_controller/server.lua b/techpack_modpack/sl_controller/server.lua
index 01178a9..9089af5 100644
--- a/techpack_modpack/sl_controller/server.lua
+++ b/techpack_modpack/sl_controller/server.lua
@@ -3,9 +3,9 @@
sl_controller
=============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
server.lua:
diff --git a/techpack_modpack/sl_controller/terminal.lua b/techpack_modpack/sl_controller/terminal.lua
index 552fb67..7c9a485 100644
--- a/techpack_modpack/sl_controller/terminal.lua
+++ b/techpack_modpack/sl_controller/terminal.lua
@@ -3,9 +3,9 @@
sl_controller
=============
- Copyright (C) 2018-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
terminal.lua:
diff --git a/techpack_modpack/sl_controller/textures/sl_controller.png b/techpack_modpack/sl_controller/textures/sl_controller.png
index ecfa8a9..b55cc4e 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller.png and b/techpack_modpack/sl_controller/textures/sl_controller.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_battery_green.png b/techpack_modpack/sl_controller/textures/sl_controller_battery_green.png
index 8fc56fc..b66821f 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_battery_green.png and b/techpack_modpack/sl_controller/textures/sl_controller_battery_green.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_battery_inventory.png b/techpack_modpack/sl_controller/textures/sl_controller_battery_inventory.png
index 67bc589..c713955 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_battery_inventory.png and b/techpack_modpack/sl_controller/textures/sl_controller_battery_inventory.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_battery_red.png b/techpack_modpack/sl_controller/textures/sl_controller_battery_red.png
index 4dddaea..fb194d9 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_battery_red.png and b/techpack_modpack/sl_controller/textures/sl_controller_battery_red.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_inventory.png b/techpack_modpack/sl_controller/textures/sl_controller_inventory.png
index 15218e3..4a5de55 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_inventory.png and b/techpack_modpack/sl_controller/textures/sl_controller_inventory.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_server_back.png b/techpack_modpack/sl_controller/textures/sl_controller_server_back.png
index 4596c23..f250016 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_server_back.png and b/techpack_modpack/sl_controller/textures/sl_controller_server_back.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_server_front.png b/techpack_modpack/sl_controller/textures/sl_controller_server_front.png
index c6aa470..047e0d5 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_server_front.png and b/techpack_modpack/sl_controller/textures/sl_controller_server_front.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_server_side.png b/techpack_modpack/sl_controller/textures/sl_controller_server_side.png
index f161343..281f715 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_server_side.png and b/techpack_modpack/sl_controller/textures/sl_controller_server_side.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_server_top.png b/techpack_modpack/sl_controller/textures/sl_controller_server_top.png
index 789ca99..b44c691 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_server_top.png and b/techpack_modpack/sl_controller/textures/sl_controller_server_top.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_back.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_back.png
index b5dcda8..c9632fa 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_back.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_back.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_front.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_front.png
index 840c123..7ae0723 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_front.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_front.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_side.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_side.png
index 6368bf4..813fcfb 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_side.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_side.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_top.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_top.png
index 78394c3..760ce77 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal2_top.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal2_top.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal_bottom.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal_bottom.png
index 29aadb1..773331d 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal_bottom.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal_bottom.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal_front.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal_front.png
index f32a742..038a6ae 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal_front.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal_front.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal_side.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal_side.png
index 19328bc..23e791b 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal_side.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal_side.png differ
diff --git a/techpack_modpack/sl_controller/textures/sl_controller_terminal_top.png b/techpack_modpack/sl_controller/textures/sl_controller_terminal_top.png
index 1c268a9..72e797d 100644
Binary files a/techpack_modpack/sl_controller/textures/sl_controller_terminal_top.png and b/techpack_modpack/sl_controller/textures/sl_controller_terminal_top.png differ
diff --git a/techpack_modpack/smartline/button.lua b/techpack_modpack/smartline/button.lua
index 6b2b087..f8f837a 100644
--- a/techpack_modpack/smartline/button.lua
+++ b/techpack_modpack/smartline/button.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
button.lua:
@@ -13,9 +13,11 @@
]]--
+-- Load support for I18n
+local S = smartline.S
local function switch_on(pos, node)
- if tubelib.data_not_corrupted(pos) then
+ if tubelib.data_not_corrupted(pos, true) then
node.name = "smartline:button_active"
minetest.swap_node(pos, node)
minetest.sound_play("button", {
@@ -40,7 +42,7 @@ local function switch_on(pos, node)
end
local function switch_off(pos)
- if tubelib.data_not_corrupted(pos) then
+ if tubelib.data_not_corrupted(pos, true) then
local node = minetest.get_node(pos)
node.name = "smartline:button"
minetest.swap_node(pos, node)
@@ -64,7 +66,7 @@ end
minetest.register_node("smartline:button", {
- description = "SmartLine Button/Switch",
+ description = S("SmartLine Button/Switch"),
inventory_image = "smartline_button_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -89,22 +91,23 @@ minetest.register_node("smartline:button", {
local own_num = tubelib.add_node(pos, "smartline:button")
meta:set_string("own_num", own_num)
meta:set_string("formspec", "size[5,6]"..
- "dropdown[0.2,0;3;type;switch,button 2s,button 4s,button 8s,button 16s;1]"..
- "field[0.5,2;3,1;numbers;Insert destination block number(s);]" ..
+ "dropdown[0.2,0;3;type;"..S("switch,button 2s,button 4s,button 8s,button 16s")..";1]"..
+ "field[0.5,2;3,1;numbers;"..S("Insert destination block number(s)")..";]" ..
"checkbox[1,3;public;public;false]"..
- "button_exit[1,4;2,1;exit;Save]")
+ "button_exit[1,4;2,1;exit;"..S("Save").."]")
meta:set_string("placer_name", placer:get_player_name())
meta:set_string("public", "false")
meta:set_int("cycle_time", 0)
- meta:set_string("infotext", "SmartLine Button "..own_num)
+ meta:set_string("infotext", S("SmartLine Button").." "..own_num)
end,
on_receive_fields = function(pos, formname, fields, player)
local meta = minetest.get_meta(pos)
+ print(dump(fields))
if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers)
local own_num = meta:get_string("own_num")
- meta:set_string("infotext", "SmartLine Button "..own_num..", connected with block "..fields.numbers)
+ meta:set_string("infotext", S("SmartLine Button").." "..own_num..", "..S("connected with block").." "..fields.numbers)
else
return
end
@@ -153,7 +156,7 @@ minetest.register_node("smartline:button", {
minetest.register_node("smartline:button_active", {
- description = "SmartLine Button/Switch",
+ description = S("SmartLine Button/Switch"),
tiles = {
-- up, down, right, left, back, front
"smartline.png",
diff --git a/techpack_modpack/smartline/collector.lua b/techpack_modpack/smartline/collector.lua
index d307d0d..754018d 100644
--- a/techpack_modpack/smartline/collector.lua
+++ b/techpack_modpack/smartline/collector.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
collector.lua:
@@ -14,6 +14,9 @@
]]--
+-- Load support for I18n
+local S = smartline.S
+
local CYCLE_TIME = 1
local tStates = {stopped = 0, running = 0, standby = 1, blocked = 2, fault = 3, defect = 4}
@@ -30,11 +33,11 @@ local function formspec(meta)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "field[0.3,0.6;9,1;poll_numbers;Node numbers to read the states from:;"..poll_numbers.."]" ..
- "field[0.3,2;9,1;event_number;Node number to send the events to:;"..event_number.."]" ..
- "label[1.3,2.8;Send an event if state is equal or larget than:]"..
+ "field[0.3,0.6;9,1;poll_numbers;"..S("Node numbers to read the states from:")..";"..poll_numbers.."]" ..
+ "field[0.3,2;9,1;event_number;"..S("Node number to send the events to:")..";"..event_number.."]" ..
+ "label[1.3,2.8;"..S("Send an event if state is equal or larget than:").."]"..
"dropdown[1.2,3.4;7,4;severity;1 standby,2 blocked,3 fault,4 defect;"..dropdown_pos.."]"..
- "button_exit[3,5;2,1;exit;Save]"
+ "button_exit[3,5;2,1;exit;"..S("Save").."]"
end
@@ -50,7 +53,7 @@ local function send_event(meta)
else
tubelib.send_message(event_number, owner, nil, "off", own_number)
end
- meta:set_string("infotext", "SmartLine State Collector "..own_number..': "'..lStates[state]..'"')
+ meta:set_string("infotext", S("SmartLine State Collector").." "..own_number..': "'..lStates[state]..'"')
meta:set_int("stored_state", state)
meta:set_int("state", 0)
end
@@ -74,7 +77,7 @@ local function on_timer(pos,elapsed)
if poll_numbers == "" then
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "SmartLine State Collector "..own_number..": stopped")
+ meta:set_string("infotext", S("SmartLine State Collector").." "..own_number..": stopped")
meta:set_int("state", 0)
meta:set_int("stored_state", 0)
return false
@@ -94,7 +97,7 @@ local function on_timer(pos,elapsed)
end
minetest.register_node("smartline:collector", {
- description = "SmartLine State Collector",
+ description = S("SmartLine State Collector"),
inventory_image = "smartline_collector_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -121,7 +124,7 @@ minetest.register_node("smartline:collector", {
meta:set_string("poll_numbers", "")
meta:set_string("event_number", "")
meta:set_string("formspec", formspec(meta))
- meta:set_string("infotext", "SmartLine State Collector "..own_number)
+ meta:set_string("infotext", S("SmartLine State Collector").." "..own_number)
meta:set_string("owner", placer:get_player_name())
end,
@@ -145,7 +148,7 @@ minetest.register_node("smartline:collector", {
if not timer:is_started() then
timer:start(CYCLE_TIME)
end
- meta:set_string("infotext", "SmartLine State Collector "..own_number..": running")
+ meta:set_string("infotext", S("SmartLine State Collector").." "..own_number..": running")
else
if timer:is_started() then
timer:stop()
diff --git a/techpack_modpack/smartline/commands.lua b/techpack_modpack/smartline/commands.lua
index 4c054bb..8f57754 100644
--- a/techpack_modpack/smartline/commands.lua
+++ b/techpack_modpack/smartline/commands.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
command.lua:
diff --git a/techpack_modpack/smartline/controller.lua b/techpack_modpack/smartline/controller.lua
index 1d4b6da..0e0513d 100644
--- a/techpack_modpack/smartline/controller.lua
+++ b/techpack_modpack/smartline/controller.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
controller.lua:
diff --git a/techpack_modpack/smartline/display.lua b/techpack_modpack/smartline/display.lua
index 62d8b26..8f5b14e 100644
--- a/techpack_modpack/smartline/display.lua
+++ b/techpack_modpack/smartline/display.lua
@@ -3,15 +3,17 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
display.lua:
]]--
+-- Load support for I18n
+local S = smartline.S
lcdlib.register_display_entity("smartline:entity")
@@ -42,7 +44,7 @@ local lcd_box = {
}
minetest.register_node("smartline:display", {
- description = "SmartLine Display",
+ description = S("SmartLine Display"),
inventory_image = 'smartline_display_inventory.png',
tiles = {"smartline_display.png"},
drawtype = "nodebox",
diff --git a/techpack_modpack/smartline/icta/action.lua b/techpack_modpack/smartline/icta/action.lua
index 7bcfc9a..6e68bca 100644
--- a/techpack_modpack/smartline/icta/action.lua
+++ b/techpack_modpack/smartline/icta/action.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
action.lua
diff --git a/techpack_modpack/smartline/icta/balancer.lua b/techpack_modpack/smartline/icta/balancer.lua
index 34fe5a7..639abef 100644
--- a/techpack_modpack/smartline/icta/balancer.lua
+++ b/techpack_modpack/smartline/icta/balancer.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
balancer.lua
diff --git a/techpack_modpack/smartline/icta/battery.lua b/techpack_modpack/smartline/icta/battery.lua
index cca063c..f50c1fd 100644
--- a/techpack_modpack/smartline/icta/battery.lua
+++ b/techpack_modpack/smartline/icta/battery.lua
@@ -3,9 +3,9 @@
ICTA Controller
===============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
battery.lua
diff --git a/techpack_modpack/smartline/icta/commands.lua b/techpack_modpack/smartline/icta/commands.lua
index 5fcb90c..1fb682f 100644
--- a/techpack_modpack/smartline/icta/commands.lua
+++ b/techpack_modpack/smartline/icta/commands.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
command.lua:
@@ -37,6 +37,8 @@ end
-- '#' is used as placeholder for rule numbers and has to be escaped
function smartline.escape(s)
s = tostring(s)
+ s = s:gsub('\\', '') -- to prevent code injection!!!
+ s = s:gsub('"', '\\"') -- to prevent code injection!!!
return s:gsub("#", '"..string.char(35).."')
end
@@ -431,7 +433,7 @@ smartline.icta_register_action("chat", {
},
},
code = function(data, environ)
- return 'minetest.chat_send_player("'..environ.owner..'", "[SmartLine Controller] '..data.text..'")'
+ return 'minetest.chat_send_player("'..environ.owner..'", "[SmartLine Controller] '..smartline.escape(data.text)..'")'
end,
button = function(data, environ)
return 'chat("'..data.text:sub(1,12)..'")'
@@ -518,7 +520,7 @@ smartline.icta_register_condition("playerdetector", {
},
code = function(data, environ)
- return 'smartline.icta_player_detect("'..data.number..'", "'..data.name..'")', "~= nil"
+ return 'smartline.icta_player_detect("'..data.number..'", "'..smartline.escape(data.name)..'")', "~= nil"
end,
button = function(data, environ)
return "detector("..sl.fmt_number(data.number)..","..data.name:sub(1,8)..")"
diff --git a/techpack_modpack/smartline/icta/condition.lua b/techpack_modpack/smartline/icta/condition.lua
index 4a2c92d..5185710 100644
--- a/techpack_modpack/smartline/icta/condition.lua
+++ b/techpack_modpack/smartline/icta/condition.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
condition.lua
diff --git a/techpack_modpack/smartline/icta/controller.lua b/techpack_modpack/smartline/icta/controller.lua
index 661553f..44c4825 100644
--- a/techpack_modpack/smartline/icta/controller.lua
+++ b/techpack_modpack/smartline/icta/controller.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
controller.lua
diff --git a/techpack_modpack/smartline/icta/edit.lua b/techpack_modpack/smartline/icta/edit.lua
index 3e04ccb..290bce6 100644
--- a/techpack_modpack/smartline/icta/edit.lua
+++ b/techpack_modpack/smartline/icta/edit.lua
@@ -3,9 +3,9 @@
ICTA Controller
===============
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
edit.lua
diff --git a/techpack_modpack/smartline/icta/formspec.lua b/techpack_modpack/smartline/icta/formspec.lua
index 19f019c..b25d13a 100644
--- a/techpack_modpack/smartline/icta/formspec.lua
+++ b/techpack_modpack/smartline/icta/formspec.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
formspec.lua:
diff --git a/techpack_modpack/smartline/icta/stopwatch.lua b/techpack_modpack/smartline/icta/stopwatch.lua
index 67d18fd..93b1f5a 100644
--- a/techpack_modpack/smartline/icta/stopwatch.lua
+++ b/techpack_modpack/smartline/icta/stopwatch.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
stopwatch.lua
diff --git a/techpack_modpack/smartline/icta/submenu.lua b/techpack_modpack/smartline/icta/submenu.lua
index bb547ea..0719042 100644
--- a/techpack_modpack/smartline/icta/submenu.lua
+++ b/techpack_modpack/smartline/icta/submenu.lua
@@ -5,9 +5,9 @@
Part of the SmartLine mod
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
submenu.lua
diff --git a/techpack_modpack/smartline/init.lua b/techpack_modpack/smartline/init.lua
index bd6f43a..3c13f13 100644
--- a/techpack_modpack/smartline/init.lua
+++ b/techpack_modpack/smartline/init.lua
@@ -3,15 +3,18 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
]]--
smartline = {}
+-- Load support for I18n
+smartline.S = minetest.get_translator("smartline")
+
local MP = minetest.get_modpath("smartline")
dofile(MP.."/display.lua")
diff --git a/techpack_modpack/smartline/locale/smartline.de.tr b/techpack_modpack/smartline/locale/smartline.de.tr
new file mode 100644
index 0000000..46d50d0
--- /dev/null
+++ b/techpack_modpack/smartline/locale/smartline.de.tr
@@ -0,0 +1,85 @@
+# textdomain: smartline
+
+
+
+### button.lua ###
+
+Insert destination block number(s)=Zielblocknummer(n) eingeben
+SmartLine Button=SmartLine Taster
+SmartLine Button/Switch=SmartLine Taster/Schalter
+connected with block=verbunden mit Block
+switch,button 2s,button 4s,button 8s,button 16s=Schalter,Taster 2s,Taster 4s,Taster 8s,Taster 16s
+
+### button.lua ###
+### collector.lua ###
+### playerdetector.lua ###
+### repeater.lua ###
+
+Save=Speichern
+
+### collector.lua ###
+
+Node number to send the events to:=Knotennummer, an den die Events gesendet werden sollen:
+Node numbers to read the states from:=Knotennummers, von wo der Status gelesen werden soll:
+Send an event if state is equal or larget than:=Sende einen Event, wenn der Status gleich oder größer ist als:
+SmartLine State Collector=SmartLine Status Sammler
+
+### display.lua ###
+
+SmartLine Display=SmartLine Display
+
+### playerdetector.lua ###
+
+Input the number(s) of the receiving node(s).=Gib die Nummer(n) der Empfangsblöcke ein.
+Input the player name(s) separated by blanks,=Gebe sie Spielernamen getrennt durch Leerzeichen ein,
+Player Detector=Spieler Detektor
+Player Detector Help=Spieler Detektor Hilfe
+Player name(s):=Spielername(n):
+Receiver node numbers:=Empfangsblocknummer(n):
+Separate numbers via blanks, like '0123 0234'.=Separiere die Nummern mit Leerzeichen, wie '0123 0234'.
+SmartLine Player Detector=SmartLine Spieler Detektor
+or leave it blank for all players.=oder lasse es leer für alle Spieler.
+
+### playerdetector.lua ###
+### sequencer.lua ###
+### timer.lua ###
+
+close=schließen
+help=Hilfe
+
+### repeater.lua ###
+
+Destination node numbers=Zielknotennummern
+SmartLine Repeater=SmartLine Wiederholer
+connected with=verbunden mit
+fault (overloaded)=Fehler (überlastet)
+not connected=nicht verbunden
+
+### sequencer.lua ###
+
+Offset/s=Offset/s
+Run endless=Laufe endlos
+SmartLine Sequencer=SmartLine Sequenzer
+
+SmartLine Sequencer Help@n @nDefine a sequence of commands to control other machines.@nNumbers(s) are the node numbers, the command shall sent to.@nThe commands 'on'/'off' are used for machines and other nodes.@nOffset is the time to the next line in seconds (1..999).@nIf endless is set, the Sequencer restarts again and again.@nThe command ' ' does nothing, only consuming the offset time.@n=SmartLine Sequenzer Hilfe@n @nDefiniere eine Sequenz von Kommandos um andere Maschinen zu steuern.@nNummern sind Blocknummern, wo die Kommandos hingesendet werden sollen@nDas Kommando 'on'/'off' wird für Maschinen und andere Blöcke verwendet@nOffset ist die Zeit zur nächsten Zeile in Sekunden (1..999).@nWird 'endlos' angeklickt, startet der Sequenzer immer wieder neu.@nDas Kommando ' ' macht nichts, die die Zeit zu verbrauchen.@n
+
+running=läuft
+stopped=gestoppt
+
+### sequencer.lua ###
+### timer.lua ###
+
+Command=Kommando
+Number(s)=Nummer(m)
+
+### signaltower.lua ###
+
+SmartLine Signal Tower=SmartLine Signalturm
+
+### timer.lua ###
+
+SmartLine Timer=SmartLine Timer
+
+SmartLine Timer Help@n@nThe Timer is for a daytime controlled sending of commands@ne.g. to turn street lights on/off. The timer checks the @ntime every few seconds. If the block was just loaded, @nthe timer will check the last 4 hours for commands@nthat still need to be executed.=SmartLine Timer Hilfe@n@nDer Timer st zum Tageszeit abhängigem Senden von Kommandos@nDer Timer prüft die regeln alle paar Sekunden.@nFalls die Block gerade erst aktiviert wurde (Spieler kommt in die Nähe),@nwerden auch die Kommandos der letzten 4 Spielstunden@ngeprüft und ggf. ausgeführt.
+
+Time=Zeit
diff --git a/techpack_modpack/smartline/locale/template.txt b/techpack_modpack/smartline/locale/template.txt
new file mode 100644
index 0000000..0b729a7
--- /dev/null
+++ b/techpack_modpack/smartline/locale/template.txt
@@ -0,0 +1,85 @@
+# textdomain: smartline
+
+
+
+### button.lua ###
+
+Insert destination block number(s)=
+SmartLine Button=
+SmartLine Button/Switch=
+connected with block=
+switch,button 2s,button 4s,button 8s,button 16s=
+
+### button.lua ###
+### collector.lua ###
+### playerdetector.lua ###
+### repeater.lua ###
+
+Save=
+
+### collector.lua ###
+
+Node number to send the events to:=
+Node numbers to read the states from:=
+Send an event if state is equal or larget than:=
+SmartLine State Collector=
+
+### display.lua ###
+
+SmartLine Display=
+
+### playerdetector.lua ###
+
+Input the number(s) of the receiving node(s).=
+Input the player name(s) separated by blanks,=
+Player Detector=
+Player Detector Help=
+Player name(s):=
+Receiver node numbers:=
+Separate numbers via blanks, like '0123 0234'.=
+SmartLine Player Detector=
+or leave it blank for all players.=
+
+### playerdetector.lua ###
+### sequencer.lua ###
+### timer.lua ###
+
+close=
+help=
+
+### repeater.lua ###
+
+Destination node numbers=
+SmartLine Repeater=
+connected with=
+fault (overloaded)=
+not connected=
+
+### sequencer.lua ###
+
+Offset/s=
+Run endless=
+SmartLine Sequencer=
+
+SmartLine Sequencer Help@n @nDefine a sequence of commands to control other machines.@nNumbers(s) are the node numbers, the command shall sent to.@nThe commands 'on'/'off' are used for machines and other nodes.@nOffset is the time to the next line in seconds (1..999).@nIf endless is set, the Sequencer restarts again and again.@nThe command ' ' does nothing, only consuming the offset time.@n=
+
+running=
+stopped=
+
+### sequencer.lua ###
+### timer.lua ###
+
+Command=
+Number(s)=
+
+### signaltower.lua ###
+
+SmartLine Signal Tower=
+
+### timer.lua ###
+
+SmartLine Timer=
+
+SmartLine Timer Help@n@nThe Timer is for a daytime controlled sending of commands@ne.g. to turn street lights on/off. The timer checks the @ntime every few seconds. If the block was just loaded, @nthe timer will check the last 4 hours for commands@nthat still need to be executed.=
+
+Time=
diff --git a/techpack_modpack/smartline/playerdetector.lua b/techpack_modpack/smartline/playerdetector.lua
index eca6707..6f646c3 100644
--- a/techpack_modpack/smartline/playerdetector.lua
+++ b/techpack_modpack/smartline/playerdetector.lua
@@ -3,15 +3,18 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
playerdetector.lua:
]]--
+-- Load support for I18n
+local S = smartline.S
+
local function switch_on(pos)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
@@ -56,15 +59,19 @@ local function scan_for_player(pos)
end
local function formspec_help()
+ local help = table.concat({
+ S("Input the number(s) of the receiving node(s)."),
+ S("Separate numbers via blanks, like '0123 0234'."),
+ S("Input the player name(s) separated by blanks,"),
+ S("or leave it blank for all players.")
+ }, "\n")
return "size[10,9]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "label[3,0;Player Detector Help]"..
- "label[0,1;Input the number(s) of the receiving node(s).\n"..
- "Separate numbers via blanks, like '0123 0234'.\n\n"..
- "Input the player name(s) separated by blanks,\nor empty for all players.]"..
- "button_exit[4,8;2,1;exit;close]"
+ "label[3,0;"..S("Player Detector Help").."]"..
+ "label[0,1;"..help.."]"..
+ "button_exit[4,8;2,1;exit2;"..S("close").."]"
end
@@ -73,26 +80,27 @@ local function formspec(numbers, names)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "label[2,0;Player Detector]"..
- "field[0.3,1;8,1;numbers;Receiver node numbers:;"..numbers.."]" ..
- "field[0.3,2.5;8,1;names;Player name(s):;"..names.."]" ..
- "button_exit[5,3.5;2,1;exit;Save]"..
- "button[1,3.5;1,1;help;help]"
+ "label[2,0;"..S("Player Detector").."]"..
+ "field[0.3,1;8,1;numbers;"..S("Receiver node numbers:")..";"..numbers.."]" ..
+ "field[0.3,2.5;8,1;names;"..S("Player name(s):")..";"..names.."]" ..
+ "button_exit[5,3.5;2,1;exit1;"..S("Save").."]"..
+ "button[1,3.5;1,1;help;"..S("help").."]"
end
local function on_receive_fields(pos, formname, fields, player)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
if player:get_player_name() == owner then
- if fields.exit == "Save" then
+ print(dump(fields))
+ if fields.exit1 then
if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers)
end
meta:set_string("names", fields.names)
meta:set_string("formspec", formspec(fields.numbers, fields.names))
- elseif fields.help ~= nil then
+ elseif fields.help then
meta:set_string("formspec", formspec_help())
- elseif fields.exit == "close" then
+ elseif fields.exit2 then
local numbers = meta:get_string("numbers")
local names = meta:get_string("names")
meta:set_string("formspec", formspec(numbers, names))
@@ -101,7 +109,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("smartline:playerdetector", {
- description = "SmartLine Player Detector",
+ description = S("SmartLine Player Detector"),
inventory_image = "smartline_detector_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -127,7 +135,7 @@ minetest.register_node("smartline:playerdetector", {
local numbers = meta:get_string("numbers") or ""
local names = meta:get_string("names") or ""
meta:set_string("formspec", formspec(numbers, names))
- meta:set_string("infotext", "SmartLine Player Detector "..number)
+ meta:set_string("infotext", S("SmartLine Player Detector").." "..number)
meta:set_string("owner", placer:get_player_name())
minetest.get_node_timer(pos):start(1)
end,
@@ -159,7 +167,7 @@ minetest.register_node("smartline:playerdetector", {
})
minetest.register_node("smartline:playerdetector_active", {
- description = "SmartLine Player Detector",
+ description = S("SmartLine Player Detector"),
tiles = {
-- up, down, right, left, back, front
"smartline.png",
diff --git a/techpack_modpack/smartline/repeater.lua b/techpack_modpack/smartline/repeater.lua
index a942bd2..0556f5e 100644
--- a/techpack_modpack/smartline/repeater.lua
+++ b/techpack_modpack/smartline/repeater.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
repeater.lua:
@@ -13,17 +13,20 @@
]]--
+-- Load support for I18n
+local S = smartline.S
+
local OVER_LOAD_MAX = 5
local function formspec(meta)
local numbers = meta:get_string("numbers")
return "size[7,5]"..
- "field[0.5,2;6,1;number;Destination node numbers;"..numbers.."]" ..
- "button_exit[1,3;2,1;exit;Save]"
+ "field[0.5,2;6,1;number;"..S("Destination node numbers")..";"..numbers.."]" ..
+ "button_exit[1,3;2,1;exit;"..S("Save").."]"
end
minetest.register_node("smartline:repeater", {
- description = "SmartLine Repeater",
+ description = S("SmartLine Repeater"),
inventory_image = "smartline_repeater_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -48,7 +51,7 @@ minetest.register_node("smartline:repeater", {
local own_number = tubelib.add_node(pos, "smartline:repeater")
meta:set_string("own_number", own_number)
meta:set_string("formspec", formspec(meta))
- meta:set_string("infotext", "SmartLine Repeater "..own_number..": not connected")
+ meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("not connected"))
meta:set_string("owner", placer:get_player_name())
meta:set_int("overload_cnt", 0)
minetest.get_node_timer(pos):start(1)
@@ -64,7 +67,7 @@ minetest.register_node("smartline:repeater", {
if tubelib.check_numbers(fields.number) then
meta:set_string("numbers", fields.number)
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "SmartLine Repeater "..own_number..": connected with "..fields.number)
+ meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("connected with").." "..fields.number)
meta:set_string("formspec", formspec(meta))
end
@@ -114,12 +117,12 @@ tubelib.register_node("smartline:repeater", {}, {
meta:set_int("overload_cnt", overload_cnt)
if overload_cnt > OVER_LOAD_MAX then
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "SmartLine Repeater "..own_number..": fault (overloaded)")
+ meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("fault (overloaded)"))
minetest.get_node_timer(pos):stop()
return false
elseif topic == "set_numbers" then
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "SmartLine Repeater "..own_number..": connected with "..payload)
+ meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("connected with").." "..payload)
meta:set_string("numbers", payload)
meta:set_string("formspec", formspec(meta))
return true
diff --git a/techpack_modpack/smartline/sequencer.lua b/techpack_modpack/smartline/sequencer.lua
index 8758c38..d9e7aa3 100644
--- a/techpack_modpack/smartline/sequencer.lua
+++ b/techpack_modpack/smartline/sequencer.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
sequencer.lua:
@@ -13,20 +13,24 @@
]]--
+-- Load support for I18n
+local S = smartline.S
+
local RUNNING_STATE = 1
local STOP_STATE = 0
local NUM_SLOTS = 8
-local sHELP = [[label[0,0;SmartLine Sequencer Help
-
+local sHELP = "label[0,0;"..
+S([[SmartLine Sequencer Help
+
Define a sequence of commands to control other machines.
Numbers(s) are the node numbers, the command shall sent to.
The commands 'on'/'off' are used for machines and other nodes.
Offset is the time to the next line in seconds (1..999).
If endless is set, the Sequencer restarts again and again.
The command ' ' does nothing, only consuming the offset time.
-]
-]]
+]])..
+"]"
local sAction = ",on,off"
@@ -39,15 +43,15 @@ local function formspec(state, rules, endless)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "label[0,0;Number(s)]label[2.1,0;Command]label[6.4,0;Offset/s]"}
+ "label[0,0;"..S("Number(s)").."]label[2.1,0;"..S("Command").."]label[6.4,0;"..S("Offset/s").."]"}
for idx, rule in ipairs(rules or {}) do
tbl[#tbl+1] = "field[0.2,"..(-0.2+idx)..";2,1;num"..idx..";;"..(rule.num or "").."]"
tbl[#tbl+1] = "dropdown[2,"..(-0.4+idx)..";3.9,1;act"..idx..";"..sAction..";"..(rule.act or "").."]"
tbl[#tbl+1] = "field[6.2,"..(-0.2+idx)..";2,1;offs"..idx..";;"..(rule.offs or "").."]"
end
- tbl[#tbl+1] = "checkbox[0,8.5;endless;Run endless;"..endless.."]"
- tbl[#tbl+1] = "button[4.5,8.5;1.5,1;help;help]"
+ tbl[#tbl+1] = "checkbox[0,8.5;endless;"..S("Run endless")..";"..endless.."]"
+ tbl[#tbl+1] = "button[4.5,8.5;1.5,1;help;"..S("help").."]"
tbl[#tbl+1] = "image_button[6.5,8.5;1,1;".. tubelib.state_button(state) ..";button;]"
return table.concat(tbl)
@@ -58,10 +62,10 @@ local function formspec_help()
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "field[0,0;0,0;_type_;;help]"..
+ "field[0,0;0,0;_type_;;"..S("help").."]"..
sHELP..
--"label[0.2,0;test]"..
- "button[11.5,9;1.5,1;close;close]"
+ "button[11.5,9;1.5,1;close;"..S("close").."]"
end
local function stop_the_sequencer(pos)
@@ -69,7 +73,7 @@ local function stop_the_sequencer(pos)
local meta = minetest.get_meta(pos)
local number = meta:get_string("number")
meta:set_int("running", STOP_STATE)
- meta:set_string("infotext", "SmartLine Sequencer "..number..": stopped")
+ meta:set_string("infotext", S("SmartLine Sequencer").." "..number..": "..S("stopped"))
local rules = minetest.deserialize(meta:get_string("rules"))
local endless = meta:get_int("endless") or 0
meta:set_string("formspec", formspec(tubelib.STOPPED, rules, endless))
@@ -120,7 +124,7 @@ local function check_rules(pos, elapsed)
if index == 1 and offs < 1 then
offs = 2
end
- meta:set_string("infotext", "SmartLine Sequencer "..number..": running ("..index.."/"..NUM_SLOTS..")")
+ meta:set_string("infotext", S("SmartLine Sequencer").." "..number..": "..S("running").." ("..index.."/"..NUM_SLOTS..")")
meta:set_int("index", index)
if offs > 0 then
minetest.after(0, restart_timer, pos, offs)
@@ -142,7 +146,7 @@ local function start_the_sequencer(pos)
local number = meta:get_string("number")
meta:set_int("running", RUNNING_STATE)
meta:set_int("index", 1)
- meta:set_string("infotext", "SmartLine Sequencer "..number..": running (1/"..NUM_SLOTS..")")
+ meta:set_string("infotext", S("SmartLine Sequencer").." "..number..": "..S("running").." (1/"..NUM_SLOTS..")")
local rules = minetest.deserialize(meta:get_string("rules"))
local endless = meta:get_int("endless") or 0
meta:set_string("formspec", formspec(tubelib.RUNNING, rules, endless))
@@ -202,7 +206,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("smartline:sequencer", {
- description = "SmartLine Sequencer",
+ description = S("SmartLine Sequencer"),
inventory_image = "smartline_sequencer_inventory.png",
wield_image = "smartline_sequencer_inventory.png",
stack_max = 1,
@@ -237,7 +241,7 @@ minetest.register_node("smartline:sequencer", {
meta:set_int("endless", 0)
meta:get_int("running", STOP_STATE)
meta:set_string("formspec", formspec(tubelib.STOPPED, rules, 0))
- meta:set_string("infotext", "SmartLine Sequencer "..number)
+ meta:set_string("infotext", S("SmartLine Sequencer").." "..number)
end,
on_receive_fields = on_receive_fields,
diff --git a/techpack_modpack/smartline/signaltower.lua b/techpack_modpack/smartline/signaltower.lua
index 9156abc..b254978 100644
--- a/techpack_modpack/smartline/signaltower.lua
+++ b/techpack_modpack/smartline/signaltower.lua
@@ -3,15 +3,17 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
signaltower.lua:
]]--
+-- Load support for I18n
+local S = smartline.S
local function switch_on(pos, node, color)
local meta = minetest.get_meta(pos)
@@ -28,7 +30,7 @@ local function switch_off(pos, node)
end
minetest.register_node("smartline:signaltower", {
- description = "SmartLine Signal Tower",
+ description = S("SmartLine Signal Tower"),
tiles = {
'smartline_signaltower_top.png',
'smartline_signaltower_top.png',
@@ -47,7 +49,7 @@ minetest.register_node("smartline:signaltower", {
local number = tubelib.add_node(pos, "smartline:signaltower")
local meta = minetest.get_meta(pos)
meta:set_string("state", "off")
- meta:set_string("infotext", "SmartLine Signal Tower "..number)
+ meta:set_string("infotext", S("SmartLine Signal Tower").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@@ -71,7 +73,7 @@ minetest.register_node("smartline:signaltower", {
for _,color in ipairs({"green", "amber", "red"}) do
minetest.register_node("smartline:signaltower_"..color, {
- description = "SmartLine Signal Tower",
+ description = S("SmartLine Signal Tower"),
tiles = {
'smartline_signaltower_top.png',
'smartline_signaltower_top.png',
diff --git a/techpack_modpack/smartline/textures/smartline.png b/techpack_modpack/smartline/textures/smartline.png
index f54957c..471aee3 100644
Binary files a/techpack_modpack/smartline/textures/smartline.png and b/techpack_modpack/smartline/textures/smartline.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_battery_green.png b/techpack_modpack/smartline/textures/smartline_battery_green.png
index 8fc56fc..b66821f 100644
Binary files a/techpack_modpack/smartline/textures/smartline_battery_green.png and b/techpack_modpack/smartline/textures/smartline_battery_green.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_battery_inventory.png b/techpack_modpack/smartline/textures/smartline_battery_inventory.png
index 67bc589..c713955 100644
Binary files a/techpack_modpack/smartline/textures/smartline_battery_inventory.png and b/techpack_modpack/smartline/textures/smartline_battery_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_battery_red.png b/techpack_modpack/smartline/textures/smartline_battery_red.png
index 4dddaea..fb194d9 100644
Binary files a/techpack_modpack/smartline/textures/smartline_battery_red.png and b/techpack_modpack/smartline/textures/smartline_battery_red.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_button_inventory.png b/techpack_modpack/smartline/textures/smartline_button_inventory.png
index 7c540fd..8ac272e 100644
Binary files a/techpack_modpack/smartline/textures/smartline_button_inventory.png and b/techpack_modpack/smartline/textures/smartline_button_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_button_off.png b/techpack_modpack/smartline/textures/smartline_button_off.png
index d19d241..64f0006 100644
Binary files a/techpack_modpack/smartline/textures/smartline_button_off.png and b/techpack_modpack/smartline/textures/smartline_button_off.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_button_on.png b/techpack_modpack/smartline/textures/smartline_button_on.png
index 67f6a7b..9bab52e 100644
Binary files a/techpack_modpack/smartline/textures/smartline_button_on.png and b/techpack_modpack/smartline/textures/smartline_button_on.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_collector.png b/techpack_modpack/smartline/textures/smartline_collector.png
index e91a11a..272a953 100644
Binary files a/techpack_modpack/smartline/textures/smartline_collector.png and b/techpack_modpack/smartline/textures/smartline_collector.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_collector_inventory.png b/techpack_modpack/smartline/textures/smartline_collector_inventory.png
index 5135ede..cbd28c6 100644
Binary files a/techpack_modpack/smartline/textures/smartline_collector_inventory.png and b/techpack_modpack/smartline/textures/smartline_collector_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_controller.png b/techpack_modpack/smartline/textures/smartline_controller.png
index 15992c9..a1e5932 100644
Binary files a/techpack_modpack/smartline/textures/smartline_controller.png and b/techpack_modpack/smartline/textures/smartline_controller.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_controller_inventory.png b/techpack_modpack/smartline/textures/smartline_controller_inventory.png
index 6c2b848..b36bdae 100644
Binary files a/techpack_modpack/smartline/textures/smartline_controller_inventory.png and b/techpack_modpack/smartline/textures/smartline_controller_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_detector.png b/techpack_modpack/smartline/textures/smartline_detector.png
index 0fa78ec..ef39e1f 100644
Binary files a/techpack_modpack/smartline/textures/smartline_detector.png and b/techpack_modpack/smartline/textures/smartline_detector.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_detector_active.png b/techpack_modpack/smartline/textures/smartline_detector_active.png
index 5f015a5..c378a32 100644
Binary files a/techpack_modpack/smartline/textures/smartline_detector_active.png and b/techpack_modpack/smartline/textures/smartline_detector_active.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_detector_inventory.png b/techpack_modpack/smartline/textures/smartline_detector_inventory.png
index e349628..e92acc6 100644
Binary files a/techpack_modpack/smartline/textures/smartline_detector_inventory.png and b/techpack_modpack/smartline/textures/smartline_detector_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_display.png b/techpack_modpack/smartline/textures/smartline_display.png
index e3482e4..9e9e3e7 100644
Binary files a/techpack_modpack/smartline/textures/smartline_display.png and b/techpack_modpack/smartline/textures/smartline_display.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_display_inventory.png b/techpack_modpack/smartline/textures/smartline_display_inventory.png
index 84202c2..58b11be 100644
Binary files a/techpack_modpack/smartline/textures/smartline_display_inventory.png and b/techpack_modpack/smartline/textures/smartline_display_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_repeater.png b/techpack_modpack/smartline/textures/smartline_repeater.png
index c5e5513..fdf7c03 100644
Binary files a/techpack_modpack/smartline/textures/smartline_repeater.png and b/techpack_modpack/smartline/textures/smartline_repeater.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_repeater_inventory.png b/techpack_modpack/smartline/textures/smartline_repeater_inventory.png
index ae310a0..d47c33c 100644
Binary files a/techpack_modpack/smartline/textures/smartline_repeater_inventory.png and b/techpack_modpack/smartline/textures/smartline_repeater_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_sequencer.png b/techpack_modpack/smartline/textures/smartline_sequencer.png
index 4e18d47..5e3066b 100644
Binary files a/techpack_modpack/smartline/textures/smartline_sequencer.png and b/techpack_modpack/smartline/textures/smartline_sequencer.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_sequencer_inventory.png b/techpack_modpack/smartline/textures/smartline_sequencer_inventory.png
index 6f19862..de56ec4 100644
Binary files a/techpack_modpack/smartline/textures/smartline_sequencer_inventory.png and b/techpack_modpack/smartline/textures/smartline_sequencer_inventory.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_signaltower.png b/techpack_modpack/smartline/textures/smartline_signaltower.png
index 8d364cc..6fe09bb 100644
Binary files a/techpack_modpack/smartline/textures/smartline_signaltower.png and b/techpack_modpack/smartline/textures/smartline_signaltower.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_signaltower_amber.png b/techpack_modpack/smartline/textures/smartline_signaltower_amber.png
index ae1c4ce..74c6473 100644
Binary files a/techpack_modpack/smartline/textures/smartline_signaltower_amber.png and b/techpack_modpack/smartline/textures/smartline_signaltower_amber.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_signaltower_green.png b/techpack_modpack/smartline/textures/smartline_signaltower_green.png
index 2b42481..c75409e 100644
Binary files a/techpack_modpack/smartline/textures/smartline_signaltower_green.png and b/techpack_modpack/smartline/textures/smartline_signaltower_green.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_signaltower_red.png b/techpack_modpack/smartline/textures/smartline_signaltower_red.png
index e19a20d..2835266 100644
Binary files a/techpack_modpack/smartline/textures/smartline_signaltower_red.png and b/techpack_modpack/smartline/textures/smartline_signaltower_red.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_signaltower_top.png b/techpack_modpack/smartline/textures/smartline_signaltower_top.png
index be37c0c..7c9ed8d 100644
Binary files a/techpack_modpack/smartline/textures/smartline_signaltower_top.png and b/techpack_modpack/smartline/textures/smartline_signaltower_top.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_timer.png b/techpack_modpack/smartline/textures/smartline_timer.png
index a861f83..bd59a58 100644
Binary files a/techpack_modpack/smartline/textures/smartline_timer.png and b/techpack_modpack/smartline/textures/smartline_timer.png differ
diff --git a/techpack_modpack/smartline/textures/smartline_timer_inventory.png b/techpack_modpack/smartline/textures/smartline_timer_inventory.png
index dc16c9e..3aa15b1 100644
Binary files a/techpack_modpack/smartline/textures/smartline_timer_inventory.png and b/techpack_modpack/smartline/textures/smartline_timer_inventory.png differ
diff --git a/techpack_modpack/smartline/timer.lua b/techpack_modpack/smartline/timer.lua
index 9367973..63e5d59 100644
--- a/techpack_modpack/smartline/timer.lua
+++ b/techpack_modpack/smartline/timer.lua
@@ -3,9 +3,9 @@
SmartLine
=========
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
timer.lua:
@@ -13,13 +13,20 @@
]]--
+-- Load support for I18n
+local S = smartline.S
+
local CYCLE_TIME = 8
-local sHELP = [[label[0,0;SmartLine Timer Help
+local sHELP = "label[0,0;"..
+S([[SmartLine Timer Help
-tbd
-]
-]]
+The Timer is for a daytime controlled sending of commands
+e.g. to turn street lights on/off. The timer checks the
+time every few seconds. If the block was just loaded,
+the timer will check the last 4 hours for commands
+that still need to be executed.]])..
+"]"
local tTime = {
@@ -45,7 +52,7 @@ local function formspec(events, numbers, actions)
default.gui_bg_img..
default.gui_slots..
- "label[0,0;Time]label[2.3,0;Number(s)]label[4.5,0;Command]"..
+ "label[0,0;"..S("Time").."]label[2.3,0;"..S("Number(s)").."]label[4.5,0;"..S("Command").."]"..
"dropdown[0,1;2,1;e1;"..sTime..";"..events[1].."]"..
"field[2.3,1.2;2,1;n1;;"..numbers[1].."]" ..
"dropdown[4.5,1;3,1;a1;"..sAction..";"..tAction[actions[1]].."]"..
@@ -70,8 +77,8 @@ local function formspec(events, numbers, actions)
"field[2.3,6.2;2,1;n6;;"..numbers[6].."]" ..
"dropdown[4.5,6;3,1;a6;"..sAction..";"..tAction[actions[6]].."]"..
- "button[4.5,7;1.5,1;help;help]"..
- "button_exit[6.5,7;1.5,1;exit;close]"
+ "button[4.5,7;1.5,1;help;"..S("help").."]"..
+ "button_exit[6.5,7;1.5,1;exit;"..S("close").."]"
end
local function formspec_help()
@@ -79,10 +86,10 @@ local function formspec_help()
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "field[0,0;0,0;_type_;;help]"..
+ "field[0,0;0,0;_type_;;"..S("help").."]"..
sHELP..
--"label[0.2,0;test]"..
- "button[11.5,9;1.5,1;close;close]"
+ "button[11.5,9;1.5,1;close;"..S("close").."]"
end
local function check_rules(pos,elapsed)
@@ -120,7 +127,7 @@ local function check_rules(pos,elapsed)
done = {false,false,false,false,false,false}
end
meta:set_string("done", minetest.serialize(done))
- meta:set_string("infotext","SmartLine Timer ("..own_num..")"..hour..":00")
+ meta:set_string("infotext", S("SmartLine Timer").." "..own_num..": "..hour..":00")
return true
end
return false
@@ -128,7 +135,7 @@ end
minetest.register_node("smartline:timer", {
- description = "SmartLine Timer",
+ description = S("SmartLine Timer"),
inventory_image = "smartline_timer_inventory.png",
wield_image = "smartline_timer_inventory.png",
stack_max = 1,
diff --git a/techpack_modpack/techpack_stairway/init.lua b/techpack_modpack/techpack_stairway/init.lua
index b74ec4e..b0bac50 100644
--- a/techpack_modpack/techpack_stairway/init.lua
+++ b/techpack_modpack/techpack_stairway/init.lua
@@ -3,16 +3,19 @@
TechPack Stairway
=================
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2019-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
init.lua
]]--
+
+S = minetest.get_translator("techpack_stairway")
+
minetest.register_node("techpack_stairway:grating", {
- description = "TechPack Grating",
+ description = S("TechPack Grating"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -43,7 +46,7 @@ minetest.register_node("techpack_stairway:grating", {
})
minetest.register_node("techpack_stairway:handrail1", {
- description = "TechPack Handrail 1",
+ description = S("TechPack Handrail 1"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -74,7 +77,7 @@ minetest.register_node("techpack_stairway:handrail1", {
})
minetest.register_node("techpack_stairway:handrail2", {
- description = "TechPack Handrail 2",
+ description = S("TechPack Handrail 2"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -107,7 +110,7 @@ minetest.register_node("techpack_stairway:handrail2", {
})
minetest.register_node("techpack_stairway:handrail3", {
- description = "TechPack Handrail 3",
+ description = S("TechPack Handrail 3"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -140,7 +143,7 @@ minetest.register_node("techpack_stairway:handrail3", {
})
minetest.register_node("techpack_stairway:handrail4", {
- description = "TechPack Handrail 4",
+ description = S("TechPack Handrail 4"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -175,7 +178,7 @@ minetest.register_node("techpack_stairway:handrail4", {
})
minetest.register_node("techpack_stairway:bridge1", {
- description = "TechPack Bridge 1",
+ description = S("TechPack Bridge 1"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -207,7 +210,7 @@ minetest.register_node("techpack_stairway:bridge1", {
})
minetest.register_node("techpack_stairway:bridge2", {
- description = "TechPack Bridge 2",
+ description = S("TechPack Bridge 2"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -240,7 +243,7 @@ minetest.register_node("techpack_stairway:bridge2", {
})
minetest.register_node("techpack_stairway:bridge3", {
- description = "TechPack Bridge 3",
+ description = S("TechPack Bridge 3"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -273,7 +276,7 @@ minetest.register_node("techpack_stairway:bridge3", {
})
minetest.register_node("techpack_stairway:bridge4", {
- description = "TechPack Bridge 4",
+ description = S("TechPack Bridge 4"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@@ -307,7 +310,7 @@ minetest.register_node("techpack_stairway:bridge4", {
})
minetest.register_node("techpack_stairway:stairway", {
- description = "TechPack Stairway",
+ description = S("TechPack Stairway"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@@ -345,7 +348,7 @@ minetest.register_node("techpack_stairway:stairway", {
})
minetest.register_node("techpack_stairway:ladder1", {
- description = "TechPack Ladder 1",
+ description = S("TechPack Ladder 1"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@@ -376,7 +379,7 @@ minetest.register_node("techpack_stairway:ladder1", {
})
minetest.register_node("techpack_stairway:ladder2", {
- description = "TechPack Ladder 2",
+ description = S("TechPack Ladder 2"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@@ -408,7 +411,7 @@ minetest.register_node("techpack_stairway:ladder2", {
})
minetest.register_node("techpack_stairway:ladder3", {
- description = "TechPack Ladder 3",
+ description = S("TechPack Ladder 3"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@@ -439,8 +442,39 @@ minetest.register_node("techpack_stairway:ladder3", {
sounds = default.node_sound_metal_defaults(),
})
+minetest.register_node("techpack_stairway:ladder4", {
+ description = S("TechPack Ladder 4"),
+ tiles = {
+ 'techpack_stairway_ladder.png',
+ },
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-17/32, -17/32, 15/32, 17/32, 17/32, 17/32},
+ --{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32},
+ --{-17/32, -17/32, -17/32, 17/32, 17/32, -15/32},
+ --{ 15/32, -17/32, -17/32, 17/32, 17/32, 17/32},
+ },
+ },
+
+ selection_box = {
+ type = "fixed",
+ fixed = {-8/16, -8/16, 6/16, 8/16, 8/16, 8/16},
+ },
+
+ climbable = true,
+ paramtype2 = "facedir",
+ paramtype = "light",
+ sunlight_propagates = true,
+ is_ground_content = false,
+ groups = {cracky = 2},
+ sounds = default.node_sound_metal_defaults(),
+})
+
+
minetest.register_node("techpack_stairway:lattice", {
- description = "TechPack Lattice",
+ description = S("TechPack Lattice"),
tiles = {
'techpack_stairway_lattice.png',
},
@@ -470,6 +504,53 @@ minetest.register_node("techpack_stairway:lattice", {
sounds = default.node_sound_metal_defaults(),
})
+minetest.register_node("techpack_stairway:lattice_slop", {
+ description = S("TechPack Lattice Slope"),
+ tiles = {
+ 'techpack_stairway_lattice.png',
+ },
+ drawtype = "mesh",
+ mesh="techpack_stairway_slope.obj",
+
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
+ {-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
+ {-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
+ {-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
+ },
+ },
+
+ collision_box = {
+ type = "fixed",
+ fixed = {
+ {-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
+ {-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
+ {-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
+ {-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
+ },
+ },
+
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ local node = minetest.get_node(pos)
+ local dir = minetest.facedir_to_dir(node.param2)
+ if pointed_thing.under.y >= pointed_thing.above.y then
+ local newparam2 = ({[0] = 8, [1] = 17, [2] = 22, [3] = 15})[node.param2]
+ if newparam2 then
+ node.param2 = newparam2
+ minetest.swap_node(pos, node)
+ end
+ end
+ end,
+
+ paramtype2 = "facedir",
+ paramtype = "light",
+ sunlight_propagates = true,
+ is_ground_content = false,
+ groups = {cracky = 2},
+ sounds = default.node_sound_metal_defaults(),
+})
minetest.register_craft({
output = "techpack_stairway:grating 4",
@@ -516,6 +597,15 @@ minetest.register_craft({
},
})
+minetest.register_craft({
+ output = "techpack_stairway:ladder4 8",
+ recipe = {
+ {"dye:dark_grey", "default:tin_ingot", "default:coal_lump"},
+ {"", "default:steel_ingot", ""},
+ {"", "default:steel_ingot", ""},
+ },
+})
+
minetest.register_craft({
output = "techpack_stairway:lattice 2",
recipe = {
@@ -525,6 +615,10 @@ minetest.register_craft({
},
})
+minetest.register_craft({
+ output = "techpack_stairway:lattice_slop 2",
+ recipe = {{"techpack_stairway:lattice"}},
+})
minetest.register_craft({
output = "techpack_stairway:handrail2",
diff --git a/techpack_modpack/techpack_stairway/locale/techpack_stairway.de.tr b/techpack_modpack/techpack_stairway/locale/techpack_stairway.de.tr
new file mode 100644
index 0000000..758b3b9
--- /dev/null
+++ b/techpack_modpack/techpack_stairway/locale/techpack_stairway.de.tr
@@ -0,0 +1,22 @@
+# textdomain: techpack_stairway
+
+
+
+### init.lua ###
+
+TechPack Bridge 1=TechPack Brücke 1
+TechPack Bridge 2=TechPack Brücke 2
+TechPack Bridge 3=TechPack Brücke 3
+TechPack Bridge 4=TechPack Brücke 4
+TechPack Grating=TechPack Gitterrost
+TechPack Handrail 1=TechPack Geländer 1
+TechPack Handrail 2=TechPack Geländer 2
+TechPack Handrail 3=TechPack Geländer 3
+TechPack Handrail 4=TechPack Geländer 4
+TechPack Ladder 1=TechPack Leiter 1
+TechPack Ladder 2=TechPack Leiter 2
+TechPack Ladder 3=TechPack Leiter 3
+TechPack Ladder 4=TechPack Leiter 4
+TechPack Lattice=TechPack Gitterrahmen
+TechPack Lattice Slope=TechPack Gitterrahmenrampe
+TechPack Stairway=TechPack Treppe
diff --git a/techpack_modpack/techpack_stairway/locale/template.txt b/techpack_modpack/techpack_stairway/locale/template.txt
new file mode 100644
index 0000000..9c29e43
--- /dev/null
+++ b/techpack_modpack/techpack_stairway/locale/template.txt
@@ -0,0 +1,22 @@
+# textdomain: techpack_stairway
+
+
+
+### init.lua ###
+
+TechPack Bridge 1=
+TechPack Bridge 2=
+TechPack Bridge 3=
+TechPack Bridge 4=
+TechPack Grating=
+TechPack Handrail 1=
+TechPack Handrail 2=
+TechPack Handrail 3=
+TechPack Handrail 4=
+TechPack Ladder 1=
+TechPack Ladder 2=
+TechPack Ladder 3=
+TechPack Ladder 4=
+TechPack Lattice=
+TechPack Lattice Slope=
+TechPack Stairway=
diff --git a/techpack_modpack/techpack_stairway/mod.conf b/techpack_modpack/techpack_stairway/mod.conf
index 73fbafe..9ab7517 100644
--- a/techpack_modpack/techpack_stairway/mod.conf
+++ b/techpack_modpack/techpack_stairway/mod.conf
@@ -1,2 +1,3 @@
name=techpack_stairway
-
+description=Simple stairways and bridges for your machines.
+depends=default
diff --git a/techpack_modpack/techpack_stairway/models/techpack_stairway_slope.obj b/techpack_modpack/techpack_stairway/models/techpack_stairway_slope.obj
new file mode 100644
index 0000000..f96e575
--- /dev/null
+++ b/techpack_modpack/techpack_stairway/models/techpack_stairway_slope.obj
@@ -0,0 +1,56 @@
+g top
+v 0.498000 0.498000 0.498000
+v -0.498000 0.498000 0.498000
+v -0.498000 -0.498000 -0.498000
+v 0.498000 -0.498000 -0.498000
+vt 1.0000 1.0000
+vt 0.0000 1.0000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vn 0.0000 0.7071 -0.7071
+s off
+f 2/1/1 1/2/1 4/3/1 3/4/1
+g bottom
+v -0.498000 -0.498000 0.498000
+v 0.498000 -0.498000 0.498000
+v -0.498000 -0.498000 -0.498000
+v 0.498000 -0.498000 -0.498000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vt 1.0000 1.0000
+vt 0.0000 1.0000
+vn 0.0000 -1.0000 -0.0000
+s off
+f 6/5/2 5/6/2 7/7/2 8/8/2
+g right
+v -0.498000 0.498000 0.498000
+v -0.498000 -0.498000 0.498000
+v -0.498000 -0.498000 -0.498000
+vt 1.0000 1.0000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vn -1.0000 0.0000 0.0000
+s off
+f 9/9/3 11/10/3 10/11/3
+g left
+v 0.498000 0.498000 0.498000
+v 0.498000 -0.498000 0.498000
+v 0.498000 -0.498000 -0.498000
+vt 0.0000 1.0000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vn 1.0000 0.0000 0.0000
+s off
+f 12/12/4 13/13/4 14/14/4
+g back
+v 0.498000 0.498000 0.498000
+v -0.498000 0.498000 0.498000
+v -0.498000 -0.498000 0.498000
+v 0.498000 -0.498000 0.498000
+vt 1.0000 1.0000
+vt 0.0000 1.0000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vn 0.0000 -0.0000 1.0000
+s off
+f 15/15/5 16/16/5 17/17/5 18/18/5
diff --git a/techpack_modpack/techpack_stairway/textures/techpack_stairway_bottom.png b/techpack_modpack/techpack_stairway/textures/techpack_stairway_bottom.png
index 8ec8593..d806d42 100644
Binary files a/techpack_modpack/techpack_stairway/textures/techpack_stairway_bottom.png and b/techpack_modpack/techpack_stairway/textures/techpack_stairway_bottom.png differ
diff --git a/techpack_modpack/techpack_stairway/textures/techpack_stairway_ladder.png b/techpack_modpack/techpack_stairway/textures/techpack_stairway_ladder.png
index b63c3f7..68a61e9 100644
Binary files a/techpack_modpack/techpack_stairway/textures/techpack_stairway_ladder.png and b/techpack_modpack/techpack_stairway/textures/techpack_stairway_ladder.png differ
diff --git a/techpack_modpack/techpack_stairway/textures/techpack_stairway_lattice.png b/techpack_modpack/techpack_stairway/textures/techpack_stairway_lattice.png
index 13db675..99008b4 100644
Binary files a/techpack_modpack/techpack_stairway/textures/techpack_stairway_lattice.png and b/techpack_modpack/techpack_stairway/textures/techpack_stairway_lattice.png differ
diff --git a/techpack_modpack/techpack_stairway/textures/techpack_stairway_side.png b/techpack_modpack/techpack_stairway/textures/techpack_stairway_side.png
index fc42490..d28339a 100644
Binary files a/techpack_modpack/techpack_stairway/textures/techpack_stairway_side.png and b/techpack_modpack/techpack_stairway/textures/techpack_stairway_side.png differ
diff --git a/techpack_modpack/techpack_stairway/textures/techpack_stairway_steps.png b/techpack_modpack/techpack_stairway/textures/techpack_stairway_steps.png
index 9344854..4c75c7a 100644
Binary files a/techpack_modpack/techpack_stairway/textures/techpack_stairway_steps.png and b/techpack_modpack/techpack_stairway/textures/techpack_stairway_steps.png differ
diff --git a/techpack_modpack/techpack_warehouse/box_copper.lua b/techpack_modpack/techpack_warehouse/box_copper.lua
index dc541c3..83f8077 100644
--- a/techpack_modpack/techpack_warehouse/box_copper.lua
+++ b/techpack_modpack/techpack_warehouse/box_copper.lua
@@ -3,23 +3,25 @@
TechPack Warehouse
==================
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
box_copper.lua
]]--
+-- Load support for I18n
+local S = techpack_warehouse.S
+
--- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local wh = techpack_warehouse
local NODE_NAME = "techpack_warehouse:box_copper"
-local DESCRIPTION = "Warehouse Box Copper"
+local DESCRIPTION = S("Warehouse Box Copper")
local INV_SIZE = 1200
local BACKGROUND_IMG = "default_copper_block.png"
@@ -47,8 +49,8 @@ minetest.register_node(NODE_NAME, {
can_dig = function(pos)
return wh.can_dig(Box, pos)
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ wh.on_dig_node(Box, pos, node, player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)
@@ -58,7 +60,6 @@ minetest.register_node(NODE_NAME, {
allow_metadata_inventory_move = wh.allow_metadata_inventory_move,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -86,6 +87,9 @@ minetest.register_node(NODE_NAME.."_active", {
on_metadata_inventory_put = wh.on_metadata_inventory_put,
allow_metadata_inventory_take = wh.allow_metadata_inventory_take,
allow_metadata_inventory_move = wh.allow_metadata_inventory_move,
+
+ diggable = false,
+ can_dig = function() return false end,
on_rotate = screwdriver.disallow,
paramtype = "light",
@@ -107,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", {
can_dig = function(pos)
return wh.can_dig(Box, pos)
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ wh.on_dig_node(Box, pos, node, player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)
@@ -131,7 +135,7 @@ tubelib.register_node(NODE_NAME,
on_push_item = function(pos, side, item)
local meta = M(pos)
meta:set_string("push_dir", wh.Turn180[side])
- local num = wh.numbers_to_shift(Box, meta, item)
+ local num = wh.inv_add_item(Box, meta, item)
if num > 0 then
item:set_count(num)
return tubelib.put_item(meta, "shift", item)
@@ -145,7 +149,14 @@ tubelib.register_node(NODE_NAME,
return tubelib.get_item(M(pos), "main")
end,
on_unpull_item = function(pos, side, item)
- return tubelib.put_item(M(pos), "main", item)
+ local meta = M(pos)
+ local num = wh.inv_add_item(Box, meta, item)
+ if num > 0 then
+ -- this should never happen, but better safe than sorry
+ item:set_count(num)
+ return tubelib.put_item(meta, "shift", item)
+ end
+ return true
end,
on_recv_message = function(pos, topic, payload)
diff --git a/techpack_modpack/techpack_warehouse/box_gold.lua b/techpack_modpack/techpack_warehouse/box_gold.lua
index 5f80712..742acce 100644
--- a/techpack_modpack/techpack_warehouse/box_gold.lua
+++ b/techpack_modpack/techpack_warehouse/box_gold.lua
@@ -3,23 +3,25 @@
TechPack Warehouse
==================
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
box_gold.lua
]]--
+-- Load support for I18n
+local S = techpack_warehouse.S
+
--- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local wh = techpack_warehouse
local NODE_NAME = "techpack_warehouse:box_gold"
-local DESCRIPTION = "Warehouse Box Gold"
+local DESCRIPTION = S("Warehouse Box Gold")
local INV_SIZE = 3600
local BACKGROUND_IMG = "default_gold_block.png"
@@ -47,8 +49,8 @@ minetest.register_node(NODE_NAME, {
can_dig = function(pos)
return wh.can_dig(Box, pos)
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ wh.on_dig_node(Box, pos, node, player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)
@@ -58,7 +60,6 @@ minetest.register_node(NODE_NAME, {
allow_metadata_inventory_move = wh.allow_metadata_inventory_move,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -87,6 +88,9 @@ minetest.register_node(NODE_NAME.."_active", {
allow_metadata_inventory_take = wh.allow_metadata_inventory_take,
allow_metadata_inventory_move = wh.allow_metadata_inventory_move,
+ diggable = false,
+ can_dig = function() return false end,
+
on_rotate = screwdriver.disallow,
paramtype = "light",
sunlight_propagates = true,
@@ -107,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", {
can_dig = function(pos)
return wh.can_dig(Box, pos)
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ wh.on_dig_node(Box, pos, node, player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)
@@ -131,7 +135,7 @@ tubelib.register_node(NODE_NAME,
on_push_item = function(pos, side, item)
local meta = M(pos)
meta:set_string("push_dir", wh.Turn180[side])
- local num = wh.numbers_to_shift(Box, meta, item)
+ local num = wh.inv_add_item(Box, meta, item)
if num > 0 then
item:set_count(num)
return tubelib.put_item(meta, "shift", item)
@@ -145,7 +149,14 @@ tubelib.register_node(NODE_NAME,
return tubelib.get_item(M(pos), "main")
end,
on_unpull_item = function(pos, side, item)
- return tubelib.put_item(M(pos), "main", item)
+ local meta = M(pos)
+ local num = wh.inv_add_item(Box, meta, item)
+ if num > 0 then
+ -- this should never happen, but better safe than sorry
+ item:set_count(num)
+ return tubelib.put_item(meta, "shift", item)
+ end
+ return true
end,
on_recv_message = function(pos, topic, payload)
diff --git a/techpack_modpack/techpack_warehouse/box_steel.lua b/techpack_modpack/techpack_warehouse/box_steel.lua
index 9e26082..c64fda8 100644
--- a/techpack_modpack/techpack_warehouse/box_steel.lua
+++ b/techpack_modpack/techpack_warehouse/box_steel.lua
@@ -3,23 +3,25 @@
TechPack Warehouse
==================
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
box_steel.lua
]]--
+-- Load support for I18n
+local S = techpack_warehouse.S
+
--- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local wh = techpack_warehouse
local NODE_NAME = "techpack_warehouse:box_steel"
-local DESCRIPTION = "Warehouse Box Steel"
+local DESCRIPTION = S("Warehouse Box Steel")
local INV_SIZE = 400
local BACKGROUND_IMG = "default_steel_block.png"
@@ -47,8 +49,8 @@ minetest.register_node(NODE_NAME, {
can_dig = function(pos)
return wh.can_dig(Box, pos)
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ wh.on_dig_node(Box, pos, node, player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)
@@ -58,7 +60,6 @@ minetest.register_node(NODE_NAME, {
allow_metadata_inventory_move = wh.allow_metadata_inventory_move,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -86,6 +87,9 @@ minetest.register_node(NODE_NAME.."_active", {
on_metadata_inventory_put = wh.on_metadata_inventory_put,
allow_metadata_inventory_take = wh.allow_metadata_inventory_take,
allow_metadata_inventory_move = wh.allow_metadata_inventory_move,
+
+ diggable = false,
+ can_dig = function() return false end,
on_rotate = screwdriver.disallow,
paramtype = "light",
@@ -107,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", {
can_dig = function(pos)
return wh.can_dig(Box, pos)
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ wh.on_dig_node(Box, pos, node, player)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)
@@ -131,7 +135,7 @@ tubelib.register_node(NODE_NAME,
on_push_item = function(pos, side, item)
local meta = M(pos)
meta:set_string("push_dir", wh.Turn180[side])
- local num = wh.numbers_to_shift(Box, meta, item)
+ local num = wh.inv_add_item(Box, meta, item)
if num > 0 then
item:set_count(num)
return tubelib.put_item(meta, "shift", item)
@@ -145,7 +149,14 @@ tubelib.register_node(NODE_NAME,
return tubelib.get_item(M(pos), "main")
end,
on_unpull_item = function(pos, side, item)
- return tubelib.put_item(M(pos), "main", item)
+ local meta = M(pos)
+ local num = wh.inv_add_item(Box, meta, item)
+ if num > 0 then
+ -- this should never happen, but better safe than sorry
+ item:set_count(num)
+ return tubelib.put_item(meta, "shift", item)
+ end
+ return true
end,
on_recv_message = function(pos, topic, payload)
diff --git a/techpack_modpack/techpack_warehouse/common.lua b/techpack_modpack/techpack_warehouse/common.lua
index 82f3c3a..f954f8e 100644
--- a/techpack_modpack/techpack_warehouse/common.lua
+++ b/techpack_modpack/techpack_warehouse/common.lua
@@ -3,17 +3,19 @@
TechPack Warehouse
==================
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
-
+
common.lua
]]--
+-- Load support for I18n
+local S = techpack_warehouse.S
+
--- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -22,8 +24,6 @@ local COUNTDOWN_TICKS = 2
local CYCLE_TIME = 2
-local Cache = {}
-
techpack_warehouse.Box = {}
techpack_warehouse.Turn180 = {F="B", L="R", B="F", R="L", U="D", D="U"}
@@ -36,24 +36,24 @@ local function formspec(self, pos, meta)
"list[context;shift;1,0;7,1;]"..
"image_button[9,0;1,1;techpack_warehouse_arrow_inv.png;shift;;true;false;]"..
"image_button[8,0;1,1;".. self:get_state_button_image(meta) ..";state_button;]"..
-
+
"image_button[0,1.4;1,1;techpack_warehouse_filter_inv.png;filter;;true;false;]"..
"list[context;filter;1,1.4;8,1;]"..
"image_button[9,1.4;1,1;techpack_warehouse_filter_inv.png;filter;;true;false;]"..
-
+
"image_button[0,2.5;1,1;techpack_warehouse_inventory_inv.png;storage;;true;false;]"..
"list[context;main;1,2.5;8,1;]"..
"image_button[9,2.5;1,1;techpack_warehouse_inventory_inv.png;storage;;true;false;]"..
-
+
"image_button[0,3.6;1,1;techpack_warehouse_input_inv.png;input;;true;false;]"..
"list[context;input;1,3.6;8,1;]"..
"image_button[9,3.6;1,1;techpack_warehouse_input_inv.png;input;;true;false;]"..
-
- "tooltip[shift;Pass-through storage for unconfigured items (turn on/off)]"..
- "tooltip[filter;Filter: To configure the 8 storages]"..
- "tooltip[storage;Storage: All items will be stored here]"..
- "tooltip[input;Input: Put items will be moved to the storage, if configured]"..
-
+
+ "tooltip[shift;"..S("Pass-through storage for unconfigured items (turn on/off)").."]"..
+ "tooltip[filter;"..S("Filter: To configure the 8 storages").."]"..
+ "tooltip[storage;"..S("Storage: All items will be stored here").."]"..
+ "tooltip[input;"..S("Input: Put items will be moved to the storage, if configured").."]"..
+
"list[current_player;main;1,5.3;8,4;]"..
"listring[context;shift]"..
"listring[current_player;main]"..
@@ -64,18 +64,20 @@ local function move_to_main(pos, index)
local inv = M(pos):get_inventory()
local main_stack = inv:get_stack("main", index)
local inp_stack = inv:get_stack("input", index)
-
+
if inp_stack:get_name() ~= "" then
local stack = ItemStack(inp_stack:get_name())
stack:set_count(inp_stack:get_count() + main_stack:get_count())
inp_stack:clear()
-
+
inv:set_stack("main", index, stack)
inv:set_stack("input", index, inp_stack)
end
end
-local function move_to_player_inv(player_name, pos, main_stack, index)
+local function move_to_player_inv(player_name, pos, index)
+ local node_inv = M(pos):get_inventory()
+ local main_stack = node_inv:get_stack("main", index)
local player_inv = minetest.get_inventory({type="player", name=player_name})
local num = main_stack:get_count()
if num > 99 then
@@ -83,7 +85,6 @@ local function move_to_player_inv(player_name, pos, main_stack, index)
end
local leftover = player_inv:add_item("main", ItemStack(main_stack:get_name().." "..num))
main_stack:set_count(main_stack:get_count() - num + leftover:get_count())
- local node_inv = M(pos):get_inventory()
node_inv:set_stack("main", index, main_stack)
end
@@ -166,54 +167,51 @@ function techpack_warehouse.Box:new(attr)
return o
end
-function techpack_warehouse.numbers_to_shift(self, meta, item)
- -- check cache
- local number = meta:get_string("tubelib_number")
- local item_name = item:get_name()
- if not Cache[number] then
- local inv = meta:get_inventory()
- Cache[number] = {}
- for idx,items in ipairs(inv:get_list("filter")) do
- Cache[number][idx] = items:get_name()
- end
- end
-
- -- determine number to shift
+-- We can't use the standard function "inv:add_item()" because this function
+-- would not allow to add more than the default 99 items per stack.
+function techpack_warehouse.inv_add_item(self, meta, item)
local num_items = item:get_count()
- local inv_size = meta:get_int("inv_size")
+ local item_name = item:get_name()
local inv = meta:get_inventory()
-
- for idx, name in ipairs(Cache[number]) do
- if item_name == name then
- local stack_size = inv:get_stack("main", idx):get_count()
- if stack_size == self.inv_size then -- full?
- Cache[number][idx] = "" -- delete for searching
- elseif (stack_size + num_items) > self.inv_size then -- limit will be reached?
- inv:set_stack("main", idx, ItemStack({name = item_name, count = self.inv_size}))
- Cache[number][idx] = "" -- delete for searching
- -- search with the rest for further slots
- num_items = num_items - (self.inv_size - stack_size)
- else
- inv:set_stack("main", idx, ItemStack({name = item_name, count = stack_size + num_items}))
- return 0
+ local main_list = inv:get_list("main")
+
+ for idx, stack in ipairs(main_list) do
+ -- If item configured
+ if item_name == inv:get_stack("filter", idx):get_name() then
+ local stack_size = stack:get_count()
+ -- If there is some space for further items
+ if stack_size < self.inv_size then
+ local new_stack_size = math.min(self.inv_size, stack_size + num_items)
+ main_list[idx] = ItemStack({name = item_name, count = new_stack_size})
+ -- calc new number of items
+ num_items = num_items - (new_stack_size - stack_size)
+ -- If everything is distributed
+ if num_items == 0 then
+ break
+ end
end
end
end
+
+ inv:set_list("main", main_list)
return num_items
end
function techpack_warehouse.allow_metadata_inventory_put(self, pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
+ elseif stack:get_wear() ~= 0 then
+ return 0
+ elseif stack:get_stack_max() == 1 then
+ return 0
end
local inv = M(pos):get_inventory()
local main_stack = inv:get_stack("main", index)
local item_name = inv:get_stack("filter", index):get_name()
if listname == "input" and item_name == stack:get_name() then
- return math.min(stack:get_count(), self.inv_size - main_stack:get_count())
+ local input_stack = inv:get_stack("input", index)
+ return math.min(stack:get_count(), self.inv_size - main_stack:get_count() - input_stack:get_count())
elseif listname == "filter" and item_name == main_stack:get_name() then
- local number = M(pos):get_string("tubelib_number")
- Cache[number] = nil
return 1
elseif listname == "shift" then
return stack:get_count()
@@ -223,8 +221,6 @@ end
function techpack_warehouse.on_metadata_inventory_put(pos, listname, index, stack, player)
if listname == "input" then
- local number = M(pos):get_string("tubelib_number")
- Cache[number] = nil
minetest.after(0.5, move_to_main, pos, index)
end
end
@@ -235,16 +231,12 @@ function techpack_warehouse.allow_metadata_inventory_take(pos, listname, index,
end
local inv = M(pos):get_inventory()
local main_stack = inv:get_stack("main", index)
- local number = M(pos):get_string("tubelib_number")
if listname == "main" then
- Cache[number] = nil
- minetest.after(0.1, move_to_player_inv, player:get_player_name(), pos, main_stack, index)
+ minetest.after(0.1, move_to_player_inv, player:get_player_name(), pos, index)
return 0
elseif listname == "filter" and main_stack:is_empty() then
- Cache[number] = nil
return 1
elseif listname == "shift" then
- Cache[number] = nil
return stack:get_count()
end
return 0
@@ -258,8 +250,6 @@ function techpack_warehouse.on_receive_fields(self, pos, formname, fields, playe
if minetest.is_protected(pos, player:get_player_name()) then
return
end
- local number = M(pos):get_string("tubelib_number")
- Cache[number] = nil
self.State:state_button_event(pos, fields)
end
@@ -274,7 +264,7 @@ function techpack_warehouse.after_place_node(self, pos, placer, itemstack)
inv:set_size('main', 8)
inv:set_size('input', 8)
end
-
+
function techpack_warehouse.on_timer(self, pos, elapsed)
if tubelib.data_not_corrupted(pos) then
local meta = M(pos)
@@ -291,7 +281,7 @@ function techpack_warehouse.on_timer(self, pos, elapsed)
local stack = inv:get_stack("shift", idx)
if stack:get_count() > 0 then
if tubelib.push_items(pos, push_dir, stack, player_name) then
- -- The effort is needed here for the case the
+ -- The effort is needed here for the case the
-- pusher pushes into its own chest.
local num = stack:get_count()
stack = inv:get_stack("shift", idx)
@@ -307,21 +297,21 @@ function techpack_warehouse.on_timer(self, pos, elapsed)
else
self.State:idle(pos, meta)
end
-
+
return self.State:is_active(meta)
end
return false
end
-
+
function techpack_warehouse.can_dig(self, pos)
local inv = M(pos):get_inventory()
return inv:is_empty("main") and inv:is_empty("shift")
end
-function techpack_warehouse.after_dig_node(self, pos, oldnode, oldmetadata, digger)
+function techpack_warehouse.on_dig_node(self, pos, node, digger)
tubelib.remove_node(pos)
- if oldnode.name == self.node_name then -- not for defect nodes
- self.State:after_dig_node(pos, oldnode, oldmetadata, digger)
+ if node.name == self.node_name then -- not for defect nodes
+ self.State:on_dig_node(pos, node, digger)
end
end
@@ -331,4 +321,4 @@ function techpack_warehouse.get_num_items(meta, index)
if index > 8 then index = 8 end
local inv = meta:get_inventory()
return inv:get_stack("main", index):get_count()
-end
\ No newline at end of file
+end
diff --git a/techpack_modpack/techpack_warehouse/init.lua b/techpack_modpack/techpack_warehouse/init.lua
index 2dac8a4..f20cf12 100644
--- a/techpack_modpack/techpack_warehouse/init.lua
+++ b/techpack_modpack/techpack_warehouse/init.lua
@@ -3,9 +3,9 @@
TechPack Warehouse
==================
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
init.lua
@@ -14,6 +14,10 @@
techpack_warehouse = {}
+-- Load support for I18n
+techpack_warehouse.S = minetest.get_translator("techpack_warehouse")
+
+
dofile(minetest.get_modpath("techpack_warehouse") .. "/common.lua")
dofile(minetest.get_modpath("techpack_warehouse") .. "/box_steel.lua")
dofile(minetest.get_modpath("techpack_warehouse") .. "/box_copper.lua")
diff --git a/techpack_modpack/techpack_warehouse/locale/template.txt b/techpack_modpack/techpack_warehouse/locale/template.txt
new file mode 100644
index 0000000..b068cd0
--- /dev/null
+++ b/techpack_modpack/techpack_warehouse/locale/template.txt
@@ -0,0 +1,22 @@
+# textdomain: techpack_warehouse
+
+
+
+### box_copper.lua ###
+
+Warehouse Box Copper=
+
+### box_gold.lua ###
+
+Warehouse Box Gold=
+
+### box_steel.lua ###
+
+Warehouse Box Steel=
+
+### common.lua ###
+
+Filter: To configure the 8 storages=
+Input: Put items will be moved to the storage, if configured=
+Pass-through storage for unconfigured items (turn on/off)=
+Storage: All items will be stored here=
diff --git a/techpack_modpack/techpack_warehouse/mod.conf b/techpack_modpack/techpack_warehouse/mod.conf
index d1c117a..66b5b1a 100644
--- a/techpack_modpack/techpack_warehouse/mod.conf
+++ b/techpack_modpack/techpack_warehouse/mod.conf
@@ -1,2 +1,3 @@
name=techpack_warehouse
-
+description=Warehouse boxes
+depends=tubelib,tubelib_addons1
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_arrow_inv.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_arrow_inv.png
index fcedc98..e2fdcb8 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_arrow_inv.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_arrow_inv.png differ
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_back.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_back.png
index 68bc9c3..067d9e6 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_back.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_back.png differ
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_front.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_front.png
index 450da85..fc1cef2 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_front.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_front.png differ
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_side.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_side.png
index 6a5a60e..f80246f 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_side.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_box_side.png differ
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_filter_inv.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_filter_inv.png
index c9c7242..7b99c93 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_filter_inv.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_filter_inv.png differ
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_input_inv.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_input_inv.png
index ad66e56..e0df9fe 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_input_inv.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_input_inv.png differ
diff --git a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_inventory_inv.png b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_inventory_inv.png
index 20fda24..721a860 100644
Binary files a/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_inventory_inv.png and b/techpack_modpack/techpack_warehouse/textures/techpack_warehouse_inventory_inv.png differ
diff --git a/techpack_modpack/tubelib/basalt.lua b/techpack_modpack/tubelib/basalt.lua
index f2c4a18..9d596b6 100644
--- a/techpack_modpack/tubelib/basalt.lua
+++ b/techpack_modpack/tubelib/basalt.lua
@@ -3,15 +3,18 @@
Tube Library
============
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
basalt.lua:
]]--
+-- Load support for I18n
+local S = tubelib.S
+
if tubelib.basalt_stone_enabled then
-- Replace default:stone with tubelib:basalt which is useless for ore generation.
default.cool_lava = function(pos, node)
@@ -25,14 +28,14 @@ if tubelib.basalt_stone_enabled then
end
minetest.register_node("tubelib:basalt_stone", {
- description = "Basalt Stone",
+ description = S("Basalt Stone"),
tiles = {"default_stone.png^[brighten"},
groups = {cracky = 3, stone = 1},
drop = "default:silver_sand",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("tubelib:basalt_stone_brick", {
- description = "Basalt Stone Brick",
+ description = S("Basalt Stone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_stone_brick.png^[brighten"},
@@ -42,7 +45,7 @@ if tubelib.basalt_stone_enabled then
})
minetest.register_node("tubelib:basalt_stone_block", {
- description = "Basalt Stone Block",
+ description = S("Basalt Stone Block"),
tiles = {"default_stone_block.png^[brighten"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
diff --git a/techpack_modpack/tubelib/blackhole.lua b/techpack_modpack/tubelib/blackhole.lua
index baef64f..70966f7 100644
--- a/techpack_modpack/tubelib/blackhole.lua
+++ b/techpack_modpack/tubelib/blackhole.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
blackhole.lua:
@@ -24,9 +24,11 @@
-- | |/
-- +--------+
+-- Load support for I18n
+local S = tubelib.S
minetest.register_node("tubelib:blackhole", {
- description = "Tubelib Black Hole",
+ description = S("Tubelib Black Hole"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -42,7 +44,7 @@ minetest.register_node("tubelib:blackhole", {
local number = tubelib.add_node(pos, "tubelib:blackhole") -- <<=== tubelib
meta:set_string("number", number)
meta:set_int("disappeared", 0)
- meta:set_string("infotext","0 items disappeared")
+ meta:set_string("infotext", "0 "..S("items disappeared"))
end,
after_dig_node = function(pos)
@@ -74,15 +76,13 @@ tubelib.register_node("tubelib:blackhole", {}, {
on_pull_item = nil, -- not needed
on_unpull_item = nil, -- not needed
+ valid_sides = {"L"},
on_push_item = function(pos, side, item)
- if side == "L" then
- local meta = minetest.get_meta(pos)
- local disappeared = meta:get_int("disappeared") + item:get_count()
- meta:set_int("disappeared", disappeared)
- meta:set_string("infotext", disappeared.." items disappeared")
- return true
- end
- return false
+ local meta = minetest.get_meta(pos)
+ local disappeared = meta:get_int("disappeared") + item:get_count()
+ meta:set_int("disappeared", disappeared)
+ meta:set_string("infotext", disappeared.." "..S("items disappeared"))
+ return true
end,
on_recv_message = function(pos, topic, payload)
diff --git a/techpack_modpack/tubelib/button.lua b/techpack_modpack/tubelib/button.lua
index 1d5225b..551e225 100644
--- a/techpack_modpack/tubelib/button.lua
+++ b/techpack_modpack/tubelib/button.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
button.lua:
@@ -14,9 +14,11 @@
]]--
+-- Load support for I18n
+local S = tubelib.S
local function switch_on(pos, node)
- if tubelib.data_not_corrupted(pos) then
+ if tubelib.data_not_corrupted(pos, true) then
node.name = "tubelib:button_active"
minetest.swap_node(pos, node)
minetest.sound_play("button", {
@@ -41,7 +43,7 @@ local function switch_on(pos, node)
end
local function switch_off(pos)
- if tubelib.data_not_corrupted(pos) then
+ if tubelib.data_not_corrupted(pos, true) then
local node = minetest.get_node(pos)
node.name = "tubelib:button"
minetest.swap_node(pos, node)
@@ -65,7 +67,7 @@ end
minetest.register_node("tubelib:button", {
- description = "Tubelib Button/Switch",
+ description = S("Tubelib Button/Switch"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -81,14 +83,14 @@ minetest.register_node("tubelib:button", {
local own_num = tubelib.add_node(pos, "tubelib:button")
meta:set_string("own_num", own_num)
meta:set_string("formspec", "size[7.5,6]"..
- "dropdown[0.2,0;3;type;switch,button 2s,button 4s,button 8s,button 16s;1]"..
- "field[0.5,2;7,1;numbers;Insert destination node number(s);]" ..
- "checkbox[1,3;public;public;false]"..
- "button_exit[2,4;3,1;exit;Save]")
+ "dropdown[0.2,0;3;type;"..S("switch,button 2s,button 4s,button 8s,button 16s")..";1]"..
+ "field[0.5,2;7,1;numbers;"..S("Insert destination node number(s)")..";]" ..
+ "checkbox[1,3;public;"..S("public")..";false]"..
+ "button_exit[2,4;3,1;exit;"..S("Save").."]")
meta:set_string("placer_name", placer:get_player_name())
meta:set_string("public", "false")
meta:set_int("cycle_time", 0)
- meta:set_string("infotext", "Tubelib Button "..own_num)
+ meta:set_string("infotext", S("Tubelib Button").." "..own_num)
end,
on_receive_fields = function(pos, formname, fields, player)
@@ -96,7 +98,7 @@ minetest.register_node("tubelib:button", {
if tubelib.check_numbers(fields.numbers) then -- <<=== tubelib
meta:set_string("numbers", fields.numbers)
local own_num = meta:get_string("own_num")
- meta:set_string("infotext", "Tubelib Button "..own_num..", connected with block "..fields.numbers)
+ meta:set_string("infotext", S("Tubelib Button").." "..own_num..", "..S("connected with block").." "..fields.numbers)
else
return
end
@@ -142,7 +144,7 @@ minetest.register_node("tubelib:button", {
minetest.register_node("tubelib:button_active", {
- description = "Tubelib Button/Switch",
+ description = S("Tubelib Button/Switch"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
diff --git a/techpack_modpack/tubelib/command.lua b/techpack_modpack/tubelib/command.lua
index 8566ecd..9563397 100644
--- a/techpack_modpack/tubelib/command.lua
+++ b/techpack_modpack/tubelib/command.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
command.lua:
@@ -19,23 +19,77 @@ local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
+local function deserialize(s)
+ local tbl = {}
+ for line in s:gmatch("[^;]+") do
+ local num, spos = unpack(string.split(line, "="))
+ tbl[num] = {pos = minetest.string_to_pos(spos)}
+ end
+ return tbl
+end
+
+local function serialize(data)
+ local tbl = {}
+ for k,v in pairs(data) do
+ tbl[#tbl+1] = k.."="..minetest.pos_to_string(v.pos)
+ end
+ return table.concat(tbl, ";")
+end
+
+-- to convert the data base from v2 to v3
+local function extract_data(data)
+ local tbl = {}
+ for num,item in pairs(data) do
+ local new_item = {}
+ local data_present = false
+ for k,v in pairs(item) do
+ if k ~= "name" and k ~= "pos" then
+ new_item[k] = v
+ data_present = true
+ end
+ end
+ if data_present then
+ tbl[num] = new_item
+ end
+ end
+ return tbl
+end
+
------------------------------------------------------------------
-- Data base storage
-------------------------------------------------------------------
local storage = minetest.get_mod_storage()
local NextNumber = minetest.deserialize(storage:get_string("NextNumber")) or 1
local Version = minetest.deserialize(storage:get_string("Version")) or 1
-local Number2Pos = minetest.deserialize(storage:get_string("Number2Pos")) or {}
+
+local Number2Pos
+local Number2Data
+local TemporaryRemovedNodes
+if Version == 2 then -- legacy data base
+ Number2Pos = minetest.deserialize(storage:get_string("Number2Pos")) or {}
+ Number2Data = extract_data(Number2Pos)
+ TemporaryRemovedNodes = {}
+ Version = 3
+else
+ Number2Pos = deserialize(storage:get_string("Number2Pos"))
+ Number2Data = minetest.deserialize(storage:get_string("Number2Data")) or {}
+ TemporaryRemovedNodes = minetest.deserialize(storage:get_string("TemporaryRemovedNodes")) or {}
+end
+
+
local function update_mod_storage()
+ local t = minetest.get_us_time()
minetest.log("action", "[Tubelib] Store data...")
storage:set_string("NextNumber", minetest.serialize(NextNumber))
storage:set_string("Version", minetest.serialize(Version))
- storage:set_string("Number2Pos", minetest.serialize(Number2Pos))
- storage:set_string("Key2Number", nil) -- not used any more
+ storage:set_string("Number2Pos", serialize(Number2Pos))
+ storage:set_string("Number2Data", minetest.serialize(Number2Data))
+ storage:set_string("TemporaryRemovedNodes", minetest.serialize(TemporaryRemovedNodes))
-- store data each hour
minetest.after(60*59, update_mod_storage)
- minetest.log("action", "[Tubelib] Data stored")
+ t = minetest.get_us_time() - t
+ minetest.log("action", "[Tubelib] Data stored. t="..t.."us")
end
minetest.register_on_shutdown(function()
@@ -46,7 +100,7 @@ end)
minetest.after(60*59, update_mod_storage)
-- Key2Number will be generated at runtine
-local Key2Number = {}
+local Key2Number = {}
local Name2Name = {} -- translation table
@@ -77,6 +131,24 @@ local function get_number(pos)
return string.format("%.04u", Key2Number[key])
end
+local function get_node_lvm(pos)
+ local node = minetest.get_node_or_nil(pos)
+ if node then
+ return node
+ end
+ local vm = minetest.get_voxel_manip()
+ local MinEdge, MaxEdge = vm:read_from_map(pos, pos)
+ local data = vm:get_data()
+ local param2_data = vm:get_param2_data()
+ local area = VoxelArea:new({MinEdge = MinEdge, MaxEdge = MaxEdge})
+ local idx = area:index(pos.x, pos.y, pos.z)
+ node = {
+ name = minetest.get_name_from_content_id(data[idx]),
+ param2 = param2_data[idx]
+ }
+ return node
+end
+
local function generate_Key2Number()
local key
for num,item in pairs(Number2Pos) do
@@ -114,35 +186,16 @@ local function register_lbm(name, nodenames)
})
end
-
-local DirToSide = {"B", "R", "F", "L", "D", "U"}
-
-local function dir_to_side(dir, param2)
- if dir < 5 then
- dir = (((dir - 1) - (param2 % 4)) % 4) + 1
- end
- return DirToSide[dir]
-end
-
-local SideToDir = {B=1, R=2, F=3, L=4, D=5, U=6}
-
-local function side_to_dir(side, param2)
- local dir = SideToDir[side]
- if dir < 5 then
- dir = (((dir - 1) + (param2 % 4)) % 4) + 1
- end
- return dir
-end
-
local function get_dest_node(pos, side)
local _,node = Tube:get_node(pos)
- local dir = side_to_dir(side, node.param2)
+ local dir = tubelib2.side_to_dir(side, node.param2)
local spos, sdir = Tube:get_connected_node_pos(pos, dir)
+ if not (spos and sdir) then return end
_,node = Tube:get_node(spos)
- local out_side = dir_to_side(tubelib2.Turn180Deg[sdir], node.param2)
- return spos, out_side, Name2Name[node.name] or node.name
+ local out_side = tubelib2.dir_to_side(tubelib2.Turn180Deg[sdir], node.param2)
+ return spos, out_side, Name2Name[node.name] or node.name
end
-
+
local function item_handling_node(name)
local node_def = name and tubelib_NodeDef[name]
if node_def then
@@ -153,7 +206,7 @@ end
-------------------------------------------------------------------
-- API helper functions
-------------------------------------------------------------------
-
+
-- Check the given list of numbers.
-- Returns true if number(s) is/are valid and point to real nodes.
function tubelib.check_numbers(numbers)
@@ -166,7 +219,7 @@ function tubelib.check_numbers(numbers)
return true
end
return false
-end
+end
-- Function returns { pos, name } for the node on the given position number.
function tubelib.get_node_info(dest_num)
@@ -174,7 +227,7 @@ function tubelib.get_node_info(dest_num)
return Number2Pos[dest_num]
end
return nil
-end
+end
-- Function returns the node number from the given position or
-- nil, if no node number for this position is assigned.
@@ -188,14 +241,14 @@ function tubelib.get_node_number(pos)
end
end
return nil
-end
+end
-- Function is used for available nodes with lost numbers, only.
function tubelib.get_new_number(pos, name)
- -- store position
+ -- store position
local number = get_number(pos)
Number2Pos[number] = {
- pos = pos,
+ pos = pos,
name = name,
}
return number
@@ -207,8 +260,9 @@ end
-- param name: name of the data (string)
-- param data: any data (number, string, table)
function tubelib.set_data(number, name, data)
- if Number2Pos[number] and type(name) == "string" then
- Number2Pos[number]["u_"..name] = data
+ Number2Data[number] = Number2Data[number] or {}
+ if type(name) == "string" then
+ Number2Data[number]["u_"..name] = data
end
end
@@ -216,8 +270,8 @@ end
-- param number: node number, returned by tubelib.add_node
-- param name: name of the data (string)
function tubelib.get_data(number, name)
- if Number2Pos[number] and type(name) == "string" then
- return Number2Pos[number]["u_"..name]
+ if Number2Data[number] and type(name) == "string" then
+ return Number2Data[number]["u_"..name]
end
return nil
end
@@ -225,7 +279,7 @@ end
-------------------------------------------------------------------
-- Node construction/destruction functions
-------------------------------------------------------------------
-
+
-- Add node to the tubelib lists.
-- Function determines and returns the node position number,
-- needed for message communication.
@@ -233,10 +287,10 @@ function tubelib.add_node(pos, name)
if item_handling_node(name) then
Tube:after_place_node(pos)
end
- -- store position
+ -- store position
local number = get_number(pos)
Number2Pos[number] = {
- pos = pos,
+ pos = pos,
name = name,
}
return number
@@ -249,7 +303,7 @@ function tubelib.remove_node(pos)
if Number2Pos[number] then
name = Number2Pos[number].name
Number2Pos[number] = {
- pos = pos,
+ pos = pos,
name = nil,
time = minetest.get_day_count() -- used for reservation timeout
}
@@ -284,11 +338,23 @@ function tubelib.register_node(name, add_names, node_definition)
for _,n in ipairs(add_names) do
Name2Name[n] = name
end
- if node_definition.on_pull_item or node_definition.on_push_item or
+ if node_definition.on_pull_item or node_definition.on_push_item or
node_definition.is_pusher then
Tube:add_secondary_node_names({name})
Tube:add_secondary_node_names(add_names)
-
+
+ if node_definition.valid_sides then
+ Tube:set_valid_sides(name, node_definition.valid_sides)
+ for _,n in ipairs(add_names) do
+ Tube:set_valid_sides(n, node_definition.valid_sides)
+ end
+ end
+ if node_definition.invalid_sides then
+ Tube:set_invalid_sides(name, node_definition.invalid_sides)
+ for _,n in ipairs(add_names) do
+ Tube:set_invalid_sides(n, node_definition.invalid_sides)
+ end
+ end
tubelib.KnownNodes[name] = true
for _,n in ipairs(add_names) do
tubelib.KnownNodes[n] = true
@@ -319,7 +385,7 @@ function tubelib.send_message(numbers, placer_name, clicker_name, topic, payload
end
end
end
-end
+end
function tubelib.send_request(number, topic, payload)
if Number2Pos[number] and Number2Pos[number].name then
@@ -329,7 +395,7 @@ function tubelib.send_request(number, topic, payload)
end
end
return false
-end
+end
-- for defect nodes
function tubelib.repair_node(pos)
@@ -349,6 +415,9 @@ function tubelib.pull_items(pos, side, player_name)
local npos, nside, name = get_dest_node(pos, side)
if npos == nil then return end
if tubelib_NodeDef[name] and tubelib_NodeDef[name].on_pull_item then
+ if Tube:is_valid_side(name, nside) == false then
+ return nil
+ end
return tubelib_NodeDef[name].on_pull_item(npos, nside, player_name)
end
return nil
@@ -358,10 +427,13 @@ function tubelib.push_items(pos, side, items, player_name)
local npos, nside, name = get_dest_node(pos, side)
if npos == nil then return end
if tubelib_NodeDef[name] and tubelib_NodeDef[name].on_push_item then
- return tubelib_NodeDef[name].on_push_item(npos, nside, items, player_name)
+ if Tube:is_valid_side(name, nside) == false then
+ return false
+ end
+ return tubelib_NodeDef[name].on_push_item(npos, nside, items, player_name)
elseif name == "air" then
minetest.add_item(npos, items)
- return true
+ return true
end
return false
end
@@ -374,11 +446,14 @@ function tubelib.unpull_items(pos, side, items, player_name)
end
return false
end
-
+
function tubelib.pull_stack(pos, side, player_name)
local npos, nside, name = get_dest_node(pos, side)
if npos == nil then return end
if tubelib_NodeDef[name] then
+ if Tube:is_valid_side(name, nside) == false then
+ return nil
+ end
if tubelib_NodeDef[name].on_pull_stack then
return tubelib_NodeDef[name].on_pull_stack(npos, nside, player_name)
elseif tubelib_NodeDef[name].on_pull_item then
@@ -425,7 +500,7 @@ function tubelib.get_this_item(meta, listname, list_number, num_items)
if inv:is_empty(listname) then
return nil
end
-
+
if num_items == nil then num_items = 1 end
local items = inv:get_stack(listname, list_number)
if items:get_count() > 0 then
@@ -480,7 +555,7 @@ function tubelib.get_stack(meta, listname)
taken:set_count(taken:get_count() + 1)
return taken
end
- return item
+ return item
end
-- Return "full", "loaded", or "empty" depending
@@ -499,7 +574,7 @@ function tubelib.fuelstate(meta, listname, item)
return "loaded"
end
end
-
+
-- Return "full", "loaded", or "empty" depending
-- on the inventory load.
-- Full is returned, when no empty stack is available.
@@ -522,45 +597,101 @@ function tubelib.get_inv_state(meta, listname)
return state
end
+-- Mainly used for door/gate nodes
+-- To delete an entry, provide nil as number. The stored data will be returned.
+function tubelib.temporary_remove_node(pos, number, name, add_data)
+ local key = get_key_str(pos)
+ if number then
+ add_data = add_data or {}
+ add_data.pos = pos
+ add_data.number = number
+ add_data.name = name
+ TemporaryRemovedNodes[key] = add_data
+ else
+ if TemporaryRemovedNodes[key] then
+ local data = table.copy(TemporaryRemovedNodes[key])
+ TemporaryRemovedNodes[key] = nil
+ return data
+ end
+ end
+end
-------------------------------------------------------------------------------
-- Data Maintenance
-------------------------------------------------------------------------------
+
+local function parse_number(s)
+ for _,word in ipairs(s:split(" ")) do
+ local n = tonumber(word)
+ if n and n > 0 then
+ return word
+ end
+ end
+end
+
+local function get_node_number(pos)
+ local meta = M(pos)
+ local num = meta:get_string("tubelib_number")
+ if num and num ~= "" then return num end
+
+ num = meta:get_string("number")
+ if num and num ~= "" then return num end
+
+ num = meta:get_string("own_number")
+ if num and num ~= "" then return num end
+
+ num = parse_number(meta:get_string("infotext"))
+ if num and num ~= "" then return num end
+
+ return 0
+end
+
local function data_maintenance()
minetest.log("info", "[Tubelib] Data maintenance started")
- if Version == 1 then
- -- Add day_count for aging of unused positions
- for num,item in pairs(Number2Pos) do
- if Number2Pos[num].name == nil then
- Number2Pos[num].time = minetest.get_day_count()
- end
- end
- Version = 2
- else
- -- Remove old unused positions
- local Tbl = table.copy(Number2Pos)
- Number2Pos = {}
- local day_cnt = minetest.get_day_count()
- for num,item in pairs(Tbl) do
- if item.name then
- Number2Pos[num] = item
- -- data not older than 5 real days
- elseif item.time and (item.time + (72*5)) > day_cnt then
+
+ -- Remove unused positions
+ local tbl = table.copy(Number2Pos)
+ Number2Pos = {}
+ local cnt1 = 0
+ local cnt2 = 0
+ for num,item in pairs(tbl) do
+ local name = Name2Name[get_node_lvm(item.pos).name]
+ cnt1 = cnt1 + 1
+ -- Is there a tubelib node?
+ if tubelib_NodeDef[name] then
+ -- Does the number match?
+ local nnum = get_node_number(item.pos)
+ if nnum == num then
+ cnt2 = cnt2 + 1
+ -- Store again
Number2Pos[num] = item
+ -- Add node names which are not stored as file
+ Number2Pos[num].name = name
+ --print("added", num, name)
else
- minetest.log("info", "Position deleted", num)
+ --print("wrong number", num, name)
+ end
+ else
+ local key = get_key_str(item.pos)
+ local data = TemporaryRemovedNodes[key]
+ if data then
+ cnt2 = cnt2 + 1
+ -- Store again
+ Number2Pos[data.number] = data
+ --print("restored", data.number, data.name)
+ else
+ --print("no data", num)
end
end
end
+ minetest.log("info", "[Tubelib] Data base shrank from "..cnt1.." to "..cnt2.." nodes")
minetest.log("info", "[Tubelib] Data maintenance finished")
-end
-
+end
+
generate_Key2Number()
--- maintain data after 5 seconds
--- (minetest.get_day_count() will not be valid at start time)
-minetest.after(5, data_maintenance)
-
+-- maintain data after 2 seconds
+minetest.after(2, data_maintenance)
function tubelib.jump(pos, to)
local num = tubelib.get_node_number(pos)
diff --git a/techpack_modpack/tubelib/defect.lua b/techpack_modpack/tubelib/defect.lua
index fd124e2..178bf78 100644
--- a/techpack_modpack/tubelib/defect.lua
+++ b/techpack_modpack/tubelib/defect.lua
@@ -1,5 +1,8 @@
+-- Load support for I18n
+local S = tubelib.S
+
minetest.register_node("tubelib:defect_dummy", {
- description = "Corrupted Tubelib Node",
+ description = S("Corrupted Tubelib Node"),
tiles = {
"tubelib_front.png",
"tubelib_front.png",
@@ -8,13 +11,21 @@ minetest.register_node("tubelib:defect_dummy", {
"tubelib_front.png^tubelib_defect.png",
"tubelib_front.png^tubelib_defect.png",
},
- drop = "",
groups = {cracky=3, crumbly=3, choppy=3, not_in_creative_inventory=1},
is_ground_content = false,
})
+local reported_machines = {}
+local function report(pos)
+ reported_machines[minetest.pos_to_string(pos)] = true
+end
+local function already_reported(pos)
+ local key = minetest.pos_to_string(pos)
+ return reported_machines[key]
+end
-function tubelib.data_not_corrupted(pos)
+
+function tubelib.data_not_corrupted(pos, has_no_info)
if minetest.pos_to_string(pos) ~= minetest.get_meta(pos):get_string("my_pos") then
-- node number corrupt?
local meta = minetest.get_meta(pos)
@@ -29,23 +40,34 @@ function tubelib.data_not_corrupted(pos)
number = meta:get_string("own_number")
end
if number == "" then
- tubelib.remove_node(pos)
- minetest.set_node(pos, {name = "tubelib:defect_dummy"})
- meta:from_table(nil)
- return false
+ if not already_reported(pos) then
+ minetest.log('error', ('[tubelib] machine @ %s has no number'):format(minetest.pos_to_string(pos)))
+ report(pos)
+ end
end
+
+ -- button like odes
+ if has_no_info then
+ minetest.get_meta(pos):get_string("my_pos", minetest.pos_to_string(pos))
+ return true
+ end
+
-- node moved?
local info = tubelib.get_node_info(number)
if not info or not vector.equals(info.pos, pos) then
+ if not already_reported(pos) then
+ if not info then
+ minetest.log('error', ('[tubelib] machine @ %s has no info'):format(minetest.pos_to_string(pos)))
+ else
+ minetest.log('error', ('[tubelib] machine @ %s thinks it is at %s'):format(minetest.pos_to_string(pos), minetest.pos_to_string(info.pos)))
+ end
+ report(pos)
+ end
local node = minetest.get_node(pos)
number = tubelib.get_new_number(pos, node.name)
meta:set_string("tubelib_number", number)
--- tubelib.remove_node(pos)
--- minetest.set_node(pos, {name = "tubelib:defect_dummy"})
--- meta:from_table(nil)
--- return false
end
minetest.get_meta(pos):get_string("my_pos", minetest.pos_to_string(pos))
end
return true
-end
\ No newline at end of file
+end
diff --git a/techpack_modpack/tubelib/distributor.lua b/techpack_modpack/tubelib/distributor.lua
index d588910..de6223f 100644
--- a/techpack_modpack/tubelib/distributor.lua
+++ b/techpack_modpack/tubelib/distributor.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
distributor.lua:
@@ -19,8 +19,10 @@
response is "running", "stopped", "standby", "defect", or "not supported"
]]--
+-- Load support for I18n
+local S = tubelib.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -62,7 +64,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib:distributor",
node_name_active = "tubelib:distributor_active",
node_name_defect = "tubelib:distributor_defect",
- infotext_name = "Tubelib Distributor",
+ infotext_name = S("Tubelib Distributor"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
aging_factor = 10,
@@ -72,7 +74,7 @@ local State = tubelib.NodeStates:new({
-- Return a key/value table with all items and the corresponding stack numbers
local function invlist_content_as_kvlist(list)
local res = {}
- for idx,items in ipairs(list) do
+ for idx,items in ipairs(list or {}) do
local name = items:get_name()
if name ~= "" then
res[name] = idx
@@ -138,39 +140,6 @@ local function num_items(moved_items, name, filter_item_names, rejected_item_nam
end
end
-local function allow_metadata_inventory_put(pos, listname, index, stack, player)
- local meta = M(pos)
- local inv = meta:get_inventory()
- local list = inv:get_list(listname)
-
- if minetest.is_protected(pos, player:get_player_name()) then
- return 0
- end
- if listname == "src" then
- if State:get_state(M(pos)) == tubelib.STANDBY then
- State:start(pos, meta)
- end
- return stack:get_count()
- elseif invlist_num_entries(list) < MAX_NUM_PER_CYC then
- return stack:get_count()
- end
- return 0
-end
-
-local function allow_metadata_inventory_take(pos, listname, index, stack, player)
- if minetest.is_protected(pos, player:get_player_name()) then
- return 0
- end
- return stack:get_count()
-end
-
-local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
- local meta = M(pos)
- local inv = meta:get_inventory()
- local stack = inv:get_stack(from_list, from_index)
- return allow_metadata_inventory_put(pos, to_list, to_index, stack, player)
-end
-
local SlotColors = {"red", "green", "blue", "yellow"}
local Num2Ascii = {"B", "L", "F", "R"} -- color to side translation
local FilterCache = {} -- local cache for filter settings
@@ -204,6 +173,50 @@ local function filter_settings(pos)
}
end
+local function allow_metadata_inventory_put(pos, listname, index, stack, player)
+ if minetest.is_protected(pos, player:get_player_name()) then
+ return 0
+ end
+
+ local meta = M(pos)
+ local inv = meta:get_inventory()
+ local list = inv:get_list(listname)
+ local stack_count = stack:get_count()
+
+ if listname == "src" then
+ if State:get_state(M(pos)) == tubelib.STANDBY then
+ State:start(pos, meta)
+ end
+ return stack_count
+ end
+
+ local space_left = MAX_NUM_PER_CYC - invlist_num_entries(list)
+ if space_left <= 0 then -- < 0 case is possible if distributor is already misconfigured
+ return 0
+ end
+
+ filter_settings(pos)
+ return math.min(stack_count, space_left)
+end
+
+local function allow_metadata_inventory_take(pos, listname, index, stack, player)
+ if minetest.is_protected(pos, player:get_player_name()) then
+ return 0
+ end
+
+ if listname ~= "src" then
+ filter_settings(pos)
+ end
+ return stack:get_count()
+end
+
+local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
+ local meta = M(pos)
+ local inv = meta:get_inventory()
+ local stack = inv:get_stack(from_list, from_index)
+ return allow_metadata_inventory_put(pos, to_list, to_index, stack, player)
+end
+
-- move items from configured filters to the output
local function distributing(pos, meta)
local player_name = meta:get_string("player_name")
@@ -303,7 +316,7 @@ local function on_receive_fields(pos, formname, fields, player)
return
end
local meta = M(pos)
- local filter = minetest.deserialize(meta:get_string("filter"))
+ local filter = minetest.deserialize(meta:get_string("filter")) or {false,false,false,false}
if fields.filter1 ~= nil then
filter[1] = fields.filter1 == "true"
elseif fields.filter2 ~= nil then
@@ -328,7 +341,7 @@ end
local function change_filter_settings(pos, slot, val)
local slots = {["red"] = 1, ["green"] = 2, ["blue"] = 3, ["yellow"] = 4}
local meta = M(pos)
- local filter = minetest.deserialize(meta:get_string("filter"))
+ local filter = minetest.deserialize(meta:get_string("filter")) or {false,false,false,false}
local num = slots[slot] or 1
if num >= 1 and num <= 4 then
filter[num] = val == "on"
@@ -342,7 +355,7 @@ local function change_filter_settings(pos, slot, val)
end
minetest.register_node("tubelib:distributor", {
- description = "Tubelib Distributor",
+ description = S("Tubelib Distributor"),
tiles = {
-- up, down, right, left, back, front
'tubelib_distributor.png',
@@ -380,9 +393,9 @@ minetest.register_node("tubelib:distributor", {
return inv:is_empty("src")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- tubelib.remove_node(pos) -- <<=== tubelib
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
+ tubelib.remove_node(pos)
end,
allow_metadata_inventory_put = allow_metadata_inventory_put,
@@ -392,7 +405,6 @@ minetest.register_node("tubelib:distributor", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -403,7 +415,7 @@ minetest.register_node("tubelib:distributor", {
minetest.register_node("tubelib:distributor_active", {
- description = "Tubelib Distributor",
+ description = S("Tubelib Distributor"),
tiles = {
-- up, down, right, left, back, front
{
@@ -432,6 +444,9 @@ minetest.register_node("tubelib:distributor_active", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
+ diggable = false,
+ can_dig = function() return false end,
+
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -441,7 +456,7 @@ minetest.register_node("tubelib:distributor_active", {
})
minetest.register_node("tubelib:distributor_defect", {
- description = "Tubelib Distributor",
+ description = S("Tubelib Distributor"),
tiles = {
-- up, down, right, left, back, front
'tubelib_distributor.png',
diff --git a/techpack_modpack/tubelib/forceload.lua b/techpack_modpack/tubelib/forceload.lua
index 0f214bb..da63948 100644
--- a/techpack_modpack/tubelib/forceload.lua
+++ b/techpack_modpack/tubelib/forceload.lua
@@ -3,17 +3,20 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
forceload.lua:
]]--
+-- Load support for I18n
+local S = tubelib.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
+local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -109,22 +112,22 @@ local function formspec(player)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "label[0,0;List of your Forceload Blocks:]"
+ "label[0,0;"..S("List of your Forceload Blocks")..":]"
for idx,pos in ipairs(lPos) do
local pos1, pos2 = calc_area(pos)
local ypos = 0.2 + idx * 0.4
tRes[#tRes+1] = "label[0,"..ypos..";"..idx.."]"
- tRes[#tRes+1] = "label[0.8,"..ypos..";"..S(pos1).."]"
- tRes[#tRes+1] = "label[3.2,"..ypos..";to]"
- tRes[#tRes+1] = "label[4,"..ypos..";"..S(pos2).."]"
+ tRes[#tRes+1] = "label[0.8,"..ypos..";"..P2S(pos1).."]"
+ tRes[#tRes+1] = "label[3.2,"..ypos..";"..S("to").."]"
+ tRes[#tRes+1] = "label[4,"..ypos..";"..P2S(pos2).."]"
end
return table.concat(tRes)
end
minetest.register_node("tubelib:forceload", {
- description = "Tubelib Forceload Block",
+ description = S("Tubelib Forceload Block"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -145,13 +148,13 @@ minetest.register_node("tubelib:forceload", {
if add_pos(pos, placer) then
minetest.forceload_block(pos, true)
local pos1, pos2, num, max = get_data(pos, placer)
- M(pos):set_string("infotext", "Area "..S(pos1).." to "..S(pos2).." loaded!\n"..
- "Punch the block to make the area visible.")
- chat(placer, "Area ("..num.."/"..max..") "..S(pos1).." to "..S(pos2).." loaded!")
+ M(pos):set_string("infotext", S("Area").." "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!").."\n"..
+ S("Punch the block to make the area visible."))
+ chat(placer, S("Area").." ("..num.."/"..max..") "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!"))
tubelib.mark_region(placer:get_player_name(), pos1, pos2)
M(pos):set_string("owner", placer:get_player_name())
else
- chat(placer, "Area already loaded or max. number of Forceload Blocks reached!")
+ chat(placer, S("Area already loaded or max. number of Forceload Blocks reached!"))
minetest.remove_node(pos)
return itemstack
end
diff --git a/techpack_modpack/tubelib/init.lua b/techpack_modpack/tubelib/init.lua
index fb803c2..8c87414 100644
--- a/techpack_modpack/tubelib/init.lua
+++ b/techpack_modpack/tubelib/init.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
History:
@@ -34,6 +34,10 @@ tubelib = {
NodeDef = {}, -- node registration info
}
+-- Load support for I18n
+tubelib.S = minetest.get_translator("tubelib")
+local S = tubelib.S
+
tubelib.version = 2.00
tubelib.max_num_forceload_blocks = tonumber(minetest.setting_get("tubelib_max_num_forceload_blocks")) or 10
@@ -78,7 +82,7 @@ minetest.register_lbm({
})
minetest.register_craftitem("tubelib:wlanchip", {
- description = "Tubelib WLAN Chip",
+ description = S("Tubelib WLAN Chip"),
inventory_image = "tubelib_wlanchip.png",
})
@@ -93,8 +97,8 @@ minetest.register_craft({
})
-if tubelib2.version < 0.8 then
- minetest.log("error", "TechPack/Tubelib requires tubelib2 version 0.8 or newer!!!")
+if tubelib2.version < 2.0 then
+ error("TechPack/Tubelib requires tubelib2 version 2.0 or newer!!!")
else
dofile(minetest.get_modpath("tubelib") .. "/tubes.lua")
dofile(minetest.get_modpath("tubelib") .. "/command.lua")
diff --git a/techpack_modpack/tubelib/lamp.lua b/techpack_modpack/tubelib/lamp.lua
index 67703e0..acd2106 100644
--- a/techpack_modpack/tubelib/lamp.lua
+++ b/techpack_modpack/tubelib/lamp.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
lamp.lua:
@@ -18,6 +18,9 @@
]]--
+-- Load support for I18n
+local S = tubelib.S
+
local function switch_on(pos, node)
node.name = "tubelib:lamp_on"
minetest.swap_node(pos, node)
@@ -29,7 +32,7 @@ local function switch_off(pos, node)
end
minetest.register_node("tubelib:lamp", {
- description = "Tubelib Lamp",
+ description = S("Tubelib Lamp"),
tiles = {
'tubelib_lamp.png',
},
@@ -37,7 +40,7 @@ minetest.register_node("tubelib:lamp", {
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib:lamp") -- <<=== tubelib
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Lamp").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@@ -60,7 +63,7 @@ minetest.register_node("tubelib:lamp", {
})
minetest.register_node("tubelib:lamp_on", {
- description = "Tubelib Lamp",
+ description = S("Tubelib Lamp"),
tiles = {
'tubelib_lamp.png',
},
diff --git a/techpack_modpack/tubelib/legacy_nodes.lua b/techpack_modpack/tubelib/legacy_nodes.lua
index 8b814a0..5f5fab7 100644
--- a/techpack_modpack/tubelib/legacy_nodes.lua
+++ b/techpack_modpack/tubelib/legacy_nodes.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
legacy_nodes.lua:
@@ -14,6 +14,18 @@
]]--
+local function is_source(pos,meta, item)
+ local inv = minetest.get_inventory({type="node", pos=pos})
+ local name = item:get_name()
+ if meta:get_string("src_item") == name then
+ return true
+ elseif inv:get_stack("src", 1):get_name() == name then
+ meta:set_string("src_item", name)
+ return true
+ end
+ return false
+end
+
tubelib.register_node("default:chest", {"default:chest_open"}, {
on_pull_item = function(pos, side)
local meta = minetest.get_meta(pos)
@@ -65,7 +77,9 @@ tubelib.register_node("default:furnace", {"default:furnace_active"}, {
on_push_item = function(pos, side, item)
local meta = minetest.get_meta(pos)
minetest.get_node_timer(pos):start(1.0)
- if minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0 then
+ if is_source(pos, meta, item) then
+ return tubelib.put_item(meta, "src", item)
+ elseif minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0 then
return tubelib.put_item(meta, "fuel", item)
else
return tubelib.put_item(meta, "src", item)
diff --git a/techpack_modpack/tubelib/locale/template.txt b/techpack_modpack/tubelib/locale/template.txt
new file mode 100644
index 0000000..2a70dbf
--- /dev/null
+++ b/techpack_modpack/tubelib/locale/template.txt
@@ -0,0 +1,69 @@
+# textdomain: tubelib
+
+
+
+### basalt.lua ###
+
+Basalt Stone=
+Basalt Stone Block=
+Basalt Stone Brick=
+
+### blackhole.lua ###
+
+Tubelib Black Hole=
+items disappeared=
+
+### button.lua ###
+
+Insert destination node number(s)=
+Save=
+Tubelib Button=
+Tubelib Button/Switch=
+connected with block=
+public=
+switch,button 2s,button 4s,button 8s,button 16s=
+
+### defect.lua ###
+
+Corrupted Tubelib Node=
+
+### distributor.lua ###
+
+Tubelib Distributor=
+
+### forceload.lua ###
+
+Area=
+
+Area already loaded or max. number of Forceload Blocks reached!=
+
+List of your Forceload Blocks=
+Punch the block to make the area visible.=
+Tubelib Forceload Block=
+loaded!=
+to=
+
+### init.lua ###
+
+Tubelib WLAN Chip=
+
+### lamp.lua ###
+
+Tubelib Lamp=
+
+### pusher.lua ###
+
+Tubelib Pusher=
+
+### repairkit.lua ###
+
+Tubelib End Wrench (use @= read status, place @= destroy)=
+Tubelib Repair Kit=
+[Tubelib] Node repaired=
+[Tubelib] state=
+aging=
+counter=
+
+### tubes.lua ###
+
+Tubelib Tube=
diff --git a/techpack_modpack/tubelib/locale/tubelib.de.tr b/techpack_modpack/tubelib/locale/tubelib.de.tr
new file mode 100644
index 0000000..a1d37a4
--- /dev/null
+++ b/techpack_modpack/tubelib/locale/tubelib.de.tr
@@ -0,0 +1,69 @@
+# textdomain: tubelib
+
+
+
+### basalt.lua ###
+
+Basalt Stone=Basaltstein
+Basalt Stone Block=Basaltsteinblock
+Basalt Stone Brick=Basaltsteinziegel
+
+### blackhole.lua ###
+
+Tubelib Black Hole=Tubelib Schwarzes Loch
+items disappeared=Gegenstände verschwunden
+
+### button.lua ###
+
+Insert destination node number(s)=Zielblocknummer(n) eingeben
+Save=Speichern
+Tubelib Button=Tubelib Taster
+Tubelib Button/Switch=Tubelib Taster/Schalter
+connected with block=verbunden mit Block
+public=öffentlich
+switch,button 2s,button 4s,button 8s,button 16s=Schalter,Taster 2s,Taster 4s,Taster 8s,Taster 16s
+
+### defect.lua ###
+
+Corrupted Tubelib Node=beschädigter Tubelib Block
+
+### distributor.lua ###
+
+Tubelib Distributor=Tubelib Verteiler
+
+### forceload.lua ###
+
+Area=Bereich
+
+Area already loaded or max. number of Forceload Blocks reached!=Bereich bereits geladen oder max. Anzahl von Forceload Blöcken erreicht!
+
+List of your Forceload Blocks=Liste deiner Forceload Blöcke
+Punch the block to make the area visible.=Schlage den Block um den Bereich anzuzeigen
+Tubelib Forceload Block=Tubelib Forceload Block
+loaded!=geladen!
+to=bis
+
+### init.lua ###
+
+Tubelib WLAN Chip=Tubelib WLAN Chip
+
+### lamp.lua ###
+
+Tubelib Lamp=Tubelib Lampe
+
+### pusher.lua ###
+
+Tubelib Pusher=Tubelib Schieber
+
+### repairkit.lua ###
+
+Tubelib End Wrench (use @= read status, place @= destroy)=Tubelib Gabelschlüssel (benutzen @= Status lesen, platzieren @= zerstören)
+Tubelib Repair Kit=Tubelib Reparatur Kit
+[Tubelib] Node repaired=[Tubelib] Block repariert
+[Tubelib] state=Tubelib Zustand
+aging=altern
+counter=Zähler
+
+### tubes.lua ###
+
+Tubelib Tube=Tubelib Röhre
diff --git a/techpack_modpack/tubelib/mark.lua b/techpack_modpack/tubelib/mark.lua
index 73328db..5d758ed 100644
--- a/techpack_modpack/tubelib/mark.lua
+++ b/techpack_modpack/tubelib/mark.lua
@@ -3,10 +3,10 @@
Tube Library
============
- Copyright (C) 2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
Code derived from wordedit (sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote))
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
mark.lua:
diff --git a/techpack_modpack/tubelib/mod.conf b/techpack_modpack/tubelib/mod.conf
index 74f37e9..75fca44 100644
--- a/techpack_modpack/tubelib/mod.conf
+++ b/techpack_modpack/tubelib/mod.conf
@@ -1 +1,3 @@
name=tubelib
+description=Tubes Mod with message communication interface as basis for further technique Mods.
+depends=default,tubelib2,basic_materials
diff --git a/techpack_modpack/tubelib/node_states.lua b/techpack_modpack/tubelib/node_states.lua
index 3f89e7a..2a3b445 100644
--- a/techpack_modpack/tubelib/node_states.lua
+++ b/techpack_modpack/tubelib/node_states.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
node_states.lua:
@@ -84,6 +84,7 @@ function NodeStates:new(attr)
local o = {
-- mandatory
cycle_time = attr.cycle_time, -- for running state
+ first_cycle_time = attr.first_cycle_time, -- for first run, not required
standby_ticks = attr.standby_ticks, -- for standby state
has_item_meter = attr.has_item_meter, -- true/false
-- optional
@@ -175,9 +176,27 @@ function NodeStates:start(pos, meta, called_from_on_timer)
if self.formspec_func then
meta:set_string("formspec", self.formspec_func(self, pos, meta))
end
- minetest.get_node_timer(pos):start(self.cycle_time)
+ local cycle_time = self.cycle_time
+ if self.first_cycle_time then
+ if meta:get_int("tubelib_first_run") == 1 then
+ meta:set_int("tubelib_first_run", 0)
+ cycle_time = self.cycle_time
+ else
+ meta:set_int("tubelib_first_run", 1)
+ cycle_time = self.first_cycle_time
+ end
+ end
+ minetest.get_node_timer(pos):start(cycle_time)
return true
end
+ if self.first_cycle_time and meta:get_int("tubelib_first_run") == 1 then
+ local cycle_time = self.cycle_time
+ local timer = minetest.get_node_timer(pos)
+ minetest.after(0, function ()
+ timer:set(cycle_time, timer:get_elapsed())
+ end)
+ meta:set_int("tubelib_first_run", 0)
+ end
return false
end
@@ -302,6 +321,7 @@ function NodeStates:keep_running(pos, meta, val, num_items)
self:start(pos, meta, true)
meta:set_int("tubelib_countdown", val)
meta:set_int("tubelib_item_meter", meta:get_int("tubelib_item_meter") + (num_items or 1))
+
if self.aging_level1 then
local cnt = meta:get_int("tubelib_aging") + num_items
meta:set_int("tubelib_aging", cnt)
@@ -427,15 +447,39 @@ function NodeStates:on_node_repair(pos)
return false
end
--- Return working or defect machine, depending on machine lifetime
-function NodeStates:after_dig_node(pos, oldnode, oldmetadata, digger)
- local inv = minetest.get_inventory({type="player", name=digger:get_player_name()})
- local cnt = oldmetadata.fields.tubelib_aging and tonumber(oldmetadata.fields.tubelib_aging)
- if not cnt or cnt < 1 then cnt = 1 end
- local is_defect = cnt > self.aging_level1 and math.random(math.max(1, math.floor(self.aging_level2 / cnt))) == 1
- if self.node_name_defect and is_defect then
- inv:add_item("main", ItemStack(self.node_name_defect))
- else
- inv:add_item("main", ItemStack(self.node_name_passive))
+
+--[[
+Callback after digging a node but before removing the node.
+
+The tubelib node becomes defect after digging it:
+ - always if the aging counter "tubelib_aging" is greater than self.aging_level2
+ - with a certain probability if the aging counter "tubelib_aging" is greater than self.aging_level1
+ but smaller than self.aging_level2
+
+Info: If a tubelib machine has been running quite some time but is dropped as a non-defect machine and then placed back again, the
+tubelib machine will be reset to new (digging will reset the aging counter). So this code tries to prevent this exploit
+
+]]--
+function NodeStates:on_dig_node(pos, node, player)
+ local meta = M(pos)
+ local cnt = tonumber(meta:get_string("tubelib_aging"))
+ if (not cnt or cnt < 1) then
+ cnt = 1
end
+
+ local is_defect = (cnt > self.aging_level1) and ( math.random(math.max(1, math.floor(self.aging_level2 / cnt))) == 1 )
+
+ if is_defect then
+ self:defect(pos, meta) -- replace node with defect one
+ node = minetest.get_node(pos)
+ end
+
+
+ minetest.node_dig(pos, node, player) -- default behaviour (this function is called automatically if on_dig() callback isn't set)
+
end
+
+
+
+
+
diff --git a/techpack_modpack/tubelib/pusher.lua b/techpack_modpack/tubelib/pusher.lua
index 8e6e878..fb26b79 100644
--- a/techpack_modpack/tubelib/pusher.lua
+++ b/techpack_modpack/tubelib/pusher.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
pusher.lua:
@@ -29,21 +29,25 @@
-- | |/
-- +--------+
+-- Load support for I18n
+local S = tubelib.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local STANDBY_TICKS = 5
local COUNTDOWN_TICKS = 5
local CYCLE_TIME = 2
+local FIRST_CYCLE = 0.5
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib:pusher",
node_name_active = "tubelib:pusher_active",
node_name_defect = "tubelib:pusher_defect",
- infotext_name = "Tubelib Pusher",
+ infotext_name = S("Tubelib Pusher"),
cycle_time = CYCLE_TIME,
+ first_cycle_time = FIRST_CYCLE,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
aging_factor = 10,
@@ -59,7 +63,9 @@ local function pushing(pos, meta)
State:blocked(pos, meta)
return
end
- State:keep_running(pos, meta, COUNTDOWN_TICKS)
+ if State.get_state(pos, meta) ~= tubelib.STOPPED then
+ State:keep_running(pos, meta, COUNTDOWN_TICKS)
+ end
return
end
State:idle(pos, meta)
@@ -75,7 +81,7 @@ local function keep_running(pos, elapsed)
end
minetest.register_node("tubelib:pusher", {
- description = "Tubelib Pusher",
+ description = S("Tubelib Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png',
@@ -99,15 +105,14 @@ minetest.register_node("tubelib:pusher", {
end
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- tubelib.remove_node(pos) -- <<=== tubelib
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
+ tubelib.remove_node(pos)
end,
on_timer = keep_running,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -118,7 +123,7 @@ minetest.register_node("tubelib:pusher", {
minetest.register_node("tubelib:pusher_active", {
- description = "Tubelib Pusher",
+ description = S("Tubelib Pusher"),
tiles = {
-- up, down, right, left, back, front
{
@@ -173,7 +178,10 @@ minetest.register_node("tubelib:pusher_active", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
-
+
+ diggable = false,
+ can_dig = function() return false end,
+
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -183,7 +191,7 @@ minetest.register_node("tubelib:pusher_active", {
})
minetest.register_node("tubelib:pusher_defect", {
- description = "Tubelib Pusher",
+ description = S("Tubelib Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png',
@@ -234,7 +242,7 @@ tubelib.register_node("tubelib:pusher",
on_push_item = nil, -- pusher has no inventory
on_unpull_item = nil, -- pusher has no inventory
is_pusher = true, -- is a pulling/pushing node
-
+ valid_sides = {"R","L"},
on_recv_message = function(pos, topic, payload)
local resp = State:on_receive_message(pos, topic, payload)
if resp then
diff --git a/techpack_modpack/tubelib/repairkit.lua b/techpack_modpack/tubelib/repairkit.lua
index 4aba31e..f0bcee3 100644
--- a/techpack_modpack/tubelib/repairkit.lua
+++ b/techpack_modpack/tubelib/repairkit.lua
@@ -3,16 +3,18 @@
Tube Library
============
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
repairkit.lua:
]]--
+-- Load support for I18n
+local S = tubelib.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -29,7 +31,7 @@ local function repair_node(itemstack, user, pointed_thing)
local pos = pointed_thing.under
if pos then
if tubelib.repair_node(pos) then
- minetest.chat_send_player(user:get_player_name(), "[Tubelib] Node repaired")
+ minetest.chat_send_player(user:get_player_name(), S("[Tubelib] Node repaired"))
itemstack:take_item()
return itemstack
end
@@ -47,14 +49,14 @@ local function read_state(itemstack, user, pointed_thing)
local aging = tubelib.send_request(number, "aging", nil)
if state and counter and aging then
if type(counter) ~= "number" then counter = "unknown" end
- minetest.chat_send_player(user:get_player_name(), "[Tubelib] state ="..state..", counter = "..counter..", aging = "..aging)
+ minetest.chat_send_player(user:get_player_name(), S("[Tubelib] state").." ="..state..", "..S("counter").." = "..counter..", "..S("aging").." = "..aging)
end
end
end
end
minetest.register_craftitem("tubelib:repairkit", {
- description = "Tubelib Repair Kit",
+ description = S("Tubelib Repair Kit"),
inventory_image = "tubelib_repairkit.png",
wield_image = "tubelib_repairkit.png^[transformR270",
groups = {cracky=1, book=1},
@@ -64,7 +66,7 @@ minetest.register_craftitem("tubelib:repairkit", {
minetest.register_node("tubelib:end_wrench", {
- description = "Tubelib End Wrench (use = read status, place = destroy)",
+ description = S("Tubelib End Wrench (use = read status, place = destroy)"),
inventory_image = "tubelib_end_wrench.png",
wield_image = "tubelib_end_wrench.png",
groups = {cracky=1, book=1},
diff --git a/techpack_modpack/tubelib/states.lua b/techpack_modpack/tubelib/states.lua
index 3710d63..8c6f634 100644
--- a/techpack_modpack/tubelib/states.lua
+++ b/techpack_modpack/tubelib/states.lua
@@ -3,9 +3,9 @@
Tube Library
============
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
states.lua:
diff --git a/techpack_modpack/tubelib/textures/tubelib_black_hole.png b/techpack_modpack/tubelib/textures/tubelib_black_hole.png
index f61f3aa..80f3119 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_black_hole.png and b/techpack_modpack/tubelib/textures/tubelib_black_hole.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_black_hole_inp.png b/techpack_modpack/tubelib/textures/tubelib_black_hole_inp.png
index 1c7482a..bd883f6 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_black_hole_inp.png and b/techpack_modpack/tubelib/textures/tubelib_black_hole_inp.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_blue.png b/techpack_modpack/tubelib/textures/tubelib_blue.png
index 48d08e2..b8d75c1 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_blue.png and b/techpack_modpack/tubelib/textures/tubelib_blue.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_button.png b/techpack_modpack/tubelib/textures/tubelib_button.png
index b3b637a..0848a56 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_button.png and b/techpack_modpack/tubelib/textures/tubelib_button.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_button_off.png b/techpack_modpack/tubelib/textures/tubelib_button_off.png
index 048a440..77863ec 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_button_off.png and b/techpack_modpack/tubelib/textures/tubelib_button_off.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_button_on.png b/techpack_modpack/tubelib/textures/tubelib_button_on.png
index 380e35b..f6c0f23 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_button_on.png and b/techpack_modpack/tubelib/textures/tubelib_button_on.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_cube.png b/techpack_modpack/tubelib/textures/tubelib_cube.png
index 2dc2c9c..9a17f06 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_cube.png and b/techpack_modpack/tubelib/textures/tubelib_cube.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_defect.png b/techpack_modpack/tubelib/textures/tubelib_defect.png
index 5b5f8ec..152d558 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_defect.png and b/techpack_modpack/tubelib/textures/tubelib_defect.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_distributor.png b/techpack_modpack/tubelib/textures/tubelib_distributor.png
index 0145d34..653ab56 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_distributor.png and b/techpack_modpack/tubelib/textures/tubelib_distributor.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_distributor_active.png b/techpack_modpack/tubelib/textures/tubelib_distributor_active.png
index 755af44..3893ae0 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_distributor_active.png and b/techpack_modpack/tubelib/textures/tubelib_distributor_active.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_distributor_blue.png b/techpack_modpack/tubelib/textures/tubelib_distributor_blue.png
index b3d1857..3bc6a14 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_distributor_blue.png and b/techpack_modpack/tubelib/textures/tubelib_distributor_blue.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_distributor_green.png b/techpack_modpack/tubelib/textures/tubelib_distributor_green.png
index 3d9b506..934e212 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_distributor_green.png and b/techpack_modpack/tubelib/textures/tubelib_distributor_green.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_distributor_red.png b/techpack_modpack/tubelib/textures/tubelib_distributor_red.png
index 69aed09..0911f7d 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_distributor_red.png and b/techpack_modpack/tubelib/textures/tubelib_distributor_red.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_distributor_yellow.png b/techpack_modpack/tubelib/textures/tubelib_distributor_yellow.png
index 363ffbb..6cf1e02 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_distributor_yellow.png and b/techpack_modpack/tubelib/textures/tubelib_distributor_yellow.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_end_wrench.png b/techpack_modpack/tubelib/textures/tubelib_end_wrench.png
index 1a29728..a66c537 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_end_wrench.png and b/techpack_modpack/tubelib/textures/tubelib_end_wrench.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_forceload.png b/techpack_modpack/tubelib/textures/tubelib_forceload.png
index 9c21d9b..68118de 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_forceload.png and b/techpack_modpack/tubelib/textures/tubelib_forceload.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_front.png b/techpack_modpack/tubelib/textures/tubelib_front.png
index 4802087..cc081bf 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_front.png and b/techpack_modpack/tubelib/textures/tubelib_front.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_green.png b/techpack_modpack/tubelib/textures/tubelib_green.png
index 07ea916..014a96e 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_green.png and b/techpack_modpack/tubelib/textures/tubelib_green.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_gui_arrow.png b/techpack_modpack/tubelib/textures/tubelib_gui_arrow.png
index 8fa1488..f5565f7 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_gui_arrow.png and b/techpack_modpack/tubelib/textures/tubelib_gui_arrow.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_hole.png b/techpack_modpack/tubelib/textures/tubelib_hole.png
index 6a22faf..6d61205 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_hole.png and b/techpack_modpack/tubelib/textures/tubelib_hole.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_hole2.png b/techpack_modpack/tubelib/textures/tubelib_hole2.png
index 219f347..f890046 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_hole2.png and b/techpack_modpack/tubelib/textures/tubelib_hole2.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_inp.png b/techpack_modpack/tubelib/textures/tubelib_inp.png
index ca37bbd..f884169 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_inp.png and b/techpack_modpack/tubelib/textures/tubelib_inp.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_inv_button_error.png b/techpack_modpack/tubelib/textures/tubelib_inv_button_error.png
index 8fa7ad2..c01e36a 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_inv_button_error.png and b/techpack_modpack/tubelib/textures/tubelib_inv_button_error.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_inv_button_off.png b/techpack_modpack/tubelib/textures/tubelib_inv_button_off.png
index 7097f8c..355fee5 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_inv_button_off.png and b/techpack_modpack/tubelib/textures/tubelib_inv_button_off.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_inv_button_on.png b/techpack_modpack/tubelib/textures/tubelib_inv_button_on.png
index 3ca6230..0a38b6d 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_inv_button_on.png and b/techpack_modpack/tubelib/textures/tubelib_inv_button_on.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_inv_button_standby.png b/techpack_modpack/tubelib/textures/tubelib_inv_button_standby.png
index 0fed820..8e23989 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_inv_button_standby.png and b/techpack_modpack/tubelib/textures/tubelib_inv_button_standby.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_inv_button_warning.png b/techpack_modpack/tubelib/textures/tubelib_inv_button_warning.png
index 33ec686..385b6f9 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_inv_button_warning.png and b/techpack_modpack/tubelib/textures/tubelib_inv_button_warning.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_knee.png b/techpack_modpack/tubelib/textures/tubelib_knee.png
index dd791a5..935d75e 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_knee.png and b/techpack_modpack/tubelib/textures/tubelib_knee.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_knee2.png b/techpack_modpack/tubelib/textures/tubelib_knee2.png
index 4f647b0..50b3205 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_knee2.png and b/techpack_modpack/tubelib/textures/tubelib_knee2.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_lamp.png b/techpack_modpack/tubelib/textures/tubelib_lamp.png
index 5a6ccb5..3526893 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_lamp.png and b/techpack_modpack/tubelib/textures/tubelib_lamp.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_outp.png b/techpack_modpack/tubelib/textures/tubelib_outp.png
index a15b862..3b1dc20 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_outp.png and b/techpack_modpack/tubelib/textures/tubelib_outp.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_pusher.png b/techpack_modpack/tubelib/textures/tubelib_pusher.png
index 4889c7d..26726ae 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_pusher.png and b/techpack_modpack/tubelib/textures/tubelib_pusher.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_pusher1.png b/techpack_modpack/tubelib/textures/tubelib_pusher1.png
index 356308c..3fcea69 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_pusher1.png and b/techpack_modpack/tubelib/textures/tubelib_pusher1.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_red.png b/techpack_modpack/tubelib/textures/tubelib_red.png
index 68c130c..4e4cd2a 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_red.png and b/techpack_modpack/tubelib/textures/tubelib_red.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_repairkit.png b/techpack_modpack/tubelib/textures/tubelib_repairkit.png
index 8a5092f..35bba39 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_repairkit.png and b/techpack_modpack/tubelib/textures/tubelib_repairkit.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_tube.png b/techpack_modpack/tubelib/textures/tubelib_tube.png
index 0f6c81e..72b8602 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_tube.png and b/techpack_modpack/tubelib/textures/tubelib_tube.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_wlanchip.png b/techpack_modpack/tubelib/textures/tubelib_wlanchip.png
index 40577b0..9ebe01c 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_wlanchip.png and b/techpack_modpack/tubelib/textures/tubelib_wlanchip.png differ
diff --git a/techpack_modpack/tubelib/textures/tubelib_yellow.png b/techpack_modpack/tubelib/textures/tubelib_yellow.png
index e402bc9..8ac9343 100644
Binary files a/techpack_modpack/tubelib/textures/tubelib_yellow.png and b/techpack_modpack/tubelib/textures/tubelib_yellow.png differ
diff --git a/techpack_modpack/tubelib/tubes.lua b/techpack_modpack/tubelib/tubes.lua
index 7c5c572..14e3cf8 100644
--- a/techpack_modpack/tubelib/tubes.lua
+++ b/techpack_modpack/tubelib/tubes.lua
@@ -3,15 +3,18 @@
Tubes based on tubelib2
=======================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
tubes.lua: Node registration and API functions to move items via tubes
]]--
+-- Load support for I18n
+local S = tubelib.S
+
-- used for registered nodes
tubelib.KnownNodes = {
["tubelib:tubeS"] = true,
@@ -32,8 +35,17 @@ local Tube = tubelib2.Tube:new({
tubelib.Tube = Tube
+local function ON_BLAST(id)
+ return function (pos)
+ local node = minetest.get_node(pos)
+ minetest.remove_node(pos)
+ Tube:after_dig_tube(pos, node)
+ return {id}
+ end
+end
+
minetest.register_node("tubelib:tubeS", {
- description = "Tubelib Tube",
+ description = S("Tubelib Tube"),
tiles = { -- Top, base, right, left, front, back
"tubelib_tube.png^[transformR90",
"tubelib_tube.png^[transformR90",
@@ -75,12 +87,13 @@ minetest.register_node("tubelib:tubeS", {
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
- groups = {choppy=2, cracky=3, stone=1},
+ groups = {choppy=2, cracky=3},
sounds = default.node_sound_wood_defaults(),
+ on_blast = ON_BLAST("tubelib:tubeS"),
})
minetest.register_node("tubelib:tubeA", {
- description = "Tubelib Tube",
+ description = S("Tubelib Tube"),
tiles = { -- Top, base, right, left, front, back
"tubelib_knee2.png",
"tubelib_hole2.png^[transformR180",
@@ -115,9 +128,10 @@ minetest.register_node("tubelib:tubeA", {
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
- groups = {choppy=2, cracky=3, stone=1, not_in_creative_inventory=1},
+ groups = {choppy=2, cracky=3, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
drop = "tubelib:tubeS",
+ on_blast = ON_BLAST("tubelib:tubeA"),
})
minetest.register_craft({
diff --git a/techpack_modpack/tubelib_addons1/autocrafter.lua b/techpack_modpack/tubelib_addons1/autocrafter.lua
index 4c9aa3d..91a3fab 100644
--- a/techpack_modpack/tubelib_addons1/autocrafter.lua
+++ b/techpack_modpack/tubelib_addons1/autocrafter.lua
@@ -3,9 +3,9 @@
Tubelib Addons
==============
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
The autocrafter is derived from pipeworks:
@@ -15,8 +15,10 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -47,7 +49,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:autocrafter",
node_name_active = "tubelib_addons1:autocrafter_active",
node_name_defect = "tubelib_addons1:autocrafter_defect",
- infotext_name = "Tubelib Autocrafter",
+ infotext_name = S("Tubelib Autocrafter"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -287,7 +289,7 @@ end
minetest.register_node("tubelib_addons1:autocrafter", {
- description = "Tubelib Autocrafter",
+ description = S("Tubelib Autocrafter"),
drawtype = "normal",
tiles = {
'tubelib_front.png',
@@ -312,10 +314,10 @@ minetest.register_node("tubelib_addons1:autocrafter", {
return inv:is_empty("dst") and inv:is_empty("src")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
autocrafterCache[minetest.hash_node_position(pos)] = nil
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
end,
on_rotate = screwdriver.disallow,
@@ -326,7 +328,6 @@ minetest.register_node("tubelib_addons1:autocrafter", {
allow_metadata_inventory_take = allow_metadata_inventory_take,
allow_metadata_inventory_move = allow_metadata_inventory_move,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -336,7 +337,7 @@ minetest.register_node("tubelib_addons1:autocrafter", {
})
minetest.register_node("tubelib_addons1:autocrafter_active", {
- description = "Tubelib Autocrafter",
+ description = S("Tubelib Autocrafter"),
drawtype = "normal",
tiles = {
'tubelib_front.png',
@@ -352,6 +353,9 @@ minetest.register_node("tubelib_addons1:autocrafter_active", {
},
},
},
+
+ diggable = false,
+ can_dig = function() return false end,
on_rotate = screwdriver.disallow,
on_timer = keep_running,
@@ -369,7 +373,7 @@ minetest.register_node("tubelib_addons1:autocrafter_active", {
})
minetest.register_node("tubelib_addons1:autocrafter_defect", {
- description = "Tubelib Autocrafter",
+ description = S("Tubelib Autocrafter"),
drawtype = "normal",
tiles = {
'tubelib_front.png',
diff --git a/techpack_modpack/tubelib_addons1/chest.lua b/techpack_modpack/tubelib_addons1/chest.lua
index c585b38..363eae3 100644
--- a/techpack_modpack/tubelib_addons1/chest.lua
+++ b/techpack_modpack/tubelib_addons1/chest.lua
@@ -3,15 +3,18 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
chest.lua
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
local PlayerActions = {}
local InventoryState = {}
@@ -74,7 +77,7 @@ local function formspec()
end
minetest.register_node("tubelib_addons1:chest", {
- description = "Tubelib Protected Chest",
+ description = S("Tubelib Protected Chest"),
tiles = {
-- up, down, right, left, back, front
"default_chest_top.png^tubelib_addons1_frame.png",
@@ -97,7 +100,7 @@ minetest.register_node("tubelib_addons1:chest", {
meta:set_string("number", number)
meta:set_string("owner", placer:get_player_name())
meta:set_string("formspec", formspec())
- meta:set_string("infotext", "Tubelib Protected Chest "..number)
+ meta:set_string("infotext", S("Tubelib Protected Chest").." "..number)
end,
can_dig = function(pos, player)
@@ -157,7 +160,7 @@ tubelib.register_node("tubelib_addons1:chest", {}, {
local meta = minetest.get_meta(pos)
meta:set_string("dest_num", payload)
local number = meta:get_string("number")
- meta:set_string("infotext", "Tubelib Protected Chest "..number.." connected with "..payload)
+ meta:set_string("infotext", S("Tubelib Protected Chest").." "..number.." "..S("connected with").." "..payload)
return true
end
else
diff --git a/techpack_modpack/tubelib_addons1/depends.txt b/techpack_modpack/tubelib_addons1/depends.txt
index f20452d..c1ea2c7 100644
--- a/techpack_modpack/tubelib_addons1/depends.txt
+++ b/techpack_modpack/tubelib_addons1/depends.txt
@@ -1,8 +1,10 @@
tubelib
default
bucket
-stairs?
-moreores?
-farming?
ethereal?
+farming?
+moreores?
+moretrees?
+skytest?
+stairs?
unified_inventory?
diff --git a/techpack_modpack/tubelib_addons1/detector.lua b/techpack_modpack/tubelib_addons1/detector.lua
index f7c5ad9..2bcce35 100644
--- a/techpack_modpack/tubelib_addons1/detector.lua
+++ b/techpack_modpack/tubelib_addons1/detector.lua
@@ -3,15 +3,17 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
detector.lua:
-
+
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
local function switch_on(pos)
if tubelib.data_not_corrupted(pos) then
@@ -42,7 +44,7 @@ end
minetest.register_node("tubelib_addons1:detector", {
- description = "Tubelib Detector",
+ description = S("Tubelib Detector"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -58,10 +60,10 @@ minetest.register_node("tubelib_addons1:detector", {
local own_num = tubelib.add_node(pos, "tubelib_addons1:detector")
meta:set_string("own_num", own_num)
meta:set_string("formspec", "size[7.5,3]"..
- "field[0.5,1;7,1;numbers;Insert destination node number(s);]" ..
- "button_exit[2,2;3,1;exit;Save]")
+ "field[0.5,1;7,1;numbers;"..S("Insert destination node number(s)")..";]" ..
+ "button_exit[2,2;3,1;exit;"..S("Save").."]")
meta:set_string("placer_name", placer:get_player_name())
- meta:set_string("infotext", "Tubelib Detector, unconfigured")
+ meta:set_string("infotext", S("Tubelib Detector, unconfigured"))
end,
on_receive_fields = function(pos, formname, fields, player)
@@ -69,17 +71,17 @@ minetest.register_node("tubelib_addons1:detector", {
if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers)
local own_num = meta:get_string("own_num")
- meta:set_string("infotext", "Tubelib Detector, connected")
+ meta:set_string("infotext", S("Tubelib Detector, connected"))
meta:set_string("formspec", "size[7.5,3]"..
- "field[0.5,1;7,1;numbers;Insert destination node number(s);"..fields.numbers.."]" ..
- "button_exit[2,2;3,1;exit;Save]")
+ "field[0.5,1;7,1;numbers;"..S("Insert destination node number(s)")..";"..fields.numbers.."]" ..
+ "button_exit[2,2;3,1;exit;"..S("Save").."]")
end
end,
-
+
after_dig_node = function(pos, oldnode, oldmetadata, digger)
tubelib.remove_node(pos)
end,
-
+
on_rotate = screwdriver.disallow,
paramtype = "light",
sunlight_propagates = true,
@@ -91,7 +93,7 @@ minetest.register_node("tubelib_addons1:detector", {
minetest.register_node("tubelib_addons1:detector_active", {
- description = "Tubelib Detector",
+ description = S("Tubelib Detector"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -108,7 +110,7 @@ minetest.register_node("tubelib_addons1:detector_active", {
after_dig_node = function(pos, oldnode, oldmetadata, digger)
tubelib.remove_node(pos)
end,
-
+
paramtype = "light",
light_source = 2,
sunlight_propagates = true,
@@ -130,7 +132,9 @@ minetest.register_craft({
tubelib.register_node("tubelib_addons1:detector", {"tubelib_addons1:detector_active"}, {
+ valid_sides = {"R","L"},
on_push_item = function(pos, side, item)
+ if side ~= "L" then return false end
local player_name = minetest.get_meta(pos):get_string("player_name")
if tubelib.push_items(pos, "R", item, player_name) then
switch_on(pos)
@@ -139,5 +143,5 @@ tubelib.register_node("tubelib_addons1:detector", {"tubelib_addons1:detector_act
return false
end,
is_pusher = true, -- is a pulling/pushing node
-})
+})
diff --git a/techpack_modpack/tubelib_addons1/fermenter.lua b/techpack_modpack/tubelib_addons1/fermenter.lua
index 0af9868..27f849b 100644
--- a/techpack_modpack/tubelib_addons1/fermenter.lua
+++ b/techpack_modpack/tubelib_addons1/fermenter.lua
@@ -3,20 +3,22 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
-
+
fermenter.lua
-
+
The Fermenter converts 3 leave items of any kind into one Bio Gas item,
needed by the Reformer to produce Bio Fuel.
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -46,7 +48,7 @@ end
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:fermenter",
node_name_defect = "tubelib_addons1:fermenter_defect",
- infotext_name = "Tubelib Fermenter",
+ infotext_name = S("Tubelib Fermenter"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -97,7 +99,8 @@ local function place_top(pos, facedir, placer)
return false
end
local node = minetest.get_node(pos)
- if node.name ~= "air" then
+ local def = minetest.registered_nodes[node.name]
+ if not def or not def.buildable_to then
return false
end
minetest.add_node(pos, {name="tubelib_addons1:fermenter_top", param2=facedir})
@@ -107,13 +110,13 @@ end
local function convert_leaves_to_biogas(pos, meta)
local inv = meta:get_inventory()
local biogas = ItemStack("tubelib_addons1:biogas")
-
+
-- Not enough output space?
if not inv:room_for_item("dst", biogas) then
State:blocked(pos, meta)
return
end
-
+
-- take NUM_LEAVES items
local items = {}
for i = 1, NUM_LEAVES do
@@ -128,14 +131,14 @@ local function convert_leaves_to_biogas(pos, meta)
end
end
end
-
+
-- put result into dst inventory
if #items == NUM_LEAVES then
inv:add_item("dst", biogas)
State:keep_running(pos, meta, COUNTDOWN_TICKS)
return
end
-
+
-- put leaves back to src inventory
for i = 1, #items do
inv:add_item("src", items[i])
@@ -160,7 +163,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:fermenter", {
- description = "Tubelib Fermenter",
+ description = S("Tubelib Fermenter"),
inventory_image = "tubelib_addons1_fermenter_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -176,39 +179,44 @@ minetest.register_node("tubelib_addons1:fermenter", {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, 24/16, 8/16 },
},
-
+
on_construct = function(pos)
local meta = M(pos)
local inv = meta:get_inventory()
inv:set_size('src', 9)
inv:set_size('dst', 9)
end,
-
+
after_place_node = function(pos, placer)
local facedir = minetest.dir_to_facedir(placer:get_look_dir(), false)
- if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) == false then
+ if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) then
+ local number = tubelib.add_node(pos, "tubelib_addons1:fermenter")
+ State:node_init(pos, number)
+ else
minetest.remove_node(pos)
- return
+ minetest.chat_send_player(placer:get_player_name(), S("Fermenter will not fit there"))
+ return true
end
- local number = tubelib.add_node(pos, "tubelib_addons1:fermenter")
- State:node_init(pos, number)
end,
-- the fermenter needs 'on_dig' to be able to remove the upper node
- on_dig = function(pos, node, puncher, pointed_thing)
+ on_dig = function(pos, node, player)
+ local pos_above = vector.add(pos, vector.new(0, 1, 0))
+ local player_name = player:get_player_name()
+
+ if minetest.is_protected(pos, player_name) or minetest.is_protected(pos_above, player_name) then
+ return
+ end
+
local meta = M(pos)
local inv = meta:get_inventory()
if inv:is_empty("dst") and inv:is_empty("src") then
- minetest.node_dig(pos, node, puncher, pointed_thing)
- minetest.remove_node({x=pos.x, y=pos.y+1, z=pos.z})
+ State:on_dig_node(pos, node, player)
+ tubelib.remove_node(pos)
+ minetest.remove_node(pos_above)
end
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- tubelib.remove_node(pos)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
- end,
-
on_rotate = screwdriver.disallow,
on_timer = keep_running,
on_receive_fields = on_receive_fields,
@@ -216,7 +224,6 @@ minetest.register_node("tubelib_addons1:fermenter", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -226,7 +233,7 @@ minetest.register_node("tubelib_addons1:fermenter", {
})
minetest.register_node("tubelib_addons1:fermenter_defect", {
- description = "Tubelib Fermenter defect",
+ description = S("Tubelib Fermenter defect"),
inventory_image = "tubelib_addons1_fermenter_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -242,39 +249,48 @@ minetest.register_node("tubelib_addons1:fermenter_defect", {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, 24/16, 8/16 },
},
-
+
on_construct = function(pos)
local meta = M(pos)
local inv = meta:get_inventory()
inv:set_size('src', 9)
inv:set_size('dst', 9)
end,
-
+
after_place_node = function(pos, placer)
local facedir = minetest.dir_to_facedir(placer:get_look_dir(), false)
- if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) == false then
+ if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) then
+ local number = tubelib.add_node(pos, "tubelib_addons1:fermenter")
+ State:node_init(pos, number)
+ State:defect(pos, M(pos))
+ else
minetest.remove_node(pos)
- return
+ minetest.chat_send_player(placer:get_player_name(), S("Fermenter will not fit there"))
+ return true
end
- local number = tubelib.add_node(pos, "tubelib_addons1:fermenter")
- State:node_init(pos, number)
- State:defect(pos, M(pos))
end,
-- the fermenter needs 'on_dig' to be able to remove the upper node
on_dig = function(pos, node, puncher, pointed_thing)
+ local pos_above = vector.add(pos, vector.new(0, 1, 0))
+ local puncher_name = puncher:get_player_name()
+
+ if minetest.is_protected(pos, puncher_name) or minetest.is_protected(pos_above, puncher_name) then
+ return
+ end
+
local meta = M(pos)
local inv = meta:get_inventory()
if inv:is_empty("dst") and inv:is_empty("src") then
minetest.node_dig(pos, node, puncher, pointed_thing)
- minetest.remove_node({x=pos.x, y=pos.y+1, z=pos.z})
+ minetest.remove_node(pos_above)
end
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
tubelib.remove_node(pos)
end,
-
+
on_rotate = screwdriver.disallow,
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_move = allow_metadata_inventory_move,
@@ -289,7 +305,7 @@ minetest.register_node("tubelib_addons1:fermenter_defect", {
})
minetest.register_node("tubelib_addons1:fermenter_top", {
- description = "Tubelib Fermenter Top",
+ description = S("Tubelib Fermenter Top"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -309,32 +325,37 @@ minetest.register_node("tubelib_addons1:fermenter_top", {
})
minetest.register_craftitem("tubelib_addons1:biogas", {
- description = "Bio Gas",
+ description = S("Bio Gas"),
inventory_image = "tubelib_addons1_biogas.png",
})
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("fermenting", {
- description = "Fermenter",
+ description = S("Fermenter"),
icon = "tubelib_addons1_fermenter_inventory.png",
width = 2,
height = 2,
})
unified_inventory.register_craft_type("reforming", {
- description = "Reformer",
+ description = S("Reformer"),
icon = "tubelib_addons1_reformer_inventory.png",
width = 2,
height = 2,
})
+
+ local leaves_table = {}
+ for i = 1, NUM_LEAVES do
+ table.insert(leaves_table, "group:leaves")
+ end
unified_inventory.register_craft({
- items = {"group:leaves", "group:leaves"},
- output = "tubelib_addons1:biogas",
+ items = leaves_table,
+ output = "tubelib_addons1:biogas",
type = "fermenting"
})
unified_inventory.register_craft({
- items = {"tubelib_addons1:biogas", "tubelib_addons1:biogas",
- "tubelib_addons1:biogas", "tubelib_addons1:biogas"},
- output = "tubelib_addons1:biofuel",
+ items = {"tubelib_addons1:biogas", "tubelib_addons1:biogas",
+ "tubelib_addons1:biogas", "tubelib_addons1:biogas"},
+ output = "tubelib_addons1:biofuel",
type = "reforming"
})
end
@@ -373,4 +394,4 @@ tubelib.register_node("tubelib_addons1:fermenter", {"tubelib_addons1:fermenter_d
on_node_repair = function(pos)
return State:on_node_repair(pos)
end,
-})
+})
diff --git a/techpack_modpack/tubelib_addons1/funnel.lua b/techpack_modpack/tubelib_addons1/funnel.lua
index 108f520..4d17bab 100644
--- a/techpack_modpack/tubelib_addons1/funnel.lua
+++ b/techpack_modpack/tubelib_addons1/funnel.lua
@@ -3,15 +3,18 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
funnel.lua
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
@@ -60,7 +63,7 @@ local function scan_for_objects(pos, elapsed)
end
minetest.register_node("tubelib_addons1:funnel", {
- description = "Tubelib Funnel",
+ description = S("Tubelib Funnel"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_funnel_top.png',
@@ -136,6 +139,7 @@ minetest.register_craft({
tubelib.register_node("tubelib_addons1:funnel", {}, {
+ invalid_sides = {"U"},
on_pull_item = function(pos, side)
local meta = minetest.get_meta(pos)
return tubelib.get_item(meta, "main")
diff --git a/techpack_modpack/tubelib_addons1/grinder.lua b/techpack_modpack/tubelib_addons1/grinder.lua
index 693c402..e3bc265 100644
--- a/techpack_modpack/tubelib_addons1/grinder.lua
+++ b/techpack_modpack/tubelib_addons1/grinder.lua
@@ -3,9 +3,9 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
grinder.lua
@@ -14,8 +14,10 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -49,7 +51,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:grinder",
node_name_active = "tubelib_addons1:grinder_active",
node_name_defect = "tubelib_addons1:grinder_defect",
- infotext_name = "Tubelib Grinder",
+ infotext_name = S("Tubelib Grinder"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -81,7 +83,7 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
end
local function grinding(pos, meta, inv)
- for _,stack in ipairs(inv:get_list("src")) do
+ for _,stack in ipairs(inv:get_list("src") or {}) do
if not stack:is_empty() then
local name = stack:get_name()
if Recipes[name] then
@@ -120,7 +122,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:grinder", {
- description = "Tubelib Grinder",
+ description = S("Tubelib Grinder"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_grinder.png',
@@ -147,11 +149,12 @@ minetest.register_node("tubelib_addons1:grinder", {
return inv:is_empty("dst") and inv:is_empty("src")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
end,
+
on_rotate = screwdriver.disallow,
on_timer = keep_running,
on_receive_fields = on_receive_fields,
@@ -159,7 +162,6 @@ minetest.register_node("tubelib_addons1:grinder", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -170,7 +172,7 @@ minetest.register_node("tubelib_addons1:grinder", {
minetest.register_node("tubelib_addons1:grinder_active", {
- description = "Tubelib Grinder",
+ description = S("Tubelib Grinder"),
tiles = {
-- up, down, right, left, back, front
{
@@ -191,6 +193,9 @@ minetest.register_node("tubelib_addons1:grinder_active", {
"tubelib_front.png",
},
+ diggable = false,
+ can_dig = function() return false end,
+
on_rotate = screwdriver.disallow,
on_timer = keep_running,
on_receive_fields = on_receive_fields,
@@ -207,7 +212,7 @@ minetest.register_node("tubelib_addons1:grinder_active", {
})
minetest.register_node("tubelib_addons1:grinder_defect", {
- description = "Tubelib Grinder",
+ description = S("Tubelib Grinder"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_grinder.png',
@@ -296,7 +301,7 @@ tubelib.register_node("tubelib_addons1:grinder",
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("grinding", {
- description = "Grinding",
+ description = S("Grinding"),
icon = 'tubelib_addons1_grinder.png',
width = 1,
height = 1,
@@ -310,34 +315,162 @@ function tubelib.add_grinder_recipe(recipe)
recipe.type = "grinding"
unified_inventory.register_craft(recipe)
end
-end
-
-
-tubelib.add_grinder_recipe({input="default:cobble", output="default:gravel"})
-tubelib.add_grinder_recipe({input="default:desert_cobble", output="default:gravel"})
-tubelib.add_grinder_recipe({input="default:mossycobble", output="default:gravel"})
-tubelib.add_grinder_recipe({input="default:gravel", output="default:sand"})
-tubelib.add_grinder_recipe({input="gravelsieve:sieved_gravel", output="default:sand"})
-tubelib.add_grinder_recipe({input="default:coral_skeleton", output="default:silver_sand"})
-tubelib.add_grinder_recipe({input="tubelib:basalt_stone", output="default:silver_sand"})
-
-if minetest.global_exists("skytest") then
- tubelib.add_grinder_recipe({input="default:desert_sand", output="skytest:dust"})
- tubelib.add_grinder_recipe({input="default:silver_sand", output="skytest:dust"})
- tubelib.add_grinder_recipe({input="default:sand", output="skytest:dust"})
- tubelib.add_grinder_recipe({input="skytest:dust 12", output="skytest:powder"})
-else
- tubelib.add_grinder_recipe({input="default:desert_sand", output="default:clay"})
- tubelib.add_grinder_recipe({input="default:silver_sand", output="default:clay"})
- tubelib.add_grinder_recipe({input="default:sand", output="default:clay"})
end
-tubelib.add_grinder_recipe({input="default:sandstone", output="default:sand 4"})
-tubelib.add_grinder_recipe({input="default:desert_sandstone", output="default:desert_sand 4"})
-tubelib.add_grinder_recipe({input="default:silver_sandstone", output="default:silver_sand 4"})
+local function remove_unified_inventory_recipe(recipe)
+ if recipe.input and recipe.output then
+ local output_name = ItemStack(recipe.output):get_name()
+ local crafts = unified_inventory.crafts_for.recipe[output_name]
+ if crafts then
+ for i, craft in ipairs(crafts) do
+ if craft.type == recipe.type
+ and ItemStack(craft.output):get_name() == output_name
+ and #craft.items == 1
+ and craft.items[1] == recipe.input
+ then
+ table.remove(crafts, i)
+ break
+ end
+ end
+ end
+ elseif recipe.input then
+ for output_name, crafts in pairs(unified_inventory.crafts_for.recipe) do
+ for i, craft in ipairs(crafts) do
+ if craft.type == recipe.type
+ and #craft.items == 1
+ and craft.items[1] == recipe.input
+ then
+ table.remove(crafts, i)
+ break
+ end
+ end
+ end
+ elseif recipe.output then
+ local output_name = ItemStack(recipe.output):get_name()
+ local crafts = unified_inventory.crafts_for.recipe[output_name]
+ if crafts then
+ for i, craft in ipairs(crafts) do
+ if craft.type == recipe.type
+ and ItemStack(craft.output):get_name() == output_name then
+ table.remove(crafts, i)
+ break
+ end
+ end
+ end
+ end
+end
+
+function tubelib.remove_grinder_recipe(recipe)
+ if recipe.input and recipe.output then
+ if Recipes[recipe.input]:get_name() ~= ItemStack(recipe.output):get_name() then
+ return
+ end
+ Recipes[recipe.input] = nil
+ elseif recipe.input then
+ Recipes[recipe.input] = nil
+ elseif recipe.output then
+ local output_name = ItemStack(recipe.output):get_name()
+ for input_name, output in pairs(Recipes) do
+ if output:get_name() == output_name then
+ Recipes[input_name] = nil
+ end
+ end
+ end
+ if minetest.global_exists("unified_inventory") then
+ remove_unified_inventory_recipe({
+ input = recipe.input,
+ output = recipe.output,
+ type = "grinding"
+ })
+ end
+end
+
+for k,v in pairs({
+ ["default:cobble"] = "default:gravel",
+ ["default:desert_cobble"] = "default:gravel",
+ ["default:mossycobble"] = "default:gravel",
+ ["default:gravel"] = "default:sand",
+ ["gravelsieve:sieved_gravel"] = "default:sand",
+ ["default:coral_skeleton"] = "default:silver_sand",
+ ["tubelib:basalt_stone"] = "default:silver_sand",
+ ["default:sandstone"] = "default:sand 4",
+ ["default:desert_sandstone"] = "default:desert_sand 4",
+ ["default:silver_sandstone"] = "default:silver_sand 4",
+ ["default:tree"] = "default:leaves 8",
+ ["default:jungletree"] = "default:jungleleaves 8",
+ ["default:pine_tree"] = "default:pine_needles 8",
+ ["default:acacia_tree"] = "default:acacia_leaves 8",
+ ["default:aspen_tree"] = "default:aspen_leaves 8"}
+) do
+ tubelib.add_grinder_recipe({input=k, output=v})
+end
+
+if minetest.global_exists("skytest") then
+ temprec = {
+["default:desert_sand"] = "skytest:dust",
+["default:silver_sand"] = "skytest:dust",
+["default:sand"] = "skytest:dust",
+["skytest:dust 12"] = "skytest:powder"}
+else
+ temprec = {
+["default:desert_sand"] = "default:clay",
+["default:silver_sand"] = "default:clay",
+["default:sand"] = "default:clay"}
+end
+
+for k,v in pairs(temprec) do tubelib.add_grinder_recipe({input=k, output=v}) end
+temprec = nil
+
+if minetest.get_modpath("underch") then
+ for regnodename,v in pairs(minetest.registered_nodes) do
+ if string.find(regnodename, "underch:") then
+ if string.find(regnodename, "_cobble") and not string.find(regnodename, "_wall") then
+ print("tubelib.add_grinder_recipe: " .. regnodename)
+ tubelib.add_grinder_recipe({input=regnodename, output="default:gravel"})
+ end
+ end
+ end
+end
+
+--Ethereal trees
+if minetest.get_modpath("ethereal") then
+ for k,v in pairs({
+ ["ethereal:sakura_trunk"] = "ethereal:sakura_leaves 8",
+ ["ethereal:willow_trunk"] = "ethereal:willow_twig 8",
+ ["ethereal:redwood_trunk"] = "ethereal:redwood_leaves 8",
+ ["ethereal:frost_tree"] = "ethereal:frost_leaves 8",
+ ["ethereal:yellow_trunk"] = "ethereal:yellowleaves 8",
+ ["ethereal:palm_trunk"] = "ethereal:palmleaves 8",
+ ["ethereal:banana_trunk"] = "ethereal:bananaleaves 8",
+ ["ethereal:birch_trunk"] = "ethereal:birch_leaves 8",
+ ["ethereal:bamboo"] = "ethereal:bamboo_leaves 8",
+ ["ethereal:olive_trunk"] = "ethereal:olive_leaves 8"}
+ ) do tubelib.add_grinder_recipe({input=k, output=v}) end
+end
+
+-- Cool Trees
+for _,v in pairs({
+ "baldcypress",
+ "bamboo",
+ "birch",
+ "cherrytree",
+ "chestnuttree",
+ "clementinetree",
+ "ebony",
+ "hollytree",
+ "larch",
+ "lemontree",
+ "mahogany",
+ "maple",
+ "oak",
+ "palm",
+ "plumtree",
+ "pomegranate",
+ "willow"
+ }) do
+ if minetest.get_modpath(v) then tubelib.add_grinder_recipe({input=v .. ":trunk", output=v .. ":leaves 8"}) end
+end
+
+if minetest.get_modpath("jacaranda") then tubelib.add_grinder_recipe({input="jacaranda:trunk", output = "jacaranda:blossom_leaves 8"}) end
+
-tubelib.add_grinder_recipe({input="default:tree", output="default:leaves 8"})
-tubelib.add_grinder_recipe({input="default:jungletree", output="default:jungleleaves 8"})
-tubelib.add_grinder_recipe({input="default:pine_tree", output="default:pine_needles 8"})
-tubelib.add_grinder_recipe({input="default:acacia_tree", output="default:acacia_leaves 8"})
-tubelib.add_grinder_recipe({input="default:aspen_tree", output="default:aspen_leaves 8"})
diff --git a/techpack_modpack/tubelib_addons1/harvester.lua b/techpack_modpack/tubelib_addons1/harvester.lua
index 8213d28..9e0dffc 100644
--- a/techpack_modpack/tubelib_addons1/harvester.lua
+++ b/techpack_modpack/tubelib_addons1/harvester.lua
@@ -3,9 +3,9 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2021 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
harvester.lua
@@ -19,13 +19,15 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local CYCLE_TIME = 6
-local MAX_HEIGHT = 18 -- harvesting altitude
+local START_HEIGHT = 18 -- harvesting altitude
local MAX_DIAMETER = 33
local BURNING_TIME = 20 -- fuel
local STANDBY_TICKS = 4 -- used for blocked state
@@ -33,13 +35,14 @@ local COUNTDOWN_TICKS = 2
local OFFSET = 5 -- for uneven terrains
-- start on top of the base block
-local function working_start_pos(pos)
+local function working_start_pos(pos, altitude)
local working_pos = table.copy(pos)
- working_pos.y = working_pos.y + MAX_HEIGHT
+ working_pos.y = working_pos.y + (altitude or START_HEIGHT)
return working_pos
end
local Radius2Idx = {[4]=1 ,[6]=2, [8]=3, [10]=4, [12]=5, [14]=6, [16]=7}
+local Altitude2Idx = {[-2]=1 ,[-1]=2, [0]=3, [1]=4, [2]=5, [4]=6, [6]=7, [8]=8, [10]=9, [14]=10, [18]=11}
local function formspec(self, pos, meta)
-- some recalculations
@@ -50,14 +53,17 @@ local function formspec(self, pos, meta)
fuel = 0
end
local radius = Radius2Idx[this.radius] or 2
+ local altitude = Altitude2Idx[this.altitude or START_HEIGHT] or 11
return "size[9,8]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"dropdown[0,0;1.5;radius;4,6,8,10,12,14,16;"..radius.."]"..
- "label[1.6,0.2;Area radius]"..
- "checkbox[0,1;endless;Run endless;"..endless.."]"..
+ "label[1.6,0.2;"..S("Area radius").."]"..
+ "dropdown[0,1;1.5;altitude;-2,-1,0,1,2,4,6,8,10,14,18;"..altitude.."]"..
+ "label[1.6,1.2;"..S("Altitude ").."]"..
+ "checkbox[0,2;endless;"..S("Run endless")..";"..endless.."]"..
"list[context;main;5,0;4,4;]"..
"list[context;fuel;1.5,3;1,1;]"..
"item_image[1.5,3;1,1;tubelib_addons1:biofuel]"..
@@ -72,7 +78,7 @@ end
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:harvester_base",
node_name_defect = "tubelib_addons1:harvester_defect",
- infotext_name = "Tubelib Harvester",
+ infotext_name = S("Tubelib Harvester"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -80,7 +86,7 @@ local State = tubelib.NodeStates:new({
on_start = function(pos, meta, oldstate)
local this = minetest.deserialize(meta:get_string("this"))
this.idx = 0
- this.working_pos = working_start_pos(pos)
+ this.working_pos = working_start_pos(pos, this.altitude)
meta:set_string("this", minetest.serialize(this))
end,
formspec_func = formspec,
@@ -117,7 +123,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
local inv = M(pos):get_inventory()
if listname == "main" then
return stack:get_count()
- elseif listname == "fuel" and stack:get_name() == "tubelib_addons1:biofuel" then
+ elseif listname == "fuel" and tubelib.is_fuel(stack) then
return stack:get_count()
end
return 0
@@ -145,6 +151,16 @@ local function remove_all_sapling_items(pos)
end
end
+local function is_plantable_ground(node)
+ if minetest.get_item_group(node.name, "soil") ~= 0 then
+ return true
+ end
+ if minetest.get_item_group(node.name, "sand") ~= 0 then
+ return true
+ end
+ return false
+end
+
-- Remove wood/leave nodes and place sapling if necessary
-- Return false if inventory is full
-- else return true
@@ -161,7 +177,7 @@ local function remove_or_replace_node(this, pos, inv, node, order)
minetest.remove_node(pos)
inv:add_item("main", ItemStack(order.drop))
this.num_items = this.num_items + 1
- if tubelib_addons1.GroundNodes[next_node.name] ~= nil and order.plant then -- hit the ground?
+ if is_plantable_ground(next_node) and order.plant then -- hit the ground?
minetest.set_node(pos, {name=order.plant, paramtype2 = "wallmounted", param2=1})
if order.t1 ~= nil then
-- We have to simulate "on_place" and start the timer by hand
@@ -178,7 +194,12 @@ end
-- check the fuel level and return false if empty
local function check_fuel(pos, this, meta)
if this.fuel <= 0 then
- if tubelib.get_this_item(meta, "fuel", 1) == nil then
+ local fuel_item = tubelib.get_this_item(meta, "fuel", 1)
+ if fuel_item == nil then
+ return false
+ end
+ if not tubelib.is_fuel(fuel_item) then
+ tubelib.put_item(meta, "fuel", fuel_item)
return false
end
this.fuel = BURNING_TIME
@@ -193,7 +214,7 @@ local function calc_new_pos(pos, this, meta)
if this.idx >= this.max then
if this.endless == 1 then
this.idx = 0
- this.working_pos = working_start_pos(pos)
+ this.working_pos = working_start_pos(pos, this.altitude)
return true
else
return false
@@ -210,7 +231,7 @@ local function harvest_field(this, meta)
local inv = meta:get_inventory()
local pos = table.copy(this.working_pos)
local start_y_pos = pos.y - 1
- local stop_y_pos = pos.y - MAX_HEIGHT - OFFSET
+ local stop_y_pos = pos.y - (this.altitude or START_HEIGHT) - OFFSET
if minetest.is_protected(pos, this.owner) then
return true
end
@@ -220,7 +241,7 @@ local function harvest_field(this, meta)
if node and node.name ~= "air" then
local order = tubelib_addons1.FarmingNodes[node.name] or tubelib_addons1.Flowers[node.name]
if order then
- if not remove_or_replace_node(this, pos, inv, node, order) then
+ if not minetest.is_protected(pos, this.owner) and not remove_or_replace_node(this, pos, inv, node, order) then
return false
end
else
@@ -254,8 +275,8 @@ local function keep_running(pos, elapsed)
if harvest_field(this, meta) then
meta:set_string("this", minetest.serialize(this))
meta:set_string("infotext",
- "Tubelib Harvester "..this.number..
- ": running ("..this.idx.."/"..this.max..")")
+ S("Tubelib Harvester").." "..this.number..
+ S(": running (")..this.idx.."/"..this.max..")")
State:keep_running(pos, meta, COUNTDOWN_TICKS, this.num_items)
else
State:blocked(pos, meta)
@@ -280,6 +301,7 @@ local function on_receive_fields(pos, formname, fields, player)
local meta = M(pos)
local this = minetest.deserialize(meta:get_string("this"))
local radius = this.radius
+ local altitude = this.altitude or START_HEIGHT
if fields.radius ~= nil then
radius = tonumber(fields.radius)
@@ -291,6 +313,15 @@ local function on_receive_fields(pos, formname, fields, player)
State:stop(pos, meta)
end
+ if fields.altitude ~= nil then
+ altitude = tonumber(fields.altitude)
+ end
+ if altitude ~= this.altitude then
+ this.altitude = altitude
+ meta:set_string("this", minetest.serialize(this))
+ State:stop(pos, meta)
+ end
+
if fields.endless ~= nil then
this.endless = fields.endless == "true" and 1 or 0
end
@@ -300,7 +331,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:harvester_base", {
- description = "Tubelib Harvester Base",
+ description = S("Tubelib Harvester Base"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -317,7 +348,7 @@ minetest.register_node("tubelib_addons1:harvester_base", {
local this = {
number = number,
owner = placer:get_player_name(),
- working_pos = working_start_pos(pos),
+ working_pos = working_start_pos(pos, START_HEIGHT),
fuel = 0,
endless = 0,
radius = 6,
@@ -333,11 +364,11 @@ minetest.register_node("tubelib_addons1:harvester_base", {
return false
end
local inv = M(pos):get_inventory()
- return inv:is_empty("main")
+ return inv:is_empty("main") and inv:is_empty("fuel")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
end,
@@ -347,7 +378,6 @@ minetest.register_node("tubelib_addons1:harvester_base", {
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_take = allow_metadata_inventory_take,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -357,7 +387,7 @@ minetest.register_node("tubelib_addons1:harvester_base", {
})
minetest.register_node("tubelib_addons1:harvester_defect", {
- description = "Tubelib Harvester Base",
+ description = S("Tubelib Harvester Base"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -376,7 +406,7 @@ minetest.register_node("tubelib_addons1:harvester_defect", {
local this = {
number = number,
owner = placer:get_player_name(),
- working_pos = working_start_pos(pos),
+ working_pos = working_start_pos(pos, START_HEIGHT),
fuel = 0,
endless = 0,
radius = 6,
@@ -394,7 +424,7 @@ minetest.register_node("tubelib_addons1:harvester_defect", {
return false
end
local inv = M(pos):get_inventory()
- return inv:is_empty("main")
+ return inv:is_empty("main") and inv:is_empty("fuel")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@@ -432,6 +462,9 @@ tubelib.register_node("tubelib_addons1:harvester_base", {"tubelib_addons1:harves
return tubelib.get_item(M(pos), "main")
end,
on_push_item = function(pos, side, item)
+ if not tubelib.is_fuel(item) then
+ return false
+ end
return tubelib.put_item(M(pos), "fuel", item)
end,
on_unpull_item = function(pos, side, item)
@@ -468,7 +501,7 @@ minetest.register_lbm({
local meta = M(pos)
local this = minetest.deserialize(meta:get_string("this"))
if this then
- this.working_pos = this.copter_pos or working_start_pos(pos)
+ this.working_pos = this.copter_pos or working_start_pos(pos, this.altitude)
meta:set_string("this", minetest.serialize(this))
end
end
diff --git a/techpack_modpack/tubelib_addons1/init.lua b/techpack_modpack/tubelib_addons1/init.lua
index c444cc9..f95bf4e 100644
--- a/techpack_modpack/tubelib_addons1/init.lua
+++ b/techpack_modpack/tubelib_addons1/init.lua
@@ -3,13 +3,17 @@
Tubelib Addons 1
================
- Copyright (C) 2017,2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
]]--
+tubelib_addons1 = {}
+
+-- Load support for I18n
+tubelib_addons1.S = minetest.get_translator("tubelib_addons1")
dofile(minetest.get_modpath("tubelib_addons1") .. "/quarry.lua")
dofile(minetest.get_modpath("tubelib_addons1") .. "/grinder.lua")
@@ -22,4 +26,5 @@ dofile(minetest.get_modpath("tubelib_addons1") .. '/funnel.lua')
dofile(minetest.get_modpath("tubelib_addons1") .. "/pusher_fast.lua")
dofile(minetest.get_modpath("tubelib_addons1") .. "/detector.lua")
dofile(minetest.get_modpath("tubelib_addons1") .. '/chest.lua')
-dofile(minetest.get_modpath("tubelib_addons1") .. '/liquidsampler.lua')
\ No newline at end of file
+dofile(minetest.get_modpath("tubelib_addons1") .. '/liquidsampler.lua')
+dofile(minetest.get_modpath("tubelib_addons1") .. '/lbms.lua')
diff --git a/techpack_modpack/tubelib_addons1/lbms.lua b/techpack_modpack/tubelib_addons1/lbms.lua
new file mode 100644
index 0000000..7816fbf
--- /dev/null
+++ b/techpack_modpack/tubelib_addons1/lbms.lua
@@ -0,0 +1,67 @@
+local bottoms_by_top = {
+ ["tubelib_addons1:fermenter_top"] = {"tubelib_addons1:fermenter", "tubelib_addons1:fermenter_defect"},
+ ["tubelib_addons1:reformer_top"] = {"tubelib_addons1:reformer", "tubelib_addons1:reformer_defect"},
+}
+
+local top_by_bottom = {
+ ["tubelib_addons1:fermenter"] = "tubelib_addons1:fermenter_top",
+ ["tubelib_addons1:fermenter_defect"] = "tubelib_addons1:fermenter_top",
+ ["tubelib_addons1:reformer"] = "tubelib_addons1:reformer_top",
+ ["tubelib_addons1:reformer_defect"] = "tubelib_addons1:reformer_top",
+}
+
+-- remove tops of multiblocks which aren't over the bottom; happens due to bugs or worldedit
+minetest.register_lbm({
+ label = "Remove detached tops of multiblocks",
+ name = "tubelib_addons1:remove_detached_tops",
+ nodenames = {
+ "tubelib_addons1:fermenter_top",
+ "tubelib_addons1:reformer_top",
+ },
+ run_at_every_load = true,
+ action = function(pos, node)
+ local bottoms = bottoms_by_top[node.name]
+ local pos_under = vector.subtract(pos, vector.new(0, 1, 0))
+ local node_under = minetest.get_node_or_nil(pos_under)
+
+ if not node_under then
+ -- not loaded
+ return
+ end
+
+ local node_under_name = node_under.name
+
+ for _, bottom in ipairs(bottoms) do
+ if node_under_name == bottom then
+ -- has an acceptable bottom
+ return
+ end
+ end
+
+ minetest.remove_node(pos)
+ end
+})
+
+-- fix multiblocks with missing tops; happens due to bugs or worldedit
+minetest.register_lbm({
+ label = "Fix missing tops of multiblocks",
+ name = "tubelib_addons1:fix_missing_tops",
+ nodenames = {
+ "tubelib_addons1:fermenter",
+ "tubelib_addons1:fermenter_defect",
+ "tubelib_addons1:reformer",
+ "tubelib_addons1:reformer_defect",
+ },
+ run_at_every_load = true,
+ action = function(pos, node)
+ local pos_above = vector.add(pos, vector.new(0, 1, 0))
+ local node_above = minetest.get_node(pos_above)
+
+ if node_above.name ~= "air" then
+ return
+ end
+
+ local top = top_by_bottom[node.name]
+ minetest.add_node(pos_above, {name=top, param2=node.param2})
+ end
+})
diff --git a/techpack_modpack/tubelib_addons1/liquidsampler.lua b/techpack_modpack/tubelib_addons1/liquidsampler.lua
index d6b1812..133d33f 100644
--- a/techpack_modpack/tubelib_addons1/liquidsampler.lua
+++ b/techpack_modpack/tubelib_addons1/liquidsampler.lua
@@ -3,17 +3,19 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
liquidsampler.lua
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -43,7 +45,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:liquidsampler",
node_name_active = "tubelib_addons1:liquidsampler_active",
node_name_defect = "tubelib_addons1:liquidsampler_defect",
- infotext_name = "Liquid Sampler",
+ infotext_name = S("Liquid Sampler"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -80,10 +82,10 @@ local function sample_liquid(pos, meta)
inv:add_item("dst", ItemStack(giving_back))
State:keep_running(pos, meta, COUNTDOWN_TICKS)
else
- State:idle(pos, meta)
+ State:blocked(pos, meta)
end
else
- State:fault(pos, meta)
+ State:idle(pos, meta)
end
State:idle(pos, meta)
end
@@ -128,7 +130,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:liquidsampler", {
- description = "Liquid Sampler",
+ description = S("Liquid Sampler"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -159,8 +161,8 @@ minetest.register_node("tubelib_addons1:liquidsampler", {
return inv:is_empty("dst") and inv:is_empty("src")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
end,
@@ -171,7 +173,6 @@ minetest.register_node("tubelib_addons1:liquidsampler", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -181,7 +182,7 @@ minetest.register_node("tubelib_addons1:liquidsampler", {
})
minetest.register_node("tubelib_addons1:liquidsampler_active", {
- description = "Liquid Sampler",
+ description = S("Liquid Sampler"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -201,6 +202,9 @@ minetest.register_node("tubelib_addons1:liquidsampler_active", {
'tubelib_addons1_liquidsampler.png',
},
+ diggable = false,
+ can_dig = function() return false end,
+
on_rotate = screwdriver.disallow,
on_timer = keep_running,
on_receive_fields = on_receive_fields,
@@ -217,7 +221,7 @@ minetest.register_node("tubelib_addons1:liquidsampler_active", {
})
minetest.register_node("tubelib_addons1:liquidsampler_defect", {
- description = "Liquid Sampler",
+ description = S("Liquid Sampler"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -277,6 +281,7 @@ minetest.register_craft({
tubelib.register_node("tubelib_addons1:liquidsampler",
{"tubelib_addons1:liquidsampler_active", "tubelib_addons1:liquidsampler_defect"}, {
+ invalid_sides = {"L"},
on_pull_item = function(pos, side)
return tubelib.get_item(M(pos), "dst")
end,
diff --git a/techpack_modpack/tubelib_addons1/locale/template.txt b/techpack_modpack/tubelib_addons1/locale/template.txt
new file mode 100644
index 0000000..92a216d
--- /dev/null
+++ b/techpack_modpack/tubelib_addons1/locale/template.txt
@@ -0,0 +1,76 @@
+# textdomain: tubelib_addons1
+
+
+
+### autocrafter.lua ###
+
+Tubelib Autocrafter=
+
+### chest.lua ###
+
+Tubelib Protected Chest=
+connected with=
+
+### detector.lua ###
+
+Insert destination node number(s)=
+Save=
+Tubelib Detector=
+Tubelib Detector, connected=
+Tubelib Detector, unconfigured=
+
+### fermenter.lua ###
+
+Bio Gas=
+Fermenter=
+Fermenter will not fit there=
+Reformer=
+Tubelib Fermenter=
+Tubelib Fermenter Top=
+Tubelib Fermenter defect=
+
+### funnel.lua ###
+
+Tubelib Funnel=
+
+### grinder.lua ###
+
+Grinding=
+Tubelib Grinder=
+
+### harvester.lua ###
+
+: running (=
+Altitude =
+Area radius=
+Tubelib Harvester=
+Tubelib Harvester Base=
+
+### harvester.lua ###
+### quarry.lua ###
+
+Run endless=
+
+### liquidsampler.lua ###
+
+Liquid Sampler=
+
+### pusher_fast.lua ###
+
+Fast Pusher=
+
+### quarry.lua ###
+
+Digging depth=
+Start level=
+Tubelib Quarry=
+[Tubelib Quarry] Area is protected!=
+running=
+
+### reformer.lua ###
+
+Bio Fuel=
+Reformer will not fit there=
+Tubelib Reformer=
+Tubelib Reformer Top=
+Tubelib Reformer defect=
diff --git a/techpack_modpack/tubelib_addons1/locale/tubelib_addons1.de.tr b/techpack_modpack/tubelib_addons1/locale/tubelib_addons1.de.tr
new file mode 100644
index 0000000..69f795e
--- /dev/null
+++ b/techpack_modpack/tubelib_addons1/locale/tubelib_addons1.de.tr
@@ -0,0 +1,76 @@
+# textdomain: tubelib_addons1
+
+
+
+### autocrafter.lua ###
+
+Tubelib Autocrafter=Tubelib Autocrafter
+
+### chest.lua ###
+
+Tubelib Protected Chest=Tubelib geschützte Kiste
+connected with=verbunden mit
+
+### detector.lua ###
+
+Insert destination node number(s)=Geben Sie die Zielknotennummer(n) ein.
+Save=Speichern
+Tubelib Detector=Tubelib Detektor
+Tubelib Detector, connected=Tubelib Detektor, verbunden
+Tubelib Detector, unconfigured=Tubelib Detektor, nicht konfiguriert
+
+### fermenter.lua ###
+
+Bio Gas=Biogas
+Fermenter=Fermenter
+Fermenter will not fit there=Fermenter wird dort nicht passen
+Reformer=Reformer
+Tubelib Fermenter=Tubelib Fermenter
+Tubelib Fermenter Top=Tubelib Fermenter Oberteil
+Tubelib Fermenter defect=Tubelib Fermenter defekt
+
+### funnel.lua ###
+
+Tubelib Funnel=Tubelib Trichter
+
+### grinder.lua ###
+
+Grinding=Mahlen
+Tubelib Grinder=Tubelib Mühle
+
+### harvester.lua ###
+
+: running (=: läuft (
+Altitude = Flughöhe
+Area radius=Flächenradius
+Tubelib Harvester=Tubelib Ernter
+Tubelib Harvester Base=Tubelib Ernter Basis
+
+### harvester.lua ###
+### quarry.lua ###
+
+Run endless=endlos laufen
+
+### liquidsampler.lua ###
+
+Liquid Sampler=Flüssigkeitsaufnehmer
+
+### pusher_fast.lua ###
+
+Fast Pusher=Schneller Schieber
+
+### quarry.lua ###
+
+Digging depth=Grabetiefe
+Start level=Startebene
+Tubelib Quarry=Tubelib Steinbrecher
+[Tubelib Quarry] Area is protected!=[Tubelib Steinbrecher] Gebiet ist geschützt!
+running=läuft
+
+### reformer.lua ###
+
+Bio Fuel=Biotreibstoff
+Reformer will not fit there=Reformer wird dort nicht passen
+Tubelib Reformer=Tubelib Reformer
+Tubelib Reformer Top=Tubelib Reformer Oberteil
+Tubelib Reformer defect=Tubelib Reformer defekt
diff --git a/techpack_modpack/tubelib_addons1/mod.conf b/techpack_modpack/tubelib_addons1/mod.conf
index c35eabb..cdcb991 100644
--- a/techpack_modpack/tubelib_addons1/mod.conf
+++ b/techpack_modpack/tubelib_addons1/mod.conf
@@ -1 +1,4 @@
name=tubelib_addons1
+description=Tubelib Extension with Mining, Farming, and Crafting nodes
+depends=tubelib,default,bucket
+optional_depends=ethereal,farming,moreores,moretrees,skytest,stairs,unified_inventory
diff --git a/techpack_modpack/tubelib_addons1/pusher_fast.lua b/techpack_modpack/tubelib_addons1/pusher_fast.lua
index 8789028..c379444 100644
--- a/techpack_modpack/tubelib_addons1/pusher_fast.lua
+++ b/techpack_modpack/tubelib_addons1/pusher_fast.lua
@@ -3,9 +3,9 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
pusher_fast.lua:
@@ -29,21 +29,25 @@
-- | |/
-- +--------+
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local STANDBY_TICKS = 5
local COUNTDOWN_TICKS = 5
local CYCLE_TIME = 1
+local FIRST_CYCLE = 0.5
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:pusher_fast",
node_name_active = "tubelib_addons1:pusher_fast_active",
node_name_defect = "tubelib_addons1:pusher_fast_defect",
- infotext_name = "Fast Pusher",
+ infotext_name = S("Fast Pusher"),
cycle_time = CYCLE_TIME,
+ first_cycle_time = FIRST_CYCLE,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
aging_factor = 30,
@@ -59,7 +63,9 @@ local function pushing(pos, meta)
State:blocked(pos, meta)
return
end
- State:keep_running(pos, meta, COUNTDOWN_TICKS)
+ if State.get_state(pos, meta) ~= tubelib.STOPPED then
+ State:keep_running(pos, meta, COUNTDOWN_TICKS)
+ end
return
end
State:idle(pos, meta)
@@ -75,7 +81,7 @@ local function keep_running(pos, elapsed)
end
minetest.register_node("tubelib_addons1:pusher_fast", {
- description = "Fast Pusher",
+ description = S("Fast Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_pusher.png',
@@ -99,15 +105,14 @@ minetest.register_node("tubelib_addons1:pusher_fast", {
end
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
end,
on_timer = keep_running,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -118,7 +123,7 @@ minetest.register_node("tubelib_addons1:pusher_fast", {
minetest.register_node("tubelib_addons1:pusher_fast_active", {
- description = "Fast Pusher",
+ description = S("Fast Pusher"),
tiles = {
-- up, down, right, left, back, front
{
@@ -173,6 +178,9 @@ minetest.register_node("tubelib_addons1:pusher_fast_active", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
+
+ diggable = false,
+ can_dig = function() return false end,
paramtype = "light",
sunlight_propagates = true,
@@ -183,7 +191,7 @@ minetest.register_node("tubelib_addons1:pusher_fast_active", {
})
minetest.register_node("tubelib_addons1:pusher_fast_defect", {
- description = "Fast Pusher",
+ description = S("Fast Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_pusher.png',
@@ -233,6 +241,7 @@ tubelib.register_node("tubelib_addons1:pusher_fast",
on_push_item = nil, -- pusher has no inventory
on_unpull_item = nil, -- pusher has no inventory
is_pusher = true, -- is a pulling/pushing node
+ valid_sides = {"R","L"},
on_recv_message = function(pos, topic, payload)
local resp = State:on_receive_message(pos, topic, payload)
diff --git a/techpack_modpack/tubelib_addons1/quarry.lua b/techpack_modpack/tubelib_addons1/quarry.lua
index cd5a3dc..e258540 100644
--- a/techpack_modpack/tubelib_addons1/quarry.lua
+++ b/techpack_modpack/tubelib_addons1/quarry.lua
@@ -3,9 +3,9 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
quarry.lua
@@ -20,8 +20,11 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
+local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -55,10 +58,10 @@ local function formspec(self, pos, meta)
default.gui_bg_img..
default.gui_slots..
"dropdown[0,0;1.5;level;2,1,0,-1,-2,-3,-5,-10,-15,-20;"..Level2Idx[start_level].."]"..
- "label[1.6,0.2;Start level]"..
+ "label[1.6,0.2;"..S("Start level").."]"..
"dropdown[0,1;1.5;depth;1,2,3,5,10,15,20,25,50,100;"..Depth2Idx[depth].."]"..
- "label[1.6,1.2;Digging depth]"..
- "checkbox[0,2;endless;Run endless;"..endless.."]"..
+ "label[1.6,1.2;"..S("Digging depth").."]"..
+ "checkbox[0,2;endless;"..S("Run endless")..";"..endless.."]"..
"list[context;main;5,0;4,4;]"..
"list[context;fuel;1.5,3;1,1;]"..
"item_image[1.5,3;1,1;tubelib_addons1:biofuel]"..
@@ -74,7 +77,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:quarry",
node_name_active = "tubelib_addons1:quarry_active",
node_name_defect = "tubelib_addons1:quarry_defect",
- infotext_name = "Tubelib Quarry",
+ infotext_name = S("Tubelib Quarry"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -119,7 +122,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
local inv = M(pos):get_inventory()
if listname == "main" then
return stack:get_count()
- elseif listname == "fuel" and stack:get_name() == "tubelib_addons1:biofuel" then
+ elseif listname == "fuel" and tubelib.is_fuel(stack) then
return stack:get_count()
end
return 0
@@ -161,10 +164,16 @@ local function quarry_next_node(pos, meta)
-- check fuel
local fuel = meta:get_int("fuel") or 0
if fuel <= 0 then
- if tubelib.get_this_item(meta, "fuel", 1) == nil then
+ local fuel_item = tubelib.get_this_item(meta, "fuel", 1)
+ if fuel_item == nil then
State:fault(pos, meta)
return
end
+ if not tubelib.is_fuel(fuel_item) then
+ State:fault(pos, meta)
+ tubelib.put_item(meta, "fuel", fuel_item)
+ return
+ end
fuel = BURNING_TIME
else
fuel = fuel - 1
@@ -209,10 +218,11 @@ local function quarry_next_node(pos, meta)
return
end
meta:set_int("idx", idx)
- meta:set_string("quarry_pos", S(quarry_pos))
+ meta:set_string("quarry_pos", P2S(quarry_pos))
if minetest.is_protected(quarry_pos, owner) then
- minetest.chat_send_player(owner, "[Tubelib Quarry] Area is protected!")
+ minetest.chat_send_player(owner, S("[Tubelib Quarry] Area is protected!") ..
+ " " .. minetest.pos_to_string(quarry_pos) )
State:fault(pos, meta)
return
end
@@ -226,15 +236,15 @@ local function quarry_next_node(pos, meta)
if inv:room_for_item("main", ItemStack(order.drop)) then
minetest.remove_node(quarry_pos)
inv:add_item("main", ItemStack(order.drop))
- meta:set_string("infotext", "Tubelib Quarry "..number..
- ": running "..idx.."/"..(start_y-quarry_pos.y+1))
+ meta:set_string("infotext", S("Tubelib Quarry").." "..number..
+ ": "..S("running").." "..idx.."/"..(start_y-quarry_pos.y+1))
State:keep_running(pos, meta, COUNTDOWN_TICKS, 1)
else
State:blocked(pos, meta)
end
else
- meta:set_string("infotext", "Tubelib Quarry "..number..
- ": running "..idx.."/"..(start_y-quarry_pos.y+1))
+ meta:set_string("infotext", S("Tubelib Quarry").." "..number..
+ ": "..S("running").." "..idx.."/"..(start_y-quarry_pos.y+1))
end
end
end
@@ -284,7 +294,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:quarry", {
- description = "Tubelib Quarry",
+ description = S("Tubelib Quarry"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -316,9 +326,9 @@ minetest.register_node("tubelib_addons1:quarry", {
return inv:is_empty("main")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
end,
on_rotate = screwdriver.disallow,
@@ -327,7 +337,6 @@ minetest.register_node("tubelib_addons1:quarry", {
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_take = allow_metadata_inventory_take,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -337,7 +346,7 @@ minetest.register_node("tubelib_addons1:quarry", {
})
minetest.register_node("tubelib_addons1:quarry_active", {
- description = "Tubelib Quarry",
+ description = S("Tubelib Quarry"),
tiles = {
-- up, down, right, left, back, front
@@ -363,6 +372,9 @@ minetest.register_node("tubelib_addons1:quarry_active", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
+ diggable = false,
+ can_dig = function() return false end,
+
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_take = allow_metadata_inventory_take,
@@ -375,7 +387,7 @@ minetest.register_node("tubelib_addons1:quarry_active", {
})
minetest.register_node("tubelib_addons1:quarry_defect", {
- description = "Tubelib Quarry",
+ description = S("Tubelib Quarry"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -405,7 +417,7 @@ minetest.register_node("tubelib_addons1:quarry_defect", {
return false
end
local inv = M(pos):get_inventory()
- return inv:is_empty("main")
+ return inv:is_empty("main") and inv:is_empty("fuel")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@@ -436,10 +448,14 @@ minetest.register_craft({
tubelib.register_node("tubelib_addons1:quarry",
{"tubelib_addons1:quarry_active", "tubelib_addons1:quarry_defect"}, {
+ invalid_sides = {"L"},
on_pull_item = function(pos, side)
return tubelib.get_item(M(pos), "main")
end,
on_push_item = function(pos, side, item)
+ if not tubelib.is_fuel(item) then
+ return false
+ end
return tubelib.put_item(M(pos), "fuel", item)
end,
on_unpull_item = function(pos, side, item)
diff --git a/techpack_modpack/tubelib_addons1/reformer.lua b/techpack_modpack/tubelib_addons1/reformer.lua
index 595e54d..90e3771 100644
--- a/techpack_modpack/tubelib_addons1/reformer.lua
+++ b/techpack_modpack/tubelib_addons1/reformer.lua
@@ -3,20 +3,22 @@
Tubelib Addons 1
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
reformer.lua
-
+
The Reformer converts 4 Bio Gas items into one Bio Fuel item,
needed by Harvester and Quarry.
-
+
]]--
+-- Load support for I18n
+local S = tubelib_addons1.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -46,7 +48,7 @@ end
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:reformer",
node_name_defect = "tubelib_addons1:reformer_defect",
- infotext_name = "Tubelib Reformer",
+ infotext_name = S("Tubelib Reformer"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@@ -91,7 +93,8 @@ local function place_top(pos, facedir, placer)
return false
end
local node = minetest.get_node(pos)
- if node.name ~= "air" then
+ local def = minetest.registered_nodes[node.name]
+ if not def or not def.buildable_to then
return false
end
minetest.add_node(pos, {name="tubelib_addons1:reformer_top", param2=facedir})
@@ -156,7 +159,7 @@ end
minetest.register_node("tubelib_addons1:reformer", {
- description = "Tubelib Reformer",
+ description = S("Tubelib Reformer"),
inventory_image = "tubelib_addons1_reformer_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -172,39 +175,44 @@ minetest.register_node("tubelib_addons1:reformer", {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, 24/16, 8/16 },
},
-
+
on_construct = function(pos)
local meta = M(pos)
local inv = meta:get_inventory()
inv:set_size('src', 9)
inv:set_size('dst', 9)
end,
-
+
after_place_node = function(pos, placer)
local facedir = minetest.dir_to_facedir(placer:get_look_dir(), false)
- if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) == false then
+ if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) then
+ local number = tubelib.add_node(pos, "tubelib_addons1:reformer")
+ State:node_init(pos, number)
+ else
minetest.remove_node(pos)
+ minetest.chat_send_player(placer:get_player_name(), S("Reformer will not fit there"))
+ return true
+ end
+ end,
+
+ -- the reformer needs 'on_dig' to be able to remove the upper node
+ on_dig = function(pos, node, puncher)
+ local pos_above = vector.add(pos, vector.new(0, 1, 0))
+ local player_name = puncher:get_player_name()
+
+ if minetest.is_protected(pos, player_name) or minetest.is_protected(pos_above, player_name) then
return
end
- local number = tubelib.add_node(pos, "tubelib_addons1:reformer")
- State:node_init(pos, number)
- end,
-
- -- the reformer needs 'on_dig' to be able to remove the upper node
- on_dig = function(pos, node, puncher, pointed_thing)
+
local meta = M(pos)
local inv = meta:get_inventory()
if inv:is_empty("dst") and inv:is_empty("src") then
- minetest.node_dig(pos, node, puncher, pointed_thing)
- minetest.remove_node({x=pos.x, y=pos.y+1, z=pos.z})
+ State:on_dig_node(pos, node, puncher)
+ tubelib.remove_node(pos)
+ minetest.remove_node(pos_above)
end
end,
-
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- tubelib.remove_node(pos)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
- end,
-
+
on_rotate = screwdriver.disallow,
on_timer = keep_running,
on_receive_fields = on_receive_fields,
@@ -212,7 +220,6 @@ minetest.register_node("tubelib_addons1:reformer", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -222,7 +229,7 @@ minetest.register_node("tubelib_addons1:reformer", {
})
minetest.register_node("tubelib_addons1:reformer_defect", {
- description = "Tubelib Reformer defect",
+ description = S("Tubelib Reformer defect"),
inventory_image = "tubelib_addons1_reformer_inventory.png",
tiles = {
-- up, down, right, left, back, front
@@ -238,39 +245,48 @@ minetest.register_node("tubelib_addons1:reformer_defect", {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, 24/16, 8/16 },
},
-
+
on_construct = function(pos)
local meta = M(pos)
local inv = meta:get_inventory()
inv:set_size('src', 9)
inv:set_size('dst', 9)
end,
-
+
after_place_node = function(pos, placer)
local facedir = minetest.dir_to_facedir(placer:get_look_dir(), false)
- if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) == false then
+ if place_top({x=pos.x, y=pos.y+1, z=pos.z}, facedir, placer) then
+ local number = tubelib.add_node(pos, "tubelib_addons1:reformer")
+ State:node_init(pos, number)
+ State:defect(pos, M(pos))
+ else
minetest.remove_node(pos)
- return
+ minetest.chat_send_player(placer:get_player_name(), S("Reformer will not fit there"))
+ return true
end
- local number = tubelib.add_node(pos, "tubelib_addons1:reformer")
- State:node_init(pos, number)
- State:defect(pos, M(pos))
end,
-- the reformer needs 'on_dig' to be able to remove the upper node
on_dig = function(pos, node, puncher, pointed_thing)
+ local pos_above = vector.add(pos, vector.new(0, 1, 0))
+ local puncher_name = puncher:get_player_name()
+
+ if minetest.is_protected(pos, puncher_name) or minetest.is_protected(pos_above, puncher_name) then
+ return
+ end
+
local meta = M(pos)
local inv = meta:get_inventory()
if inv:is_empty("dst") and inv:is_empty("src") then
minetest.node_dig(pos, node, puncher, pointed_thing)
- minetest.remove_node({x=pos.x, y=pos.y+1, z=pos.z})
+ minetest.remove_node(pos_above)
end
end,
-
+
after_dig_node = function(pos, oldnode, oldmetadata, digger)
tubelib.remove_node(pos)
end,
-
+
on_rotate = screwdriver.disallow,
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_move = allow_metadata_inventory_move,
@@ -286,7 +302,7 @@ minetest.register_node("tubelib_addons1:reformer_defect", {
minetest.register_node("tubelib_addons1:reformer_top", {
- description = "Tubelib Reformer Top",
+ description = S("Tubelib Reformer Top"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -306,7 +322,7 @@ minetest.register_node("tubelib_addons1:reformer_top", {
})
minetest.register_craftitem("tubelib_addons1:biofuel", {
- description = "Bio Fuel",
+ description = S("Bio Fuel"),
inventory_image = "tubelib_addons1_biofuel.png",
})
@@ -326,6 +342,9 @@ minetest.register_craft({
},
})
+function tubelib.is_fuel(stack)
+ return stack:get_name() == "tubelib_addons1:biofuel"
+end
tubelib.register_node("tubelib_addons1:reformer", {"tubelib_addons1:reformer_defect"}, {
on_pull_item = function(pos, side)
@@ -351,4 +370,4 @@ tubelib.register_node("tubelib_addons1:reformer", {"tubelib_addons1:reformer_def
on_node_repair = function(pos)
return State:on_node_repair(pos)
end,
-})
+})
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter.png
index 3f18c39..e1ce370 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter_active.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter_active.png
index aa50791..eaf85dd 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter_active.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_autocrafter_active.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biofuel.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biofuel.png
index 1d5cf2b..a5feeaf 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biofuel.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biofuel.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biogas.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biogas.png
index 96b9c3a..b528306 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biogas.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_biogas.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector.png
index 7681063..1c4febb 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector_active.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector_active.png
index 4ed519c..ee1c618 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector_active.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_detector_active.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_bottom.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_bottom.png
index 57764da..8a1cb79 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_bottom.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_bottom.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_inventory.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_inventory.png
index b8d7562..a4795a5 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_inventory.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_inventory.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_top.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_top.png
index 112f6c3..c281197 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_top.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_fermenter_top.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_frame.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_frame.png
index 061d583..55f7007 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_frame.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_frame.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel.png
index 2da41f8..de08d00 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel_top.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel_top.png
index ce8003f..514723c 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel_top.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_funnel_top.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder.png
index 43b52d1..87e5c58 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder_active.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder_active.png
index 902c4ce..11f8bd3 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder_active.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_grinder_active.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester.png
index 6f346c0..20e4505 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester_top.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester_top.png
index 529ac55..0237ce3 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester_top.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_harvester_top.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler.png
index f451555..5033f43 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_active.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_active.png
index 44d7795..b6d3066 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_active.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_active.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_passive.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_passive.png
index c45a91e..3a4e548 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_passive.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_liquidsampler_passive.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher.png
index 4c69164..96c01e0 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher_an.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher_an.png
index 6a91b47..c87d5af 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher_an.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_pusher_an.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry.png
index a728a50..5a4c774 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_active.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_active.png
index 4806b7c..e7b5e81 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_active.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_active.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_passive.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_passive.png
index 64b0086..2103b6c 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_passive.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_quarry_passive.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_bottom.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_bottom.png
index 1e070f6..74a6ebd 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_bottom.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_bottom.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_top.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_top.png
index c0fa6be..fa961e4 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_top.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer1_top.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_bottom.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_bottom.png
index 6d39512..392186a 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_bottom.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_bottom.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_top.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_top.png
index a8c0cbe..e5e29e0 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_top.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer2_top.png differ
diff --git a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer_inventory.png b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer_inventory.png
index 9a36c94..bd06dfb 100644
Binary files a/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer_inventory.png and b/techpack_modpack/tubelib_addons1/textures/tubelib_addons1_reformer_inventory.png differ
diff --git a/techpack_modpack/tubelib_addons2/accesscontrol.lua b/techpack_modpack/tubelib_addons2/accesscontrol.lua
index bfe8d73..b7d206d 100644
--- a/techpack_modpack/tubelib_addons2/accesscontrol.lua
+++ b/techpack_modpack/tubelib_addons2/accesscontrol.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
accesscontrol.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local function switch_on(pos, meta)
if tubelib.data_not_corrupted(pos) then
minetest.sound_play("tubelib_addons2_door", {
@@ -47,9 +50,9 @@ local function formspec1(numbers)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "field[0.5,1;5,1;numbers;Door block numbers:;"..numbers.."]" ..
- "field[0.5,2.5;5,1;code;Access code (4 digits):;]" ..
- "button_exit[1.5,3.5;2,1;exit;Save]"
+ "field[0.5,1;5,1;numbers;"..S("Door block numbers:")..";"..numbers.."]" ..
+ "field[0.5,2.5;5,1;code;"..S("Access code (4 digits):")..";]" ..
+ "button_exit[1.5,3.5;2,1;exit;"..S("Save").."]"
end
local function formspec2(code)
@@ -57,7 +60,7 @@ local function formspec2(code)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "field[0.5,1;3.6,1;code;Enter access code;"..code.."]" ..
+ "field[0.5,1;3.6,1;code;"..S("Enter access code")..";"..code.."]" ..
"button[0.4,2;1,1;b1;1]" ..
"button[1.6,2;1,1;b2;2]" ..
"button[2.8,2;1,1;b3;3]" ..
@@ -67,11 +70,11 @@ local function formspec2(code)
"button[0.4,4;1,1;b7;7]" ..
"button[1.6,4;1,1;b8;8]" ..
"button[2.8,4;1,1;b9;9]" ..
- "button_exit[1.6,5;1,1;ok;OK]"
+ "button_exit[1.6,5;1,1;ok;"..S("OK").."]"
end
minetest.register_node("tubelib_addons2:accesscontrol", {
- description = "Tubelib Access Lock",
+ description = S("Tubelib Access Lock"),
tiles = {
-- up, down, right, left, back, front
'default_steel_block.png',
@@ -99,7 +102,7 @@ minetest.register_node("tubelib_addons2:accesscontrol", {
meta:set_string("numbers", fields.numbers)
meta:set_string("code", fields.code)
meta:mark_as_private("code")
- meta:set_string("infotext", "Tubelib Access Lock, Enter access code")
+ meta:set_string("infotext", S("Tubelib Access Lock, Enter access code"))
meta:set_string("formspec", formspec2(""))
end
end
diff --git a/techpack_modpack/tubelib_addons2/ceilinglamp.lua b/techpack_modpack/tubelib_addons2/ceilinglamp.lua
index 7137406..2e3bd29 100644
--- a/techpack_modpack/tubelib_addons2/ceilinglamp.lua
+++ b/techpack_modpack/tubelib_addons2/ceilinglamp.lua
@@ -3,15 +3,17 @@
Tubelib Addons 2
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
ceilinglamp.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
local function switch_on(pos, node)
node.name = "tubelib_addons2:ceilinglamp_on"
@@ -27,7 +29,7 @@ local function switch_off(pos, node)
end
minetest.register_node("tubelib_addons2:ceilinglamp", {
- description = "Tubelib Ceiling Lamp",
+ description = S("Tubelib Ceiling Lamp"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons2_ceilinglamp_top.png',
@@ -53,7 +55,7 @@ minetest.register_node("tubelib_addons2:ceilinglamp", {
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib_addons2:ceilinglamp")
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Ceiling Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Ceiling Lamp").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@@ -76,7 +78,7 @@ minetest.register_node("tubelib_addons2:ceilinglamp", {
})
minetest.register_node("tubelib_addons2:ceilinglamp_on", {
- description = "Tubelib Ceiling Lamp",
+ description = S("Tubelib Ceiling Lamp"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons2_ceilinglamp_top.png',
diff --git a/techpack_modpack/tubelib_addons2/colorlamp.lua b/techpack_modpack/tubelib_addons2/colorlamp.lua
index 93b8488..8d594f1 100644
--- a/techpack_modpack/tubelib_addons2/colorlamp.lua
+++ b/techpack_modpack/tubelib_addons2/colorlamp.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
colorlamp.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local tColors = {"#0000FF", "#00FFFF", "#00FF00", "#FFFF00", "#FF0000", "#FF00FF",
"#FFFFFF", "#000000", "#3BC23B", "#CA3131", "#FFA500", "#FFC0CB"}
local sColor = "1,2,3,4,5,6,7,8,9,10,11,12"
@@ -24,7 +27,7 @@ local function switch_node(pos, num, player)
minetest.swap_node(pos, node)
local number = meta:get_int("number")
number = string.format("%.04u", number)
- meta:set_string("infotext", "Tubelib Color Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Color Lamp").." "..number)
if num ~= "" then
meta:set_int("color", num)
end
@@ -32,7 +35,7 @@ local function switch_node(pos, num, player)
end
minetest.register_node("tubelib_addons2:lamp", {
- description = "Tubelib Color Lamp",
+ description = S("Tubelib Color Lamp"),
tiles = {"tubelib_addons2_lamp.png^[colorize:#000000:100"},
after_place_node = function(pos, placer)
@@ -43,7 +46,7 @@ minetest.register_node("tubelib_addons2:lamp", {
meta:set_string("formspec", "size[3,2]"..
"label[0,0;Select color]"..
"dropdown[0,0.5;3;type;"..sColor..";1]"..
- "button_exit[0.5,1.5;2,1;exit;Save]")
+ "button_exit[0.5,1.5;2,1;exit;"..S("Save").."]")
meta:set_int("color", 1)
end,
@@ -96,7 +99,7 @@ minetest.register_craft({
for idx,color in ipairs(tColors) do
minetest.register_node("tubelib_addons2:lamp"..idx, {
- description = "Tubelib Color Lamp",
+ description = S("Tubelib Color Lamp"),
tiles = {
"tubelib_addons2_lamp.png^[colorize:"..color..":120",
},
@@ -121,6 +124,7 @@ for idx,color in ipairs(tColors) do
paramtype = 'light',
light_source = minetest.LIGHT_MAX,
+ sounds = default.node_sound_stone_defaults(),
groups = {choppy=2, cracky=1, not_in_creative_inventory=1},
is_ground_content = false,
drop = "tubelib_addons2:lamp"
diff --git a/techpack_modpack/tubelib_addons2/colorlamp_ud.lua b/techpack_modpack/tubelib_addons2/colorlamp_ud.lua
index 2fc7a15..0d2cc35 100644
--- a/techpack_modpack/tubelib_addons2/colorlamp_ud.lua
+++ b/techpack_modpack/tubelib_addons2/colorlamp_ud.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
colorlamp_ud.lua which requires the mod unifieddyes:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local function switch_on(pos, node, player)
if player == nil or not minetest.is_protected(pos, player:get_player_name()) then
node.name = "tubelib_addons2:lamp_on"
@@ -27,13 +30,13 @@ local function switch_off(pos, node, player)
end
minetest.register_node("tubelib_addons2:lamp_off", {
- description = "Tubelib Color Lamp",
+ description = S("Tubelib Color Lamp"),
tiles = {"tubelib_addons2_lamp.png^[colorize:#000000:100"},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local number = tubelib.add_node(pos, "tubelib_addons2:lamp_off")
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Color Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Color Lamp").." "..number)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
@@ -60,7 +63,7 @@ minetest.register_node("tubelib_addons2:lamp_off", {
minetest.register_node("tubelib_addons2:lamp_on", {
- description = "Tubelib Color Lamp",
+ description = S("Tubelib Color Lamp"),
tiles = {"tubelib_addons2_lamp.png"},
on_rightclick = switch_off,
@@ -68,6 +71,7 @@ minetest.register_node("tubelib_addons2:lamp_on", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
+ sounds = default.node_sound_stone_defaults(),
groups = {choppy=2, cracky=1, not_in_creative_inventory=1, ud_param2_colorable = 1},
on_construct = unifieddyes.on_construct,
@@ -108,7 +112,7 @@ minetest.register_craft({
--
for idx=1,12 do
minetest.register_node("tubelib_addons2:lamp"..idx, {
- description = "Tubelib Color Lamp "..idx,
+ description = S("Tubelib Color Lamp").." "..idx,
tiles = {"tubelib_addons2_lamp.png"},
paramtype = 'light',
groups = {choppy=2, cracky=1, not_in_creative_inventory=1},
@@ -143,7 +147,7 @@ minetest.register_lbm({
minetest.swap_node(pos, node)
local number = meta:get_int("number") or 0
number = string.format("%.04u", number)
- meta:set_string("infotext", "Tubelib Color Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Color Lamp").." "..number)
end
})
diff --git a/techpack_modpack/tubelib_addons2/doorblock.lua b/techpack_modpack/tubelib_addons2/doorblock.lua
index 0eca8ee..ae66413 100644
--- a/techpack_modpack/tubelib_addons2/doorblock.lua
+++ b/techpack_modpack/tubelib_addons2/doorblock.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
doorblock.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local sTextures = "Gate Wood,Aspen Wood,Jungle Wood,Pine Wood,"..
"Cobblestone,Sandstone,Stone,Desert Sandstone,"..
"Copper,Steel,Tin,Coral,"..
@@ -32,7 +35,7 @@ local tPgns = {"tubelib_addon2_door.png", "default_aspen_wood.png", "default_jun
local not_in_inventory=nil
for idx,pgn in ipairs(tPgns) do
minetest.register_node("tubelib_addons2:doorblock"..idx, {
- description = "Tubelib Door Block",
+ description = S("Tubelib Door Block"),
tiles = {
pgn.."^[transformR90",
pgn,
@@ -52,24 +55,22 @@ for idx,pgn in ipairs(tPgns) do
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
- local number = tubelib.add_node(pos, "tubelib_addons2:doorblock"..idx)
- tubelib.set_data(number, "facedir", node.param2)
+ local number = tubelib.add_node(pos, node.name)
meta:set_string("number", number)
- meta:set_string("infotext", "Tubelib Door Block "..number)
+ meta:set_string("infotext", S("Tubelib Door Block").." "..number)
meta:set_string("formspec", "size[3,2]"..
- "label[0,0;Select texture]"..
+ "label[0,0;"..S("Select texture").."]"..
"dropdown[0,0.5;3;type;"..sTextures..";1]"..
- "button_exit[0.5,1.5;2,1;exit;Save]")
+ "button_exit[0.5,1.5;2,1;exit;"..S("Save").."]")
end,
on_receive_fields = function(pos, formname, fields, player)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
- local number = meta:get_string("number")
if fields.type then
node.name = "tubelib_addons2:doorblock"..tTextures[fields.type]
minetest.swap_node(pos, node)
- tubelib.set_data(number, "texture", node.name)
+ tubelib.add_node(pos, node.name)
end
if fields.exit then
meta:set_string("formspec", nil)
@@ -96,14 +97,16 @@ for idx,pgn in ipairs(tPgns) do
on_recv_message = function(pos, topic, payload)
local node = minetest.get_node(pos)
if topic == "on" then
+ local meta = minetest.get_meta(pos)
+ local number = meta:get_string("number")
minetest.remove_node(pos)
+ tubelib.temporary_remove_node(pos, number, node.name, {param2 = node.param2})
elseif topic == "off" then
- local num = tubelib.get_node_number(pos)
- local name = tubelib.get_data(num, "texture") or "tubelib_addons2:doorblock1"
- if name then
- minetest.add_node(pos, {name=name,
- paramtype2="facedir",
- param2=tubelib.get_data(num, "facedir")})
+ local data = tubelib.temporary_remove_node(pos)
+ if data then
+ minetest.add_node(pos, {name = data.name, param2 = data.param2})
+ local meta = minetest.get_meta(pos)
+ meta:set_string("number", data.number)
end
end
end,
diff --git a/techpack_modpack/tubelib_addons2/gateblock.lua b/techpack_modpack/tubelib_addons2/gateblock.lua
index 27891e2..eb4c3e8 100644
--- a/techpack_modpack/tubelib_addons2/gateblock.lua
+++ b/techpack_modpack/tubelib_addons2/gateblock.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
gateblock.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local NUM_TEXTURES = 20
local sTextures = "Wood,Aspen Wood,Jungle Wood,Pine Wood,"..
@@ -36,17 +39,18 @@ local tPgns = {"default_wood.png", "default_aspen_wood.png", "default_junglewood
for idx,pgn in ipairs(tPgns) do
minetest.register_node("tubelib_addons2:gateblock"..idx, {
- description = "Tubelib Gate Block",
+ description = S("Tubelib Gate Block"),
tiles = {pgn},
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
- local number = tubelib.add_node(pos, "tubelib_addons2:gateblock"..idx)
- meta:set_string("infotext", "Tubelib Gate Block "..number)
+ local number = tubelib.add_node(pos, node.name)
+ meta:set_string("number", number)
+ meta:set_string("infotext", S("Tubelib Gate Block").." "..number)
meta:set_string("formspec", "size[3,2]"..
"label[0,0;Select texture]"..
"dropdown[0,0.5;3;type;"..sTextures..";"..NUM_TEXTURES.."]"..
- "button_exit[0.5,1.5;2,1;exit;Save]")
+ "button_exit[0.5,1.5;2,1;exit;"..S("Save").."]")
end,
on_receive_fields = function(pos, formname, fields, player)
@@ -62,7 +66,7 @@ for idx,pgn in ipairs(tPgns) do
end
end,
- after_dig_node = function(pos)
+ after_dig_node = function(pos, oldnode, oldmetadata)
tubelib.remove_node(pos)
end,
@@ -71,23 +75,25 @@ for idx,pgn in ipairs(tPgns) do
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
- groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==NUM_TEXTURES and 0 or 1},
+ groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx == NUM_TEXTURES and 0 or 1},
is_ground_content = false,
drop = "tubelib_addons2:gateblock1",
})
- not_in_inventory = 1
-
tubelib.register_node("tubelib_addons2:gateblock"..idx, {}, {
on_recv_message = function(pos, topic, payload)
local node = minetest.get_node(pos)
if topic == "on" then
+ local meta = minetest.get_meta(pos)
+ local number = meta:get_string("number")
minetest.remove_node(pos)
+ tubelib.temporary_remove_node(pos, number, node.name, {param2 = node.param2})
elseif topic == "off" then
- local num = tubelib.get_node_number(pos)
- local info = tubelib.get_node_info(num)
- if info then
- minetest.add_node(pos, {name=info.name})
+ local data = tubelib.temporary_remove_node(pos)
+ if data then
+ minetest.add_node(pos, {name = data.name, param2 = data.param2})
+ local meta = minetest.get_meta(pos)
+ meta:set_string("number", data.number)
end
end
end,
diff --git a/techpack_modpack/tubelib_addons2/industriallamp.lua b/techpack_modpack/tubelib_addons2/industriallamp.lua
index 373879e..777151b 100644
--- a/techpack_modpack/tubelib_addons2/industriallamp.lua
+++ b/techpack_modpack/tubelib_addons2/industriallamp.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
industriallamp.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local function switch_on(pos, node)
if string.sub(node.name, -3) ~= "_on" then
node.name = node.name.."_on"
@@ -32,7 +35,7 @@ end
local function register_lamp(tbl)
local num, tiles, tiles_on, node_box, size = tbl.num, tbl.tiles, tbl.tiles_on, tbl.node_box, tbl.size
minetest.register_node("tubelib_addons2:industriallamp"..num, {
- description = "Tubelib Industrial Lamp "..num,
+ description = S("Tubelib Industrial Lamp").." "..num,
tiles = tiles,
drawtype = "nodebox",
node_box = node_box,
@@ -48,7 +51,7 @@ local function register_lamp(tbl)
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib_addons2:industriallamp"..num)
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Industrial Lamp "..num..": "..number)
+ meta:set_string("infotext", S("Tubelib Industrial Lamp").." "..num..": "..number)
end,
on_rightclick = function(pos, node, clicker)
@@ -72,7 +75,7 @@ local function register_lamp(tbl)
})
minetest.register_node("tubelib_addons2:industriallamp"..num.."_on", {
- description = "Tubelib Industrial Lamp "..num,
+ description = S("Tubelib Industrial Lamp").." "..num,
tiles = tiles_on,
drawtype = "nodebox",
node_box = node_box,
@@ -87,7 +90,7 @@ local function register_lamp(tbl)
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib_addons2:industriallamp"..num)
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Industrial Lamp "..num..": "..number)
+ meta:set_string("infotext", S("Tubelib Industrial Lamp").." "..num..": "..number)
end,
on_rightclick = function(pos, node, clicker)
diff --git a/techpack_modpack/tubelib_addons2/init.lua b/techpack_modpack/tubelib_addons2/init.lua
index fb37810..94bdd5a 100644
--- a/techpack_modpack/tubelib_addons2/init.lua
+++ b/techpack_modpack/tubelib_addons2/init.lua
@@ -3,13 +3,19 @@
Tubelib Addons 2
================
- Copyright (C) 2017,2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
]]--
+tubelib_addons2 = {}
+
+
+-- Load support for I18n
+tubelib_addons2.S = minetest.get_translator("tubelib_addons2")
+
dofile(minetest.get_modpath("tubelib_addons2") .. "/timer.lua")
dofile(minetest.get_modpath("tubelib_addons2") .. "/sequencer.lua")
dofile(minetest.get_modpath("tubelib_addons2") .. "/gateblock.lua")
diff --git a/techpack_modpack/tubelib_addons2/invisiblelamp.lua b/techpack_modpack/tubelib_addons2/invisiblelamp.lua
index 8e532ef..7d2721e 100644
--- a/techpack_modpack/tubelib_addons2/invisiblelamp.lua
+++ b/techpack_modpack/tubelib_addons2/invisiblelamp.lua
@@ -3,15 +3,17 @@
Tubelib Addons 2
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
invisiblelamp.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
local function switch_on(pos, node)
node.name = "tubelib_addons2:invisiblelamp_on"
@@ -27,7 +29,7 @@ local function switch_off(pos, node)
end
minetest.register_node("tubelib_addons2:invisiblelamp", {
- description = "Tubelib Invisible Lamp",
+ description = S("Tubelib Invisible Lamp"),
drawtype = "glasslike_framed_optional",
tiles = {"tubelib_addons2_invisiblelamp.png"},
inventory_image = 'tubelib_addons2_invisiblelamp_inventory.png',
@@ -35,7 +37,7 @@ minetest.register_node("tubelib_addons2:invisiblelamp", {
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib_addons2:invisiblelamp")
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Invisible Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Invisible Lamp").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@@ -58,7 +60,7 @@ minetest.register_node("tubelib_addons2:invisiblelamp", {
})
minetest.register_node("tubelib_addons2:invisiblelamp_on", {
- description = "Tubelib Invisible Lamp",
+ description = S("Tubelib Invisible Lamp"),
drawtype = "glasslike_framed_optional",
tiles = {"tubelib_addons2_invisiblelamp.png"},
diff --git a/techpack_modpack/tubelib_addons2/locale/template.txt b/techpack_modpack/tubelib_addons2/locale/template.txt
new file mode 100644
index 0000000..1eecfc2
--- /dev/null
+++ b/techpack_modpack/tubelib_addons2/locale/template.txt
@@ -0,0 +1,116 @@
+# textdomain: tubelib_addons2
+
+
+
+### accesscontrol.lua ###
+
+Access code (4 digits):=
+Door block numbers:=
+Enter access code=
+OK=
+Tubelib Access Lock=
+Tubelib Access Lock, Enter access code=
+
+### accesscontrol.lua ###
+### colorlamp.lua ###
+### doorblock.lua ###
+### gateblock.lua ###
+### logic_not.lua ###
+### mesecons_converter.lua ###
+### repeater.lua ###
+
+Save=
+
+### ceilinglamp.lua ###
+
+Tubelib Ceiling Lamp=
+
+### colorlamp.lua ###
+### colorlamp_ud.lua ###
+
+Tubelib Color Lamp=
+
+### doorblock.lua ###
+
+Select texture=
+Tubelib Door Block=
+
+### gateblock.lua ###
+
+Tubelib Gate Block=
+
+### industriallamp.lua ###
+
+Tubelib Industrial Lamp=
+
+### invisiblelamp.lua ###
+
+Tubelib Invisible Lamp=
+
+### logic_not.lua ###
+
+Tubelib Logic Not=
+
+### logic_not.lua ###
+### mesecons_converter.lua ###
+### repeater.lua ###
+
+: connected with=
+: not connected=
+Destination node numbers=
+
+### mesecons_converter.lua ###
+
+Tubelib Mesecons Converter=
+
+### mesecons_converter.lua ###
+### repeater.lua ###
+
+: fault (overloaded)=
+
+### programmer.lua ###
+
+Tubelib Programmer=
+[Tubelib Programmer] Error: programmer not supported!=
+[Tubelib Programmer] Unknown node on=
+[Tubelib Programmer] foreign or unknown node!=
+[Tubelib Programmer] node programmed!=
+[Tubelib Programmer] number=
+[Tubelib Programmer] programmer reset=
+read=
+
+### repeater.lua ###
+
+Tubelib Repeater=
+
+### sequencer.lua ###
+
+Define a sequence of commands@nto control other machines.=
+If endless is set, the Sequencer@nrestarts again and again.=
+Numbers(s) are the node numbers,@nthe command shall sent to.=
+Offset is the time to the@nnext line in seconds (1..999).=
+Run endless=
+Sequencer Help=
+
+The command ' ' does nothing,@nonly consuming the offset time.=
+
+The commands 'on'/'off' are used@n for machines and other nodes.=
+
+Tubelib Sequencer=
+exit=
+help=
+
+### sequencer.lua ###
+### timer.lua ###
+
+Command=
+
+### streetlamp.lua ###
+
+Tubelib Street Lamp=
+
+### timer.lua ###
+
+Number(s)=
+Time=
+Tubelib Timer=
diff --git a/techpack_modpack/tubelib_addons2/locale/tubelib_addons2.de.tr b/techpack_modpack/tubelib_addons2/locale/tubelib_addons2.de.tr
new file mode 100644
index 0000000..92c42d9
--- /dev/null
+++ b/techpack_modpack/tubelib_addons2/locale/tubelib_addons2.de.tr
@@ -0,0 +1,118 @@
+# textdomain: tubelib_addons2
+
+
+
+### accesscontrol.lua ###
+
+Access code (4 digits):=Zugangscode (4 Zahlen):
+Door block numbers:=Türblocknummern:
+Enter access code=Zugangscode eingeben
+OK=OK
+Tubelib Access Lock=Tubelib Zugangsschloss
+Tubelib Access Lock, Enter access code=Tubelib Zugangsschloss, Zugangscode eingeben
+
+### accesscontrol.lua ###
+### colorlamp.lua ###
+### doorblock.lua ###
+### gateblock.lua ###
+### logic_not.lua ###
+### mesecons_converter.lua ###
+### repeater.lua ###
+
+Save=Speichern
+
+### ceilinglamp.lua ###
+
+Tubelib Ceiling Lamp=Tubelib Deckenleuchte
+
+### colorlamp.lua ###
+### colorlamp_ud.lua ###
+
+Tubelib Color Lamp=Tubelib Farblampe
+
+### doorblock.lua ###
+
+Select texture=Wähle Textur
+Tubelib Door Block=Tubelib Türblock
+
+### gateblock.lua ###
+
+Tubelib Gate Block=Tubelib Torblock
+
+### industriallamp.lua ###
+
+Tubelib Industrial Lamp=Tubelib Industrielampe
+
+### invisiblelamp.lua ###
+
+Tubelib Invisible Lamp=Tubelib Unsichtbare Lampe
+
+### logic_not.lua ###
+
+#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
+Tubelib Logic Not=Tubelib Logisches NOT
+
+### logic_not.lua ###
+### mesecons_converter.lua ###
+### repeater.lua ###
+
+: connected with=: verbunden mit
+: not connected=: nicht verbunden
+Destination node numbers=Zielknotennummern
+
+### mesecons_converter.lua ###
+
+Tubelib Mesecons Converter=Tubelib Mesecons Konverter
+
+### mesecons_converter.lua ###
+### repeater.lua ###
+
+: fault (overloaded)=: Fehler (überlastet)
+
+### programmer.lua ###
+
+Tubelib Programmer=Tubelib Programmer
+[Tubelib Programmer] Error: programmer not supported!=[Tubelib Programmer] Fehler: Programmer wird nicht unterstützt!
+[Tubelib Programmer] Unknown node on=[Tubelib Programmer] Unbekannter Knoten an
+[Tubelib Programmer] foreign or unknown node!=[Tubelib Programmer] fremder oder unbekannter Knoten!
+[Tubelib Programmer] node programmed!=[Tubelib Programmer] Knoten programmiert!
+[Tubelib Programmer] number=[Tubelib Programmer] Nummer
+[Tubelib Programmer] programmer reset=[Tubelib Programmer] Programmer zurückgesetzt
+read=lesen
+
+### repeater.lua ###
+
+#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
+Tubelib Repeater=Tubelib Repeater
+
+### sequencer.lua ###
+
+Define a sequence of commands@nto control other machines.=Definieren Sie eine Folge von Befehlen@nandere Maschinen zu steuern.
+If endless is set, the Sequencer@nrestarts again and again.=Wenn endlos eingestellt ist, wird der Sequenzer@nimmer wieder neu gestartet.
+Numbers(s) are the node numbers,@nthe command shall sent to.=Zahlen sind die Knotennummern,@nzu denen der Befehl gesendet werden soll.
+Offset is the time to the@nnext line in seconds (1..999).=Offset ist die Zeit bis zur@nnächste Zeile in Sekunden (1..999).
+Run endless=Laufe endlos
+Sequencer Help=Sequenzer-Hilfe
+
+The command ' ' does nothing,@nonly consuming the offset time.=Der Befehl '' macht nichts,@nverbraucht nur die Wartezeit.
+
+The commands 'on'/'off' are used@n for machines and other nodes.=Die Befehle 'ein'/'aus' werden@nfür Maschinen und andere Knoten verwendet.
+
+Tubelib Sequencer=Tubelib Sequenzer
+exit=raus
+help=Hilfe
+
+### sequencer.lua ###
+### timer.lua ###
+
+Command=Befehl
+
+### streetlamp.lua ###
+
+Tubelib Street Lamp=Tubelib Straßenlaterne
+
+### timer.lua ###
+
+Number(s)=Nummer(n)
+Time=Zeit
+Tubelib Timer=Tubelib Timer
diff --git a/techpack_modpack/tubelib_addons2/logic_not.lua b/techpack_modpack/tubelib_addons2/logic_not.lua
index 3003447..bcb69a0 100644
--- a/techpack_modpack/tubelib_addons2/logic_not.lua
+++ b/techpack_modpack/tubelib_addons2/logic_not.lua
@@ -3,24 +3,27 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
logic_not.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local function formspec(meta)
local numbers = meta:get_string("numbers")
return "size[7,5]"..
- "field[0.5,2;6,1;number;Destination node numbers;"..numbers.."]" ..
- "button_exit[1,3;2,1;exit;Save]"
+ "field[0.5,2;6,1;number;"..S("Destination node numbers")..";"..numbers.."]" ..
+ "button_exit[1,3;2,1;exit;"..S("Save").."]"
end
minetest.register_node("tubelib_addons2:logic_not", {
- description = "Tubelib Logic Not",
+ description = S("Tubelib Logic Not"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -33,7 +36,7 @@ minetest.register_node("tubelib_addons2:logic_not", {
local own_number = tubelib.add_node(pos, "tubelib_addons2:logic_not")
meta:set_string("own_number", own_number)
meta:set_string("formspec", formspec(meta))
- meta:set_string("infotext", "Tubelib Logic Not "..own_number..": not connected")
+ meta:set_string("infotext", S("Tubelib Logic Not").." "..own_number..S(": not connected"))
meta:set_string("owner", placer:get_player_name())
end,
@@ -47,7 +50,7 @@ minetest.register_node("tubelib_addons2:logic_not", {
if tubelib.check_numbers(fields.number) then
meta:set_string("numbers", fields.number)
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Logic Not "..own_number..": connected with "..fields.number)
+ meta:set_string("infotext", S("Tubelib Logic Not").." "..own_number..S(": connected with").." "..fields.number)
meta:set_string("formspec", formspec(meta))
end
end,
@@ -82,7 +85,7 @@ tubelib.register_node("tubelib_addons2:logic_not", {}, {
local numbers = meta:get_string("numbers")
local own_number = meta:get_string("own_number")
if topic == "set_numbers" then
- meta:set_string("infotext", "Tubelib Logic Not "..own_number..": connected with "..payload)
+ meta:set_string("infotext", S("Tubelib Logic Not").." "..own_number..S(": connected with").." "..payload)
meta:set_string("numbers", payload)
meta:set_string("formspec", formspec(meta))
return true
diff --git a/techpack_modpack/tubelib_addons2/mesecons_converter.lua b/techpack_modpack/tubelib_addons2/mesecons_converter.lua
index f64d0c5..283536c 100644
--- a/techpack_modpack/tubelib_addons2/mesecons_converter.lua
+++ b/techpack_modpack/tubelib_addons2/mesecons_converter.lua
@@ -3,22 +3,25 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
mesecons_converter.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local OVER_LOAD_MAX = 5
local function formspec(meta)
local numbers = meta:get_string("numbers")
return "size[7,5]"..
- "field[0.5,2;6,1;number;Destination node numbers;"..numbers.."]" ..
- "button_exit[1,3;2,1;exit;Save]"
+ "field[0.5,2;6,1;number;"..S("Destination node numbers")..";"..numbers.."]" ..
+ "button_exit[1,3;2,1;exit;"..S("Save").."]"
end
local function send_message(pos, topic, payload)
@@ -29,7 +32,7 @@ local function send_message(pos, topic, payload)
meta:set_int("overload_cnt", overload_cnt)
if overload_cnt > OVER_LOAD_MAX then
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Mesecons Converter "..own_number..": fault (overloaded)")
+ meta:set_string("infotext", S("Tubelib Mesecons Converter").." "..own_number..S(": fault (overloaded)"))
minetest.get_node_timer(pos):stop()
return
else
@@ -42,7 +45,7 @@ local function send_message(pos, topic, payload)
end
minetest.register_node("tubelib_addons2:mesecons_converter", {
- description = "Tubelib Mesecons Converter",
+ description = S("Tubelib Mesecons Converter"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -55,7 +58,7 @@ minetest.register_node("tubelib_addons2:mesecons_converter", {
local own_number = tubelib.add_node(pos, "tubelib_addons2:mesecons_converter")
meta:set_string("own_number", own_number)
meta:set_string("formspec", formspec(meta))
- meta:set_string("infotext", "Tubelib Mesecons Converter "..own_number..": not connected")
+ meta:set_string("infotext", S("Tubelib Mesecons Converter").." "..own_number..S(": not connected"))
meta:set_string("owner", placer:get_player_name())
-- send_message is called 24 times after the node is placed
meta:set_int("overload_cnt", -24)
@@ -72,7 +75,7 @@ minetest.register_node("tubelib_addons2:mesecons_converter", {
if tubelib.check_numbers(fields.number) then
meta:set_string("numbers", fields.number)
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Mesecons Converter "..own_number..": connected with "..fields.number)
+ meta:set_string("infotext", S("Tubelib Mesecons Converter").." "..own_number..S(": connected with").." "..fields.number)
meta:set_string("formspec", formspec(meta))
end
@@ -145,10 +148,10 @@ tubelib.register_node("tubelib_addons2:mesecons_converter", {}, {
elseif topic == "set_numbers" then
local meta = minetest.get_meta(pos)
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Mesecons Converter "..own_number..": connected with "..payload)
+ meta:set_string("infotext", S("Tubelib Mesecons Converter").." "..own_number..S(": connected with").." "..payload)
meta:set_string("numbers", payload)
meta:set_string("formspec", formspec(meta))
+ return true
end
- return true
end,
})
diff --git a/techpack_modpack/tubelib_addons2/mod.conf b/techpack_modpack/tubelib_addons2/mod.conf
index c4fb3c7..476f8c7 100644
--- a/techpack_modpack/tubelib_addons2/mod.conf
+++ b/techpack_modpack/tubelib_addons2/mod.conf
@@ -1 +1,4 @@
name=tubelib_addons2
+description=Tubelib Extension for switching/controlling tasks
+depends=default,tubelib,basic_materials
+optional_depends=mesecons,unifieddyes
diff --git a/techpack_modpack/tubelib_addons2/programmer.lua b/techpack_modpack/tubelib_addons2/programmer.lua
index fe83da7..8e0aecc 100644
--- a/techpack_modpack/tubelib_addons2/programmer.lua
+++ b/techpack_modpack/tubelib_addons2/programmer.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
programmer.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local function join_to_string(tbl)
local t = {}
for key,_ in pairs(tbl) do
@@ -23,7 +26,7 @@ end
local function reset_programmer(itemstack, user, pointed_thing)
user:set_attribute("tubelib_prog_numbers", nil)
- minetest.chat_send_player(user:get_player_name(), "[Tubelib Programmer] programmer reset")
+ minetest.chat_send_player(user:get_player_name(), S("[Tubelib Programmer] programmer reset"))
return itemstack
end
@@ -35,9 +38,9 @@ local function read_number(itemstack, user, pointed_thing)
local numbers = minetest.deserialize(user:get_attribute("tubelib_prog_numbers")) or {}
numbers[number] = true
user:set_attribute("tubelib_prog_numbers", minetest.serialize(numbers))
- minetest.chat_send_player(user:get_player_name(), "[Tubelib Programmer] number "..number.." read")
+ minetest.chat_send_player(user:get_player_name(), S("[Tubelib Programmer] number").." "..number.." "..S("read"))
else
- minetest.chat_send_player(user:get_player_name(), "[Tubelib Programmer] Unknown node on "..minetest.pos_to_string(pos))
+ minetest.chat_send_player(user:get_player_name(), S("[Tubelib Programmer] Unknown node on").." "..minetest.pos_to_string(pos))
end
else
return reset_programmer(itemstack, user, pointed_thing)
@@ -55,14 +58,14 @@ local function program_numbers(itemstack, placer, pointed_thing)
local text = join_to_string(numbers)
local player_name = placer:get_player_name()
if meta and meta:get_string("owner") ~= player_name then
- minetest.chat_send_player(player_name, "[Tubelib Programmer] foreign or unknown node!")
+ minetest.chat_send_player(player_name, S("[Tubelib Programmer] foreign or unknown node!"))
return itemstack
end
local res = tubelib.send_request(node_number, "set_numbers", text)
if res == true then
- minetest.chat_send_player(player_name, "[Tubelib Programmer] node programmed!")
+ minetest.chat_send_player(player_name, S("[Tubelib Programmer] node programmed!"))
else
- minetest.chat_send_player(player_name, "[Tubelib Programmer] Error: programmer not supported!")
+ minetest.chat_send_player(player_name, S("[Tubelib Programmer] Error: programmer not supported!"))
end
return itemstack
else
@@ -71,7 +74,7 @@ local function program_numbers(itemstack, placer, pointed_thing)
end
minetest.register_craftitem("tubelib_addons2:programmer", {
- description = "Tubelib Programmer",
+ description = S("Tubelib Programmer"),
inventory_image = "tubelib_addons2_programmer.png",
stack_max = 1,
wield_image = "tubelib_addons2_programmer_wield.png",
diff --git a/techpack_modpack/tubelib_addons2/repeater.lua b/techpack_modpack/tubelib_addons2/repeater.lua
index 313996f..a423180 100644
--- a/techpack_modpack/tubelib_addons2/repeater.lua
+++ b/techpack_modpack/tubelib_addons2/repeater.lua
@@ -3,26 +3,29 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
repeater.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local OVER_LOAD_MAX = 5
local function formspec(meta)
local numbers = meta:get_string("numbers")
return "size[7,5]"..
- "field[0.5,2;6,1;number;Destination node numbers;"..numbers.."]" ..
- "button_exit[1,3;2,1;exit;Save]"
+ "field[0.5,2;6,1;number;"..S("Destination node numbers")..";"..numbers.."]" ..
+ "button_exit[1,3;2,1;exit;"..S("Save").."]"
end
minetest.register_node("tubelib_addons2:repeater", {
- description = "Tubelib Repeater",
+ description = S("Tubelib Repeater"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@@ -35,7 +38,7 @@ minetest.register_node("tubelib_addons2:repeater", {
local own_number = tubelib.add_node(pos, "tubelib_addons2:repeater")
meta:set_string("own_number", own_number)
meta:set_string("formspec", formspec(meta))
- meta:set_string("infotext", "Tubelib Repeater "..own_number..": not connected")
+ meta:set_string("infotext", S("Tubelib Repeater").." "..own_number..S(": not connected"))
meta:set_string("owner", placer:get_player_name())
meta:set_int("overload_cnt", 0)
minetest.get_node_timer(pos):start(1)
@@ -51,7 +54,7 @@ minetest.register_node("tubelib_addons2:repeater", {
if tubelib.check_numbers(fields.number) then
meta:set_string("numbers", fields.number)
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Repeater "..own_number..": connected with "..fields.number)
+ meta:set_string("infotext", S("Tubelib Repeater").." "..own_number..S(": connected with").." "..fields.number)
meta:set_string("formspec", formspec(meta))
end
@@ -101,12 +104,12 @@ tubelib.register_node("tubelib_addons2:repeater", {}, {
meta:set_int("overload_cnt", overload_cnt)
if overload_cnt > OVER_LOAD_MAX then
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Repeater "..own_number..": fault (overloaded)")
+ meta:set_string("infotext", S("Tubelib Repeater").." "..own_number..S(": fault (overloaded)"))
minetest.get_node_timer(pos):stop()
return false
elseif topic == "set_numbers" then
local own_number = meta:get_string("own_number")
- meta:set_string("infotext", "Tubelib Repeater "..own_number..": connected with "..payload)
+ meta:set_string("infotext", S("Tubelib Repeater").." "..own_number..S(": connected with").." "..payload)
meta:set_string("numbers", payload)
meta:set_string("formspec", formspec(meta))
return true
diff --git a/techpack_modpack/tubelib_addons2/sequencer.lua b/techpack_modpack/tubelib_addons2/sequencer.lua
index 9c7fec1..6cdf8e3 100644
--- a/techpack_modpack/tubelib_addons2/sequencer.lua
+++ b/techpack_modpack/tubelib_addons2/sequencer.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
sequencer.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local RUNNING_STATE = 1
local STOP_STATE = 0
local NUM_SLOTS = 8
@@ -26,16 +29,16 @@ local function formspec(state, rules, endless)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "label[0,0;Number(s)]label[2.1,0;Command]label[6.4,0;Offset/s]"}
+ "label[0,0;Number(s)]label[2.1,0;"..S("Command").."]label[6.4,0;Offset/s]"}
for idx, rule in ipairs(rules or {}) do
tbl[#tbl+1] = "field[0.2,"..(-0.2+idx)..";2,1;num"..idx..";;"..(rule.num or "").."]"
tbl[#tbl+1] = "dropdown[2,"..(-0.4+idx)..";3.9,1;act"..idx..";"..sAction..";"..(rule.act or "").."]"
tbl[#tbl+1] = "field[6.2,"..(-0.2+idx)..";2,1;offs"..idx..";;"..(rule.offs or "").."]"
end
- tbl[#tbl+1] = "checkbox[0,8.5;endless;Run endless;"..endless.."]"
+ tbl[#tbl+1] = "checkbox[0,8.5;endless;"..S("Run endless")..";"..endless.."]"
tbl[#tbl+1] = "image_button[5,8.5;1,1;".. tubelib.state_button(state) ..";button;]"
- tbl[#tbl+1] = "button[6.2,8.5;1.5,1;help;help]"
+ tbl[#tbl+1] = "button[6.2,8.5;1.5,1;"..S("help")..";help]"
return table.concat(tbl)
end
@@ -45,14 +48,14 @@ local function formspec_help()
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
- "label[2,0;Sequencer Help]"..
- "label[0,1;Define a sequence of commands\nto control other machines.]"..
- "label[0,2.2;Numbers(s) are the node numbers,\nthe command shall sent to.]"..
- "label[0,3.4;The commands 'on'/'off' are used\n for machines and other nodes.]"..
- "label[0,4.6;Offset is the time to the\nnext line in seconds (1..999).]"..
- "label[0,5.8;If endless is set, the Sequencer\nrestarts again and again.]"..
- "label[0,7;The command ' ' does nothing,\nonly consuming the offset time.]"..
- "button[3,8;2,1;exit;close]"
+ "label[2,0;"..S("Sequencer Help").."]"..
+ "label[0,1;"..S("Define a sequence of commands\nto control other machines.").."]"..
+ "label[0,2.2;"..S("Numbers(s) are the node numbers,\nthe command shall sent to.").."]"..
+ "label[0,3.4;"..S("The commands 'on'/'off' are used\n for machines and other nodes.").."]"..
+ "label[0,4.6;"..S("Offset is the time to the\nnext line in seconds (1..999).").."]"..
+ "label[0,5.8;"..S("If endless is set, the Sequencer\nrestarts again and again.").."]"..
+ "label[0,7;"..S("The command ' ' does nothing,\nonly consuming the offset time.").."]"..
+ "button[3,8;2,1;"..S("exit")..";close]"
end
local function stop_the_sequencer(pos)
@@ -60,7 +63,7 @@ local function stop_the_sequencer(pos)
local meta = minetest.get_meta(pos)
local number = meta:get_string("number")
meta:set_int("running", STOP_STATE)
- meta:set_string("infotext", "Tubelib Sequencer "..number..": stopped")
+ meta:set_string("infotext", S("Tubelib Sequencer").." "..number..": stopped")
local rules = minetest.deserialize(meta:get_string("rules"))
local endless = meta:get_int("endless") or 0
meta:set_string("formspec", formspec(tubelib.STOPPED, rules, endless))
@@ -111,7 +114,7 @@ local function check_rules(pos, elapsed)
if index == 1 and offs < 1 then
offs = 1
end
- meta:set_string("infotext", "Tubelib Sequencer "..number..": running ("..index.."/"..NUM_SLOTS..")")
+ meta:set_string("infotext", S("Tubelib Sequencer").." "..number..": running ("..index.."/"..NUM_SLOTS..")")
meta:set_int("index", index)
if offs > 0 then
minetest.after(0, restart_timer, pos, offs)
@@ -133,7 +136,7 @@ local function start_the_sequencer(pos)
local number = meta:get_string("number")
meta:set_int("running", 1)
meta:set_int("index", 1)
- meta:set_string("infotext", "Tubelib Sequencer "..number..": running (1/"..NUM_SLOTS..")")
+ meta:set_string("infotext", S("Tubelib Sequencer").." "..number..": running (1/"..NUM_SLOTS..")")
local rules = minetest.deserialize(meta:get_string("rules"))
local endless = meta:get_int("endless") or 0
meta:set_string("formspec", formspec(tubelib.RUNNING, rules, endless))
@@ -196,7 +199,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons2:sequencer", {
- description = "Tubelib Sequencer",
+ description = S("Tubelib Sequencer"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
diff --git a/techpack_modpack/tubelib_addons2/streetlamp.lua b/techpack_modpack/tubelib_addons2/streetlamp.lua
index 81002d4..7d5bc3f 100644
--- a/techpack_modpack/tubelib_addons2/streetlamp.lua
+++ b/techpack_modpack/tubelib_addons2/streetlamp.lua
@@ -3,15 +3,17 @@
Tubelib Addons 2
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
streetlamp.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
local function switch_on(pos, node)
node.name = "tubelib_addons2:streetlamp_on"
@@ -24,7 +26,7 @@ local function switch_off(pos, node)
end
minetest.register_node("tubelib_addons2:streetlamp", {
- description = "Tubelib Street Lamp",
+ description = S("Tubelib Street Lamp"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons2_streetlamp_top.png',
@@ -50,7 +52,7 @@ minetest.register_node("tubelib_addons2:streetlamp", {
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib_addons2:streetlamp")
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Tubelib Street Lamp "..number)
+ meta:set_string("infotext", S("Tubelib Street Lamp").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@@ -73,7 +75,7 @@ minetest.register_node("tubelib_addons2:streetlamp", {
})
minetest.register_node("tubelib_addons2:streetlamp_on", {
- description = "Tubelib Street Lamp",
+ description = S("Tubelib Street Lamp"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons2_streetlamp_top.png',
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_access_control.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_access_control.png
index 24e0afb..b03bb73 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_access_control.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_access_control.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_door.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_door.png
index a4591e1..2ef811b 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_door.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_door.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_gate.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_gate.png
index da566e3..7c7644e 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_gate.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_gate.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_logic_not.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_logic_not.png
index 8cf9258..2106466 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_logic_not.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_logic_not.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_mesecons_converter.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_mesecons_converter.png
index 49e5fda..dee002e 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_mesecons_converter.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_mesecons_converter.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_repeater.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_repeater.png
index ef563dc..37b5bad 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_repeater.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_repeater.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_timer.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_timer.png
index 6df1274..960376d 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_timer.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addon2_timer.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp.png
index 572776e..a6730ae 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_bottom.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_bottom.png
index ab5ad8e..f7635ef 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_bottom.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_bottom.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_top.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_top.png
index d2f12da..835c1c3 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_top.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_ceilinglamp_top.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1.png
index f4672d3..8fc4900 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1_on.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1_on.png
index 8df366f..9c2a702 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1_on.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp1_on.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2.png
index 5774d95..58eb44e 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2_on.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2_on.png
index 3aaad5a..8d46b21 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2_on.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp2_on.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv1.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv1.png
index 89c32f0..58f04d6 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv1.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv1.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv2.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv2.png
index 480eb4d..18a975f 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv2.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_industriallamp_inv2.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp.png
index 24416b8..ad598ca 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp_inventory.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp_inventory.png
index 103bd18..1767749 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp_inventory.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_invisiblelamp_inventory.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_lamp.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_lamp.png
index 745d3b7..f669768 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_lamp.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_lamp.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer.png
index 6cbcf93..03a08d7 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer_wield.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer_wield.png
index 8bcf027..7a6866c 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer_wield.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_programmer_wield.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_sequencer.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_sequencer.png
index 86999b4..6d028a8 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_sequencer.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_sequencer.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp.png
index e89777b..974da01 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_off.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_off.png
index fdcdd00..4385f29 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_off.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_off.png differ
diff --git a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_top.png b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_top.png
index fcbba70..f4ea4ab 100644
Binary files a/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_top.png and b/techpack_modpack/tubelib_addons2/textures/tubelib_addons2_streetlamp_top.png differ
diff --git a/techpack_modpack/tubelib_addons2/timer.lua b/techpack_modpack/tubelib_addons2/timer.lua
index 588e059..fd21d50 100644
--- a/techpack_modpack/tubelib_addons2/timer.lua
+++ b/techpack_modpack/tubelib_addons2/timer.lua
@@ -3,15 +3,18 @@
Tubelib Addons 2
================
- Copyright (C) 2017 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
timer.lua:
]]--
+-- Load support for I18n
+local S = tubelib_addons2.S
+
local CYCLE_TIME = 8
local tTime = {
@@ -37,7 +40,7 @@ local function formspec(events, numbers, actions)
default.gui_bg_img..
default.gui_slots..
- "label[0,0;Time]label[2.3,0;Number(s)]label[4.5,0;Command]"..
+ "label[0,0;"..S("Time").."]label[2.3,0;"..S("Number(s)").."]label[4.5,0;"..S("Command").."]"..
"dropdown[0,1;2,1;e1;"..sTime..";"..events[1].."]"..
"field[2.3,1.2;2,1;n1;;"..numbers[1].."]" ..
"dropdown[4.5,1;3,1;a1;"..sAction..";"..tAction[actions[1]].."]"..
@@ -97,7 +100,7 @@ local function check_rules(pos,elapsed)
done = {false,false,false,false,false,false}
end
meta:set_string("done", minetest.serialize(done))
- meta:set_string("infotext","Tubelib Timer "..hour..":00")
+ meta:set_string("infotext", S("Tubelib Timer").." "..hour..":00")
return true
end
return false
@@ -105,7 +108,7 @@ end
minetest.register_node("tubelib_addons2:timer", {
- description = "Tubelib Timer",
+ description = S("Tubelib Timer"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
diff --git a/techpack_modpack/tubelib_addons3/chest.lua b/techpack_modpack/tubelib_addons3/chest.lua
index e32aeb3..ed6910c 100644
--- a/techpack_modpack/tubelib_addons3/chest.lua
+++ b/techpack_modpack/tubelib_addons3/chest.lua
@@ -3,9 +3,9 @@
Tubelib Addons 3
================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
chest.lua
@@ -14,6 +14,9 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons3.S
+
local PlayerActions = {}
local InventoryState = {}
@@ -76,7 +79,7 @@ local function formspec()
end
minetest.register_node("tubelib_addons3:chest", {
- description = "HighPerf Chest",
+ description = S("HighPerf Chest"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons3_chest_bottom.png',
@@ -99,7 +102,7 @@ minetest.register_node("tubelib_addons3:chest", {
meta:set_string("number", number)
meta:set_string("owner", placer:get_player_name())
meta:set_string("formspec", formspec())
- meta:set_string("infotext", "HighPerf Chest "..number)
+ meta:set_string("infotext", S("HighPerf Chest").." "..number)
end,
can_dig = function(pos,player)
@@ -148,7 +151,14 @@ tubelib.register_node("tubelib_addons3:chest", {}, {
end,
on_push_item = function(pos, side, item)
local meta = minetest.get_meta(pos)
- return tubelib.put_item(meta, "main", item)
+ local res = tubelib.put_item(meta, "main", item)
+ if res == false then
+ local inv = meta:get_inventory()
+ local leftover = inv:add_item("main", item)
+ item:set_count(leftover:get_count())
+ return false
+ end
+ return true
end,
on_unpull_item = function(pos, side, item)
local meta = minetest.get_meta(pos)
@@ -168,7 +178,7 @@ tubelib.register_node("tubelib_addons3:chest", {}, {
local meta = minetest.get_meta(pos)
meta:set_string("dest_num", payload)
local number = meta:get_string("number")
- meta:set_string("infotext", "HighPerf Chest "..number.." connected with "..payload)
+ meta:set_string("infotext", S("HighPerf Chest").." "..number.." "..S("connected with").." "..payload)
return true
end
else
diff --git a/techpack_modpack/tubelib_addons3/chest_cart.lua b/techpack_modpack/tubelib_addons3/chest_cart.lua
new file mode 100644
index 0000000..5332f3d
--- /dev/null
+++ b/techpack_modpack/tubelib_addons3/chest_cart.lua
@@ -0,0 +1,171 @@
+--[[
+
+ Tubelib Addons 3
+ ================
+
+ Copyright (C) 2017-2020 Joachim Stolberg
+
+ AGPL v3
+ See LICENSE.txt for more information
+
+ chest.lua
+
+ A high performance chest
+
+]]--
+
+-- Load support for I18n
+local S = tubelib_addons3.S
+
+local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
+local S2P = minetest.string_to_pos
+local M = minetest.get_meta
+
+local function on_rightclick(pos, node, clicker)
+ if clicker and clicker:is_player() then
+ if M(pos):get_int("userID") == 0 then
+ minecart.show_formspec(pos, clicker)
+ end
+ end
+end
+
+local function formspec()
+ return "size[8,6]"..
+ default.gui_bg..
+ default.gui_bg_img..
+ default.gui_slots..
+ "list[context;main;3,0;2,2;]"..
+ "list[current_player;main;0,2.3;8,4;]"..
+ "listring[context;main]"..
+ "listring[current_player;main]"
+end
+
+local function allow_metadata_inventory_put(pos, listname, index, stack, player)
+ local owner = M(pos):get_string("owner")
+ if owner ~= "" and owner ~= player:get_player_name() then
+ return 0
+ end
+ return stack:get_count()
+end
+
+local function allow_metadata_inventory_take(pos, listname, index, stack, player)
+ local owner = M(pos):get_string("owner")
+ if owner ~= "" and owner ~= player:get_player_name() then
+ return 0
+ end
+ return stack:get_count()
+end
+
+minetest.register_node("tubelib_addons3:chest_cart", {
+ description = S("TA Chest Cart"),
+ tiles = {
+ -- up, down, right, left, back, front
+ "tubelib_addons3_chest_cart_top.png",
+ "tubelib_addons3_chest_cart_bottom.png",
+ "tubelib_addons3_chest_cart_side.png",
+ "tubelib_addons3_chest_cart_side.png",
+ "tubelib_addons3_chest_cart_front.png",
+ "tubelib_addons3_chest_cart_front.png",
+ },
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-7/16, 3/16, -7/16, 7/16, 8/16, 7/16},
+ {-8/16, -8/16, -8/16, 8/16, 3/16, 8/16},
+ },
+ },
+ paramtype2 = "facedir",
+ paramtype = "light",
+ use_texture_alpha = true,
+ sunlight_propagates = true,
+ is_ground_content = false,
+ groups = {cracky = 2, crumbly = 2, choppy = 2},
+ node_placement_prediction = "",
+ diggable = false,
+
+ on_place = minecart.on_nodecart_place,
+ on_punch = minecart.on_nodecart_punch,
+ allow_metadata_inventory_put = allow_metadata_inventory_put,
+ allow_metadata_inventory_take = allow_metadata_inventory_take,
+ on_rightclick = on_rightclick,
+
+ after_place_node = function(pos, placer)
+ local inv = M(pos):get_inventory()
+ inv:set_size('main', 4)
+ if placer and placer:is_player() then
+ minecart.show_formspec(pos, placer)
+ else
+ M(pos):set_string("formspec", formspec())
+ end
+ end,
+
+ set_cargo = function(pos, data)
+ local inv = M(pos):get_inventory()
+ for idx, stack in ipairs(data) do
+ inv:set_stack("main", idx, stack)
+ end
+ end,
+
+ get_cargo = function(pos)
+ local inv = M(pos):get_inventory()
+ local data = {}
+ for idx = 1, 4 do
+ local stack = inv:get_stack("main", idx)
+ data[idx] = {name = stack:get_name(), count = stack:get_count()}
+ end
+ return data
+ end,
+
+ has_cargo = function(pos)
+ local inv = minetest.get_meta(pos):get_inventory()
+ return not inv:is_empty("main")
+ end
+})
+
+minecart.register_cart_entity("tubelib_addons3:chest_cart_entity", "tubelib_addons3:chest_cart", "chest", {
+ initial_properties = {
+ physical = false,
+ collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
+ visual = "wielditem",
+ textures = {"tubelib_addons3:chest_cart"},
+ visual_size = {x=0.66, y=0.66, z=0.66},
+ static_save = false,
+ },
+})
+
+tubelib.register_node("tubelib_addons3:chest_cart", {}, {
+ on_pull_stack = function(pos, side)
+ local meta = minetest.get_meta(pos)
+ return tubelib.get_stack(meta, "main")
+ end,
+ on_pull_item = function(pos, side)
+ local meta = minetest.get_meta(pos)
+ return tubelib.get_item(meta, "main")
+ end,
+ on_push_item = function(pos, side, item)
+ local meta = minetest.get_meta(pos)
+ return tubelib.put_item(meta, "main", item)
+ end,
+ on_unpull_item = function(pos, side, item)
+ local meta = minetest.get_meta(pos)
+ return tubelib.put_item(meta, "main", item)
+ end,
+
+ on_recv_message = function(pos, topic, payload)
+ if topic == "state" then
+ local meta = minetest.get_meta(pos)
+ return tubelib.get_inv_state(meta, "main")
+ else
+ return "unsupported"
+ end
+ end,
+})
+
+minetest.register_craft({
+ output = "tubelib_addons3:chest_cart",
+ recipe = {
+ {"default:junglewood", "default:chest_locked", "default:junglewood"},
+ {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
+ },
+})
diff --git a/techpack_modpack/tubelib_addons3/distributor.lua b/techpack_modpack/tubelib_addons3/distributor.lua
index bed3ae5..6d4ef85 100644
--- a/techpack_modpack/tubelib_addons3/distributor.lua
+++ b/techpack_modpack/tubelib_addons3/distributor.lua
@@ -3,9 +3,9 @@
Tubelib Addons 3
================
- Copyright (C) 2018-2019 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
distributor.lua:
@@ -13,8 +13,10 @@
A high performance distributor
]]--
+-- Load support for I18n
+local S = tubelib_addons3.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@@ -55,7 +57,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons3:distributor",
node_name_active = "tubelib_addons3:distributor_active",
node_name_defect = "tubelib_addons3:distributor_defect",
- infotext_name = "HighPerf Distributor",
+ infotext_name = S("HighPerf Distributor"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
aging_factor = 50,
@@ -110,6 +112,14 @@ local function random_list_elem(list)
end
end
+local function rearrange_table(t)
+ if #t > 1 then
+ local elem = table.remove(t, 1)
+ table.insert(t, elem)
+ end
+ return t
+end
+
local Side2Color = {B="red", L="green", F="blue", R="yellow"}
local SlotColors = {"red", "green", "blue", "yellow"}
local Num2Ascii = {"B", "L", "F", "R"}
@@ -143,30 +153,38 @@ local function filter_settings(pos)
end
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
- local meta = M(pos)
- local inv = meta:get_inventory()
- local list = inv:get_list(listname)
-
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
+
+ local meta = M(pos)
+ local inv = meta:get_inventory()
+ local list = inv:get_list(listname)
+ local stack_count = stack:get_count()
+
if listname == "src" then
if State:get_state(M(pos)) == tubelib.STANDBY then
State:start(pos, meta)
end
- return stack:get_count()
- elseif invlist_num_entries(list) < NUM_FILTER_ELEM then
- filter_settings(pos)
- return 1
+ return stack_count
end
- return 0
+
+ local space_left = NUM_FILTER_ELEM - invlist_num_entries(list)
+ if space_left <= 0 then
+ return 0
+ end
+
+ filter_settings(pos)
+ return 1
end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
- filter_settings(pos)
+ if listname ~= "src" then
+ filter_settings(pos)
+ end
return stack:get_count()
end
@@ -194,7 +212,10 @@ local function distributing(pos, meta)
local open_ports = table.copy(FilterCache[hash].OpenPorts)
-- no filter configured?
- if not next(kvFilterItemNames) and not next(open_ports) then return end
+ if not next(kvFilterItemNames) and not next(open_ports) then
+ State:idle(pos, meta)
+ return
+ end
local busy = false
local inv = meta:get_inventory()
@@ -215,23 +236,26 @@ local function distributing(pos, meta)
local num = stack:get_count()
local second_try = false
-- try configured output ports
- local side = random_list_elem(kvFilterItemNames[name])
- if side then -- configured
+ for _, side in ipairs(kvFilterItemNames[name] or {}) do -- configured
if tubelib.push_items(pos, side, stack, player_name) then
stack:set_count(0)
local color = Side2Color[side]
counter[color] = counter[color] + num
+ rearrange_table(kvFilterItemNames[name])
busy = true
- else
- second_try = true -- port blocked
+ break
+ elseif num ~= stack:get_count() then
+ local color = Side2Color[side]
+ counter[color] = counter[color] + stack:get_count()
+ rearrange_table(kvFilterItemNames[name])
+ busy = true
+ break
end
- else
- second_try = true -- not configured
end
-- try unconfigured open output ports
- if second_try and (not kvFilterItemNames[name] or #kvFilterItemNames[name] == 1) then
- side = random_list_elem(open_ports)
+ if not busy then
+ local side = random_list_elem(open_ports)
if side then
if tubelib.push_items(pos, side, stack, player_name) then
stack:set_count(0)
@@ -239,6 +263,10 @@ local function distributing(pos, meta)
counter[color] = counter[color] + num
busy = true
end
+ elseif num ~= stack:get_count() then
+ local color = Side2Color[side]
+ counter[color] = counter[color] + stack:get_count()
+ busy = true
end
end
end
@@ -267,7 +295,7 @@ local function on_receive_fields(pos, formname, fields, player)
return
end
local meta = M(pos)
- local filter = minetest.deserialize(meta:get_string("filter"))
+ local filter = minetest.deserialize(meta:get_string("filter")) or {false,false,false,false}
if fields.filter1 ~= nil then
filter[1] = fields.filter1 == "true"
elseif fields.filter2 ~= nil then
@@ -292,7 +320,7 @@ end
local function change_filter_settings(pos, slot, val)
local slots = {["red"] = 1, ["green"] = 2, ["blue"] = 3, ["yellow"] = 4}
local meta = M(pos)
- local filter = minetest.deserialize(meta:get_string("filter"))
+ local filter = minetest.deserialize(meta:get_string("filter")) or {false,false,false,false}
local num = slots[slot] or 1
if num >= 1 and num <= 4 then
filter[num] = val == "on"
@@ -306,7 +334,7 @@ local function change_filter_settings(pos, slot, val)
end
minetest.register_node("tubelib_addons3:distributor", {
- description = "HighPerf Distributor",
+ description = S("HighPerf Distributor"),
tiles = {
-- up, down, right, left, back, front
'tubelib_distributor.png^tubelib_addons3_node_frame.png',
@@ -343,9 +371,9 @@ minetest.register_node("tubelib_addons3:distributor", {
local inv = M(pos):get_inventory()
return inv:is_empty("src")
end,
-
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
+
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
end,
@@ -356,7 +384,6 @@ minetest.register_node("tubelib_addons3:distributor", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -367,7 +394,7 @@ minetest.register_node("tubelib_addons3:distributor", {
minetest.register_node("tubelib_addons3:distributor_active", {
- description = "HighPerf Distributor",
+ description = S("HighPerf Distributor"),
tiles = {
-- up, down, right, left, back, front
{
@@ -396,6 +423,9 @@ minetest.register_node("tubelib_addons3:distributor_active", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
+ diggable = false,
+ can_dig = function() return false end,
+
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -405,7 +435,7 @@ minetest.register_node("tubelib_addons3:distributor_active", {
})
minetest.register_node("tubelib_addons3:distributor_defect", {
- description = "HighPerf Distributor",
+ description = S("HighPerf Distributor"),
tiles = {
-- up, down, right, left, back, front
'tubelib_distributor.png^tubelib_addons3_node_frame.png',
@@ -478,6 +508,9 @@ tubelib.register_node("tubelib_addons3:distributor",
on_pull_item = function(pos, side)
return tubelib.get_item(M(pos), "src")
end,
+ on_pull_stack = function(pos, side)
+ return tubelib.get_stack(M(pos), "src")
+ end,
on_push_item = function(pos, side, item)
return tubelib.put_item(M(pos), "src", item)
end,
diff --git a/techpack_modpack/tubelib_addons3/funnel.lua b/techpack_modpack/tubelib_addons3/funnel.lua
new file mode 100644
index 0000000..1eeba23
--- /dev/null
+++ b/techpack_modpack/tubelib_addons3/funnel.lua
@@ -0,0 +1,172 @@
+--[[
+
+ Tubelib Addons 3
+ ================
+
+ Copyright (C) 2017-2020 Joachim Stolberg
+
+ AGPL v3
+ See LICENSE.txt for more information
+
+ funnel.lua
+
+ A high performance funnel
+
+]]--
+
+-- Load support for I18n
+local S = tubelib_addons3.S
+
+local function allow_metadata_inventory_put(pos, listname, index, stack, player)
+ if minetest.is_protected(pos, player:get_player_name()) then
+ return 0
+ end
+ minetest.log("action", player:get_player_name().." moves "..stack:get_name()..
+ " to HighPerf funnel at "..minetest.pos_to_string(pos))
+ return stack:get_count()
+end
+
+local function allow_metadata_inventory_take(pos, listname, index, stack, player)
+ if minetest.is_protected(pos, player:get_player_name()) then
+ return 0
+ end
+ minetest.log("action", player:get_player_name().." takes "..stack:get_name()..
+ " from HighPerf funnel at "..minetest.pos_to_string(pos))
+ return stack:get_count()
+end
+
+local function formspec()
+ return "size[9,7]"..
+ default.gui_bg..
+ default.gui_bg_img..
+ default.gui_slots..
+ "list[context;main;0.5,0;8,2;]"..
+ "list[current_player;main;0.5,3.3;8,4;]"..
+ "listring[context;main]"..
+ "listring[current_player;main]"
+end
+
+local function scan_for_objects(pos, elapsed)
+ local meta = minetest.get_meta(pos)
+ for _, object in pairs(minetest.get_objects_inside_radius(pos, 1)) do
+ local lua_entity = object:get_luaentity()
+ if not object:is_player() and lua_entity and lua_entity.name == "__builtin:item" then
+ local obj_pos = object:getpos()
+ if lua_entity.itemstring ~= "" and ((obj_pos.y - pos.y) >= 0.4) then
+ if tubelib.put_item(meta, "main", lua_entity.itemstring) then
+ lua_entity.itemstring = ""
+ object:remove()
+ end
+ end
+
+ end
+ end
+ return true
+end
+
+minetest.register_node("tubelib_addons3:funnel", {
+ description = S("HighPerf Funnel"),
+ tiles = {
+ -- up, down, right, left, back, front
+ 'tubelib_addons1_funnel_top.png^tubelib_addons3_node_frame4.png',
+ 'tubelib_addons1_funnel_top.png^tubelib_addons3_node_frame4.png',
+ 'tubelib_addons1_funnel.png^tubelib_addons3_node_frame4.png',
+ },
+
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-8/16, -8/16, -8/16, 8/16, 8/16, -6/16},
+ {-8/16, -8/16, 6/16, 8/16, 8/16, 8/16},
+ {-8/16, -8/16, -8/16, -6/16, 8/16, 8/16},
+ { 6/16, -8/16, -8/16, 8/16, 8/16, 8/16},
+ {-6/16, -8/16, -6/16, 6/16, 4/16, 6/16},
+ },
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-8/16, -8/16, -8/16, 8/16, 8/16, 8/16},
+ },
+
+ on_construct = function(pos)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ inv:set_size('main', 16)
+ end,
+
+ after_place_node = function(pos, placer)
+ tubelib.add_node(pos, "tubelib_addons3:funnel")
+ local meta = minetest.get_meta(pos)
+ meta:set_string("formspec", formspec())
+ minetest.get_node_timer(pos):start(1)
+ end,
+
+ on_timer = scan_for_objects,
+ on_rotate = screwdriver.disallow,
+
+ can_dig = function(pos, player)
+ if minetest.is_protected(pos, player:get_player_name()) then
+ return false
+ end
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ return inv:is_empty("main")
+ end,
+
+ after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ tubelib.remove_node(pos)
+ end,
+
+ allow_metadata_inventory_put = allow_metadata_inventory_put,
+ allow_metadata_inventory_take = allow_metadata_inventory_take,
+
+ paramtype = "light",
+ sunlight_propagates = true,
+ paramtype2 = "facedir",
+ groups = {choppy=2, cracky=2, crumbly=2},
+ is_ground_content = false,
+ sounds = default.node_sound_wood_defaults(),
+})
+
+
+minetest.register_craft({
+ output = "tubelib_addons3:funnel",
+ recipe = {
+ {"default:tin_ingot", "tubelib_addons1:funnel", ""},
+ {"tubelib_addons1:funnel", "default:gold_ingot", ""},
+ {"", "", ""},
+ },
+})
+
+
+tubelib.register_node("tubelib_addons3:funnel", {}, {
+ invalid_sides = {"U"},
+ on_pull_stack = function(pos, side)
+ local meta = minetest.get_meta(pos)
+ return tubelib.get_stack(meta, "main")
+ end,
+ on_pull_item = function(pos, side)
+ local meta = minetest.get_meta(pos)
+ return tubelib.get_item(meta, "main")
+ end,
+ on_unpull_item = function(pos, side, item)
+ local meta = minetest.get_meta(pos)
+ return tubelib.put_item(meta, "main", item)
+ end,
+
+ on_recv_message = function(pos, topic, payload)
+ if topic == "state" then
+ local meta = minetest.get_meta(pos)
+ return tubelib.get_inv_state(meta, "main")
+ else
+ return "unsupported"
+ end
+ end,
+ on_node_load = function(pos)
+ minetest.get_node_timer(pos):start(1)
+ end,
+
+})
+
+
diff --git a/techpack_modpack/tubelib_addons3/init.lua b/techpack_modpack/tubelib_addons3/init.lua
index 93a20cf..5f0d5a3 100644
--- a/techpack_modpack/tubelib_addons3/init.lua
+++ b/techpack_modpack/tubelib_addons3/init.lua
@@ -3,15 +3,25 @@
Tubelib Addons 3
================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
]]--
+tubelib_addons3 = {}
+
+-- Load support for I18n
+tubelib_addons3.S = minetest.get_translator("tubelib_addons3")
+
dofile(minetest.get_modpath("tubelib_addons3") .. '/chest.lua')
dofile(minetest.get_modpath("tubelib_addons3") .. '/pusher.lua')
dofile(minetest.get_modpath("tubelib_addons3") .. '/distributor.lua')
dofile(minetest.get_modpath("tubelib_addons3") .. '/pushing_chest.lua')
-dofile(minetest.get_modpath("tubelib_addons3") .. '/teleporter.lua')
\ No newline at end of file
+dofile(minetest.get_modpath("tubelib_addons3") .. '/teleporter.lua')
+dofile(minetest.get_modpath("tubelib_addons3") .. '/funnel.lua')
+
+if minetest.global_exists("minecart") then
+ dofile(minetest.get_modpath("tubelib_addons3") .. '/chest_cart.lua')
+end
diff --git a/techpack_modpack/tubelib_addons3/locale/template.txt b/techpack_modpack/tubelib_addons3/locale/template.txt
new file mode 100644
index 0000000..dca4125
--- /dev/null
+++ b/techpack_modpack/tubelib_addons3/locale/template.txt
@@ -0,0 +1,34 @@
+# textdomain: tubelib_addons3
+
+
+
+### chest.lua ###
+
+HighPerf Chest=
+connected with=
+
+### chest_cart.lua ###
+
+TA Chest Cart=
+
+### distributor.lua ###
+
+HighPerf Distributor=
+
+### funnel.lua ###
+
+HighPerf Funnel=
+
+### pusher.lua ###
+
+HighPerf Pusher=
+
+### pushing_chest.lua ###
+
+HighPerf Pushing Chest=
+
+### teleporter.lua ###
+
+Enter channel string=
+Save=
+Tubelib Teleporter=
diff --git a/techpack_modpack/tubelib_addons3/locale/tubelib_addons3.de.tr b/techpack_modpack/tubelib_addons3/locale/tubelib_addons3.de.tr
new file mode 100644
index 0000000..9137367
--- /dev/null
+++ b/techpack_modpack/tubelib_addons3/locale/tubelib_addons3.de.tr
@@ -0,0 +1,34 @@
+# textdomain: tubelib_addons3
+
+
+
+### chest.lua ###
+
+HighPerf Chest=HighPerf Kiste
+connected with=verbunden mit
+
+### chest_cart.lua ###
+
+TA Chest Cart=TA Kistenwagen
+
+### distributor.lua ###
+
+HighPerf Distributor=HighPerf Verteiler
+
+### funnel.lua ###
+
+HighPerf Funnel=HighPerf Trichter
+
+### pusher.lua ###
+
+HighPerf Pusher=HighPerf Schieber
+
+### pushing_chest.lua ###
+
+HighPerf Pushing Chest=HighPerf Schiebende Kiste
+
+### teleporter.lua ###
+
+Enter channel string=Geben Sie die Kanalbezeichner ein
+Save=Speichern
+Tubelib Teleporter=Tubelib Teleporter
diff --git a/techpack_modpack/tubelib_addons3/mod.conf b/techpack_modpack/tubelib_addons3/mod.conf
index c545ead..18f1527 100644
--- a/techpack_modpack/tubelib_addons3/mod.conf
+++ b/techpack_modpack/tubelib_addons3/mod.conf
@@ -1 +1,4 @@
name=tubelib_addons3
+description=Tubelib Extension with High Performance nodes
+depends=tubelib,tubelib_addons1,default
+optional_depends=minecart
diff --git a/techpack_modpack/tubelib_addons3/pusher.lua b/techpack_modpack/tubelib_addons3/pusher.lua
index 0074d85..cc4979a 100644
--- a/techpack_modpack/tubelib_addons3/pusher.lua
+++ b/techpack_modpack/tubelib_addons3/pusher.lua
@@ -3,9 +3,9 @@
Tubelib Addons 3
================
- Copyright (C) 2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
pusher.lua
@@ -14,21 +14,25 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons3.S
+
-- for lazy programmers
-local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local STANDBY_TICKS = 5
local COUNTDOWN_TICKS = 5
local CYCLE_TIME = 2
+local FIRST_CYCLE = 0.5
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons3:pusher",
node_name_active = "tubelib_addons3:pusher_active",
node_name_defect = "tubelib_addons3:pusher_defect",
- infotext_name = "HighPerf Pusher",
+ infotext_name = S("HighPerf Pusher"),
cycle_time = CYCLE_TIME,
+ first_cycle_time = FIRST_CYCLE,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
aging_factor = 50,
@@ -38,13 +42,19 @@ local function pushing(pos, meta)
local player_name = meta:get_string("player_name")
local items = tubelib.pull_stack(pos, "L", player_name)
if items ~= nil then
+ local count = items:get_count()
if tubelib.push_items(pos, "R", items, player_name) == false then
-- place item back
tubelib.unpull_items(pos, "L", items, player_name)
- State:blocked(pos, meta)
- return
+ -- Complete stack rejected
+ if count == items:get_count() then
+ State:blocked(pos, meta)
+ return
+ end
+ end
+ if State.get_state(pos, meta) ~= tubelib.STOPPED then
+ State:keep_running(pos, meta, COUNTDOWN_TICKS, 1)
end
- State:keep_running(pos, meta, COUNTDOWN_TICKS, 1)
return
end
State:idle(pos, meta)
@@ -60,7 +70,7 @@ local function keep_running(pos, elapsed)
end
minetest.register_node("tubelib_addons3:pusher", {
- description = "HighPerf Pusher",
+ description = S("HighPerf Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png^tubelib_addons3_node_frame4.png',
@@ -84,15 +94,14 @@ minetest.register_node("tubelib_addons3:pusher", {
end
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ on_dig = function(pos, node, player)
+ State:on_dig_node(pos, node, player)
tubelib.remove_node(pos)
- State:after_dig_node(pos, oldnode, oldmetadata, digger)
end,
on_timer = keep_running,
on_rotate = screwdriver.disallow,
- drop = "",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -103,7 +112,7 @@ minetest.register_node("tubelib_addons3:pusher", {
minetest.register_node("tubelib_addons3:pusher_active", {
- description = "HighPerf Pusher",
+ description = S("HighPerf Pusher"),
tiles = {
-- up, down, right, left, back, front
{
@@ -158,7 +167,10 @@ minetest.register_node("tubelib_addons3:pusher_active", {
on_timer = keep_running,
on_rotate = screwdriver.disallow,
-
+
+ diggable = false,
+ can_dig = function() return false end,
+
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -168,7 +180,7 @@ minetest.register_node("tubelib_addons3:pusher_active", {
})
minetest.register_node("tubelib_addons3:pusher_defect", {
- description = "HighPerf Pusher",
+ description = S("HighPerf Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png^tubelib_addons3_node_frame4.png',
@@ -215,6 +227,7 @@ minetest.register_craft({
tubelib.register_node("tubelib_addons3:pusher",
{"tubelib_addons3:pusher_active", "tubelib_addons3:pusher_defect"}, {
is_pusher = true, -- is a pulling/pushing node
+ valid_sides = {"R","L"},
on_recv_message = function(pos, topic, payload)
local resp = State:on_receive_message(pos, topic, payload)
diff --git a/techpack_modpack/tubelib_addons3/pushing_chest.lua b/techpack_modpack/tubelib_addons3/pushing_chest.lua
index a5d5d32..7dd7440 100644
--- a/techpack_modpack/tubelib_addons3/pushing_chest.lua
+++ b/techpack_modpack/tubelib_addons3/pushing_chest.lua
@@ -3,17 +3,20 @@
Tubelib Addons 3
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
-
+
pushing_chest.lua
-
+
A high performance pushing chest
]]--
+-- Load support for I18n
+local S = tubelib_addons3.S
+
-- tubelib aging feature
local AGING_LEVEL1 = 50 * tubelib.machine_aging_value
local AGING_LEVEL2 = 150 * tubelib.machine_aging_value
@@ -46,11 +49,11 @@ local function allow_metadata_inventory_move(pos, from_list, from_index, to_list
end
Cache[minetest.get_meta(pos):get_string("number")] = nil
return count
-end
+end
local function keep_the_rest(meta, list, taken)
if taken then
- local inv = meta:get_inventory()
+ local inv = meta:get_inventory()
local rest = ItemStack(taken:get_name())
if not inv:contains_item(list, rest) then
inv:add_item(list, rest)
@@ -62,7 +65,7 @@ local function keep_the_rest(meta, list, taken)
return taken
end
end
-end
+end
local function aging(pos, meta)
local cnt = meta:get_int("tubelib_aging") + 1
@@ -75,22 +78,12 @@ local function aging(pos, meta)
end
end
-local function after_dig_node(pos, oldnode, oldmetadata, digger)
- local inv = minetest.get_inventory({type="player", name=digger:get_player_name()})
- local cnt = oldmetadata.fields.tubelib_aging and tonumber(oldmetadata.fields.tubelib_aging) or 0
- local is_defect = cnt > AGING_LEVEL1 and math.random(AGING_LEVEL2 / cnt) == 1
- if is_defect then
- inv:add_item("main", ItemStack("tubelib_addons3:pushing_chest_defect"))
- else
- inv:add_item("main", ItemStack("tubelib_addons3:pushing_chest"))
- end
-end
local function set_state(meta, state)
local number = meta:get_string("number")
- meta:set_string("infotext", "HighPerf Pushing Chest "..number..": "..state)
+ meta:set_string("infotext", S("HighPerf Pushing Chest").." "..number..": "..state)
meta:set_string("state", state)
-end
+end
local function configured(pos, item)
local meta = minetest.get_meta(pos)
@@ -117,9 +110,10 @@ local function shift_items(pos, elapsed)
for i = 0,7 do
local idx = ((i + offs) % 8) + 1
local stack = inv:get_stack("shift", idx)
- if stack:get_count() > 0 then
+ local count = stack:get_count()
+ if count > 0 then
if tubelib.push_items(pos, "R", stack, player_name) then
- -- The effort is needed here for the case the
+ -- The effort is needed here for the case the
-- pusher pushes into its own chest.
local num = stack:get_count()
stack = inv:get_stack("shift", idx)
@@ -128,7 +122,12 @@ local function shift_items(pos, elapsed)
aging(pos, meta)
return true
else
- set_state(meta, "blocked")
+ -- Complete stack rejected
+ if count == stack:get_count() then
+ set_state(meta, "blocked")
+ else
+ inv:set_stack("shift", idx, stack)
+ end
end
end
end
@@ -153,8 +152,39 @@ local function formspec()
"listring[current_player;main]"
end
+-- necessary function for a quick bugfix, doubles some code from local function "aging"
+local function defect(pos, meta)
+ minetest.get_node_timer(pos):stop()
+ local node = minetest.get_node(pos)
+ node.name = "tubelib_addons3:pushing_chest_defect"
+ minetest.swap_node(pos, node)
+ return true
+end
+
+-- code duplication of method "NodeStates:on_dig_node" (node_states.lua)
+-- (in contrast to (all?) other tubelib nodes that can go defect class "NodeStates" isn't applied here)
+function on_dig_node(pos, node, player)
+ local meta = minetest.get_meta(pos)
+ local cnt = tonumber(meta:get_string("tubelib_aging"))
+ if (not cnt or cnt < 1) then
+ cnt = 1
+ end
+
+ local is_defect = (cnt > AGING_LEVEL1) and ( math.random(math.max(1, math.floor(AGING_LEVEL2 / cnt))) == 1 )
+
+ if is_defect then
+ defect(pos, meta) -- replace node with defect one
+ node = minetest.get_node(pos)
+ end
+
+
+ minetest.node_dig(pos, node, player) -- default behaviour (this function is called automatically if on_dig() callback isn't set)
+
+end
+
+
minetest.register_node("tubelib_addons3:pushing_chest", {
- description = "HighPerf Pushing Chest",
+ description = S("HighPerf Pushing Chest"),
tiles = {
-- up, down, right, left, back, front
{
@@ -180,10 +210,10 @@ minetest.register_node("tubelib_addons3:pushing_chest", {
inv:set_size('main', 32)
inv:set_size('shift', 8)
end,
-
+
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
- local number = tubelib.add_node(pos, "tubelib_addons3:pushing_chest")
+ local number = tubelib.add_node(pos, "tubelib_addons3:pushing_chest")
meta:set_string("player_name", placer:get_player_name())
meta:set_string("number", number)
meta:set_string("formspec", formspec())
@@ -200,8 +230,10 @@ minetest.register_node("tubelib_addons3:pushing_chest", {
return inv:is_empty("main") and inv:is_empty("shift")
end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- after_dig_node(pos, oldnode, oldmetadata, digger)
+
+
+ on_dig = function(pos, node, player)
+ on_dig_node(pos, node, player)
tubelib.remove_node(pos)
end,
@@ -211,8 +243,7 @@ minetest.register_node("tubelib_addons3:pushing_chest", {
on_timer = shift_items,
on_rotate = screwdriver.disallow,
-
- drop = "",
+
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -222,7 +253,7 @@ minetest.register_node("tubelib_addons3:pushing_chest", {
})
minetest.register_node("tubelib_addons3:pushing_chest_defect", {
- description = "HighPerf Pushing Chest",
+ description = S("HighPerf Pushing Chest"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png^tubelib_addons3_node_frame4.png',
@@ -239,10 +270,10 @@ minetest.register_node("tubelib_addons3:pushing_chest_defect", {
inv:set_size('main', 32)
inv:set_size('shift', 8)
end,
-
+
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
- local number = tubelib.add_node(pos, "tubelib_addons3:pushing_chest")
+ local number = tubelib.add_node(pos, "tubelib_addons3:pushing_chest")
meta:set_string("player_name", placer:get_player_name())
meta:set_string("number", number)
meta:set_string("formspec", formspec())
@@ -266,7 +297,7 @@ minetest.register_node("tubelib_addons3:pushing_chest_defect", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
on_rotate = screwdriver.disallow,
-
+
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
@@ -285,14 +316,14 @@ minetest.register_craft({
},
})
-tubelib.register_node("tubelib_addons3:pushing_chest",
+tubelib.register_node("tubelib_addons3:pushing_chest",
{"tubelib_addons3:pushing_chest_defect"}, {
on_recv_message = function(pos, topic, payload)
local node = minetest.get_node(pos)
if topic == "state" then
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- if inv:is_empty("main") then
+ if inv:is_empty("main") then
return "empty"
end
return meta:get_string("state")
@@ -343,7 +374,7 @@ tubelib.register_node("tubelib_addons3:pushing_chest",
local meta = minetest.get_meta(pos)
meta:set_int("tubelib_aging", 0)
meta:set_int("idx", 2)
-
+
meta:set_string("formspec", formspec())
set_state(meta, "empty")
local node = minetest.get_node(pos)
@@ -352,4 +383,4 @@ tubelib.register_node("tubelib_addons3:pushing_chest",
minetest.get_node_timer(pos):start(2)
return true
end,
-})
+})
diff --git a/techpack_modpack/tubelib_addons3/teleporter.lua b/techpack_modpack/tubelib_addons3/teleporter.lua
index 09aeaa5..8d5220a 100644
--- a/techpack_modpack/tubelib_addons3/teleporter.lua
+++ b/techpack_modpack/tubelib_addons3/teleporter.lua
@@ -3,9 +3,9 @@
Tubelib Addons 3
================
- Copyright (C) 2017-2018 Joachim Stolberg
+ Copyright (C) 2017-2020 Joachim Stolberg
- LGPLv2.1+
+ AGPL v3
See LICENSE.txt for more information
teleporter.lua
@@ -14,14 +14,18 @@
]]--
+-- Load support for I18n
+local S = tubelib_addons3.S
+local M = minetest.get_meta
+
local Tube = tubelib.Tube
local sFormspec = "size[7.5,3]"..
- "field[0.5,1;7,1;channel;Enter channel string;]" ..
- "button_exit[2,2;3,1;exit;Save]"
+ "field[0.5,1;7,1;channel;"..S("Enter channel string")..";]" ..
+ "button_exit[2,2;3,1;exit;"..S("Save").."]"
minetest.register_node("tubelib_addons3:teleporter", {
- description = "Tubelib Teleporter",
+ description = S("Tubelib Teleporter"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons3_chest_bottom.png',
@@ -35,7 +39,7 @@ minetest.register_node("tubelib_addons3:teleporter", {
after_place_node = function(pos, placer)
tubelib.add_node(pos, "tubelib_addons3:teleporter")
-- determine the tube side
- local tube_dir = ((minetest.dir_to_facedir(placer:get_look_dir()) + 1) % 4) + 1
+ local tube_dir = tubelib2.side_to_dir("R", minetest.dir_to_facedir(placer:get_look_dir()))
Tube:prepare_pairing(pos, tube_dir, sFormspec)
Tube:after_place_node(pos, {tube_dir})
end,
@@ -71,4 +75,5 @@ minetest.register_craft({
},
})
-Tube:add_secondary_node_names({"tubelib_addons3:teleporter"})
\ No newline at end of file
+Tube:add_secondary_node_names({"tubelib_addons3:teleporter"})
+Tube:set_valid_sides("tubelib_addons3:teleporter", {"R"})
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_bottom.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_bottom.png
index cbbb626..93a1790 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_bottom.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_bottom.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_bottom.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_bottom.png
new file mode 100644
index 0000000..7aa750f
Binary files /dev/null and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_bottom.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_front.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_front.png
new file mode 100644
index 0000000..3bf8f76
Binary files /dev/null and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_front.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_side.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_side.png
new file mode 100644
index 0000000..d04b4aa
Binary files /dev/null and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_side.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_top.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_top.png
new file mode 100644
index 0000000..646f9ec
Binary files /dev/null and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_cart_top.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_front.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_front.png
index e4a317a..1a3e215 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_front.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_front.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_out.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_out.png
index 3181725..e9077ba 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_out.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_out.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_side.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_side.png
index 4f43b1f..4ff4d6f 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_side.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_chest_side.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_distributor_active.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_distributor_active.png
index f0ac04e..cc0432a 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_distributor_active.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_distributor_active.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame.png
index 33db160..1e1312e 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame4.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame4.png
index 2741b24..70d586a 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame4.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_node_frame4.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_pusher_active.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_pusher_active.png
index e836dc2..b2c3797 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_pusher_active.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_pusher_active.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_front.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_front.png
index 2856687..0a943d3 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_front.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_front.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_side.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_side.png
index c868dc4..0ad2fc7 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_side.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_stack_chest_side.png differ
diff --git a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_teleporter.png b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_teleporter.png
index 696c304..3f98a4b 100644
Binary files a/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_teleporter.png and b/techpack_modpack/tubelib_addons3/textures/tubelib_addons3_teleporter.png differ