diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-06-23 14:44:07 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-06-23 14:44:07 -0400 |
commit | b5a777047be2f7e547ef09b9dc6768f20b18de9b (patch) | |
tree | dec2eab54f604a1f30d5bb6a78ce89c81cc0e1e9 | |
parent | 138a8e6e48ead7c4230fbf2fed1a53c23b0e2870 (diff) | |
download | dreambuilder_modpack-b5a777047be2f7e547ef09b9dc6768f20b18de9b.tar dreambuilder_modpack-b5a777047be2f7e547ef09b9dc6768f20b18de9b.tar.gz dreambuilder_modpack-b5a777047be2f7e547ef09b9dc6768f20b18de9b.tar.bz2 dreambuilder_modpack-b5a777047be2f7e547ef09b9dc6768f20b18de9b.tar.xz dreambuilder_modpack-b5a777047be2f7e547ef09b9dc6768f20b18de9b.zip |
removed technic wrench (broken), updated pipeworks, homedecor, and unified dyes
-rw-r--r-- | homedecor/bedroom.lua | 35 | ||||
-rw-r--r-- | pipeworks/LICENSE | 505 | ||||
-rw-r--r-- | pipeworks/compat-chests.lua | 3 | ||||
-rw-r--r-- | pipeworks/filter-injector.lua | 1 | ||||
-rw-r--r-- | unifieddyes/API.md | 108 | ||||
-rw-r--r-- | unifieddyes/README | 246 | ||||
-rw-r--r-- | unifieddyes/README.md | 16 | ||||
-rw-r--r-- | unifieddyes/init.lua | 43 | ||||
-rw-r--r-- | wrench/depends.txt | 6 | ||||
-rw-r--r-- | wrench/init.lua | 162 | ||||
-rw-r--r-- | wrench/locale/de.txt | 7 | ||||
-rw-r--r-- | wrench/locale/es.txt | 5 | ||||
-rw-r--r-- | wrench/locale/template.txt | 5 | ||||
-rw-r--r-- | wrench/locale/tr.txt | 5 | ||||
-rw-r--r-- | wrench/support.lua | 73 | ||||
-rw-r--r-- | wrench/technic.lua | 343 | ||||
-rw-r--r-- | wrench/textures/technic_wrench.png | bin | 249 -> 0 bytes |
17 files changed, 673 insertions, 890 deletions
diff --git a/homedecor/bedroom.lua b/homedecor/bedroom.lua index a5c5a4f..94f886d 100644 --- a/homedecor/bedroom.lua +++ b/homedecor/bedroom.lua @@ -67,12 +67,11 @@ homedecor.register("bed_regular", { homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true) return itemstack else - if minetest.get_modpath("beds") then - beds.on_rightclick(pos, clicker) - end +-- if minetest.get_modpath("beds") then +-- beds.on_rightclick(pos, clicker) +-- end return itemstack end - return itemstack end }) @@ -99,13 +98,13 @@ homedecor.register("bed_extended", { unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) homedecor.unextend_bed(pos) end, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - local itemname = itemstack:get_name() - if minetest.get_modpath("beds") then - beds.on_rightclick(pos, clicker) - end - return itemstack - end, +-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) +-- local itemname = itemstack:get_name() +-- if minetest.get_modpath("beds") then +-- beds.on_rightclick(pos, clicker) +-- end +-- return itemstack +-- end, drop = "homedecor:bed_regular" }) @@ -140,13 +139,13 @@ homedecor.register("bed_kingsize", { inv:add_item("main", "homedecor:bed_regular 2") end end, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - local itemname = itemstack:get_name() - if minetest.get_modpath("beds") then - beds.on_rightclick(pos, clicker) - end - return itemstack - end +-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) +-- local itemname = itemstack:get_name() +-- if minetest.get_modpath("beds") then +-- beds.on_rightclick(pos, clicker) +-- end +-- return itemstack +-- end }) for _, w in pairs({ N_("mahogany"), N_("oak") }) do diff --git a/pipeworks/LICENSE b/pipeworks/LICENSE index eb930e9..4362b49 100644 --- a/pipeworks/LICENSE +++ b/pipeworks/LICENSE @@ -1,17 +1,502 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 - Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. +[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.] - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 - 0. You just DO WHAT THE FUCK YOU WANT TO. + 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". + + 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. + + 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".) + + "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. + + 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. + + 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. + + 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) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + 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. + + 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. + + (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.) + +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. + +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. + +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. + + 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. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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.) + + 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. + + 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: + + 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.) + + 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. + + 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. + + 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. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + 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. + + 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: + + 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. + + 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. + + 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. + + 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. + + 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 +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 +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. + +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. + +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. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this 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. + + 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. + +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. + + NO WARRANTY + + 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. + + 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. + + 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). + + 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. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 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 + Lesser 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 + +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: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. ----------- + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice -This license is commonly known as "WTFPL". +That's all there is to it! diff --git a/pipeworks/compat-chests.lua b/pipeworks/compat-chests.lua index 0fe95dd..7cff6fd 100644 --- a/pipeworks/compat-chests.lua +++ b/pipeworks/compat-chests.lua @@ -83,10 +83,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) fs_helpers.on_receive_fields(pos, fields) minetest.show_formspec(player:get_player_name(), "pipeworks:chest_formspec", get_chest_formspec(pos)) end + return true end end - - return true end) -- Original Definitions diff --git a/pipeworks/filter-injector.lua b/pipeworks/filter-injector.lua index 4870501..45b27c4 100644 --- a/pipeworks/filter-injector.lua +++ b/pipeworks/filter-injector.lua @@ -56,6 +56,7 @@ end -- todo SOON: this function has *way too many* parameters local function grabAndFire(data,slotseq_mode,exmatch_mode,filtmeta,frominv,frominvname,frompos,fromnode,filterfor,fromtube,fromdef,dir,fakePlayer,all,digiline) local sposes = {} + if not frominvname or not frominv:get_list(frominvname) then return end for spos,stack in ipairs(frominv:get_list(frominvname)) do local matches if filterfor == "" then diff --git a/unifieddyes/API.md b/unifieddyes/API.md new file mode 100644 index 0000000..a4e0a62 --- /dev/null +++ b/unifieddyes/API.md @@ -0,0 +1,108 @@ +### API + +This section details the Unified Dyes API and how to use it with your mods. + +In your node definition, you must include a few things to interface with Unified Dyes. Here is an example: + +```lua +minetest.register_node("mymod:colored_node", { + description = "My custom colored node", + tiles = { "mymod_custom_colored_node.png" }, + paramtype = "light", + paramtype2 = "color", + palette = "unifieddyes_palette_extended.png", + place_param2 = 240, + groups = {snappy = 1, cracky = 2, ud_param2_colorable = 1} + on_construct = unifieddyes.on_construct, + after_place_node = unifieddyes.recolor_on_place, + after_dig_node = unifieddyes.after_dig_node, +}) +``` + +`paramtype2` must be one of: +- "color" this is an 89-color or 256-color node +- "colorwallmounted" this is a 32-color node using "wallmounted" mode +- "colorfacedir" this node uses one of the "split" 89-color palettes. + +`palette` must be set to match the `paramtype2` setting, and must be one of: +- "unifieddyes_palette.png" +- "unifieddyes_palette_extended.png" +- "unifieddyes_palette_colorwallmounted.png" +- or one of the "split" hues palettes (see below). + +`place_param2` generally is only needed for the 256-color palette, and should usually be set to 240 (which corresponds to white). +`groups` If your node can be colored by punching it with dye, its groups entry must contain the key ud_param2_colorable = 1, among whatever else you'd normally put there. If the node is software-controlled, as might be the case for some mesecons-digilines aware node, then this group key should be omitted. +`on_construct` see below. +`after_place_node` see below. +`after_dig_node` see below. + +#### Function calls + +**`unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)`** + +Call this within your node's `after_place_node` callback to allow Unified Dyes to automatically color the node using the dye you last used on that kind of node The feature will remain active until the dye runs out, or the user places a different kind of colorable node, or the user cancels the feature. + +**`unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)` +`unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)`** + +These two are used to re-orient `wallmounted` nodes after placing. The former allows positioning to floor, ceiling, and four walls, while the latter restricts the rotation to just the four walls. The latter is most often used with a node whose model is designed so that the four wall positions actually place the model "upright", facing +/- X or Z. This is a hacky way to make a node look like it has basic `facedir` capability, while being able to use the 32-color palette. + +**`unifieddyes.fix_after_screwdriver_nsew(pos, node, user, mode, new_param2)`** + +This serves the same purpose as the `fix_rotation_nsew`, but is used to restrict the node's rotation after it's been hit with the screwdriver. + +**`unifieddyes.select_node(pointed_thing)`** + +Just what it says on the tin. :-) This function returns a position and node definition of whatever is being pointed at. + +**`unifieddyes.is_buildable_to(placer_name, ...)`** + +Again, another obvious one, returns whether or not the pointed node is `buildable_to` (can be overwritten by another node). + +**`unifieddyes.get_hsv(name)`** + +Accepts an item name, and returns the corresponding hue, saturation, and value (in that order), as strings. + +If the item name is a color (not greyscale), then hue will be the basic hue for that color, saturation will be empty string for high saturation or `_s50` for low, and value will be `dark_`, `medium_`, `light_`, or an empty string if it's full color. + +If the item name is greyscale, then hue will contain `white`, `light_grey`, `grey`, `dark_grey`, or `black`, saturation will (ironically) be an empty string, and value will be `light_`, `dark_`, or empty string if it's medium grey. + +For example: +"mymod:mynode_red" would return ("red", "", "") +"mymod:mynode_light_blue" would return ("blue", "", "light_") +"mymod:mynode_dark_yellow_s50" would return ("yellow", "_s50", "dark_") +"mymod:mynode_dark_grey" would return ("dark_grey", "", "dark_") + +**`unifieddyes.getpaletteidx(color, palette_type)`** + +When given a `color` string (in the form of "dye:foo" or "unifieddyes:foo") and `palette_type` (either a boolean or string), this function returns the numerical index into that palette, and the hue name as a string. + `false` or `nil`: the 89-color palette + `true`: 89 color "split" palette mode, for nodes that need full `facedir` support. In this case, the hue field would match whichever of the 13 "split" palettes the node is using, and the index will be 1-7, representing the shade within that palette. See my coloredwoods mod for more information on how this mode is used. + `wallmounted`: the 32-color palette, for nodes using `colorwallmounted` mode. + `extended`: the 256-color "extended" palette + +**`unifieddyes.on_construct(pos)`** + +This function, called in your node definition's on_construct, just sets the `palette = "ext"` metadata key for the node after it's been placed. This can then be read in an LBM to determine if this node needs to be converted from the old 89-color palette to the extended 256-color palette. Although it is good practice to call this for any node that uses the 256-color palette, it isn't strictly necessary as long as the node has never used the 89-color palette and won't be subjected to an LBM that changes its color. + +**`unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)`** + +This function handles returning dyes to the user when a node is dug. All colorized nodes need to call this in `after_dig_node`. + +**`unifieddyes.on_use(itemstack, player, pointed_thing)`** + +This function is used internally by Unfiied Dyes to actually make a dye able to colorize a node when you wield and punch with it. Unified Dyes redefines the minetest_game default dye items to call this function. + +#### Tables + +In addition to the above API calls, Unified Dyes provides several useful tables + +`unifieddyes.HUES` contains a list of the 12 hues used by the 89-color palette. + +`unifieddyes.HUES_EXTENDED` contains a list of the 24 hues in the 256-color palette. Each line contains the color name and its RGB value expressed as three numbers (rather than the usual `#RRGGBB` string). + +`unifieddyes.base_color_crafts` contains a condensed list of crafting recipes for all 24 basic hues, plus black and white, most of which have multiple alternative recipes. Each line contains the name of the color, up to five dye itemstrings (with `nil` in each unused space), and the yield for that craft. + +`unifieddyes.shade_crafts` contains recipes for each of the 10 shades a hue can take on, used with one or two portions of the dye corresponding to that hue. Each line contains the shade name with trailing "_", the saturation name (either `_s50` or empty string), up to three dye itemstrings, and the yield for that craft. + +`unifieddyes.greymixes` contains the recipes for the 14 shades of grey. Each line contains the grey shade number from 1-14, up to four dye item names, and the yield for that craft. diff --git a/unifieddyes/README b/unifieddyes/README index eba6d52..bb71e65 100644 --- a/unifieddyes/README +++ b/unifieddyes/README @@ -1,248 +1,14 @@ VanessaE's Unified Dyes ======================= -The purpose of this mod originally was to supply a complete set of colors for -Minetest mod authors to use in their recipes. Since the default dyes mod that -is supplied with Minetest "common" is now usable (via flowers, also included in -"common"), this mod has become more of an extension pack. +The purpose of this mod originally was to supply a complete set of colors for Minetest mod authors to use for colorized nodes, or to reference in recipes. Since the advent of the default dyes mod in minetest_game, this mod has become more of an extension of the default mod. Since the advent of param2 colorization, it has also become a library for general color handling. -Unified Dyes expands the standard dye set from 15 to 90 colors. +Unified Dyes expands the standard dye set from 15 colors to 32, 89, or 256 (see below). -IMPORTANT: This mod is not intended to suggest that you should use the entire -palette. Rather, I was hoping people would just choose maybe the dozen or so -most useful colors to use in their mods. +Dependencies: Minetest engine version 0.4.16 or higher and a corresponding copy of minetest_game. -Dependencies: default and dye from Minetest "common". This mod will NOT work -without these. This mod will NOT work without these. The default dye mod is -normally activated only in the standard "build" and "minetest_game" games, or perhaps if -someone has a modpack or game that includes them. +License: GPL 2.0 or higher. -Recommends: flowers from common. +Install: Unzip the distribution file, rename the resultant folder to just "unifieddyes", move it into Minetest's mods folder, and enable it in your world configuration. -License: GPL 2.0 or above - -Install: Unzip the distribution file, rename the resultant -VanessaE-unifieddyes-blahblah folder to just "unifieddyes", and move it into -Minetest's mods folder. - -The Palette: - -[ http://digitalaudioconcepts.com/vanessa/hobbies/minetest/screenshots/color-swatches.png ] -[ The official palette, showing 84 colors and 5 greys. ] - -In the image above, the "50%" markings on the left next to each shade mean 50% -saturation for all hues in that shade line. Note that the "light" shades don't -have (or need) that variant. For the greys, the percentages shown are of -brightness relative to pure white. There are three special cases: Light red -has been aliased to default pink dye, and dark green has been aliased to -default dark greey dye. Brown dye also exists in the default set, it's just -not shown in the palette above. - - -Usage instructions, technical information -========================================= - -Getting Started ---------------- - -First thing's first: you're going to need to harvest some materials to make the -dyes from. For this, you need one or more of the following: roses (red), -tulips (orange), yellow dandelions (yellow), cactus (green), geraniums (blue), -violas (purple), coal (black), or white dandelions (white). Simply wander -around your world and collect whichever of the above you need to get your -colors. - -[ http://digitalaudioconcepts.com/vanessa/hobbies/minetest/screenshots/unifieddyes1.png ] -[ The 8 base colors directly obtainable from a material in the world. ] - -Simply place one of the above materials into the crafting grid to obtain four -portions of dye in that color From those initial 8 colors, you can directly -fashion another 11, for a total of 19 standard colors (including the various -greys): - -[ http://digitalaudioconcepts.com/vanessa/hobbies/minetest/screenshots/unifieddyes2.png ] -[ The complete 19-color standard set. ] - -The standardized colors and their crafting methods are as follows: - -* Red (0°): one rose -* Orange (30°): one tulip, or put one red dye and one yellow dye into the - crafting grid to mix them (yields 2) -* Yellow (60°): one yellow dandelion -* Lime (90°): mix yellow + green (yields 2) -* Green (120°): one cactus, or mix yellow + blue (yields 2) -* Aqua (150°): mix green + cyan (yields 2) -* Cyan (180°): mix green + blue (yields 2) -* Sky blue (210°): mix cyan + blue (yields 2) -* Blue (240°): one geranium -* Violet (270°): one viola, or mix blue + magenta (yields 2). -* Magenta (300°): mix blue + red (yields 2) -* Red-violet (330°): mix magenta + red (yields 2) - -* Black (7.5%): one piece of coal -* Dark grey (25%): mix one white + two black (yields 3) -* Medium grey (50%): mix one white and one black (yields 2) -* Light grey (75%): Mix two white and one black (yields 3) -* White (95%): one white dandelion. - -The degree figures are the colors' hues on a standard HSV color wheel, and are -what I used in the textures supplied with this mod. For the greys, the figures -in parenthesis indicate the intended brightness of the shade, relative to -white. Note that black and white don't go all the way to the bottom/top of the -scale, as doing so may crush some details in textures made in those shades (see -below, regarding semi-automatic texture generation). - - -Darker/Lighter colors ---------------------- - -To obtain a dark (33%) version of a given color, use two portions of black dye -along with the base color from the list above, which yields three portions of -the final color. - -To obtain a medium-brightness (66%) version of a given color, mix one portion -the base color with one portion of black dye (for example, medium lime = lime + -black). All such mixtures yield two portions of the final color. - -To obtain a light (150% over full) version of a given color, mix one portion of -the base color with one portion of white dye. Yields 2 portions of the final -color. - - -Low-saturation colors ---------------------- - -To get the low saturation (50%) version of one of the base colors, mix one or -more of white, black, or a shade of grey with the desired base color: - -Dark, low saturation: dark grey dye + color (yields 2), or two blacks + 1 white -+ color (yields 4). For example, dark, low-saturation red = red + dark grey, -or red + two black + one white. - -Medium brightness, low saturation: medium grey dye + color (yields 2), or black -+ white + color (yields 3). For example, medium, low-saturation green = green -+ medium grey, or green + black + white. - -Full, low saturation: light grey dye + color (yields 2), or 1 black + 2 whites -+ color (yields 4). For example, bright, low-saturation blue = blue + light -grey, or blue + black + 2 white. - -There is no low-saturation version of the "light" colors. - -Red + white always returns default pink dye, and black + green always returns -default dark green dye. - - -RGB values ----------- - -All RGB values and filenames for all colors and shades of grey are represented -in the file "colors.txt" (which was generated with the bash script -"listcolors.sh"), included in the distribution directory. Note that -listcolors.sh is an example only and was written for a different set of -textures than what Unified Dyes includes now. - - -Misc. Notes ------------ - -If you need to use /give commands, the item names for the standard set of 12 -regular "full" colors (plus pink, brown, and dark green) is simply "dye:color", -e.g. "dye:red", "dye:pink", or "dye:skyblue". Greys have a similar naming -convention: dye:white, dye:light_grey, dye:grey, dye:dark_grey, or dye:black. - -For everything beyond those initial 19 colors, the item names are of the -following format: - -unifieddyes:{"light_" or "medium_" or "dark_"}{color}{nothing or "_s50"}. - -For example, low saturation dark yellow is "unifieddyes:dark_yellow_s50", while -light normal-saturation red-violet would be "unifieddyes:light_redviolet". - -See the texture filenames in the textures/ folder for further hints - all of -the item names follow the same format as the corresponding filenames, save for -having a colon (:) instead of the first underscore (_). - - -Semi-automatic generation of textures -===================================== - -The texture generator script ----------------------------- - -Obviously, in order for this mod or the above template to be useful, you'll -need textures. If you plan to support the entire range of colors offered by -Unified Dyes, there is a BASH script included with this mod as well with the -above template named gentextures.sh, which will, with an appropriately- colored -and appropriately-named source texture, and possibly an overlay texture, -generate a complete set of colored and greyscale textures. - -The script requires bc (the calculator program) to handle some basic math -regarding the hue adjustments, and Imagemagick's "convert" program handles all -of the actual conversions. - -First thing's first though - you need source textures. Using your favorite -image editor, create a single version of your desired texture. Draw it in the -brightest, deepest shade of RED you can muster without losing any detail, and -save it out. Ideally, you will want the average color of the texture, when -taking into account all bright and dark areas, to be as close as possible to -the hex value #FF0000 (0 degrees, 100% saturation, pure red) without losing any -appreciable #detail. - -Save this source texture out as a PNG image, with a filename of -"whatever_base.png", where "whatever" is the one-word name of your mod - for -example, mymod_base.png. - -If you want to add an image on top of the colored blocks, such as a frame, -which you want to be the same color throughout all of the textures, create it -now. It should consist only of those parts of the textures that you want to -leave unchanged, with some level of alpha transparency everywhere else, -depending on how much of the image needs to remain unchanged. Save it out as a -PNG image, using any filename you want, for example myoverlay.png. - -Now, use chmod to make the script executable, if necessary, and run it. - -If you don't need the overlay, you just need to supply one command line -argument: the base name of your mod. The script will use that parameter as the -basis of its texture filenames. For example: - -./gentextures.sh mymod - -The script will then look for mymod_base.png and copy and convert it into -things like mymod_red.png, mymod_dark_blue.png, and so on. - -If you want to use an overlay also, skip the above step and run the script with -the base name as the first parameter, and the complete filename of your overlay -as the second instead. For example: - -./gentextures.sh mymod myoverlay.png - -Otherwise, the program will iterate through all of the hues and shades that are -supported by unifieddyes (though this is done manually, not by reading anything -from the mod), compositing your overlay image in after the recolor step, if -you're using that option. - -All of the output files will be placed in a new folder, generated-textures/ in -the current directory. Note that the script looks for the above files in the -current directory also. - -The script has a third mode as well: - -./gentextures.sh -t mymod myoverlay.png - -In this mode, the script will leave the base texture mymod_base.png unchanged, -and instead will rotate the colors of the overlay image and then composite that -onto the base texture. The same color changes will happen with the overlay in -this mode, so it's a good idea to make the overlay some fairly saturated shade -of red. Along with that, the base image should be some neutral color; any -color is fine as long as the result is what you wanted. - -The program attempts to verify that the files you've asked it to use will -actually work, and will exit immediately if the any are invalid, missing, etc. - -Use your favorite image browser or file manager to review the results in -generated-textures/, and if they're right, copy them over to the textures/ -folder in your mod. - -Note that this script does not generate brown and pink variations of your base -texture - you'll have to do those two manually. +Usage: for detailed usage information, please see [the Unified Dyes Thread](https://forum.minetest.net/viewtopic.php?f=11&t=2178&p=28399) on the Minetest forum. diff --git a/unifieddyes/README.md b/unifieddyes/README.md new file mode 100644 index 0000000..44ddbb2 --- /dev/null +++ b/unifieddyes/README.md @@ -0,0 +1,16 @@ +VanessaE's Unified Dyes +======================= + +The purpose of this mod originally was to supply a complete set of colors for Minetest mod authors to use for colorized nodes, or to reference in recipes. Since the advent of the default dyes mod in minetest_game, this mod has become more of an extension of the default mod. Since the advent of param2 colorization, it has also become a library for general color handling. + +Unified Dyes expands the standard dye set from 15 colors to 32, 89, or 256 (see the API and usage info). + +Dependencies: Minetest engine version 0.4.16 or higher and a corresponding copy of minetest_game. + +License: GPL 2.0 or higher. + +Install: Unzip the distribution file, rename the resultant folder to just "unifieddyes", move it into Minetest's mods folder, and enable it in your world configuration. + +Usage: for detailed usage information, please see [the Unified Dyes Thread](https://forum.minetest.net/viewtopic.php?f=11&t=2178&p=28399) on the Minetest forum. + +API: the full API is documented here: https://github.com/minetest-mods/unifieddyes/blob/master/API.md diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua index 35b2e72..ff2fd41 100644 --- a/unifieddyes/init.lua +++ b/unifieddyes/init.lua @@ -315,7 +315,7 @@ function unifieddyes.getpaletteidx(color, palette_type) local origcolor = color local aliases = { ["pink"] = "light_red", - ["brown"] = "dark_orange", + ["brown"] = "medium_orange", } local grayscale = { @@ -499,7 +499,7 @@ function unifieddyes.getpaletteidx(color, palette_type) else if color == "brown" then color = "orange" - shade = "dark" + shade = "medium" elseif color == "pink" then color = "red" shade = "light" @@ -804,12 +804,15 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do on_use = unifieddyes.on_use }) else - minetest.register_craftitem(":dye:"..val..hue, { - description = S(desc), - inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", - groups = { dye=1, not_in_creative_inventory=1 }, - on_use = unifieddyes.on_use - }) + if (val..hue) ~= "medium_orange" + and (val..hue) ~= "light_red" then + minetest.register_craftitem(":dye:"..val..hue, { + description = S(desc), + inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", + groups = { dye=1, not_in_creative_inventory=1 }, + on_use = unifieddyes.on_use + }) + end end minetest.register_alias("unifieddyes:"..val..hue, "dye:"..val..hue) @@ -960,6 +963,8 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do local firstdye = j[3] if firstdye == "color" then firstdye = "dye:"..color end + -- ignore black, white, anything containing the word "grey" + if color ~= "black" and color ~= "white" and not string.find(color, "grey") then minetest.register_craft( { @@ -976,6 +981,8 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do end end +-- greys + unifieddyes.greymixes = { { 1, "dye:black", "dye:black", "dye:black", "dye:dark_grey", 4 }, { 2, "dye:black", "dye:black", "dye:dark_grey", nil, 3 }, @@ -1021,15 +1028,23 @@ for _, i in ipairs(unifieddyes.greymixes) do }) end -minetest.register_alias("unifieddyes:light_red", "dye:pink") -minetest.register_alias("unifieddyes:dark_green", "dye:dark_green") +-- we can't make dark orange anymore because brown/medium orange conflicts + +minetest.register_craft( { + type = "shapeless", + output = "dye:dark_orange", + recipe = { + "dye:brown", + "dye:brown" + }, +}) + +minetest.register_alias("dye:light_red", "dye:pink") +minetest.register_alias("dye:medium_orange", "dye:brown") + minetest.register_alias("unifieddyes:black", "dye:black") -minetest.register_alias("unifieddyes:darkgrey", "dye:dark_grey") minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey") -minetest.register_alias("unifieddyes:grey", "dye:grey") -minetest.register_alias("unifieddyes:lightgrey", "dye:light_grey") minetest.register_alias("unifieddyes:light_grey", "dye:light_grey") -minetest.register_alias("unifieddyes:white", "dye:white") minetest.register_alias("unifieddyes:grey_0", "dye:black") minetest.register_alias("unifieddyes:grey_4", "dye:dark_grey") diff --git a/wrench/depends.txt b/wrench/depends.txt deleted file mode 100644 index a681af3..0000000 --- a/wrench/depends.txt +++ /dev/null @@ -1,6 +0,0 @@ -default -technic? -technic_chests? -technic_worldgen? -intllib? - diff --git a/wrench/init.lua b/wrench/init.lua deleted file mode 100644 index f99fd14..0000000 --- a/wrench/init.lua +++ /dev/null @@ -1,162 +0,0 @@ ---[[ -Wrench mod - -Adds a wrench that allows the player to pickup nodes that contain an inventory -with items or metadata that needs perserving. -The wrench has the same tool capability as the normal hand. -To pickup a node simply right click on it. If the node contains a formspec, -you will need to shift+right click instead. -Because it enables arbitrary nesting of chests, and so allows the player -to carry an unlimited amount of material at once, this wrench is not -available to survival-mode players. ---]] - -local LATEST_SERIALIZATION_VERSION = 1 - -wrench = {} - -local modpath = minetest.get_modpath(minetest.get_current_modname()) -dofile(modpath.."/support.lua") -dofile(modpath.."/technic.lua") - --- Boilerplate to support localized strings if intllib mod is installed. -local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end - -local function get_meta_type(name, metaname) - local def = wrench.registered_nodes[name] - if not def or not def.metas or not def.metas[metaname] then - return nil - end - return def.metas[metaname] -end - -local function get_pickup_name(name) - return "wrench:picked_up_"..(name:gsub(":", "_")) -end - -local function restore(pos, placer, itemstack) - local name = itemstack:get_name() - local node = minetest.get_node(pos) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - local data = itemstack:get_meta():get_string("data") - data = (data ~= "" and data) or itemstack:get_metadata() - data = minetest.deserialize(data) - minetest.set_node(pos, {name = data.name, param2 = node.param2}) - for name, value in pairs(data.metas) do - local meta_type = get_meta_type(data.name, name) - if meta_type == wrench.META_TYPE_INT then - meta:set_int(name, value) - elseif meta_type == wrench.META_TYPE_FLOAT then - meta:set_float(name, value) - elseif meta_type == wrench.META_TYPE_STRING then - meta:set_string(name, value) - end - end - local lists = data.lists - for listname, list in pairs(lists) do - inv:set_list(listname, list) - end - itemstack:take_item() - return itemstack -end - -for name, info in pairs(wrench.registered_nodes) do - local olddef = minetest.registered_nodes[name] - if olddef then - local newdef = {} - for key, value in pairs(olddef) do - newdef[key] = value - end - newdef.stack_max = 1 - newdef.description = S("%s with items"):format(newdef.description) - newdef.groups = {} - newdef.groups.not_in_creative_inventory = 1 - newdef.on_construct = nil - newdef.on_destruct = nil - newdef.after_place_node = restore - minetest.register_node(":"..get_pickup_name(name), newdef) - end -end - -minetest.register_tool("wrench:wrench", { - description = S("Wrench"), - inventory_image = "technic_wrench.png", - tool_capabilities = { - full_punch_interval = 0.9, - max_drop_level = 0, - groupcaps = { - crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1}, - snappy = {times={[3]=0.40}, uses=0, maxlevel=1}, - oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40}, - uses=0, maxlevel=3} - }, - damage_groups = {fleshy=1}, - }, - on_place = function(itemstack, placer, pointed_thing) - local pos = pointed_thing.under - if not placer or not pos then - return - end - local player_name = placer:get_player_name() - if minetest.is_protected(pos, player_name) then - minetest.record_protection_violation(pos, player_name) - return - end - local name = minetest.get_node(pos).name - local def = wrench.registered_nodes[name] - if not def then - return - end - - local stack = ItemStack(get_pickup_name(name)) - local player_inv = placer:get_inventory() - if not player_inv:room_for_item("main", stack) then - return - end - local meta = minetest.get_meta(pos) - if def.owned then - local owner = meta:get_string("owner") - if owner and owner ~= player_name then - minetest.log("action", player_name.. - " tried to pick up an owned node belonging to ".. - owner.." at ".. - minetest.pos_to_string(pos)) - return - end - end - - local metadata = {} - metadata.name = name - metadata.version = LATEST_SERIALIZATION_VERSION - - local inv = meta:get_inventory() - local lists = {} - for _, listname in pairs(def.lists or {}) do - local list = inv:get_list(listname) - for i, stack in pairs(list) do - list[i] = stack:to_string() - end - lists[listname] = list - end - metadata.lists = lists - - local item_meta = stack:get_meta() - metadata.metas = {} - for name, meta_type in pairs(def.metas or {}) do - if meta_type == wrench.META_TYPE_INT then - metadata.metas[name] = meta:get_int(name) - elseif meta_type == wrench.META_TYPE_FLOAT then - metadata.metas[name] = meta:get_float(name) - elseif meta_type == wrench.META_TYPE_STRING then - metadata.metas[name] = meta:get_string(name) - end - end - - item_meta:set_string("data", minetest.serialize(metadata)) - minetest.remove_node(pos) - itemstack:add_wear(65535 / 20) - player_inv:add_item("main", stack) - return itemstack - end, -}) diff --git a/wrench/locale/de.txt b/wrench/locale/de.txt deleted file mode 100644 index b285cd3..0000000 --- a/wrench/locale/de.txt +++ /dev/null @@ -1,7 +0,0 @@ -# German Translation for technic_wrench -# Deutsche Übersetzung von technic_wrench -# by Xanthin - -Wrench = Schraubenschluessel -%s with items = %s mit Gegenstaenden - diff --git a/wrench/locale/es.txt b/wrench/locale/es.txt deleted file mode 100644 index 1d79a96..0000000 --- a/wrench/locale/es.txt +++ /dev/null @@ -1,5 +0,0 @@ -# technic_wrench traducido por Carlos Barraza - -Wrench = Llave Inglesa -%s with items = %s con elementos - diff --git a/wrench/locale/template.txt b/wrench/locale/template.txt deleted file mode 100644 index eff2da2..0000000 --- a/wrench/locale/template.txt +++ /dev/null @@ -1,5 +0,0 @@ -# technic_wrench translation template - -Wrench = -%s with items = - diff --git a/wrench/locale/tr.txt b/wrench/locale/tr.txt deleted file mode 100644 index 2050bce..0000000 --- a/wrench/locale/tr.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Turkish translation by mahmutelmas06 -# mahmutelmas06@hotmail.com - -Wrench = İngiliz anahtarı -%s with items = Araçlarla birlikte %s diff --git a/wrench/support.lua b/wrench/support.lua deleted file mode 100644 index 1d21811..0000000 --- a/wrench/support.lua +++ /dev/null @@ -1,73 +0,0 @@ ---[[ -supported_nodes -This table stores all nodes that are compatible with the wrench mod. -Syntax: - [<node name>] = { - lists = {"<inventory list name>"}, - metas = {["<meta name>"] = STRING, - ["<meta name>"] = INT, - ["<meta name>"] = FLOAT}, - owned = true, - store_meta_always = true, - } - owned - nodes that are protected by owner requirements (Ex. locked chests) - store_meta_always - when nodes are broken this ensures metadata and - inventory is always stored (Ex. active state for machines) ---]] - -wrench.META_TYPE_INT = 0 -wrench.META_TYPE_FLOAT = 1 -wrench.META_TYPE_STRING = 2 - -local INT, STRING, FLOAT = - wrench.META_TYPE_INT, - wrench.META_TYPE_STRING, - wrench.META_TYPE_FLOAT - -wrench.registered_nodes = { - ["default:chest"] = { - lists = {"main"}, - }, - ["default:chest_locked"] = { - lists = {"main"}, - metas = {owner = STRING, - infotext = STRING}, - owned = true, - }, - ["default:furnace"] = { - lists = {"fuel", "src", "dst"}, - metas = {infotext = STRING, - fuel_totaltime = FLOAT, - fuel_time = FLOAT, - src_totaltime = FLOAT, - src_time = FLOAT}, - }, - ["default:furnace_active"] = { - lists = {"fuel", "src", "dst"}, - metas = {infotext = STRING, - fuel_totaltime = FLOAT, - fuel_time = FLOAT, - src_totaltime = FLOAT, - src_time = FLOAT}, - store_meta_always = true, - }, - ["default:sign_wall"] = { - metas = {infotext = STRING, - text = STRING}, - }, -} - -function wrench:original_name(name) - for key, value in pairs(self.registered_nodes) do - if name == value.name then - return key - end - end -end - -function wrench:register_node(name, def) - if minetest.registered_nodes[name] then - self.registered_nodes[name] = def - end -end - diff --git a/wrench/technic.lua b/wrench/technic.lua deleted file mode 100644 index c404180..0000000 --- a/wrench/technic.lua +++ /dev/null @@ -1,343 +0,0 @@ - -local INT, STRING, FLOAT = - wrench.META_TYPE_INT, - wrench.META_TYPE_STRING, - wrench.META_TYPE_FLOAT - -wrench:register_node("technic:iron_chest", { - lists = {"main"}, -}) -wrench:register_node("technic:iron_locked_chest", { - lists = {"main"}, - metas = {infotext = STRING, - owner = STRING}, - owned = true, -}) -wrench:register_node("technic:copper_chest", { - lists = {"main"}, -}) -wrench:register_node("technic:copper_locked_chest", { - lists = {"main"}, - metas = {infotext = STRING, - owner = STRING}, - owned = true, -}) -wrench:register_node("technic:silver_chest", { - lists = {"main"}, - metas = {infotext = STRING, - formspec = STRING}, -}) -wrench:register_node("technic:silver_locked_chest", { - lists = {"main"}, - metas = {infotext = STRING, - owner = STRING, - formspec = STRING}, - owned = true, -}) -wrench:register_node("technic:gold_chest", { - lists = {"main"}, - metas = {infotext = STRING, - formspec = STRING}, -}) -wrench:register_node("technic:gold_locked_chest", { - lists = {"main"}, - metas = {infotext = STRING, - owner = STRING, - formspec = STRING}, - owned = true, -}) -wrench:register_node("technic:mithril_chest", { - lists = {"main"}, - metas = {infotext = STRING, - formspec = STRING}, -}) -wrench:register_node("technic:mithril_locked_chest", { - lists = {"main"}, - metas = {infotext = STRING, - owner = STRING, - formspec = STRING}, - owned = true, -}) -wrench:register_node("technic:lv_electric_furnace", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:lv_electric_furnace_active", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_electric_furnace", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_electric_furnace_active", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:coal_alloy_furnace", { - lists = {"fuel", "src", "dst"}, - metas = {infotext = STRING, - fuel_totaltime = FLOAT, - fuel_time = FLOAT, - src_totaltime = FLOAT, - src_time = FLOAT}, -}) -wrench:register_node("technic:coal_alloy_furnace_active", { - lists = {"fuel", "src", "dst"}, - metas = {infotext = STRING, - fuel_totaltime = FLOAT, - fuel_time = FLOAT, - src_totaltime = FLOAT, - src_time = FLOAT}, -}) -wrench:register_node("technic:alloy_furnace", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:alloy_furnace_active", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_alloy_furnace", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_alloy_furnace_active", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:tool_workshop", { - lists = {"src", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT}, -}) -wrench:register_node("technic:grinder", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:grinder_active", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_grinder", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_grinder_active", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:extractor", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:extractor_active", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_extractor", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_extractor_active", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:compressor", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:compressor_active", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_compressor", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_compressor_active", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:cnc", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT, - cnc_product = STRING}, -}) -wrench:register_node("technic:cnc_active", { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - LV_EU_demand = INT, - LV_EU_input = INT, - src_time = INT, - cnc_product = STRING}, -}) -wrench:register_node("technic:mv_centrifuge", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) -wrench:register_node("technic:mv_centrifuge_active", { - lists = {"src", "dst", "upgrade1", "upgrade2"}, - metas = {infotext = STRING, - formspec = STRING, - MV_EU_demand = INT, - MV_EU_input = INT, - tube_time = INT, - src_time = INT}, -}) - - -local chest_mark_colors = { - '_black', - '_blue', - '_brown', - '_cyan', - '_dark_green', - '_dark_grey', - '_green', - '_grey', - '_magenta', - '_orange', - '_pink', - '_red', - '_violet', - '_white', - '_yellow', - '', -} - -for i = 1, 15 do - wrench:register_node("technic:gold_chest"..chest_mark_colors[i], { - lists = {"main"}, - metas = {infotext = STRING,formspec = STRING}, - }) - wrench:register_node("technic:gold_locked_chest"..chest_mark_colors[i], { - lists = {"main"}, - metas = {infotext = STRING,owner = STRING,formspec = STRING}, - owned = true, - }) -end - -if minetest.get_modpath("technic") then - for tier, _ in pairs(technic.machines) do - local ltier = tier:lower() - for i = 0, 8 do - wrench:register_node("technic:"..ltier.."_battery_box"..i, { - lists = {"src", "dst"}, - metas = {infotext = STRING, - formspec = STRING, - [tier.."_EU_demand"] = INT, - [tier.."_EU_supply"] = INT, - [tier.."_EU_input"] = INT, - internal_EU_charge = INT, - last_side_shown = INT}, - }) - end - end -end - diff --git a/wrench/textures/technic_wrench.png b/wrench/textures/technic_wrench.png Binary files differdeleted file mode 100644 index 471b47e..0000000 --- a/wrench/textures/technic_wrench.png +++ /dev/null |