diff --git a/contribution guide.txt b/contribution guide.txt index da26c01..fc0d10c 100644 --- a/contribution guide.txt +++ b/contribution guide.txt @@ -2,11 +2,17 @@ contribution guide: To keep things neat and tidy across the game/server here are a few style guidelines to keep in mind. -Codestyle stays fairly true to Minetest Game, 90 line widths, three space indentation. I usually use single quotes. I can always change from tabs to spaces easily enough on any submissions. This part really isn't super important, as you don't see code when playing. +Code style stays fairly true to Minetest Game, 90 line widths, three space indentation. I usually use single quotes. I can always change from tabs to spaces easily enough on any submissions. This part really isn't super important, as you don't see code when playing. Textures should all be 32px. Models should be built to a 16th grid with 32px textures. Angles are okay, but shouldn't be overdone. -Mobs should be built of boxes rotated as needed. +Mobs should be built of boxes rotated as needed. As with the models they should stick as close as possible to the 32px texture grid. +Obviously as mobs will be moving around, imperfections in the pixel alignment aren't too big of a deal. :) +Breaking changes are obviously strongly frowned upon, unless there is absolutely no other way, they are avoided. +ABMs or Aliases can be used if a node needs to change names, or a second node can be registered, with the craft removed for the first, +then after some time the first can be removed. + +The game is set in a medieval/fantasy type setting. Only the most basic of automation is allowed. This will probably get more clarification in the future. I just wanted to get something put together sooner rather than later. diff --git a/mods/cartographer-mtg/CHANGELOG.md b/mods/cartographer-mtg/CHANGELOG.md new file mode 100644 index 0000000..a28622d --- /dev/null +++ b/mods/cartographer-mtg/CHANGELOG.md @@ -0,0 +1,2 @@ +# v1.0 +- Initial Release diff --git a/mods/cartographer-mtg/LICENSE-ccbysa4 b/mods/cartographer-mtg/LICENSE-ccbysa4 new file mode 100644 index 0000000..203e0da --- /dev/null +++ b/mods/cartographer-mtg/LICENSE-ccbysa4 @@ -0,0 +1,103 @@ +Creative Commons Attribution-ShareAlike 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +Section 1 – Definitions. + + Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. + BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. + Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. + Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + Licensor means the individual(s) or entity(ies) granting rights under this Public License. + Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + License grant. + Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + reproduce and Share the Licensed Material, in whole or in part; and + produce, reproduce, and Share Adapted Material. + Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. + Term. The term of this Public License is specified in Section 6(a). + Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. + Downstream recipients. + Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. + Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. + No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. + No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). + + Other rights. + Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + Patent and trademark rights are not licensed under this Public License. + To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + + Attribution. + + If You Share the Licensed Material (including in modified form), You must: + retain the following if it is supplied by the Licensor with the Licensed Material: + identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + a copyright notice; + a notice that refers to this Public License; + a notice that refers to the disclaimer of warranties; + a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + indicate if You modified the Licensed Material and retain an indication of any previous modifications; and + indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. + You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. + If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. + ShareAlike. + + In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. + The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. + You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. + You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + + for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; + if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and + You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + + Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. + To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. + + The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + + This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. + + Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + upon express reinstatement by the Licensor. + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + + The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation. + + For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. diff --git a/mods/cartographer-mtg/LICENSE-gplv3 b/mods/cartographer-mtg/LICENSE-gplv3 new file mode 100644 index 0000000..39117e0 --- /dev/null +++ b/mods/cartographer-mtg/LICENSE-gplv3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + 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. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is 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. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "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. + + 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. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + 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. + + 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. + + 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. + + 1. Source Code. + + 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. + + 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. + + 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. + + 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. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + 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. + + 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. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + 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. + + 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. + + 4. Conveying Verbatim Copies. + + 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. + + 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. + + 5. Conveying Modified Source Versions. + + 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: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + 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". + + 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. + + 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. + + 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. + + 6. Conveying Non-Source Forms. + + 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: + + 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. + + 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 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. + + 13. Use with the GNU Affero General Public 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 Affero 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 special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 +Program specifies that a certain numbered version of the GNU 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 General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU 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. + + 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. + + 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 Programs + + 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. + + MTG Craft Reverser + Copyright (C) 2020 Hugues Ross + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + MTG Craft Reverser Copyright (C) 2020 Hugues Ross + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + 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 GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/mods/cartographer-mtg/README.md b/mods/cartographer-mtg/README.md new file mode 100644 index 0000000..e7b64a8 --- /dev/null +++ b/mods/cartographer-mtg/README.md @@ -0,0 +1,16 @@ +# Cartographer for Minetest Game +A Minetest mod that adds Cartographer's gameplay to Minetest Game. + +## Contact +For questions, requests, and other communications regarding this work, you can +contact the original creator at hugues.ross@gmail.com + +# License +Cartographer for Minetest Game's code is licensed under the GNU General Public +License v3.0. A copy of this license should be bundled with this work, if one +was not provided then you can find the license [here](https://www.gnu.org/licenses/gpl-3.0.html) + +Cartographer for Minetest Game's visual/audio assets are licensed under the +Creative Commons Attribution-ShareAlike 4.0 International License. A copy of +this license should be bundled with this work, if one was not provided then you +can find the license [here](https://creativecommons.org/licenses/by-sa/4.0/) diff --git a/mods/cartographer-mtg/init.lua b/mods/cartographer-mtg/init.lua new file mode 100644 index 0000000..ac6bf9d --- /dev/null +++ b/mods/cartographer-mtg/init.lua @@ -0,0 +1,336 @@ +-- Biomes +-- Icesheet +cartographer.biomes.add("icesheet", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", +}); +cartographer.biomes.add("icesheet_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}); +cartographer.biomes.add("icesheet_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", +}, 1); + +-- Tundra +cartographer.biomes.add("tundra", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", + "ctg_mtg_colored_snow", + "ctg_mtg_tundra", +}); +cartographer.biomes.add("tundra_highland", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", + "ctg_mtg_colored_snow", + "ctg_mtg_tundra", +}); +cartographer.biomes.add("tundra_beach", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", + "ctg_mtg_tundra", +}); +cartographer.biomes.add("tundra_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}); + +-- Taiga +cartographer.biomes.add("taiga", { + "ctg_mtg_simple_forest", + "ctg_mtg_snowy_forest", + "ctg_mtg_coniferous_snowy", +}); +cartographer.biomes.add("taiga_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("taiga_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", +}, 1); + +-- Snowy Grassland +cartographer.biomes.add("snowy_grassland", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", +}); +cartographer.biomes.add("snowy_grassland_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("snowy_grassland_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_snow", +}, 1); + + +-- Grassland +cartographer.biomes.add("grassland", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_land", +}); +cartographer.biomes.add("grassland_dunes", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}); +cartographer.biomes.add("grassland_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("grassland_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Coniferous Forest +cartographer.biomes.add("coniferous_forest", { + "ctg_mtg_simple_forest", + "ctg_mtg_colored_forest", + "ctg_mtg_coniferous_forest", +}); +cartographer.biomes.add("coniferous_forest_dunes", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}); +cartographer.biomes.add("coniferous_forest_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("coniferous_forest_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Deciduous Forest +cartographer.biomes.add("deciduous_forest", { + "ctg_mtg_simple_forest", + "ctg_mtg_colored_forest", + "ctg_mtg_deciduous_forest", +}); +cartographer.biomes.add("deciduous_forest_shore", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}); +cartographer.biomes.add("deciduous_forest_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("deciduous_forest_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Desert +cartographer.biomes.add("desert", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", + "ctg_mtg_colored_sand", + "ctg_mtg_desert_sand", +}); +cartographer.biomes.add("desert_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("desert_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Sandstone Desert +cartographer.biomes.add("sandstone_desert", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}); +cartographer.biomes.add("sandstone_desert_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("sandstone_desert_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Cold Desert +cartographer.biomes.add("cold_desert", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", + "ctg_mtg_colored_sand", + "ctg_mtg_silver_sand", +}); +cartographer.biomes.add("cold_desert_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("cold_desert_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Savanna +cartographer.biomes.add("savanna", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_land", + "ctg_mtg_colored_land", + "ctg_mtg_savanna", +}); +cartographer.biomes.add("savanna_shore", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}); +cartographer.biomes.add("savanna_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}, nil, 0); +cartographer.biomes.add("savanna_ocean", { + "ctg_mtg_simple_land", + "ctg_mtg_colored_sand", +}, 1); + +-- Rainforest +cartographer.biomes.add("rainforest", { + "ctg_mtg_simple_forest", + "ctg_mtg_colored_forest", + "ctg_mtg_rainforest", +}); +cartographer.biomes.add("rainforest_swamp", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", + "ctg_mtg_swamp", +}); +cartographer.biomes.add("rainforest_ocean", { + "ctg_mtg_simple_water", + "ctg_mtg_colored_water", +}); + +-- Markers +-- General markers +cartographer.markers.add("ctg_mtg:house", "House", { + "ctg_mtg_marker_house", + "ctg_mtg_marker_house_2", +}); +cartographer.markers.add("ctg_mtg:skull", "Skull", { + "ctg_mtg_marker_skull", +}); +cartographer.markers.add("ctg_mtg:diamond", "diamond", { + "ctg_mtg_marker_diamond", + "ctg_mtg_marker_diamond_2", +}); +cartographer.markers.add("ctg_mtg:mese", "mese", { + "ctg_mtg_marker_mese", + "ctg_mtg_marker_mese_2", +}); +cartographer.markers.add("ctg_mtg:x", "X", { + "ctg_mtg_marker_x", + "ctg_mtg_marker_x_2", +}); +cartographer.markers.add("ctg_mtg:flag", "Flag", { + "ctg_mtg_marker_flag", + "ctg_mtg_marker_flag_2", +}); + +-- Line drawing markers +cartographer.markers.add("ctg_mtg:line_h", "Line (Horizontal)", { + "ctg_mtg_marker_line_h", +}); +cartographer.markers.add("ctg_mtg:line_v", "Line (Vertical)", { + "ctg_mtg_marker_line_v", +}); +cartographer.markers.add("ctg_mtg:line_c_ne", "Line (North-East Corner)", { + "ctg_mtg_marker_line_c_ne", +}); +cartographer.markers.add("ctg_mtg:line_c_se", "Line (South-East Corner)", { + "ctg_mtg_marker_line_c_se", +}); +cartographer.markers.add("ctg_mtg:line_c_nw", "Line (North-West Corner)", { + "ctg_mtg_marker_line_c_nw", +}); +cartographer.markers.add("ctg_mtg:line_c_sw", "Line (South-West Corner)", { + "ctg_mtg_marker_line_c_sw", +}); +cartographer.markers.add("ctg_mtg:line_t_n", "Line (North T-Intersection)", { + "ctg_mtg_marker_line_t_n", +}); +cartographer.markers.add("ctg_mtg:line_t_s", "Line (South T-Intersection)", { + "ctg_mtg_marker_line_t_s", +}); +cartographer.markers.add("ctg_mtg:line_t_e", "Line (East T-Intersection)", { + "ctg_mtg_marker_line_t_e", +}); +cartographer.markers.add("ctg_mtg:line_t_w", "Line (West T-Intersection)", { + "ctg_mtg_marker_line_t_w", +}); +cartographer.markers.add("ctg_mtg:line_cross", "Line (Crossing)", { + "ctg_mtg_marker_line_cross", +}); + +-- Arrow markers +cartographer.markers.add("ctg_mtg:arrow_n", "Arrow (North)", { + "ctg_mtg_marker_arrow_n", +}); +cartographer.markers.add("ctg_mtg:arrow_s", "Arrow (South)", { + "ctg_mtg_marker_arrow_s", +}); +cartographer.markers.add("ctg_mtg:arrow_e", "Arrow (East)", { + "ctg_mtg_marker_arrow_e", +}); +cartographer.markers.add("ctg_mtg:arrow_w", "Arrow (West)", { + "ctg_mtg_marker_arrow_w", +}); +cartographer.markers.add("ctg_mtg:arrow_ne", "Arrow (North-East)", { + "ctg_mtg_marker_arrow_ne", +}); +cartographer.markers.add("ctg_mtg:arrow_se", "Arrow (South-East)", { + "ctg_mtg_marker_arrow_se", +}); +cartographer.markers.add("ctg_mtg:arrow_nw", "Arrow (North-West)", { + "ctg_mtg_marker_arrow_nw", +}); +cartographer.markers.add("ctg_mtg:arrow_sw", "Arrow (South-West)", { + "ctg_mtg_marker_arrow_sw", +}); + +-- Materials +cartographer.materials.register_by_name("default:paper", "paper"); +cartographer.materials.register_by_name("default:coal_lump", "pigment"); +cartographer.materials.register_by_name("default:coalblock", "pigment", 9); +cartographer.materials.register_by_name("dye:black", "pigment"); + +-- Crafting Recipes +minetest.register_craft({ + output = "cartographer:standard_table", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "cartographer:simple_table", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + } +}); +minetest.register_craft({ + output = "cartographer:advanced_table", + recipe = { + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + {"default:mese_crystal_fragment", "cartographer:simple_table", "default:mese_crystal_fragment"}, + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + } +}); + +-- Skin +for _,skin in pairs(cartographer.skin.table_skins) do + skin.paper_texture = "default_paper"; + skin.pigment_texture = "dye_black"; +end + +cartographer.skin.table_skins.advanced_table.background.texture = "ctg_mtg_advanced_table_bg"; + +-- Overrides +minetest.override_item("cartographer:simple_table", { + tiles = { "ctg_mtg_simple_table.png" }; +}); +minetest.override_item("cartographer:standard_table", { + tiles = { "ctg_mtg_standard_table.png" }; +}); +minetest.override_item("cartographer:advanced_table", { + tiles = { "ctg_mtg_advanced_table.png" }; + light_source = 5, +}); diff --git a/mods/cartographer-mtg/mod.conf b/mods/cartographer-mtg/mod.conf new file mode 100644 index 0000000..dda2f26 --- /dev/null +++ b/mods/cartographer-mtg/mod.conf @@ -0,0 +1,3 @@ +name = cartographer_minetest_game +description = Adds regional maps that you can craft and place (Minetest Game version) +depends = cartographer, default, dye diff --git a/mods/cartographer-mtg/textures/ctg_mtg_advanced_table.png b/mods/cartographer-mtg/textures/ctg_mtg_advanced_table.png new file mode 100644 index 0000000..b4379b0 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_advanced_table.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_advanced_table_bg.png b/mods/cartographer-mtg/textures/ctg_mtg_advanced_table_bg.png new file mode 100644 index 0000000..0a8e75b Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_advanced_table_bg.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.1.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.1.png new file mode 100644 index 0000000..9f7b92d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.2.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.2.png new file mode 100644 index 0000000..2d87633 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.3.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.3.png new file mode 100644 index 0000000..677bc84 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.4.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.4.png new file mode 100644 index 0000000..b6b215d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_forest.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_land.1.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.1.png new file mode 100644 index 0000000..ba36228 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_land.2.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.2.png new file mode 100644 index 0000000..d059ac4 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_land.3.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.3.png new file mode 100644 index 0000000..fad0351 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_land.4.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.4.png new file mode 100644 index 0000000..e424810 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_land.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.1.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.1.png new file mode 100644 index 0000000..1b7c72e Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.2.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.2.png new file mode 100644 index 0000000..f85ac70 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.3.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.3.png new file mode 100644 index 0000000..27232b2 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.4.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.4.png new file mode 100644 index 0000000..c91d156 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_sand.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.1.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.1.png new file mode 100644 index 0000000..61c3d8d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.2.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.2.png new file mode 100644 index 0000000..c86ae5e Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.3.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.3.png new file mode 100644 index 0000000..055e3cd Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.4.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.4.png new file mode 100644 index 0000000..b29fdc1 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_snow.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_water.1.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.1.png new file mode 100644 index 0000000..0484906 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_water.2.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.2.png new file mode 100644 index 0000000..0484906 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_water.3.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.3.png new file mode 100644 index 0000000..bce4fe5 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_colored_water.4.png b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.4.png new file mode 100644 index 0000000..f532cb3 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_colored_water.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.1.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.1.png new file mode 100644 index 0000000..1e23442 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.2.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.2.png new file mode 100644 index 0000000..e9c4509 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.3.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.3.png new file mode 100644 index 0000000..472618a Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.4.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.4.png new file mode 100644 index 0000000..37db22d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_forest.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.1.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.1.png new file mode 100644 index 0000000..46295a2 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.2.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.2.png new file mode 100644 index 0000000..bc8cbfb Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.3.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.3.png new file mode 100644 index 0000000..9c14096 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.4.png b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.4.png new file mode 100644 index 0000000..4def49f Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_coniferous_snowy.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.1.png b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.1.png new file mode 100644 index 0000000..e6afbe4 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.2.png b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.2.png new file mode 100644 index 0000000..f00ca3e Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.3.png b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.3.png new file mode 100644 index 0000000..189d3a8 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.4.png b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.4.png new file mode 100644 index 0000000..bccfcda Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_deciduous_forest.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.1.png b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.1.png new file mode 100644 index 0000000..711e9a8 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.2.png b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.2.png new file mode 100644 index 0000000..9947956 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.3.png b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.3.png new file mode 100644 index 0000000..3d3c298 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.4.png b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.4.png new file mode 100644 index 0000000..3c3cf29 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_desert_sand.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_e.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_e.png new file mode 100644 index 0000000..9c25714 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_e.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_n.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_n.png new file mode 100644 index 0000000..d856266 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_n.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_ne.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_ne.png new file mode 100644 index 0000000..3a000d0 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_ne.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_nw.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_nw.png new file mode 100644 index 0000000..6f50fd3 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_nw.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_s.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_s.png new file mode 100644 index 0000000..dd39032 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_s.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_se.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_se.png new file mode 100644 index 0000000..1cf54d6 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_se.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_sw.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_sw.png new file mode 100644 index 0000000..3b785b1 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_sw.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_w.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_w.png new file mode 100644 index 0000000..a537366 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_arrow_w.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_diamond.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_diamond.png new file mode 100644 index 0000000..5c4116d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_diamond.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_diamond_2.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_diamond_2.png new file mode 100644 index 0000000..276ec31 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_diamond_2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_flag.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_flag.png new file mode 100644 index 0000000..83fa13c Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_flag.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_flag_2.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_flag_2.png new file mode 100644 index 0000000..3fcffe1 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_flag_2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_house.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_house.png new file mode 100644 index 0000000..93d7969 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_house.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_house_2.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_house_2.png new file mode 100644 index 0000000..9e7c532 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_house_2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_ne.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_ne.png new file mode 100644 index 0000000..366a59f Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_ne.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_nw.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_nw.png new file mode 100644 index 0000000..69590ed Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_nw.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_se.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_se.png new file mode 100644 index 0000000..2aaebc5 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_se.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_sw.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_sw.png new file mode 100644 index 0000000..1c90e7b Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_c_sw.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_cross.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_cross.png new file mode 100644 index 0000000..2a68de1 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_cross.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_h.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_h.png new file mode 100644 index 0000000..4b208a1 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_h.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_e.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_e.png new file mode 100644 index 0000000..fd68147 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_e.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_n.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_n.png new file mode 100644 index 0000000..b95bf25 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_n.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_s.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_s.png new file mode 100644 index 0000000..0ba95e9 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_s.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_w.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_w.png new file mode 100644 index 0000000..52488e5 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_t_w.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_line_v.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_v.png new file mode 100644 index 0000000..cc06ffe Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_line_v.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_mese.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_mese.png new file mode 100644 index 0000000..70744dc Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_mese.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_mese_2.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_mese_2.png new file mode 100644 index 0000000..4501db3 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_mese_2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_skull.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_skull.png new file mode 100644 index 0000000..2cee047 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_skull.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_x.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_x.png new file mode 100644 index 0000000..510b462 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_x.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_marker_x_2.png b/mods/cartographer-mtg/textures/ctg_mtg_marker_x_2.png new file mode 100644 index 0000000..b0d0231 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_marker_x_2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_rainforest.1.png b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.1.png new file mode 100644 index 0000000..3d1e366 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_rainforest.2.png b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.2.png new file mode 100644 index 0000000..a46654f Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_rainforest.3.png b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.3.png new file mode 100644 index 0000000..c05b856 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_rainforest.4.png b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.4.png new file mode 100644 index 0000000..f8cab2d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_rainforest.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_savanna.1.png b/mods/cartographer-mtg/textures/ctg_mtg_savanna.1.png new file mode 100644 index 0000000..2fa9838 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_savanna.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_savanna.2.png b/mods/cartographer-mtg/textures/ctg_mtg_savanna.2.png new file mode 100644 index 0000000..f95d825 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_savanna.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_savanna.3.png b/mods/cartographer-mtg/textures/ctg_mtg_savanna.3.png new file mode 100644 index 0000000..d6113cd Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_savanna.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_savanna.4.png b/mods/cartographer-mtg/textures/ctg_mtg_savanna.4.png new file mode 100644 index 0000000..513a06d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_savanna.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.1.png b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.1.png new file mode 100644 index 0000000..5ab2aba Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.2.png b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.2.png new file mode 100644 index 0000000..84cfab8 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.3.png b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.3.png new file mode 100644 index 0000000..ee4fc70 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.4.png b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.4.png new file mode 100644 index 0000000..ee8f71e Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_silver_sand.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.1.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.1.png new file mode 100644 index 0000000..8207b61 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.2.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.2.png new file mode 100644 index 0000000..fd79bf8 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.3.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.3.png new file mode 100644 index 0000000..97ac39c Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.4.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.4.png new file mode 100644 index 0000000..459331d Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_forest.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_land.1.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.1.png new file mode 100644 index 0000000..0eedeed Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_land.2.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.2.png new file mode 100644 index 0000000..d4ea928 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_land.3.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.3.png new file mode 100644 index 0000000..4c933ef Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_land.4.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.4.png new file mode 100644 index 0000000..fdceb10 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_land.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_table.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_table.png new file mode 100644 index 0000000..e6828bb Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_table.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_water.1.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.1.png new file mode 100644 index 0000000..4ec3706 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_water.2.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.2.png new file mode 100644 index 0000000..4ec3706 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_water.3.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.3.png new file mode 100644 index 0000000..56a4e0a Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_simple_water.4.png b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.4.png new file mode 100644 index 0000000..ef6db3e Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_simple_water.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.1.png b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.1.png new file mode 100644 index 0000000..4da3d2c Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.2.png b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.2.png new file mode 100644 index 0000000..4068850 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.3.png b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.3.png new file mode 100644 index 0000000..de1bd21 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.4.png b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.4.png new file mode 100644 index 0000000..1c293db Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_snowy_forest.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_standard_table.png b/mods/cartographer-mtg/textures/ctg_mtg_standard_table.png new file mode 100644 index 0000000..0e1bbcf Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_standard_table.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_swamp.1.png b/mods/cartographer-mtg/textures/ctg_mtg_swamp.1.png new file mode 100644 index 0000000..4f90783 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_swamp.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_swamp.2.png b/mods/cartographer-mtg/textures/ctg_mtg_swamp.2.png new file mode 100644 index 0000000..4114a8b Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_swamp.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_swamp.3.png b/mods/cartographer-mtg/textures/ctg_mtg_swamp.3.png new file mode 100644 index 0000000..fa10dd5 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_swamp.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_swamp.4.png b/mods/cartographer-mtg/textures/ctg_mtg_swamp.4.png new file mode 100644 index 0000000..7799540 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_swamp.4.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_tundra.1.png b/mods/cartographer-mtg/textures/ctg_mtg_tundra.1.png new file mode 100644 index 0000000..0164d05 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_tundra.1.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_tundra.2.png b/mods/cartographer-mtg/textures/ctg_mtg_tundra.2.png new file mode 100644 index 0000000..c123903 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_tundra.2.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_tundra.3.png b/mods/cartographer-mtg/textures/ctg_mtg_tundra.3.png new file mode 100644 index 0000000..a60e298 Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_tundra.3.png differ diff --git a/mods/cartographer-mtg/textures/ctg_mtg_tundra.4.png b/mods/cartographer-mtg/textures/ctg_mtg_tundra.4.png new file mode 100644 index 0000000..d8ce9ba Binary files /dev/null and b/mods/cartographer-mtg/textures/ctg_mtg_tundra.4.png differ diff --git a/mods/cartographer/CHANGELOG.md b/mods/cartographer/CHANGELOG.md new file mode 100644 index 0000000..a28622d --- /dev/null +++ b/mods/cartographer/CHANGELOG.md @@ -0,0 +1,2 @@ +# v1.0 +- Initial Release diff --git a/mods/cartographer/LICENSE-ccbysa4 b/mods/cartographer/LICENSE-ccbysa4 new file mode 100644 index 0000000..203e0da --- /dev/null +++ b/mods/cartographer/LICENSE-ccbysa4 @@ -0,0 +1,103 @@ +Creative Commons Attribution-ShareAlike 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +Section 1 – Definitions. + + Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. + BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. + Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. + Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + Licensor means the individual(s) or entity(ies) granting rights under this Public License. + Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + License grant. + Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + reproduce and Share the Licensed Material, in whole or in part; and + produce, reproduce, and Share Adapted Material. + Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. + Term. The term of this Public License is specified in Section 6(a). + Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. + Downstream recipients. + Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. + Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. + No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. + No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). + + Other rights. + Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + Patent and trademark rights are not licensed under this Public License. + To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + + Attribution. + + If You Share the Licensed Material (including in modified form), You must: + retain the following if it is supplied by the Licensor with the Licensed Material: + identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + a copyright notice; + a notice that refers to this Public License; + a notice that refers to the disclaimer of warranties; + a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + indicate if You modified the Licensed Material and retain an indication of any previous modifications; and + indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. + You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. + If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. + ShareAlike. + + In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. + The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. + You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. + You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + + for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; + if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and + You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + + Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. + To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. + + The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + + This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. + + Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + upon express reinstatement by the Licensor. + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + + The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation. + + For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. diff --git a/mods/cartographer/LICENSE-gplv3 b/mods/cartographer/LICENSE-gplv3 new file mode 100644 index 0000000..39117e0 --- /dev/null +++ b/mods/cartographer/LICENSE-gplv3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + 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. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is 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. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "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. + + 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. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + 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. + + 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. + + 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. + + 1. Source Code. + + 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. + + 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. + + 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. + + 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. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + 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. + + 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. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + 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. + + 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. + + 4. Conveying Verbatim Copies. + + 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. + + 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. + + 5. Conveying Modified Source Versions. + + 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: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + 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". + + 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. + + 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. + + 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. + + 6. Conveying Non-Source Forms. + + 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: + + 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. + + 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 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. + + 13. Use with the GNU Affero General Public 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 Affero 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 special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 +Program specifies that a certain numbered version of the GNU 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 General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU 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. + + 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. + + 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 Programs + + 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. + + MTG Craft Reverser + Copyright (C) 2020 Hugues Ross + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + MTG Craft Reverser Copyright (C) 2020 Hugues Ross + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + 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 GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/mods/cartographer/README.md b/mods/cartographer/README.md new file mode 100644 index 0000000..60491c8 --- /dev/null +++ b/mods/cartographer/README.md @@ -0,0 +1,38 @@ +# Cartographer +A Minetest mod that provides the necessary framework for crafting maps of the +local environment from various resources. The mod is structured as an API of +sorts, to allow it to be used with any game where such concepts are sensible. + +## How to set up Cartographer +Since Cartographer is an API, it needs at least one additional mod in order to +function in your world. There are example mods available for Minetest Game and +Repixture, and you can make your own to extend these or support other games of +your choosing. + +The process of making such a mod is pretty straightforward: +1. Register every biome in your game with cartographer, by calling `cartographer.biomes.add`, listing the biome, texture names to use for each detail level, and an optional min/max height for those textures to be used. +2. Register items/item groups that provide "paper" and "pigment" for mapmaking, by calling `cartographer.materials.register_by_name` or `cartographer.materials.register_by_group`. You can optionally specify how much of a material to provide per-item, or let it provide 1 unit by default. +3. Add crafting recipes or other ways of acquiring the following nodes: + - cartographer:simple_table + - cartographer:standard_table + - cartographer:advanced_table +4. When integrating into a game, you can use `cartographer.skin` (skin_api.lua) to re-skin this mod's UI with your own textures and better integrate the mod with your art direction. + +It's worth looking in the code to see what other options the cartographer API +offers. If your mod/game would benefit from another means of acquiring or +displaying maps, you can use the API to create your own crafting systems and +mapping items. + +## Contact +For questions, requests, and other communications regarding this work, you can +contact the original creator at hugues.ross@gmail.com + +# License +Cartographer's code is licensed under the GNU General Public License v3.0. A copy +of this license should be bundled with this work, if one was not provided then you +can find the license [here](https://www.gnu.org/licenses/gpl-3.0.html) + +Cartographer's visual/audio assets are licensed under the Creative Commons +Attribution-ShareAlike 4.0 International License. A copy of this license should +be bundled with this work, if one was not provided then you can find the +license [here](https://creativecommons.org/licenses/by-sa/4.0/) diff --git a/mods/cartographer/audio.lua b/mods/cartographer/audio.lua new file mode 100644 index 0000000..dea7992 --- /dev/null +++ b/mods/cartographer/audio.lua @@ -0,0 +1,14 @@ +-- Audio API (Internal) +-- +-- Contains functions for providing audio feedback +local audio = { + -- Play a feedback sound localized on the given player + -- + -- sound: The sound to play + -- player: The player who triggered the sound + play_feedback = function(sound, player) + minetest.sound_play(sound, { pos=player:get_pos(), max_hear_distance=5 }, true); + end +}; + +return audio; diff --git a/mods/cartographer/autofill.lua b/mods/cartographer/autofill.lua new file mode 100644 index 0000000..609774b --- /dev/null +++ b/mods/cartographer/autofill.lua @@ -0,0 +1,42 @@ +-- Arguments +-- chunk: The chunk coordinate conversion API +-- scanner: The map scanning API +-- maps: The map API +-- settings: The mod settings +local chunk, scanner, maps, settings = ...; + +-- Periodically-called function to fill in maps and queue chunks for backup +-- scans +if settings.autofill_freq ~= 0 then + -- scanning + local function fill_loop() + -- Fill in all player-held maps + for _,p in ipairs(minetest.get_connected_players()) do + local inventory = p:get_inventory(); + local pos = p:get_pos(); + if pos.y > -10 then + for i = 1,inventory:get_size("main") do + local stack = inventory:get_stack("main", i); + local map = maps.get(stack:get_meta():get_int("cartographer:map_id")); + + if map then + map:fill_local(pos.x, pos.z); + end + end + for i = -4,4 do + for j = -4,4 do + local adjusted_pos = { + x = pos.x + chunk.from(i), + y = pos.y, + z = pos.z + chunk.from(j), + } + scanner.queue_region(adjusted_pos); + end + end + end + end + minetest.after(settings.autofill_freq, fill_loop); + end + + minetest.after(settings.autofill_freq, fill_loop); +end diff --git a/mods/cartographer/biome_api.lua b/mods/cartographer/biome_api.lua new file mode 100644 index 0000000..f7a56bd --- /dev/null +++ b/mods/cartographer/biome_api.lua @@ -0,0 +1,44 @@ +-- Arguments +-- util: API for uncategorized utility methods +local util = ...; + +local biome_lookup = {}; + +-- Contains functions for registering and getting biome-related mapping information +return { + -- Register a biome with textures to display + -- + -- name: A string containing the biome name + -- textures: A table of texture names. + -- These should correspond with detail levels, + -- any detail level past the length of the table will return the last texture + -- (Optional) min_height: The minimum Y position where this biome data should be used + -- (Optional) max_height: The maximum Y position where this biome data should be used + add = function (name, textures, min_height, max_height) + biome_lookup[#biome_lookup + 1] = { + name = name, + textures = textures, + min_height = min_height, + max_height = max_height, + }; + end, + + -- Get the texture name (minus index/extension) for the given biome, height, and detail level. + -- + -- name: A string containing the biome name + -- height: A number representing the Y position of the biome + -- detail: The detail level + -- + -- Returns a string with a texture name, or nil if no matching biome entry was found. + get_texture = function (name, height, detail) + for _,biome in ipairs(biome_lookup) do + local matches_height = (not biome.min_height or height >= biome.min_height) + and (not biome.max_height or height <= biome.max_height); + if biome.name == name and matches_height then + return util.get_clamped(biome.textures, detail); + end + end + + return nil; + end, +}; diff --git a/mods/cartographer/chunk_api.lua b/mods/cartographer/chunk_api.lua new file mode 100644 index 0000000..fb368a9 --- /dev/null +++ b/mods/cartographer/chunk_api.lua @@ -0,0 +1,21 @@ +local CHUNK_SIZE = 16; + +-- Contains functions for converting coordinates between world units and the +-- unit used by cartographer's maps +return { + -- Convert world coordinates to map coordinates + -- coord: The coordinate value + -- + -- Returns a coordinate value in map space + to = function(coord) + return math.floor(coord / CHUNK_SIZE); + end, + + -- Convert map coordinates to world coordinates + -- coord: The coordinate value + -- + -- Returns a coordinate value in world space + from = function(coord) + return math.floor(coord * CHUNK_SIZE); + end +}; diff --git a/mods/cartographer/commands.lua b/mods/cartographer/commands.lua new file mode 100644 index 0000000..e092399 --- /dev/null +++ b/mods/cartographer/commands.lua @@ -0,0 +1,52 @@ +-- Arguments +-- chunk: The chunk coordinate conversion API +-- audio: The audio playback API +-- map_formspec: The map display API +-- settings: The mod settings +local chunk, audio, map_formspec, settings = ...; +local MAXINT = 2147483647; + +minetest.register_privilege("cartographer", { + description = "Allows use of the /map command to view local area maps", + give_to_singleplayer = false, + give_to_admin = true, +}); + +-- /map -- Displays a regional map around the player +-- (Optional)detail: Specifies the map's detail level. Defaults to the highest +-- available detail. +-- (Optional)scale: Specifies the map's scale. Defaults to 1. +minetest.register_chatcommand("map", { + params = "[] []", + description = "Display a mapo of the local area", + privs = { cartographer = true }, + func = function(name, param) + local detail, scale = param:match("(%d*) (%d*)"); + + if detail then + detail = tonumber(detail); + else + detail = MAXINT; + end + + if scale then + scale = tonumber(scale); + else + scale = 1; + end + + local player = minetest.get_player_by_name(name); + local pos = player:get_pos(); + local player_x = math.floor((chunk.to(pos.x) / scale) + 0.5); + local player_z = math.floor((chunk.to(pos.z) / scale) + 0.5); + + audio.play_feedback("cartographer_open_map", player); + minetest.show_formspec(name, "map", map_formspec.from_coords(player_x, + player_z, + settings.default_size, + settings.default_size, + detail, + scale, + true)); + end, +}) diff --git a/mods/cartographer/formspec.lua b/mods/cartographer/formspec.lua new file mode 100644 index 0000000..4cf6fa0 --- /dev/null +++ b/mods/cartographer/formspec.lua @@ -0,0 +1,359 @@ +-- Gui API (Internal) +-- +-- Contains functions for building formspec-based uis +local gui = { +}; + +-- Create a formspec +-- +-- w: The width of the window +-- h: The height of the window +-- (Optional) version: The formspec version. Defaults to 3. +-- (Optional) bg: A 9-slice background skin object +-- Additional arguments are added as additional formspec elements +-- +-- Returns a table. Calling table.concat on the result will produce +-- a usable formspec string. +function gui.formspec(args) + local data = string.format("formspec_version[%d] size[%f,%f] no_prepend[] bgcolor[#00000000;false]", + args.version or 3, + args.w, args.h); + + if args.bg then + data = data .. gui.bg9 { + skin = args.bg, + fullsize = 'true', + }; + end + + for _,element in ipairs(args) do + data = data .. element; + end + + return data; +end + +-- Create an animated image formspec element +-- +-- animation: An animation skin object +-- (Optional) x: The x position of the element. Defaults to 0. +-- (Optional) y: The y position of the element. Defaults to 0. +-- (Optional) w: The width of the element. Defaults to 1. +-- (Optional) h: The height of the element. Defaults to 1. +-- (Optional) size: Multiplies the width and height. Defaults to 1. +-- (Optional) id: The element id +-- +-- Returns a formspec string +function gui.animated_image(args) + local x = args.x or 0; + local y = args.y or 0; + local w = args.w or 1 * (args.size or 1); + local h = args.h or 1 * (args.size or 1); + + return string.format("animated_image[%f,%f;%f,%f;%s;%s;%d;%d]", + x, y, + w, h, + args.id or "", + args.animation.texture .. ".png", + args.animation.frame_count, + args.animation.frame_duration); +end + +-- Create a 9-slice background formspec element +-- +-- skin: A 9-slice background skin object +-- (Optional) x: The x position of the element. Defaults to 0. +-- (Optional) y: The y position of the element. Defaults to 0. +-- (Optional) w: The width of the element. Defaults to 1. +-- (Optional) h: The height of the element. Defaults to 1. +-- (Optional) size: Multiplies the width and height. Defaults to 1. +-- (Optional) fullsize: Whether or not to fill the parent formspec. Defaults to false. +-- +-- Returns a formspec string +function gui.bg9(args) + local x = args.x or 0; + local y = args.y or 0; + local w = args.w or 1 * (args.size or 1); + local h = args.h or 1 * (args.size or 1); + + return string.format("background9[%f,%f;%f,%f;%s;%s;%s]", + x, y, + w, h, + args.skin.texture .. ".png", + args.fullsize or 'false', + tostring(args.skin.radius)); +end + +-- Create a button formspec element +-- +-- (Optional) text: The text to display on the button +-- (Optional) x: The x position of the element. Defaults to 0. +-- (Optional) y: The y position of the element. Defaults to 0. +-- (Optional) w: The width of the element. Defaults to 1. +-- (Optional) h: The height of the element. Defaults to 1. +-- (Optional) size: Multiplies the width and height. Defaults to 1. +-- (Optional) id: The element id +-- (Optional) tooltip: The tooltip to display when hovering this element. +-- (Optional) disabled: Replaces the id with "disabled_button", allowing it to +-- receive a specific style +-- +-- Returns a formspec string +function gui.button(args) + local x = args.x or 0; + local y = args.y or 0; + local w = args.w or 1 * (args.size or 1); + local h = args.h or 1 * (args.size or 1); + + if args.disabled then + return string.format("button[%f,%f;%f,%f;disabled_button;%s]", x, y, w, h, args.text or ""); + end + + local data = string.format("button[%f,%f;%f,%f;%s;%s]", x, y, w, h, args.id or "", args.text or ""); + + if args.tooltip then + if args.id and not args.disabled then + data = data .. gui.tooltip { + id = args.id, + text = args.tooltip + }; + else + data = data .. gui.tooltip { + x = x, + y = y, + w = w, + h = h, + text = args.tooltip + }; + end + end + + return data; +end + +-- Create a formspec container +-- +-- (Optional) x: The x offset of the container. Defaults to 0. +-- (Optional) y: The y offset of the container. Defaults to 0. +-- (Optional) w: The width of the container (for drawing a background). Defaults to 1. +-- (Optional) h: The height of the container (for drawing a background). Defaults to 1. +-- (Optional) size: Multiplies the width and height. Defaults to 1. +-- (Optional) bg: A 9-slice background skin object +-- +-- Additional arguments are added as the container's child elements +-- +-- Returns a formspec string +function gui.container(args) + local x = args.x or 0; + local y = args.y or 0; + local w = args.w or 1 * (args.size or 1); + local h = args.h or 1 * (args.size or 1); + + local data = string.format("container[%f,%f]", x, y); + + if args.bg then + data = data .. gui.bg9 { + x = 0, + y = 0, + w = w, + h = h, + + skin = args.bg, + }; + end + + for _,element in ipairs(args) do + data = data .. element; + end + + return data .. "container_end[]"; +end + +-- Create an image formspec element +-- +-- image: The image to display. +-- (Optional) x: The x offset of the container. Defaults to 0. +-- (Optional) y: The y offset of the container. Defaults to 0. +-- (Optional) w: The width of the container (for drawing a background). Defaults to 1. +-- (Optional) h: The height of the container (for drawing a background). Defaults to 1. +-- (Optional) size: Multiplies the width and height. Defaults to 1. +-- +-- Returns a formspec string +function gui.image(args) + local x = args.x or 0; + local y = args.y or 0; + local w = args.w or 1 * (args.size or 1); + local h = args.h or 1 * (args.size or 1); + + return string.format("image[%f,%f;%f,%f;%s]", x, y, w, h, args.image); +end + +-- Create an image button formspec element +-- +-- image: The image to display on the button +-- (Optional) text: The text to display on the button +-- (Optional) x: The x position of the element. Defaults to 0. +-- (Optional) y: The y position of the element. Defaults to 0. +-- (Optional) w: The width of the element. Defaults to 1. +-- (Optional) h: The height of the element. Defaults to 1. +-- (Optional) size: Multiplies the width and height. Defaults to 1. +-- (Optional) id: The element id +-- (Optional) tooltip: The tooltip to display when hovering this element. +-- (Optional) disabled: Replaces the id with "disabled_button", allowing it to +-- receive a specific style +-- +-- Returns a formspec string +function gui.image_button(args) + local x = args.x or 0; + local y = args.y or 0; + local w = args.w or 1 * (args.size or 1); + local h = args.h or 1 * (args.size or 1); + + if args.disabled then + return string.format("image_button[%f,%f;%f,%f;%s;disabled_button;%s]", + x, y, + w, h, + args.image, + args.text or ""); + end + + local data = string.format("image_button[%f,%f;%f,%f;%s;%s;%s]", + x, y, + w, h, + args.image, + args.id or "", + args.text or ""); + + if args.tooltip then + if args.id and not args.disabled then + data = data .. gui.tooltip { + id = args.id, + text = args.tooltip + }; + else + data = data .. gui.tooltip { + x = x, + y = y, + w = w, + h = h, + text = args.tooltip + }; + end + end + + return data; +end + +-- Create an inventory list formspec element +-- +-- location: The location of the inventory +-- id: The id of the inventory list +-- w: The number of columns in the inventory list +-- h: The number of rows in the inventory list +-- (Optional) x: The x position of the element. Defaults to 0. +-- (Optional) y: The y position of the element. Defaults to 0. +-- (Optional) bg: A 9-slice background skin object (To display under each slot) +-- (Optional) tooltip: The tooltip to display when hovering this element. +-- +-- Returns a formspec string +function gui.inventory(args) + local data = ""; + + if args.bg then + for i = 0,args.w - 1 do + for j = 0,args.h - 1 do + data = data .. gui.bg9 { + x = args.x + (i * 1.25), + y = args.y + (j * 1.25), + + skin = args.bg, + }; + end + end + end + + data = data .. string.format("listcolors[#00000000;#00000022] list[%s;%s;%f,%f;%f,%f;]", + args.location, args.id, + args.x or 0, args.y or 0, + args.w, args.h); + + if args.tooltip then + data = data .. gui.tooltip { + x = args.x, + y = args.y, + w = args.w, + h = args.h, + text = args.tooltip, + }; + end + + return data; +end + +-- Create a label formspec element +-- +-- text: The text of the label +-- (Optional) textcolor: The color of the label +-- (Optional) x: The x position of the element. Defaults to 0. +-- (Optional) y: The y position of the element. Defaults to 0. +-- +-- Returns a formspec string +function gui.label(args) + if args.textcolor then + return string.format("label[%f,%f;%s%s]", + args.x or 0, + args.y or 0, + minetest.get_color_escape_sequence(args.textcolor), + args.text); + end + + return string.format("label[%f,%f;%s]", args.x or 0, args.y or 0, args.text); +end + +local function style_internal(selector, properties) + local data = "[" .. selector; + for name,value in pairs(properties) do + data = data .. string.format(";%s=%s", name, tostring(value)); + end + return data .. "]"; +end + +-- Create a formspec style +-- +-- selector: A valid comma-separated list of id-based style selectors +-- properties: A table of property names and values +-- +-- Returns a formspec string +function gui.style(args) + return "style" .. style_internal(args.selector, args.properties); +end + +-- Create a formspec style +-- +-- selector: A valid comma-separated list of type-based style selectors +-- properties: A table of property names and values +-- +-- Returns a formspec string +function gui.style_type(args) + return "style_type" .. style_internal(args.selector, args.properties); +end + +-- Create a formspec tooltip element +-- +-- text: The text of the tooltip +-- (Optional) id: The ID of the element to display on +-- +-- (Required when id == nil) x: The x position of the element +-- (Required when id == nil) y: The y position of the element +-- (Required when id == nil) w: The width of the element +-- (Required when id == nil) h: The height of the element +-- +-- Returns a formspec string +function gui.tooltip(args) + if args.id then + return string.format("tooltip[%s;%s]", args.id, args.text); + else + return string.format("tooltip[%f,%f;%f,%f;%s]", args.x, args.y, args.w, args.h, args.text); + end +end + +return gui; diff --git a/mods/cartographer/init.lua b/mods/cartographer/init.lua new file mode 100644 index 0000000..edf86e9 --- /dev/null +++ b/mods/cartographer/init.lua @@ -0,0 +1,46 @@ +-- The path to this mod, for including files +local modpath = minetest.get_modpath("cartographer"); + +local settings = { + default_size = tonumber(minetest.settings:get("default_size")) or 40, + autofill_freq = tonumber(minetest.settings:get("autofill_freq")) or 5, + autosave_freq = tonumber(minetest.settings:get("autosave_freq")) or 60, + backup_scan_freq = tonumber(minetest.settings:get("backup_scan_freq")) or 5, + backup_scan_count = tonumber(minetest.settings:get("backup_scan_count")) or 20, +}; + +-- Includes +local map_data = loadfile(modpath .. "/storage.lua") (settings); +local chunk = loadfile(modpath .. "/chunk_api.lua") (); +local gui = loadfile(modpath .. "/formspec.lua") (); +local skin = loadfile(modpath .. "/skin_api.lua") (); +local util = loadfile(modpath .. "/util.lua") (); +local audio = loadfile(modpath .. "/audio.lua") (); +local biomes = loadfile(modpath .. "/biome_api.lua") (util); +local markers = loadfile(modpath .. "/marker_api.lua") (); +local scanner = loadfile(modpath .. "/scanner.lua") (map_data, chunk, settings); +local maps = loadfile(modpath .. "/map_api.lua") (map_data, chunk); +local materials = loadfile(modpath .. "/material_api.lua") (); +local map_formspec = loadfile(modpath .. "/map_formspec.lua") (map_data, gui, skin, util, biomes, markers); +local map_item = loadfile(modpath .. "/items.lua") (chunk, gui, skin, audio, maps, markers, map_formspec, settings); +loadfile(modpath .. "/commands.lua") (chunk, audio, map_formspec, settings); +loadfile(modpath .. "/table.lua") (gui, skin, audio, maps, materials, map_item, settings); +loadfile(modpath .. "/autofill.lua") (chunk, scanner, maps, settings); + +-- The API object +cartographer = { + -- skin_api.lua: Allows the visual customization of formspecs + skin = skin, + -- biome_api.lua: Allows biome data to be registered for display in maps + biomes = biomes, + -- marker_api.lua: Allows markers to be registered for placement on maps + markers = markers, + -- map_api.lua: Allows the creation, lookup, and management of map objects + maps = maps, + -- items.lua: Allows the creation of map items with proper metadata + map_item = map_item, + -- materials.lua: Allows items to be registered as mapmaking materials + materials = materials, + -- scanner.lua: Exposes functions for queuing and performing terrain scans + scanner = scanner, +}; diff --git a/mods/cartographer/items.lua b/mods/cartographer/items.lua new file mode 100644 index 0000000..6ba1879 --- /dev/null +++ b/mods/cartographer/items.lua @@ -0,0 +1,481 @@ +-- Arguments +-- chunk: The chunk coordinate conversion API +-- gui: The GUI API +-- skin: The GUI skin +-- audio: The audio playback API +-- maps: The map API +-- markers: The marker API +-- map_formspec: The map display API +-- settings: The mod settings +local chunk, gui, skin, audio, maps, markers, map_formspec, settings = ...; + +-- The list of players looking at maps, and the map IDs that they're looking at +local player_maps = {}; + +-- Generate formspec data for the map marker editor +-- +-- selected_id: The id of the currently selected marker, or nil if no marker is +-- selected +-- detail: The map's detail level +-- page: The current page +-- +-- Returns a formspec string for use in containers +local function marker_formspec(selected_id, detail, page) + local marker_lookup = markers.get_all(); + + local formspec = { + gui.button { + x = 0.125, + y = 0.125, + + w = 1.125, + h = 0.5, + + id = "clear_marker", + text = "Erase", + tooltip = "Remove the selected marker", + }, + + gui.label { + x = 1.375, + y = 3.5, + + text = string.format("%d / %d", page, math.ceil(#marker_lookup / 20)), + }, + }; + + if selected_id then + table.insert(formspec, gui.style { + selector = "marker-" .. selected_id, + properties = { + bgimg = skin.marker_button.selected_texture .. ".png", + bgimg_hovered = skin.marker_button.selected_texture .. ".png", + bgimg_pressed = skin.marker_button.selected_texture .. ".png", + } + }); + end + + local starting_id = ((page - 1) * 20) + 1; + for i = starting_id,math.min(#marker_lookup,starting_id + 19),1 do + local marker = marker_lookup[i]; + table.insert(formspec, gui.image_button { + x = (i - starting_id) % 5 * 0.625 + 0.125, + y = math.floor((i - starting_id) / 5) * 0.625 + 0.75, + + w = 0.5, + h = 0.5, + + image = marker.textures[math.min(detail, #marker.textures)] .. ".png", + id = "marker-" .. marker.id, + tooltip = marker.name, + }); + end + + if page > 1 then + table.insert(formspec, gui.button { + x = 0.125, + y = 3.25, + + w = 0.5, + h = 0.5, + + id = "prev_button", + text = "<" + }); + end + + if starting_id + 19 < #marker_lookup then + table.insert(formspec, gui.button { + x = 2.625, + y = 3.25, + + w = 0.5, + h = 0.5, + + id = "next_button", + text = ">" + }); + end + + return table.concat(formspec); +end + +-- Show a map to a player +-- +-- map: The map to display +-- player_x: The X position (in world coordinates) +-- player_z: The Z position (in world coordinates) +-- player_name: The name of the player to show to +-- height_mode: Whether or not to display the map in height mode +-- (Optional) marker_page: The current page that the marker editor is on +local function show_map_formspec(map, player_x, player_z, player_name, height_mode, marker_page) + map:fill_local(player_x, player_z); + + player_maps[player_name] = { + id = map.id, + page = marker_page or 1, + height_mode = height_mode, + }; + + player_x, player_z = map:to_coordinates(player_x, player_z, true); + local formspec, formspec_width, _ = map_formspec.from_map(map, player_x, player_z, height_mode); + local height_button_texture; + if height_mode then + height_button_texture = skin.height_button_texture .. ".png"; + else + height_button_texture = skin.flat_button_texture .. ".png"; + end + + local data = { + gui.style_type { + selector = "button,image_button,label", + properties = { + noclip = true, + } + }, + gui.style_type { + selector = "button,image_button", + properties = { + border = false, + bgimg = skin.marker_button.texture .. ".png", + bgimg_hovered = skin.marker_button.hovered_texture .. ".png", + bgimg_pressed = skin.marker_button.pressed_texture .. ".png", + bgimg_middle = skin.marker_button.radius, + textcolor = skin.marker_button.font_color, + }, + }, + gui.container { + x = formspec_width - 0.01, + y = 0.125, + w = 0.75, + h = 0.75, + bg = skin.marker_bg, + + gui.image_button { + x = 0.125, + y = 0.125, + w = 0.5, + h = 0.5, + + id = "height_button", + image = height_button_texture, + tooltip = "Toggle height view", + } + }, + }; + + if markers.count() > 0 then + table.insert(data, gui.container { + x = formspec_width - 0.01, + y = 1, + w = 3.25, + h = 3.875, + bg = skin.marker_bg, + + marker_formspec(map:get_marker(player_x, player_z), map.detail, marker_page or 1)}); + end + + formspec = formspec .. table.concat(data); + minetest.show_formspec(player_name, "cartographer:map", formspec); +end + +-- Get the description text for a map ID and dimensions +-- +-- id: The map ID +-- from_x: The x coordinate of the top-left corner of the map, in map coordinates +-- from_z: The z coordinate of the top-left corner of the map, in map coordinates +-- w: The width, in world coordinates +-- h: The height, in world coordinates +-- +-- returns a string containing the description +local function map_description(id, from_x, from_z, w, h) + return string.format("Map #%d\n[%d,%d] - [%d,%d]", + id, + chunk.from(from_x), chunk.from(from_z), + chunk.from(from_x + w + 1), chunk.from(from_z + h + 1)); +end + +-- Create a map from metadata, and assign the ID to the metadata +-- +-- meta: A metadata object containing the map ID +-- player_x: The X position (in map coordinates) +-- player_z: The Z position (in map coordinates) +-- +-- Returns the id of the new map +local function map_from_meta(meta, player_x, player_z) + local size = meta:get_int("cartographer:size"); + if size == 0 then + size = settings.default_size; + end + + local detail = meta:get_int("cartographer:detail"); + if detail == 0 then + detail = 1; + end + + local scale = meta:get_int("cartographer:scale"); + if scale == 0 then + scale = 1; + end + + local total_size = size * scale; + + local map_x = math.floor(player_x / total_size) * total_size; + local map_y = math.floor(player_z / total_size) * total_size; + + local id = maps.create(map_x, map_y, size, size, false, detail, scale); + + meta:set_int("cartographer:map_id", id); + meta:set_string("description", map_description(id, map_x, map_y, total_size, total_size)); + + return id; +end + +-- Show a map to a player from metadata, creating it if necessary +-- +-- meta: A metadata object containing the map ID +-- player: The player to show the map to +local function show_map_meta(meta, player) + local pos = player:get_pos(); + local player_x = chunk.to(pos.x); + local player_z = chunk.to(pos.z); + + local id = meta:get_int("cartographer:map_id"); + if id == 0 then + id = map_from_meta(meta, player_x, player_z); + end + + local map = maps.get(id); + if map then + show_map_formspec(map, pos.x, pos.z, player:get_player_name(), true); + end +end + +-- Called when a player sends input to the server from a formspec +-- This callback handles player input in the map formspec, for editing markers +-- +-- player: The player who sent the input +-- name: The formspec name +-- fields: A table containing the input +minetest.register_on_player_receive_fields(function(player, name, fields) + if name == "cartographer:map" then + local data = player_maps[player:get_player_name()]; + if not data then + return; + end + + local map = maps.get(data.id); + if not map then + return; + end + + for k,_ in pairs(fields) do + local marker = k:match("marker%-(.+)"); + local pos = player:get_pos(); + if marker or k == "clear_marker" then + local player_x, player_z = map:to_coordinates(pos.x, pos.z, true); + map:set_marker(player_x, player_z, marker); + + audio.play_feedback("cartographer_write", player); + show_map_formspec(map, pos.x, pos.z, player:get_player_name(), data.page); + elseif k == "prev_button" then + local new_page = math.max(data.page - 1, 1); + show_map_formspec(map, pos.x, pos.z, player:get_player_name(), data.height_mode, new_page); + elseif k == "next_button" then + local new_page = math.min(data.page + 1, math.ceil(markers.count() / 20)); + show_map_formspec(map, pos.x, pos.z, player:get_player_name(), data.height_mode, new_page); + elseif k == "height_button" then + show_map_formspec(map, pos.x, pos.z, player:get_player_name(), not data.height_mode, data.page); + elseif k == "quit" then + player_maps[player:get_player_name()] = nil; + end + end + end +end); + +-- The map item/node +minetest.register_node("cartographer:map", { + description = "Map", + inventory_image = "cartographer_map.png", + wield_image = "cartographer_map.png", + tiles = { "cartographer_map.png" }, + drawtype = "signlike", + paramtype = "light", + paramtype2 = "wallmounted", + stack_max = 1, + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -7 / 16, 0.5}, + }, + }, + + groups = { + attached_node = 1, + dig_immediate = 3, + }, + + -- Called when this node is placed in the world. Copies map data from the + -- item to the node. + -- pos: The position of the node + -- stack: The itemstack that was placed + after_place_node = function(pos, _, stack, _) + local meta = stack:get_meta():to_table(); + local node_meta = minetest.get_meta(pos); + node_meta:from_table(meta); + + -- Consume the item after placing + return false; + end, + + -- Called when this node is dug. Turns the node into an item. + -- pos: The position of the node + on_dig = function(pos, _, _) + local node_meta = minetest.get_meta(pos):to_table(); + local item = ItemStack("cartographer:map"); + item:get_meta():from_table(node_meta); + + if minetest.add_item(pos, item) then + minetest.remove_node(pos); + end + end, + + -- Called when a player right-clicks this node. Display's the map's + -- content, creating it if it doesn't exist. + -- pos: The position of the node + -- player: The player that right-clicked the node + on_rightclick = function(pos, _, player) + audio.play_feedback("cartographer_open_map", player); + show_map_meta(minetest.get_meta(pos), player); + end, + + -- Called when a player uses this item. Displays the map's content, + -- creating it if it doesn't exist. + -- stack: The itemstack + -- player: The player that used the item + on_use = function(stack, player) + audio.play_feedback("cartographer_open_map", player); + show_map_meta(stack:get_meta(), player); + return stack; + end, + + -- Called when a node is about to be turned into an item. Copies all + -- metadata into any items matching this node's name. + -- oldnode: The old node's data + -- oldmeta: A table containing the old node's metadata + -- drops: A table containing the new items + preserve_metadata = function(_, oldnode, oldmeta, drops) + for _,item in ipairs(drops) do + if item:get_name() == oldnode.name then + item:get_meta():from_table({fields=oldmeta}); + end + end + end, +}); + +-- Create an empty map item with the given parameters +-- +-- size: The size of the map +-- detail: The detail level of the map +-- scale: The scaling factor of the map +-- +-- Returns an ItemStack +local function create_map_item(size, detail, scale) + local map = ItemStack("cartographer:map"); + local meta = map:get_meta(); + meta:set_int("cartographer:size", size); + meta:set_int("cartographer:detail", detail); + meta:set_int("cartographer:scale", scale); + meta:set_string("description", "Empty Map\nUse to set the initial location"); + + return map; +end + +-- Create a copy of the given map +-- +-- stack: An itemstack containing a map +-- +-- Returns a new ItemStack with the copied map +local function copy_map_item(stack) + local meta = stack:get_meta(); + + local size = meta:get_int("cartographer:size"); + local detail = meta:get_int("cartographer:detail"); + local scale = meta:get_int("cartographer:scale"); + + local copy = create_map_item(size, detail, scale); + local copy_meta = copy:get_meta(); + + local id = meta:get_int("cartographer:map_id"); + if id > 0 then + local src = maps.get(id); + + local new_id = maps.create(src.x, src.z, src.w, src.h, false, src.detail, src.scale); + local dest = maps.get(new_id); + for k,v in pairs(src.fill) do + dest.fill[k] = table.copy(v); + end + for k,v in pairs(src.markers) do + dest.markers[k] = table.copy(v); + end + + copy_meta:set_int("cartographer:map_id", new_id); + copy_meta:set_string("description", map_description(new_id, + dest.x, dest.z, + dest.w * dest.scale, dest.h * dest.scale)); + end + + return copy; +end + +-- Resize the given map item +-- +-- meta: A metadata object containing the map data +-- size: The new size +local function resize_map_item(meta, size) + local old_size = meta:get_int("cartographer:size"); + + if old_size >= size then + return; + end + + meta:set_int("cartographer:size", size); + + local id = meta:get_int("cartographer:map_id"); + if id > 0 then + local map = maps.get(id); + map:resize(size, size); + + meta:set_string("description", map_description(id, map.x, map.z, map.w * map.scale, map.h * map.scale)); + end +end + +-- Change the scale of the given map item +-- +-- meta: A metadata object containing the map data +-- scale: The new scale +local function rescale_map_item(meta, scale) + local old_scale = meta:get_int("cartographer:scale"); + + if old_scale >= scale then + return; + end + + meta:set_int("cartographer:scale", scale); + + local id = meta:get_int("cartographer:map_id"); + if id > 0 then + local map = maps.get(id); + map:rescale(scale); + meta:set_string("description", map_description(id, map.x, map.z, map.w * map.scale, map.h * map.scale)); + end +end + +return { + create = create_map_item, + copy = copy_map_item, + resize = resize_map_item, + rescale = rescale_map_item, +}; diff --git a/mods/cartographer/map_api.lua b/mods/cartographer/map_api.lua new file mode 100644 index 0000000..3cb96eb --- /dev/null +++ b/mods/cartographer/map_api.lua @@ -0,0 +1,195 @@ +-- Arguments +-- map_data: The map data source +-- chunk: The chunk coordinate conversion API +local map_data, chunk = ...; + +-- The map 'class' +local Map = {}; +Map.__index = Map; + +for _,loaded_map in ipairs(map_data.maps) do + setmetatable(loaded_map, Map); +end + +-- Rescale this map +-- +-- scale: The new scale +function Map.rescale(self, scale) + if scale >= self.scale then + self.fill = {}; + self.markers = {}; + self.scale = scale; + end +end + +-- Resize this map +-- +-- w: The new width +-- h: The new height +function Map.resize(self, w, h) + if w >= self.w and h >= self.h then + self.w = w; + self.h = h; + end +end + + +-- Fill in a region of this map +-- +-- x: The x position, in map coordinates +-- z: The z position, in map coordinates +-- w: The width, in map coordinates +-- h: The height, in map coordinates +function Map.fill_area(self, x, z, w, h) + for i = math.max(x, 0),math.min(x + w - 1, self.w),1 do + if not self.fill[i] then + self.fill[i] = {}; + end + + for j = math.max(z, 0),math.min(z + h - 1, self.h),1 do + self.fill[i][j] = self.detail; + end + end +end + +-- Set the marker at the given position +-- +-- x: The x position, in map coordinates +-- z: The z position, in map coordinates +-- marker: The marker ID to set, or nil to unset +function Map.set_marker(self, x, z, marker) + if x < 0 or x > self.w or z < 0 or z > self.h then + return; + end + + if not self.markers[x] then + self.markers[x] = { + [z] = marker, + }; + else + self.markers[x][z] = marker; + end +end + +-- Get the marker at the given position +-- +-- x: The x position, in map coordinates +-- z: The z position, in map coordinates +-- +-- Returns a marker id +function Map.get_marker(self, x, z) + if x < 0 or x > self.w or z < 0 or z > self.h or not self.markers[x] then + return nil; + end + + return self.markers[x][z]; +end + +-- Fill in the local area of a map around a position +-- +-- id: A map ID +-- x: The x position, in world coordinates +-- z: The z position, in world coordinates +function Map.fill_local(self, x, z) + x, z = self:to_coordinates(x, z, true); + + local scale_sizes = { + 7, + 5, + 5, + 3, + 3, + 3, + 1, + 1, + }; + + local fill_size = scale_sizes[math.min(self.scale, #scale_sizes)]; + local fill_radius = math.floor(fill_size / 2); + + if x >= 0 - fill_radius and x <= self.w + (fill_radius - 1) + and z >= 0 - fill_radius and z <= self.h + (fill_radius - 1) then + self:fill_area(x - fill_radius, z - fill_radius, fill_size, fill_size); + end +end + +-- Convert a position in world coordinates to the given map's coordinate system +-- +-- x: The x position, in world coordinates +-- z: The z position, in world coordinates +-- (Optional) relative: When true, the coordinates are relative to this map's +-- position. +-- +-- Returns The converted x and z coordinates +function Map.to_coordinates(self, x, z, relative) + if self.scale == 0 then + return chunk.to(x), chunk.to(z); + end + + if relative then + return math.floor((chunk.to(x) - self.x) / self.scale + 0.5), + math.floor((chunk.to(z) - self.z) / self.scale + 0.5); + else + return math.floor(chunk.to(x) / self.scale + 0.5), + math.floor(chunk.to(z) / self.scale + 0.5); + end +end + +-- Check if the given position on this map is filled +-- +-- x: The x position, in map coordinates +-- z: The z position, in map coordinates +function Map.is_filled(self, x, z) + return self.fill[x - self.x] and self.fill[x - self.x][z - self.z]; +end + +-- The Map API +local maps = { + -- Create a new map object with the given parameters + -- + -- x: The x position, in map coordinates + -- z: The z position, in map coordinates + -- w: The width, in map coordinates + -- h: The height, in map coordinates + -- filled: Whether or not the map is pre-filled + -- detail: The detail level + -- scale: The scale factor + -- + -- Returns the new map's id + create = function(x, z, w, h, filled, detail, scale) + local id = map_data.next_map_id; + + local map = { + id = id, + x = x, + z = z, + w = w, + h = h, + detail = detail, + scale = scale, + fill = {}, + markers = {}, + }; + setmetatable(map, Map); + + map_data.maps[id] = map; + if filled then + map:fill_area(0, 0, w, h); + end + + map_data.next_map_id = map_data.next_map_id + 1; + + return id; + end, + + -- Get the map objwct assigned to the given id + -- + -- id: The map id + -- + -- Returns a map object, or nil if the id is invalid + get = function(id) + return map_data.maps[id]; + end, +} + +return maps; diff --git a/mods/cartographer/map_formspec.lua b/mods/cartographer/map_formspec.lua new file mode 100644 index 0000000..326b913 --- /dev/null +++ b/mods/cartographer/map_formspec.lua @@ -0,0 +1,212 @@ +-- Arguments +-- map_data: The cartographer map data table +-- gui: The GUI API +-- skin: The GUI skin +-- util: API for uncategorized utility methods +-- biomes: The biome API +-- markers: The marker API +local map_data, gui, skin, util, biomes, markers = ...; + +-- Constants +local TILE_SIZE = 0.25; +local TILE_OFFSET = 0.24; -- Slightly smaller than TILE_SIZE. We overlap tiles slightly to minimize seams + +-- NoiseParams table for tile variations +local MAP_NOISE = { + offset = 0, + scale = 1, + spread = {x = 2, y = 2, z = 2}, + seed = tonumber(minetest.get_mapgen_setting("seed")), + octaves = 2, + persist = 0.63, + lacunarity = 2.0, + flags = "defaults, absvalue", +}; + +local function map_is_filled(map, x, y) + return map:is_filled(x, y); +end + +local function map_get_marker(map, x, y) + return map:get_marker(x, y); +end + +-- Get the variant of the tile at a given position +-- +-- prefix: The part of the tile texture name before the variant +-- x: The X position of the tile (in map coordinates) +-- z: The Z position of the tile (in map coordinates) +-- noise: A 2d lookup table of perlin noise. Must contain the position [x + 1][y + 1] +-- +-- Returns a string in the format 'prefix.variant.png', where variant is a number from 1 to 4 +local function get_variant(prefix, x, z, noise) + return string.format("%s.%d.png", prefix, math.floor(math.min(noise[x + 1][z + 1] * 3, 3)) + 1); +end + +-- Generate formspec markup for a given map +-- +-- x: The X position of the map (in relative map coordinates) +-- y: The Z position of the map (in relative map coordinates) +-- w: The width of the map (in map coordinates) +-- h: The height of the map (in map coordinates) +-- player_x: The X position of the player marker (in map coordinates) +-- player_y: The Y position of the player marker (in map coordinates) +-- detail: The detail level +-- map_scale: Integer scaling factor for displaying a zoomed-out map +-- height_mode: If true, displaces tiles by their height +-- (Optional) is_visible: Callback to determine if a tile should be drawn +-- (Optional) get_marker: Callback to get the marker for any given tile +-- +-- Additional arguments are provided to is_visible / get_marker +-- +-- Returns a formspec string +local function generate_map(x, y, w, h, player_x, player_y, detail, map_scale, height_mode, is_visible, get_marker, ...) + local str = ""; + local noise = PerlinNoiseMap(MAP_NOISE, { x=w + 1, y=h + 1, z=1}):get_2d_map({ x=x, y=y}); + + for i = 0,w,1 do + local world_i = x + (i * map_scale); + local fx = i * TILE_OFFSET; + local column = map_data.generated[world_i]; + for j = h,0,-1 do + local world_j = y + (j * map_scale); + local fy = (h - j) * TILE_OFFSET; + if column == nil or column[world_j] == nil or (is_visible and not is_visible(..., x + i, y + j)) then + local unknown_tex = util.get_clamped(skin.unknown_biome_textures, detail); + str = str .. gui.image { + x = fx, + y = fy, + w = TILE_SIZE, + h = TILE_SIZE, + + image = get_variant(unknown_tex, i, j, noise), + }; + else + local name = minetest.get_biome_name(column[world_j].biome); + local height = column[world_j].height; + local biome = biomes.get_texture(name, math.floor(height + 0.5), detail); + + if biome then + local depth = math.min(math.max(math.floor(height / 8), -8), 0) * -1 + height = math.max(math.min(math.floor(height / (math.max(map_scale * 0.5, 1) + 4)), 8), 0) + + local mod = ""; + if height > 0 then + mod = "^[colorize:white:"..tostring(height * 10) + height = height * 0.05; + + if height_mode then + str = str .. gui.image { + x = fx, + y = fy - height + TILE_OFFSET, + w = TILE_SIZE, + h = height + 0.01, + + image = util.get_clamped(skin.cliff_textures, detail) .. ".png", + }; + else + height = 0; + end + elseif depth > 0 then + mod = "^[colorize:#1f1f34:"..tostring(depth * 10) + end + + str = str .. gui.image { + x = fx, + y = fy - height, + w = TILE_SIZE, + h = TILE_SIZE, + + image = get_variant(biome, i, j, noise) .. mod, + }; + + if get_marker then + local marker = markers.get_texture(get_marker(..., i, j), detail); + if marker then + str = str .. gui.image { + x = fx, + y = fy - height, + w = TILE_SIZE, + h = TILE_SIZE, + + image = marker .. ".png", + }; + end + end + + if i == player_x and j == player_y then + local player_icon = util.get_clamped(skin.player_icons, detail); + str = str .. gui.animated_image { + x = fx, + y = fy - height, + w = TILE_SIZE, + h = TILE_SIZE, + + animation = player_icon, + }; + end + else + local unknown_tex = util.get_clamped(skin.unknown_biome_textures, detail); + str = str .. gui.image { + x = fx, + y = fy, + w = TILE_SIZE, + h = TILE_SIZE, + + image = get_variant(unknown_tex, i, j, noise), + }; + end + end + end + end + + return str; +end + +local map_formspec = {}; + +-- Get the formspec for a given map segment +-- +-- x: The X position of the map, in map coordinates +-- y: The Y position of the map, in map coordinates +-- w: The width of the map, in map coordinates +-- h: The height of the map, in map coordinates +-- detail: The detail level of the map +-- scale: Integer scaling factor for displaying a zoomed-out map +-- height_mode: If true, displaces tiles by their height +-- +-- Returns a formspec string, the width of the formspec, and the height of the +-- formspec +function map_formspec.from_coords(x, y, w, h, detail, scale, height_mode) + local formspec_width = (w + 1) * TILE_OFFSET + 0.01; + local formspec_height = (h + 1) * TILE_OFFSET + 0.01; + return gui.formspec { + w = formspec_width, + h = formspec_height, + + generate_map(x - (w * 0.5), y - (h * 0.5), w, h, w * 0.5, h * 0.5, detail, scale, height_mode), + }, formspec_width, formspec_height; +end + +-- Get the formspec for a given map table +-- +-- map: The map to use +-- x: The X position of the player marker, in relative map coordinates +-- y: The Y position of the player marker, in relative map coordinates +-- height_mode: If true, displaces tiles by their height +-- +-- Returns a formspec string, the width of the formspec, and the height of the +-- formspec +function map_formspec.from_map(map, x, y, height_mode) + local formspec_width = (map.w + 1) * TILE_OFFSET + 0.01; + local formspec_height = (map.h + 1) * TILE_OFFSET + 0.01; + return gui.formspec { + w = formspec_width, + h = formspec_height, + + generate_map(map.x, map.z, map.w, map.h, + x, y, map.detail, map.scale, height_mode, map_is_filled, map_get_marker, map), + }, formspec_width, formspec_height; +end + +return map_formspec; diff --git a/mods/cartographer/marker_api.lua b/mods/cartographer/marker_api.lua new file mode 100644 index 0000000..519228d --- /dev/null +++ b/mods/cartographer/marker_api.lua @@ -0,0 +1,100 @@ +local marker_lookup = {}; + +-- Format marker ids to allow their use as formspec element ids. +-- We're mostly concerned with guarding against the : character because it is +-- common for ids and has an alternate meaning in formspecs. +-- +-- id: The id to format +-- +-- Returns the formatted id +local function format_marker_id(id) + return id:gsub(":", "_"); +end + +-- Find the marker data for a given id +-- +-- id: The id to search for +-- +-- Returns the marker data, or nil if not found +local function get_marker(id) + if not id then + return nil; + end + + id = format_marker_id(id); + for _,marker in pairs(marker_lookup) do + if marker.id == id then + return marker; + end + end + + return nil; +end + +-- Get the number of registered markers +-- +-- Returns the length of the marker table +local function get_marker_count() + return #marker_lookup; +end + +-- Get all registered markers +-- +-- Returns a copy of the marker table +local function get_registered_markers() + return table.copy(marker_lookup); +end + +-- Register a marker with textures to display +-- +-- id: A string containing the id of the marker +-- name: A string containing the displayedname of the marker +-- textures: A table of texture names. +-- These should correspond with detail levels, +-- any detail level past the length of the table will return the last texture +local function add_marker(id, name, textures) + if not id then + return nil; + end + + id = format_marker_id(id); + local existing_marker = get_marker(id); + if existing_marker then + existing_marker.name = name; + existing_marker.textures = textures; + else + marker_lookup[#marker_lookup+1] = { + id = id, + name = name, + textures = textures, + }; + end +end + +-- Get the texture name (minus extension) for the given marker and detail level. +-- +-- id: A string containing the marker id +-- detail: The detail level +-- Returns a string with a texture name, or nil if no matching marker was found. +local function get_marker_texture(id, detail) + if not id then + return nil; + end + + id = format_marker_id(id); + local marker = get_marker(id); + + if marker then + return marker.textures[math.min(detail, #marker.textures)]; + end + + return nil; +end + +return { + add = add_marker, + count = get_marker_count, + get = get_marker, + get_all = get_registered_markers, + get_texture = get_marker_texture, +}; diff --git a/mods/cartographer/material_api.lua b/mods/cartographer/material_api.lua new file mode 100644 index 0000000..76c1a32 --- /dev/null +++ b/mods/cartographer/material_api.lua @@ -0,0 +1,67 @@ +local materials_by_name = {}; +local materials_by_group = {}; + +return { + -- Get the converted material value of the given itemstack + -- + -- stack: The itemstack to convert + -- + -- Returns a table with the material values + get_stack_value = function(stack) + local item_name = stack:get_name(); + local item_count = stack:get_count(); + + for name,mats in pairs(materials_by_name) do + if name == item_name then + return { + paper = (mats.paper or 0) * item_count, + pigment = (mats.pigment or 0) * item_count, + } + end + end + + for group,mats in pairs(materials_by_group) do + if minetest.get_item_group(item_name, group) ~= 0 then + return { + paper = (mats.paper or 0) * item_count, + pigment = (mats.pigment or 0) * item_count, + } + end + end + + return { + paper = 0, + pigment = 0, + }; + end, + + -- Register a material from an item name + -- + -- name: The name of the item + -- material: The material type to set + -- value: The material value + register_by_name = function(name, material, value) + if materials_by_name[name] then + materials_by_name[name][material] = value or 1; + else + materials_by_name[name] = { + [material] = value or 1, + }; + end + end, + + -- Register a material from an item group + -- + -- group: The name of the group + -- material: The material type to set + -- value: The material value + register_by_group = function(name, material, value) + if materials_by_group[name] then + materials_by_group[name][material] = value or 1; + else + materials_by_group[name] = { + [material] = value or 1, + }; + end + end, +}; diff --git a/mods/cartographer/mod.conf b/mods/cartographer/mod.conf new file mode 100644 index 0000000..b0dad78 --- /dev/null +++ b/mods/cartographer/mod.conf @@ -0,0 +1,2 @@ +name = cartographer +description = A mapmaking API. Needs additional mods to function. diff --git a/mods/cartographer/models/cartographer_advanced_table.blend b/mods/cartographer/models/cartographer_advanced_table.blend new file mode 100644 index 0000000..0cbcec0 Binary files /dev/null and b/mods/cartographer/models/cartographer_advanced_table.blend differ diff --git a/mods/cartographer/models/cartographer_advanced_table.obj b/mods/cartographer/models/cartographer_advanced_table.obj new file mode 100644 index 0000000..94f8754 --- /dev/null +++ b/mods/cartographer/models/cartographer_advanced_table.obj @@ -0,0 +1,821 @@ +# Blender v2.82 (sub 7) OBJ File: 'cartographer_advanced_table.blend' +# www.blender.org +o Legs_Plane.001 +v 0.437500 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v 0.437500 -0.500000 0.375000 +v 0.375000 -0.500000 0.375000 +v 0.437500 -0.375000 0.375000 +v 0.437500 -0.375000 -0.375000 +v 0.375000 -0.375000 -0.375000 +v 0.375000 -0.375000 0.375000 +v 0.437500 -0.500000 0.250000 +v 0.375000 -0.437500 0.250000 +v 0.437500 -0.375000 0.250000 +v 0.375000 -0.375000 0.250000 +v 0.437500 -0.500000 0.125333 +v 0.437500 -0.375000 0.125333 +v 0.375000 -0.437500 0.125665 +v 0.375000 -0.375000 0.125665 +v 0.375000 0.125000 0.125665 +v 0.375000 0.125000 0.250000 +v 0.437500 0.125000 0.250000 +v 0.437500 0.125000 0.125333 +v 0.375000 0.437500 0.125665 +v 0.375000 0.500000 0.250000 +v 0.437500 0.500000 0.250000 +v 0.437500 0.437500 0.125333 +v -0.437500 -0.500000 -0.375000 +v -0.375000 -0.500000 -0.375000 +v -0.437500 -0.500000 0.375000 +v -0.375000 -0.500000 0.375000 +v -0.437500 -0.375000 0.375000 +v -0.437500 -0.375000 -0.375000 +v -0.375000 -0.375000 -0.375000 +v -0.375000 -0.375000 0.375000 +v -0.437500 -0.500000 0.250000 +v -0.375000 -0.437500 0.250000 +v -0.437500 -0.375000 0.250000 +v -0.375000 -0.375000 0.250000 +v -0.437500 -0.500000 0.125333 +v -0.437500 -0.375000 0.125333 +v -0.375000 -0.437500 0.125665 +v -0.375000 -0.375000 0.125665 +v -0.375000 0.125000 0.125665 +v -0.375000 0.125000 0.250000 +v -0.437500 0.125000 0.250000 +v -0.437500 0.125000 0.125333 +v -0.375000 0.437500 0.125665 +v -0.375000 0.500000 0.250000 +v -0.437500 0.500000 0.250000 +v -0.437500 0.437500 0.125333 +v 0.437500 0.062500 0.250000 +v 0.375000 0.062500 0.250000 +v 0.375000 0.062500 0.125665 +v 0.437500 0.062500 0.125333 +v -0.437500 0.062500 0.250000 +v -0.375000 0.062500 0.250000 +v -0.375000 0.062500 0.125665 +v -0.437500 0.062500 0.125333 +v 0.375000 0.125000 -0.186835 +v 0.437500 0.125000 -0.187167 +v -0.375000 0.125000 -0.186835 +v -0.437500 0.125000 -0.187167 +v 0.375000 0.062500 -0.186835 +v 0.437500 0.062500 -0.187167 +v -0.375000 0.062500 -0.186835 +v -0.437500 0.062500 -0.187167 +v -0.375000 0.125000 0.375000 +v -0.437500 0.125000 0.375000 +v -0.437500 0.062500 0.375000 +v -0.375000 0.062500 0.375000 +v 0.375000 0.125000 -0.186835 +v 0.437500 0.125000 -0.187167 +v 0.375000 0.062500 -0.186835 +v 0.437500 0.062500 -0.187167 +v 0.375000 0.125000 0.375000 +v 0.437500 0.125000 0.375000 +v 0.437500 0.062500 0.375000 +v 0.375000 0.062500 0.375000 +v 0.375000 -0.500000 0.250000 +v 0.375000 -0.500000 0.125665 +v -0.375000 -0.500000 0.250000 +v -0.375000 -0.500000 0.125665 +vt 0.403846 0.230769 +vt 0.365385 0.282051 +vt 0.365385 0.230769 +vt 0.403846 0.384615 +vt 0.365385 0.358974 +vt 0.403846 0.358974 +vt 0.442308 0.102564 +vt 0.596154 0.128205 +vt 0.442308 0.128205 +vt 0.596154 0.307692 +vt 0.442308 0.358974 +vt 0.442308 0.307692 +vt 0.365385 0.641026 +vt 0.596154 0.589744 +vt 0.365385 0.589744 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.403846 0.102564 +vt 0.442308 0.076923 +vt 0.442308 0.102564 +vt 0.403846 0.307692 +vt 0.365385 0.307692 +vt 0.403846 0.102564 +vt 0.596154 0.384615 +vt 0.596154 0.358974 +vt 0.403846 0.128205 +vt 0.365385 0.102564 +vt 0.846154 0.820513 +vt 0.884615 0.948718 +vt 0.846154 0.974359 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.788462 0.820513 +vt 0.807692 0.974359 +vt 0.807692 0.820513 +vt 1.000000 0.820513 +vt 0.980769 0.948718 +vt 0.980769 0.820513 +vt 0.596154 0.974359 +vt 0.365385 0.820513 +vt 0.596154 0.820513 +vt 0.596154 0.769231 +vt 0.365385 0.666667 +vt 0.596154 0.666667 +vt 0.365385 0.564103 +vt 0.596154 0.512821 +vt 0.596154 0.564103 +vt 0.403846 0.282051 +vt 0.442308 0.307692 +vt 0.442308 0.282051 +vt 0.365385 0.179487 +vt 0.403846 0.205128 +vt 0.403846 0.179487 +vt 0.596154 0.102564 +vt 0.442308 0.051282 +vt 0.442308 0.102564 +vt 0.442308 0.179487 +vt 0.596154 0.128205 +vt 0.442308 0.128205 +vt 0.365385 0.589744 +vt 0.596154 0.589744 +vt 0.750000 0.435897 +vt 0.788462 0.410256 +vt 0.750000 0.410256 +vt 0.442308 0.282051 +vt 0.403846 0.256410 +vt 0.403846 0.282051 +vt 0.403846 0.128205 +vt 0.365385 0.128205 +vt 0.403846 0.307692 +vt 0.365385 0.282051 +vt 0.365385 0.307692 +vt 0.596154 0.205128 +vt 0.596154 0.179487 +vt 0.365385 0.051282 +vt 0.403846 0.102564 +vt 0.403846 0.051282 +vt 0.846154 0.435897 +vt 0.884615 0.564103 +vt 0.884615 0.435897 +vt 0.711538 0.435897 +vt 0.711538 0.410256 +vt 0.884615 0.410256 +vt 0.846154 0.410256 +vt 0.807692 0.589744 +vt 0.788462 0.435897 +vt 0.807692 0.435897 +vt 1.000000 0.564103 +vt 0.980769 0.435897 +vt 1.000000 0.435897 +vt 0.596154 0.487179 +vt 0.365385 0.512821 +vt 0.596154 0.512821 +vt 0.884615 0.615385 +vt 0.846154 0.794872 +vt 0.846154 0.615385 +vt 0.980769 0.615385 +vt 1.000000 0.794872 +vt 1.000000 0.615385 +vt 0.750000 0.615385 +vt 0.711538 0.794872 +vt 0.711538 0.615385 +vt 0.788462 0.615385 +vt 0.807692 0.794872 +vt 0.807692 0.615385 +vt 0.884615 0.230769 +vt 0.846154 0.230769 +vt 1.000000 0.410256 +vt 0.980769 0.230769 +vt 1.000000 0.230769 +vt 0.750000 0.230769 +vt 0.711538 0.230769 +vt 0.807692 0.410256 +vt 0.788462 0.230769 +vt 0.807692 0.230769 +vt 0.807692 0.435897 +vt 0.788462 0.410256 +vt 0.807692 0.410256 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.615385 0.435897 +vt 0.711538 0.384615 +vt 0.615385 0.410256 +vt 0.711538 0.435897 +vt 0.615385 0.461538 +vt 0.615385 0.435897 +vt 0.980769 0.410256 +vt 0.750000 0.461538 +vt 0.788462 0.435897 +vt 0.000000 0.000000 +vt 0.750000 0.384615 +vt 0.750000 0.410256 +vt 0.807692 0.435897 +vt 0.750000 0.794872 +vt 0.788462 0.769231 +vt 0.750000 0.769231 +vt 0.750000 0.820513 +vt 0.711538 0.794872 +vt 0.711538 0.820513 +vt 0.884615 0.794872 +vt 0.980769 0.820513 +vt 0.884615 0.820513 +vt 0.711538 0.769231 +vt 0.615385 0.794872 +vt 0.615385 0.769231 +vt 0.788462 0.794872 +vt 0.807692 0.820513 +vt 0.807692 0.794872 +vt 0.711538 0.846154 +vt 0.615385 0.820513 +vt 0.711538 0.820513 +vt 0.615385 0.820513 +vt 0.750000 0.820513 +vt 0.788462 0.846154 +vt 0.750000 0.846154 +vt 0.750000 0.794872 +vt 0.788462 0.820513 +vt 0.807692 0.794872 +vt 0.346154 0.307692 +vt 0.365385 0.128205 +vt 0.346154 0.179487 +vt 0.346154 0.128205 +vt 0.615385 0.358974 +vt 0.615385 0.307692 +vt 0.615385 0.179487 +vt 0.615385 0.128205 +vt 0.596154 0.282051 +vt 0.442308 0.282051 +vt 0.596154 0.230769 +vt 0.403846 0.282051 +vt 0.365385 0.384615 +vt 0.596154 0.102564 +vt 0.596154 0.641026 +vt 0.403846 0.076923 +vt 0.442308 0.384615 +vt 0.788462 0.974359 +vt 1.000000 0.948718 +vt 0.365385 0.974359 +vt 0.365385 0.769231 +vt 0.365385 0.512821 +vt 0.365385 0.205128 +vt 0.596154 0.051282 +vt 0.442308 0.256410 +vt 0.442308 0.205128 +vt 0.365385 0.102564 +vt 0.846154 0.589744 +vt 0.788462 0.589744 +vt 0.980769 0.564103 +vt 0.365385 0.487179 +vt 0.980769 0.794872 +vt 0.788462 0.794872 +vt 0.980769 0.410256 +vt 0.788462 0.410256 +vt 0.788462 0.435897 +vt 0.615385 0.384615 +vt 0.711538 0.461538 +vt 0.980769 0.435897 +vt 0.788462 0.461538 +vt 0.788462 0.384615 +vt 0.807692 0.410256 +vt 0.750000 0.794872 +vt 0.980769 0.794872 +vt 0.788462 0.820513 +vt 0.615385 0.846154 +vt 0.615385 0.794872 +vt 0.788462 0.794872 +vt 0.807692 0.820513 +vt 0.346154 0.358974 +vt 0.365385 0.179487 +vt 0.442308 0.230769 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -0.0053 0.0000 -1.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0053 0.0000 -1.0000 +s off +f 12/1/1 4/2/1 8/3/1 +f 12/4/2 5/5/2 11/6/2 +f 37/7/3 26/8/3 80/9/3 +f 1/10/4 14/11/4 13/12/4 +f 16/13/2 36/14/2 12/15/2 +f 58/16/5 69/17/5 70/18/5 +f 34/19/4 80/20/4 39/21/4 +f 9/22/4 5/5/4 3/23/4 +f 13/12/4 11/6/4 9/22/4 +f 80/9/3 33/24/3 37/7/3 +f 7/25/2 14/11/2 6/26/2 +f 79/27/3 27/28/3 33/24/3 +f 19/29/4 24/30/4 23/31/4 +f 62/32/5 70/18/5 72/33/5 +f 19/34/5 22/35/5 18/36/5 +f 17/37/6 24/38/6 20/39/6 +f 22/40/5 42/41/5 18/42/5 +f 17/43/7 45/44/7 21/45/7 +f 34/46/3 15/47/3 10/48/3 +f 9/49/3 78/50/3 13/51/3 +f 29/52/2 36/53/2 35/54/2 +f 26/55/4 40/56/4 80/57/4 +f 38/58/1 25/59/1 37/60/1 +f 36/61/5 10/48/5 12/62/5 +f 42/63/4 68/64/4 54/65/4 +f 15/66/1 77/67/1 10/68/1 +f 29/52/1 33/69/1 27/70/1 +f 35/54/1 37/60/1 33/69/1 +f 77/71/3 3/72/3 4/73/3 +f 38/58/2 31/74/2 30/75/2 +f 32/76/4 79/77/4 36/78/4 +f 43/79/1 48/80/1 44/81/1 +f 41/82/4 54/65/4 55/83/4 +f 43/79/1 56/84/1 53/85/1 +f 46/86/5 43/87/5 42/88/5 +f 48/89/8 41/90/8 44/91/8 +f 42/41/3 17/43/3 18/42/3 +f 15/92/7 40/93/7 16/94/7 +f 14/95/4 49/96/4 11/97/4 +f 16/98/6 52/99/6 14/100/6 +f 12/101/1 51/102/1 16/103/1 +f 11/104/5 50/105/5 12/106/5 +f 53/85/1 38/107/1 35/108/1 +f 56/109/8 40/110/8 38/111/8 +f 55/83/4 36/112/4 40/113/4 +f 54/114/5 35/115/5 36/116/5 +f 65/117/5 67/118/5 68/119/5 +f 57/120/5 71/121/5 69/17/5 +f 55/83/4 59/122/4 41/82/4 +f 56/123/3 63/124/3 55/83/3 +f 44/125/2 59/126/2 60/127/2 +f 44/81/1 64/128/1 56/84/1 +f 43/129/2 65/130/2 42/63/2 +f 61/131/5 72/33/5 71/121/5 +f 54/132/3 67/118/3 53/133/3 +f 53/85/1 66/134/1 43/79/1 +f 49/135/3 76/136/3 50/137/3 +f 50/138/1 17/139/1 51/140/1 +f 52/141/4 70/142/4 20/143/4 +f 52/141/4 19/29/4 49/96/4 +f 52/144/3 71/145/3 72/146/3 +f 75/147/5 73/148/5 76/149/5 +f 20/150/2 69/151/2 17/152/2 +f 17/139/1 71/153/1 51/140/1 +f 18/154/2 74/155/2 19/156/2 +f 50/157/1 73/158/1 18/154/1 +f 19/29/4 75/159/4 49/96/4 +f 5/5/5 4/160/5 3/23/5 +f 28/161/5 29/162/5 27/163/5 +f 7/164/7 1/10/7 2/165/7 +f 25/59/7 31/166/7 26/167/7 +f 2/168/3 13/12/3 78/169/3 +f 78/169/1 7/170/1 2/168/1 +f 12/1/1 77/171/1 4/2/1 +f 12/4/2 8/172/2 5/5/2 +f 37/7/3 25/173/3 26/8/3 +f 1/10/4 6/26/4 14/11/4 +f 16/13/2 40/174/2 36/14/2 +f 58/16/5 57/120/5 69/17/5 +f 34/19/4 79/175/4 80/20/4 +f 9/22/4 11/6/4 5/5/4 +f 13/12/4 14/11/4 11/6/4 +f 80/9/3 79/27/3 33/24/3 +f 7/25/2 16/176/2 14/11/2 +f 79/27/3 28/161/3 27/28/3 +f 19/29/4 20/143/4 24/30/4 +f 62/32/5 58/16/5 70/18/5 +f 19/34/5 23/177/5 22/35/5 +f 17/37/6 21/178/6 24/38/6 +f 22/40/5 46/179/5 42/41/5 +f 17/43/7 41/180/7 45/44/7 +f 34/46/3 39/181/3 15/47/3 +f 9/49/3 77/71/3 78/50/3 +f 29/52/2 32/182/2 36/53/2 +f 26/55/4 31/183/4 40/56/4 +f 38/58/1 30/75/1 25/59/1 +f 36/61/5 34/46/5 10/48/5 +f 42/63/4 65/130/4 68/64/4 +f 15/66/1 78/184/1 77/67/1 +f 29/52/1 35/54/1 33/69/1 +f 35/54/1 38/58/1 37/60/1 +f 77/71/3 9/49/3 3/72/3 +f 38/58/2 40/185/2 31/74/2 +f 32/76/4 28/186/4 79/77/4 +f 43/79/1 47/187/1 48/80/1 +f 41/82/4 42/63/4 54/65/4 +f 43/79/1 44/81/1 56/84/1 +f 46/86/5 47/188/5 43/87/5 +f 48/89/8 45/189/8 41/90/8 +f 42/41/3 41/180/3 17/43/3 +f 15/92/7 39/190/7 40/93/7 +f 14/95/4 52/141/4 49/96/4 +f 16/98/6 51/191/6 52/99/6 +f 12/101/1 50/157/1 51/102/1 +f 11/104/5 49/192/5 50/105/5 +f 53/85/1 56/84/1 38/107/1 +f 56/109/8 55/193/8 40/110/8 +f 55/83/4 54/65/4 36/112/4 +f 54/114/5 53/194/5 35/115/5 +f 65/117/5 66/195/5 67/118/5 +f 57/120/5 61/131/5 71/121/5 +f 55/83/4 63/124/4 59/122/4 +f 56/123/3 64/196/3 63/124/3 +f 44/125/2 41/197/2 59/126/2 +f 44/81/1 60/198/1 64/128/1 +f 43/129/2 66/199/2 65/130/2 +f 61/131/5 62/32/5 72/33/5 +f 54/132/3 68/200/3 67/118/3 +f 53/85/1 67/201/1 66/134/1 +f 49/135/3 75/147/3 76/136/3 +f 50/138/1 18/202/1 17/139/1 +f 52/141/4 72/203/4 70/142/4 +f 52/141/4 20/143/4 19/29/4 +f 52/144/3 51/102/3 71/145/3 +f 75/147/5 74/204/5 73/148/5 +f 20/150/2 70/205/2 69/151/2 +f 17/139/1 69/206/1 71/153/1 +f 18/154/2 73/158/2 74/155/2 +f 50/157/1 76/207/1 73/158/1 +f 19/29/4 74/208/4 75/159/4 +f 5/5/5 8/209/5 4/160/5 +f 28/161/5 32/210/5 29/162/5 +f 7/164/7 6/26/7 1/10/7 +f 25/59/7 30/75/7 31/166/7 +f 2/168/3 1/10/3 13/12/3 +f 78/169/1 16/211/1 7/170/1 +o Surface_Plane.002 +v 0.437500 -0.004442 -0.254442 +v 0.437500 0.658471 0.408471 +v 0.437500 0.702665 0.364277 +v 0.437500 0.039752 -0.298636 +v 0.437500 -0.048636 -0.298636 +v 0.437500 -0.004442 -0.342830 +v 0.500000 0.658471 0.408471 +v 0.500000 -0.004442 -0.254442 +v 0.500000 0.702665 0.364277 +v 0.500000 0.039752 -0.298636 +v 0.500000 -0.004442 -0.342830 +v 0.500000 -0.048636 -0.298636 +v 0.437500 0.083947 -0.342830 +v 0.437500 0.039752 -0.387024 +v -0.437500 -0.004442 -0.254442 +v -0.437500 0.658471 0.408471 +v -0.437500 0.702665 0.364277 +v -0.437500 0.039752 -0.298636 +v -0.437500 -0.048636 -0.298636 +v -0.437500 -0.004442 -0.342830 +v -0.500000 0.658471 0.408471 +v -0.500000 -0.004442 -0.254442 +v -0.500000 0.702665 0.364277 +v -0.500000 0.039752 -0.298636 +v -0.500000 -0.004442 -0.342830 +v -0.500000 -0.048636 -0.298636 +v -0.437500 0.083947 -0.342830 +v -0.437500 0.039752 -0.387024 +v -0.250000 0.614277 0.275888 +v -0.250000 0.658471 0.231694 +v -0.250000 0.658471 0.320083 +v -0.250000 0.702665 0.275888 +v -0.437500 0.614277 0.275888 +v -0.437500 0.658471 0.231694 +v -0.437500 0.658471 0.320083 +v -0.437500 0.702665 0.275888 +v -0.250000 0.570083 0.231694 +v -0.250000 0.614277 0.187500 +v -0.437500 0.614277 0.187500 +v -0.437500 0.570083 0.231694 +v -0.250000 0.525888 0.187500 +v -0.250000 0.570083 0.143306 +v -0.437500 0.570083 0.143306 +v -0.437500 0.525888 0.187500 +v 0.250000 0.614277 0.275888 +v 0.250000 0.658471 0.231694 +v 0.250000 0.570083 0.231694 +v 0.250000 0.614277 0.187500 +v -0.500000 0.658471 0.231694 +v -0.500000 0.614277 0.275888 +v -0.500000 0.614277 0.187500 +v -0.500000 0.570083 0.231694 +v -0.562500 0.658471 0.231694 +v -0.562500 0.614277 0.275888 +v -0.562500 0.614277 0.187500 +v -0.562500 0.570083 0.231694 +v -0.500000 0.525888 0.275888 +v -0.500000 0.570083 0.320083 +v -0.562500 0.525888 0.275888 +v -0.562500 0.570083 0.320083 +v -0.625000 0.658471 0.231694 +v -0.625000 0.614277 0.275888 +v -0.625000 0.614277 0.187500 +v -0.625000 0.570083 0.231694 +v -0.062500 0.039752 -0.298636 +v -0.062500 0.083947 -0.342830 +v -0.062500 0.083947 -0.254442 +v -0.062500 0.128141 -0.298636 +v -0.312500 0.039752 -0.298636 +v -0.312500 0.083947 -0.342830 +v -0.312500 0.083947 -0.254442 +v -0.312500 0.128141 -0.298636 +vt 0.038462 0.461538 +vt 0.307692 0.435897 +vt 0.307692 0.461538 +vt 0.038462 0.051282 +vt 0.038462 0.435897 +vt 0.038462 0.974359 +vt 0.019231 0.948718 +vt 0.038462 0.948718 +vt 0.038462 0.538462 +vt 0.019231 0.512821 +vt 0.038462 0.512821 +vt 0.038462 0.564103 +vt 0.019231 0.538462 +vt 0.019231 0.564103 +vt 0.000000 0.948718 +vt 0.019231 0.948718 +vt 0.019231 0.512821 +vt 0.000000 0.538462 +vt 0.000000 0.512821 +vt 0.019231 0.435897 +vt 0.019231 0.564103 +vt 0.038462 0.564103 +vt 0.038462 0.461538 +vt 0.019231 0.487179 +vt 0.038462 0.487179 +vt 0.019231 0.051282 +vt 0.307692 0.487179 +vt 0.307692 0.974359 +vt 0.307692 0.948718 +vt 0.038462 0.487179 +vt 0.307692 0.512821 +vt 0.038462 0.512821 +vt 0.307692 0.564103 +vt 0.307692 0.948718 +vt 0.326923 0.974359 +vt 0.326923 0.948718 +vt 0.307692 0.512821 +vt 0.326923 0.538462 +vt 0.326923 0.512821 +vt 0.307692 0.538462 +vt 0.326923 0.564103 +vt 0.326923 0.564103 +vt 0.346154 0.948718 +vt 0.346154 0.564103 +vt 0.326923 0.538462 +vt 0.346154 0.512821 +vt 0.326923 0.512821 +vt 0.307692 0.435897 +vt 0.326923 0.461538 +vt 0.326923 0.435897 +vt 0.307692 0.564103 +vt 0.326923 0.564103 +vt 0.307692 0.487179 +vt 0.326923 0.461538 +vt 0.307692 0.051282 +vt 0.326923 0.051282 +vt 0.038462 0.564103 +vt 0.307692 0.538462 +vt 0.038462 0.538462 +vt 0.307692 0.512821 +vt 0.038462 0.512821 +vt 0.807692 0.179487 +vt 0.788462 0.205128 +vt 0.788462 0.179487 +vt 0.807692 0.179487 +vt 0.865385 0.205128 +vt 0.807692 0.205128 +vt 0.884615 0.179487 +vt 0.865385 0.205128 +vt 0.865385 0.179487 +vt 0.807692 0.153846 +vt 0.865385 0.128205 +vt 0.865385 0.153846 +vt 0.865385 0.179487 +vt 0.807692 0.128205 +vt 0.865385 0.102564 +vt 0.865385 0.153846 +vt 0.884615 0.128205 +vt 0.865385 0.128205 +vt 0.807692 0.076923 +vt 0.865385 0.076923 +vt 0.884615 0.076923 +vt 0.865385 0.102564 +vt 0.865385 0.076923 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.788462 0.102564 +vt 0.807692 0.076923 +vt 0.807692 0.102564 +vt 0.634615 0.153846 +vt 0.653846 0.128205 +vt 0.653846 0.153846 +vt 0.807692 0.179487 +vt 0.653846 0.102564 +vt 0.807692 0.102564 +vt 0.884615 0.153846 +vt 0.903846 0.128205 +vt 0.865385 0.128205 +vt 0.884615 0.102564 +vt 0.865385 0.102564 +vt 0.884615 0.179487 +vt 0.865385 0.179487 +vt 0.961538 0.153846 +vt 0.942308 0.128205 +vt 0.961538 0.128205 +vt 0.884615 0.153846 +vt 0.903846 0.179487 +vt 0.980769 0.128205 +vt 0.961538 0.153846 +vt 0.980769 0.153846 +vt 0.884615 0.128205 +vt 0.903846 0.102564 +vt 1.000000 0.128205 +vt 0.980769 0.153846 +vt 1.000000 0.153846 +vt 0.980769 0.179487 +vt 0.961538 0.153846 +vt 0.980769 0.153846 +vt 0.980769 0.102564 +vt 0.961538 0.128205 +vt 0.942308 0.153846 +vt 0.923077 0.128205 +vt 0.923077 0.153846 +vt 0.903846 0.128205 +vt 0.923077 0.102564 +vt 0.903846 0.153846 +vt 0.923077 0.128205 +vt 0.903846 0.153846 +vt 0.923077 0.179487 +vt 0.365385 0.410256 +vt 0.346154 0.435897 +vt 0.346154 0.410256 +vt 0.365385 0.435897 +vt 0.442308 0.461538 +vt 0.365385 0.461538 +vt 0.461538 0.410256 +vt 0.442308 0.435897 +vt 0.442308 0.410256 +vt 0.442308 0.410256 +vt 0.442308 0.435897 +vt 0.307692 0.051282 +vt 0.019231 0.974359 +vt 0.019231 0.538462 +vt 0.019231 0.564103 +vt 0.000000 0.564103 +vt 0.019231 0.538462 +vt 0.019231 0.461538 +vt 0.019231 0.461538 +vt 0.307692 0.974359 +vt 0.307692 0.538462 +vt 0.307692 0.564103 +vt 0.326923 0.948718 +vt 0.346154 0.538462 +vt 0.307692 0.461538 +vt 0.326923 0.487179 +vt 0.307692 0.564103 +vt 0.307692 0.538462 +vt 0.807692 0.205128 +vt 0.884615 0.205128 +vt 0.807692 0.102564 +vt 0.884615 0.102564 +vt 0.000000 0.000000 +vt 0.788462 0.076923 +vt 0.634615 0.128205 +vt 0.653846 0.179487 +vt 0.942308 0.153846 +vt 0.980769 0.128205 +vt 0.961538 0.179487 +vt 0.961538 0.102564 +vt 0.942308 0.128205 +vt 0.923077 0.153846 +vt 0.923077 0.153846 +vt 0.461538 0.435897 +vn 0.0000 -0.7071 0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 0.7071 -0.7071 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.7071 -0.7071 +vn -1.0000 0.0000 0.0000 +s off +f 85/212/9 95/213/9 99/214/9 +f 82/215/9 95/213/9 81/216/9 +f 82/217/10 89/218/10 83/219/10 +f 84/220/11 91/221/11 86/222/11 +f 86/223/12 93/224/12 84/220/12 +f 88/225/12 89/226/12 87/227/12 +f 88/228/12 91/229/12 90/230/12 +f 85/212/9 88/231/9 81/216/9 +f 83/219/11 90/232/11 84/233/11 +f 86/234/13 92/235/13 85/236/13 +f 81/216/9 87/237/9 82/215/9 +f 100/238/13 85/212/13 99/214/13 +f 96/239/10 83/219/10 97/240/10 +f 86/241/13 108/242/13 94/243/13 +f 98/244/11 83/219/11 84/233/11 +f 103/245/10 96/246/10 97/247/10 +f 105/248/11 98/249/11 100/250/11 +f 107/251/14 100/252/14 98/249/14 +f 103/253/14 102/254/14 101/255/14 +f 105/256/14 102/257/14 104/258/14 +f 102/259/9 99/260/9 95/261/9 +f 104/262/11 97/247/11 98/263/11 +f 106/264/13 100/265/13 99/214/13 +f 101/266/9 95/261/9 96/267/9 +f 93/268/10 98/269/10 84/220/10 +f 94/270/11 107/271/11 93/272/11 +f 110/273/12 111/274/12 109/275/12 +f 112/276/10 115/277/10 111/278/10 +f 116/279/14 113/280/14 115/281/14 +f 110/282/11 119/283/11 114/284/11 +f 112/276/11 114/284/11 116/285/11 +f 118/286/11 123/287/11 119/283/11 +f 119/288/11 129/289/11 114/290/11 +f 123/287/13 121/291/13 124/292/13 +f 119/293/14 124/294/14 120/295/14 +f 120/296/9 121/297/9 117/298/9 +f 117/299/12 122/300/12 118/301/12 +f 125/302/12 128/303/12 126/304/12 +f 110/282/11 128/303/11 118/286/11 +f 109/305/10 126/304/10 110/282/10 +f 118/286/13 127/306/13 117/307/13 +f 131/308/11 133/309/11 129/289/11 +f 120/310/13 131/311/13 119/312/13 +f 114/284/10 130/313/10 113/314/10 +f 134/315/9 144/316/9 136/317/9 +f 129/318/10 134/319/10 130/313/10 +f 136/320/14 140/321/14 134/322/14 +f 132/323/13 135/324/13 131/311/13 +f 138/325/9 139/326/9 137/327/9 +f 134/328/10 138/329/10 130/330/10 +f 132/331/13 139/332/13 136/320/13 +f 141/333/14 144/334/14 142/335/14 +f 136/336/13 143/337/13 135/324/13 +f 135/338/11 141/339/11 133/309/11 +f 133/340/10 142/341/10 134/319/10 +f 146/342/12 147/343/12 145/344/12 +f 148/345/10 151/346/10 147/347/10 +f 152/348/14 149/349/14 151/350/14 +f 148/345/11 150/351/11 152/352/11 +f 85/212/9 81/216/9 95/213/9 +f 82/215/9 96/353/9 95/213/9 +f 82/217/10 87/354/10 89/218/10 +f 84/220/11 90/355/11 91/221/11 +f 86/223/12 94/356/12 93/224/12 +f 88/225/12 90/357/12 89/226/12 +f 88/228/12 92/358/12 91/229/12 +f 85/212/9 92/359/9 88/231/9 +f 83/219/11 89/218/11 90/232/11 +f 86/234/13 91/360/13 92/235/13 +f 81/216/9 88/231/9 87/237/9 +f 100/238/13 86/241/13 85/212/13 +f 96/239/10 82/217/10 83/219/10 +f 86/241/13 100/238/13 108/242/13 +f 98/244/11 97/240/11 83/219/11 +f 103/245/10 101/361/10 96/246/10 +f 105/248/11 104/362/11 98/249/11 +f 107/251/14 108/363/14 100/252/14 +f 103/253/14 104/364/14 102/254/14 +f 105/256/14 106/365/14 102/257/14 +f 102/259/9 106/366/9 99/260/9 +f 104/262/11 103/245/11 97/247/11 +f 106/264/13 105/367/13 100/265/13 +f 101/266/9 102/259/9 95/261/9 +f 93/268/10 107/368/10 98/269/10 +f 94/270/11 108/369/11 107/271/11 +f 110/273/12 112/370/12 111/274/12 +f 112/276/10 116/285/10 115/277/10 +f 116/279/14 114/371/14 113/280/14 +f 110/282/11 118/286/11 119/283/11 +f 112/276/11 110/282/11 114/284/11 +f 118/286/11 122/372/11 123/287/11 +f 119/288/11 131/308/11 129/289/11 +f 123/287/13 122/372/13 121/291/13 +f 119/293/14 123/373/14 124/294/14 +f 120/296/9 124/374/9 121/297/9 +f 117/299/12 121/375/12 122/300/12 +f 125/302/12 127/376/12 128/303/12 +f 110/282/11 126/304/11 128/303/11 +f 109/305/10 125/377/10 126/304/10 +f 118/286/13 128/303/13 127/306/13 +f 131/308/11 135/338/11 133/309/11 +f 120/310/13 132/323/13 131/311/13 +f 114/284/10 129/318/10 130/313/10 +f 134/315/9 142/378/9 144/316/9 +f 129/318/10 133/340/10 134/319/10 +f 136/320/14 139/332/14 140/321/14 +f 132/323/13 136/336/13 135/324/13 +f 138/325/9 140/379/9 139/326/9 +f 134/328/10 140/380/10 138/329/10 +f 132/331/13 137/381/13 139/332/13 +f 141/333/14 143/382/14 144/334/14 +f 136/336/13 144/334/13 143/337/13 +f 135/338/11 143/383/11 141/339/11 +f 133/340/10 141/384/10 142/341/10 +f 146/342/12 148/345/12 147/343/12 +f 148/345/10 152/352/10 151/346/10 +f 152/348/14 150/385/14 149/349/14 +f 148/345/11 146/342/11 150/351/11 diff --git a/mods/cartographer/models/cartographer_advanced_table_uvs.png b/mods/cartographer/models/cartographer_advanced_table_uvs.png new file mode 100644 index 0000000..78e7370 Binary files /dev/null and b/mods/cartographer/models/cartographer_advanced_table_uvs.png differ diff --git a/mods/cartographer/models/cartographer_simple_table.blend b/mods/cartographer/models/cartographer_simple_table.blend new file mode 100644 index 0000000..389e234 Binary files /dev/null and b/mods/cartographer/models/cartographer_simple_table.blend differ diff --git a/mods/cartographer/models/cartographer_simple_table.obj b/mods/cartographer/models/cartographer_simple_table.obj new file mode 100644 index 0000000..78d88da --- /dev/null +++ b/mods/cartographer/models/cartographer_simple_table.obj @@ -0,0 +1,749 @@ +# Blender v2.81 (sub 16) OBJ File: 'simple_table.blend' +# www.blender.org +o Legs_Plane.001 +v 0.437500 -0.437500 -0.312500 +v 0.375000 -0.437500 -0.312500 +v 0.437500 -0.437500 0.312500 +v 0.375000 -0.437500 0.312500 +v 0.437500 -0.375000 0.312500 +v 0.437500 -0.375000 -0.312500 +v 0.375000 -0.375000 -0.312500 +v 0.375000 -0.375000 0.312500 +v 0.375000 -0.437500 -0.375000 +v 0.437500 -0.437500 -0.375000 +v 0.437500 -0.437500 0.062500 +v 0.375000 -0.437500 0.062500 +v 0.437500 -0.375000 0.062500 +v 0.375000 -0.375000 0.062500 +v 0.437500 -0.437500 0.062500 +v 0.437500 -0.437500 -0.062500 +v 0.437500 -0.375000 -0.062167 +v 0.437500 -0.437500 -0.061835 +v 0.375000 -0.437500 -0.061835 +v 0.375000 -0.375000 -0.061835 +v 0.375000 0.125000 -0.061835 +v 0.375000 0.125000 0.062500 +v 0.437500 0.125000 0.062500 +v 0.437500 0.125000 -0.062167 +v 0.375000 0.250000 -0.061835 +v 0.375000 0.312500 0.062500 +v 0.437500 0.312500 0.062500 +v 0.437500 0.250000 -0.062167 +v 0.437500 -0.375000 -0.375000 +v 0.375000 -0.375000 -0.375000 +v 0.375000 -0.437500 0.375000 +v 0.437500 -0.437500 0.375000 +v 0.375000 -0.375000 0.375000 +v 0.437500 -0.375000 0.375000 +v 0.375000 -0.312500 0.312500 +v 0.437500 -0.312500 0.312500 +v 0.375000 -0.312500 0.375000 +v 0.437500 -0.312500 0.375000 +v 0.375000 -0.500000 0.312500 +v 0.437500 -0.500000 0.312500 +v 0.375000 -0.500000 0.375000 +v 0.437500 -0.500000 0.375000 +v 0.437500 -0.500000 -0.312500 +v 0.375000 -0.500000 -0.312500 +v 0.437500 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v 0.437500 -0.312500 -0.312500 +v 0.375000 -0.312500 -0.312500 +v 0.437500 -0.312500 -0.375000 +v 0.375000 -0.312500 -0.375000 +v -0.437500 -0.437500 -0.312500 +v -0.375000 -0.437500 -0.312500 +v -0.437500 -0.437500 0.312500 +v -0.375000 -0.437500 0.312500 +v -0.437500 -0.375000 0.312500 +v -0.437500 -0.375000 -0.312500 +v -0.375000 -0.375000 -0.312500 +v -0.375000 -0.375000 0.312500 +v -0.375000 -0.437500 -0.375000 +v -0.437500 -0.437500 -0.375000 +v -0.437500 -0.437500 0.062500 +v -0.375000 -0.437500 0.062500 +v -0.437500 -0.375000 0.062500 +v -0.375000 -0.375000 0.062500 +v -0.437500 -0.437500 0.062500 +v -0.437500 -0.437500 -0.062500 +v -0.437500 -0.375000 -0.062167 +v -0.437500 -0.437500 -0.061835 +v -0.375000 -0.437500 -0.061835 +v -0.375000 -0.375000 -0.061835 +v -0.375000 0.125000 -0.061835 +v -0.375000 0.125000 0.062500 +v -0.437500 0.125000 0.062500 +v -0.437500 0.125000 -0.062167 +v -0.375000 0.250000 -0.061835 +v -0.375000 0.312500 0.062500 +v -0.437500 0.312500 0.062500 +v -0.437500 0.250000 -0.062167 +v -0.437500 -0.375000 -0.375000 +v -0.375000 -0.375000 -0.375000 +v -0.375000 -0.437500 0.375000 +v -0.437500 -0.437500 0.375000 +v -0.375000 -0.375000 0.375000 +v -0.437500 -0.375000 0.375000 +v -0.375000 -0.312500 0.312500 +v -0.437500 -0.312500 0.312500 +v -0.375000 -0.312500 0.375000 +v -0.437500 -0.312500 0.375000 +v -0.375000 -0.500000 0.312500 +v -0.437500 -0.500000 0.312500 +v -0.375000 -0.500000 0.375000 +v -0.437500 -0.500000 0.375000 +v -0.437500 -0.500000 -0.312500 +v -0.375000 -0.500000 -0.312500 +v -0.437500 -0.500000 -0.375000 +v -0.375000 -0.500000 -0.375000 +v -0.437500 -0.312500 -0.312500 +v -0.375000 -0.312500 -0.312500 +v -0.437500 -0.312500 -0.375000 +v -0.375000 -0.312500 -0.375000 +vt 0.692308 0.333333 +vt 0.615385 0.358974 +vt 0.615385 0.333333 +vt 0.615385 0.410256 +vt 0.692308 0.384615 +vt 0.615385 0.384615 +vt 0.692308 0.435897 +vt 0.615385 0.435897 +vt 0.711538 0.410256 +vt 0.692308 0.384615 +vt 0.711538 0.384615 +vt 0.480769 0.410256 +vt 0.500000 0.384615 +vt 0.500000 0.410256 +vt 0.576923 0.384615 +vt 0.500000 0.358974 +vt 0.576923 0.358974 +vt 0.634615 0.717949 +vt 0.403846 0.666667 +vt 0.634615 0.666667 +vt 0.634615 0.666667 +vt 0.653846 0.897436 +vt 0.653846 0.666667 +vt 0.615385 0.358974 +vt 0.576923 0.333333 +vt 0.576923 0.358974 +vt 0.615385 0.384615 +vt 0.692308 0.358974 +vt 0.692308 0.384615 +vt 0.653846 0.692308 +vt 0.692308 0.666667 +vt 0.653846 0.666667 +vt 0.576923 0.333333 +vt 0.500000 0.358974 +vt 0.500000 0.333333 +vt 0.576923 0.384615 +vt 0.500000 0.384615 +vt 0.576923 0.435897 +vt 0.500000 0.435897 +vt 0.653846 0.897436 +vt 0.692308 0.948718 +vt 0.653846 0.974359 +vt 0.750000 0.666667 +vt 0.711538 0.897436 +vt 0.711538 0.666667 +vt 0.692308 0.692308 +vt 0.711538 0.897436 +vt 0.711538 0.692308 +vt 0.692308 0.692308 +vt 0.653846 0.692308 +vt 0.634615 0.897436 +vt 0.653846 0.974359 +vt 0.692308 0.897436 +vt 0.634615 0.897436 +vt 0.403846 0.974359 +vt 0.634615 0.974359 +vt 0.961538 0.897436 +vt 0.711538 0.948718 +vt 0.961538 0.948718 +vt 0.423077 0.384615 +vt 0.442308 0.410256 +vt 0.423077 0.410256 +vt 0.423077 0.358974 +vt 0.442308 0.384615 +vt 0.442308 0.358974 +vt 0.403846 0.384615 +vt 0.423077 0.384615 +vt 0.442308 0.410256 +vt 0.423077 0.435897 +vt 0.423077 0.410256 +vt 0.769231 0.410256 +vt 0.750000 0.384615 +vt 0.769231 0.384615 +vt 0.769231 0.410256 +vt 0.750000 0.435897 +vt 0.750000 0.410256 +vt 0.769231 0.384615 +vt 0.788462 0.358974 +vt 0.769231 0.358974 +vt 0.750000 0.358974 +vt 0.730769 0.384615 +vt 0.711538 0.410256 +vt 0.711538 0.384615 +vt 0.730769 0.384615 +vt 0.750000 0.384615 +vt 0.750000 0.410256 +vt 0.730769 0.384615 +vt 0.730769 0.410256 +vt 0.788462 0.410256 +vt 0.807692 0.384615 +vt 0.807692 0.410256 +vt 0.826923 0.410256 +vt 0.807692 0.384615 +vt 0.826923 0.384615 +vt 0.788462 0.435897 +vt 0.769231 0.435897 +vt 0.788462 0.410256 +vt 0.403846 0.384615 +vt 0.384615 0.410256 +vt 0.384615 0.384615 +vt 0.403846 0.384615 +vt 0.403846 0.410256 +vt 0.384615 0.384615 +vt 0.365385 0.410256 +vt 0.365385 0.384615 +vt 0.461538 0.410256 +vt 0.480769 0.384615 +vt 0.480769 0.410256 +vt 0.461538 0.358974 +vt 0.461538 0.435897 +vt 0.442308 0.435897 +vt 0.442308 0.384615 +vt 0.461538 0.410256 +vt 0.403846 0.641026 +vt 0.634615 0.589744 +vt 0.634615 0.641026 +vt 0.615385 0.487179 +vt 0.692308 0.461538 +vt 0.615385 0.461538 +vt 0.692308 0.512821 +vt 0.615385 0.538462 +vt 0.615385 0.512821 +vt 0.692308 0.564103 +vt 0.615385 0.564103 +vt 0.692308 0.512821 +vt 0.711538 0.538462 +vt 0.711538 0.512821 +vt 0.500000 0.512821 +vt 0.480769 0.538462 +vt 0.500000 0.538462 +vt 0.576923 0.512821 +vt 0.500000 0.487179 +vt 0.500000 0.512821 +vt 0.403846 0.897436 +vt 0.384615 0.666667 +vt 0.576923 0.487179 +vt 0.576923 0.461538 +vt 0.692308 0.487179 +vt 0.615385 0.512821 +vt 0.692308 0.512821 +vt 0.384615 0.692308 +vt 0.346154 0.666667 +vt 0.346154 0.692308 +vt 0.500000 0.487179 +vt 0.500000 0.461538 +vt 0.576923 0.512821 +vt 0.500000 0.512821 +vt 0.576923 0.564103 +vt 0.500000 0.564103 +vt 0.384615 0.897436 +vt 0.346154 0.948718 +vt 0.346154 0.897436 +vt 0.961538 0.897436 +vt 0.923077 0.666667 +vt 0.961538 0.666667 +vt 0.980769 0.897436 +vt 0.961538 0.692308 +vt 0.980769 0.692308 +vt 0.346154 0.692308 +vt 0.384615 0.692308 +vt 0.403846 0.974359 +vt 0.980769 0.948718 +vt 0.634615 0.846154 +vt 0.634615 0.897436 +vt 0.442308 0.538462 +vt 0.423077 0.512821 +vt 0.423077 0.538462 +vt 0.442308 0.487179 +vt 0.423077 0.512821 +vt 0.442308 0.512821 +vt 0.403846 0.487179 +vt 0.423077 0.487179 +vt 0.423077 0.564103 +vt 0.442308 0.538462 +vt 0.423077 0.538462 +vt 0.750000 0.512821 +vt 0.769231 0.538462 +vt 0.769231 0.512821 +vt 0.750000 0.564103 +vt 0.769231 0.538462 +vt 0.750000 0.538462 +vt 0.788462 0.512821 +vt 0.769231 0.487179 +vt 0.769231 0.512821 +vt 0.750000 0.512821 +vt 0.711538 0.538462 +vt 0.730769 0.512821 +vt 0.711538 0.512821 +vt 0.730769 0.487179 +vt 0.750000 0.487179 +vt 0.730769 0.512821 +vt 0.750000 0.538462 +vt 0.730769 0.538462 +vt 0.807692 0.512821 +vt 0.788462 0.538462 +vt 0.807692 0.538462 +vt 0.807692 0.512821 +vt 0.826923 0.538462 +vt 0.826923 0.512821 +vt 0.788462 0.564103 +vt 0.769231 0.564103 +vt 0.788462 0.538462 +vt 0.384615 0.538462 +vt 0.403846 0.512821 +vt 0.384615 0.512821 +vt 0.403846 0.512821 +vt 0.403846 0.538462 +vt 0.365385 0.538462 +vt 0.384615 0.512821 +vt 0.365385 0.512821 +vt 0.480769 0.512821 +vt 0.461538 0.538462 +vt 0.480769 0.538462 +vt 0.461538 0.512821 +vt 0.461538 0.564103 +vt 0.442308 0.564103 +vt 0.461538 0.538462 +vt 0.442308 0.512821 +vt 0.634615 0.717949 +vt 0.403846 0.743590 +vt 0.634615 0.743590 +vt 0.692308 0.358974 +vt 0.692308 0.410256 +vt 0.692308 0.410256 +vt 0.480769 0.384615 +vt 0.500000 0.384615 +vt 0.403846 0.717949 +vt 0.615385 0.333333 +vt 0.615385 0.358974 +vt 0.692308 0.692308 +vt 0.576923 0.358974 +vt 0.576923 0.410256 +vt 0.750000 0.897436 +vt 0.692308 0.897436 +vt 0.634615 0.974359 +vt 0.711538 0.948718 +vt 0.403846 0.897436 +vt 0.711538 0.897436 +vt 0.403846 0.358974 +vt 0.788462 0.384615 +vt 0.730769 0.410256 +vt 0.730769 0.358974 +vt 0.730769 0.410256 +vt 0.730769 0.435897 +vt 0.807692 0.410256 +vt 0.788462 0.410256 +vt 0.788462 0.384615 +vt 0.403846 0.410256 +vt 0.403846 0.410256 +vt 0.403846 0.435897 +vt 0.384615 0.410256 +vt 0.461538 0.384615 +vt 0.461538 0.410256 +vt 0.461538 0.384615 +vt 0.403846 0.589744 +vt 0.692308 0.487179 +vt 0.692308 0.538462 +vt 0.692308 0.538462 +vt 0.480769 0.512821 +vt 0.576923 0.487179 +vt 0.615385 0.487179 +vt 0.576923 0.538462 +vt 0.384615 0.974359 +vt 0.923077 0.897436 +vt 0.961538 0.948718 +vt 0.403846 0.846154 +vt 0.403846 0.512821 +vt 0.788462 0.487179 +vt 0.730769 0.538462 +vt 0.730769 0.512821 +vt 0.730769 0.538462 +vt 0.730769 0.564103 +vt 0.788462 0.512821 +vt 0.807692 0.538462 +vt 0.788462 0.538462 +vt 0.788462 0.512821 +vt 0.403846 0.538462 +vt 0.403846 0.538462 +vt 0.403846 0.564103 +vt 0.384615 0.538462 +vt 0.461538 0.512821 +vt 0.461538 0.487179 +vt 0.461538 0.538462 +vt 0.461538 0.512821 +vt 0.403846 0.717949 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn -0.0053 0.0000 -1.0000 +vn 0.0053 0.0000 -1.0000 +s off +f 3/1/1 12/2/1 11/3/1 +f 14/4/2 5/5/2 13/6/2 +f 4/7/3 14/4/3 12/8/3 +f 8/9/4 36/10/4 5/11/4 +f 6/12/5 48/13/5 7/14/5 +f 16/15/6 6/16/6 17/17/6 +f 20/18/2 64/19/2 14/20/2 +f 13/21/5 22/22/5 14/23/5 +f 11/24/1 19/25/1 18/26/1 +f 15/27/6 5/28/6 3/29/6 +f 15/30/6 17/31/6 13/32/6 +f 18/33/1 2/34/1 1/35/1 +f 7/14/2 17/36/2 6/37/2 +f 19/38/3 7/14/3 2/39/3 +f 23/40/6 28/41/6 27/42/6 +f 14/43/3 21/44/3 20/45/3 +f 20/46/7 24/47/7 17/48/7 +f 17/49/6 23/40/6 13/50/6 +f 23/51/5 26/52/5 22/22/5 +f 21/44/7 28/41/7 24/53/7 +f 26/54/5 72/55/5 22/56/5 +f 21/57/4 75/58/4 25/59/4 +f 9/60/4 29/61/4 10/62/4 +f 1/63/6 29/64/6 6/65/6 +f 1/63/6 45/66/6 10/67/6 +f 7/68/3 9/69/3 2/70/3 +f 32/71/5 33/72/5 31/73/5 +f 4/74/3 33/75/3 8/76/3 +f 32/77/6 40/78/6 3/79/6 +f 5/80/6 32/77/6 3/79/6 +f 35/81/2 38/82/2 36/83/2 +f 5/80/6 38/84/6 34/85/6 +f 34/86/5 37/87/5 33/72/5 +f 33/75/3 35/88/3 8/76/3 +f 40/89/1 41/90/1 39/91/1 +f 3/92/4 39/93/4 4/94/4 +f 4/74/3 41/95/3 31/96/3 +f 31/73/5 42/97/5 32/71/5 +f 44/98/1 45/99/1 43/100/1 +f 10/62/4 46/101/4 9/60/4 +f 9/69/3 44/102/3 2/70/3 +f 2/103/5 43/104/5 1/105/5 +f 47/106/2 50/107/2 48/108/2 +f 29/64/6 47/109/6 6/65/6 +f 7/68/3 50/110/3 30/111/3 +f 30/112/4 49/113/4 29/61/4 +f 62/114/1 19/115/1 12/116/1 +f 62/117/1 53/118/1 61/119/1 +f 55/120/2 64/121/2 63/122/2 +f 64/121/6 54/123/6 62/124/6 +f 86/125/4 58/126/4 55/127/4 +f 98/128/5 56/129/5 57/130/5 +f 66/131/3 56/132/3 51/133/3 +f 64/19/5 12/116/5 14/20/5 +f 72/134/5 63/135/5 64/19/5 +f 69/136/1 61/119/1 68/137/1 +f 55/138/3 65/139/3 53/140/3 +f 65/141/3 67/142/3 66/143/3 +f 52/144/1 68/137/1 51/145/1 +f 67/146/2 57/130/2 56/147/2 +f 57/130/6 69/148/6 52/149/6 +f 73/150/3 78/151/3 74/152/3 +f 71/153/6 64/154/6 70/155/6 +f 74/156/8 70/157/8 67/158/8 +f 73/150/3 67/159/3 63/160/3 +f 76/161/5 73/150/5 72/134/5 +f 78/162/8 71/153/8 74/156/8 +f 72/134/1 21/163/1 22/164/1 +f 79/165/4 59/166/4 60/167/4 +f 79/168/3 51/169/3 56/170/3 +f 95/171/3 51/169/3 60/172/3 +f 59/173/6 57/174/6 52/175/6 +f 83/176/5 82/177/5 81/178/5 +f 83/179/6 54/180/6 58/181/6 +f 90/182/3 82/183/3 53/184/3 +f 82/183/3 55/185/3 53/184/3 +f 88/186/2 85/187/2 86/188/2 +f 88/189/3 55/185/3 84/190/3 +f 87/191/5 84/192/5 83/176/5 +f 85/193/6 83/179/6 58/181/6 +f 91/194/1 90/195/1 89/196/1 +f 89/197/4 53/198/4 54/199/4 +f 91/200/6 54/180/6 81/201/6 +f 92/202/5 81/178/5 82/177/5 +f 95/203/1 94/204/1 93/205/1 +f 96/206/4 60/167/4 59/166/4 +f 94/207/6 59/173/6 52/175/6 +f 93/208/5 52/209/5 51/210/5 +f 100/211/2 97/212/2 98/213/2 +f 97/214/3 79/168/3 56/170/3 +f 100/215/6 57/174/6 80/216/6 +f 99/217/4 80/218/4 79/165/4 +f 19/219/4 70/220/4 20/221/4 +f 3/1/1 4/222/1 12/2/1 +f 14/4/2 8/223/2 5/5/2 +f 4/7/3 8/223/3 14/4/3 +f 8/9/4 35/224/4 36/10/4 +f 6/12/5 47/225/5 48/13/5 +f 16/15/6 1/226/6 6/16/6 +f 20/18/2 70/227/2 64/19/2 +f 13/21/5 23/51/5 22/22/5 +f 11/24/1 12/228/1 19/25/1 +f 15/27/6 13/229/6 5/28/6 +f 15/30/6 16/230/6 17/31/6 +f 18/33/1 19/231/1 2/34/1 +f 7/14/2 20/232/2 17/36/2 +f 19/38/3 20/232/3 7/14/3 +f 23/40/6 24/53/6 28/41/6 +f 14/43/3 22/233/3 21/44/3 +f 20/46/7 21/234/7 24/47/7 +f 17/49/6 24/53/6 23/40/6 +f 23/51/5 27/235/5 26/52/5 +f 21/44/7 25/236/7 28/41/7 +f 26/54/5 76/237/5 72/55/5 +f 21/57/4 71/238/4 75/58/4 +f 9/60/4 30/112/4 29/61/4 +f 1/63/6 10/67/6 29/64/6 +f 1/63/6 43/239/6 45/66/6 +f 7/68/3 30/111/3 9/69/3 +f 32/71/5 34/86/5 33/72/5 +f 4/74/3 31/96/3 33/75/3 +f 32/77/6 42/240/6 40/78/6 +f 5/80/6 34/85/6 32/77/6 +f 35/81/2 37/241/2 38/82/2 +f 5/80/6 36/242/6 38/84/6 +f 34/86/5 38/243/5 37/87/5 +f 33/75/3 37/244/3 35/88/3 +f 40/89/1 42/240/1 41/90/1 +f 3/92/4 40/245/4 39/93/4 +f 4/74/3 39/246/3 41/95/3 +f 31/73/5 41/247/5 42/97/5 +f 44/98/1 46/248/1 45/99/1 +f 10/62/4 45/249/4 46/101/4 +f 9/69/3 46/250/3 44/102/3 +f 2/103/5 44/251/5 43/104/5 +f 47/106/2 49/252/2 50/107/2 +f 29/64/6 49/252/6 47/109/6 +f 7/68/3 48/253/3 50/110/3 +f 30/112/4 50/254/4 49/113/4 +f 62/114/1 69/255/1 19/115/1 +f 62/117/1 54/256/1 53/118/1 +f 55/120/2 58/257/2 64/121/2 +f 64/121/6 58/257/6 54/123/6 +f 86/125/4 85/258/4 58/126/4 +f 98/128/5 97/259/5 56/129/5 +f 66/131/3 67/260/3 56/132/3 +f 64/19/5 62/114/5 12/116/5 +f 72/134/5 73/150/5 63/135/5 +f 69/136/1 62/117/1 61/119/1 +f 55/138/3 63/261/3 65/139/3 +f 65/141/3 63/135/3 67/142/3 +f 52/144/1 69/136/1 68/137/1 +f 67/146/2 70/262/2 57/130/2 +f 57/130/6 70/262/6 69/148/6 +f 73/150/3 77/263/3 78/151/3 +f 71/153/6 72/264/6 64/154/6 +f 74/156/8 71/153/8 70/157/8 +f 73/150/3 74/152/3 67/159/3 +f 76/161/5 77/263/5 73/150/5 +f 78/162/8 75/265/8 71/153/8 +f 72/134/1 71/266/1 21/163/1 +f 79/165/4 80/218/4 59/166/4 +f 79/168/3 60/172/3 51/169/3 +f 95/171/3 93/267/3 51/169/3 +f 59/173/6 80/216/6 57/174/6 +f 83/176/5 84/192/5 82/177/5 +f 83/179/6 81/201/6 54/180/6 +f 90/182/3 92/268/3 82/183/3 +f 82/183/3 84/190/3 55/185/3 +f 88/186/2 87/269/2 85/187/2 +f 88/189/3 86/270/3 55/185/3 +f 87/191/5 88/271/5 84/192/5 +f 85/193/6 87/272/6 83/179/6 +f 91/194/1 92/273/1 90/195/1 +f 89/197/4 90/274/4 53/198/4 +f 91/200/6 89/275/6 54/180/6 +f 92/202/5 91/276/5 81/178/5 +f 95/203/1 96/277/1 94/204/1 +f 96/206/4 95/278/4 60/167/4 +f 94/207/6 96/279/6 59/173/6 +f 93/208/5 94/280/5 52/209/5 +f 100/211/2 99/281/2 97/212/2 +f 97/214/3 99/282/3 79/168/3 +f 100/215/6 98/283/6 57/174/6 +f 99/217/4 100/284/4 80/218/4 +f 19/219/4 69/285/4 70/220/4 +o Surface_Plane.002 +v 0.437500 -0.059359 -0.309359 +v 0.437500 0.603553 0.353553 +v 0.437500 0.647748 0.309359 +v 0.437500 -0.015165 -0.353553 +v 0.437500 -0.103553 -0.353553 +v 0.437500 -0.059359 -0.397748 +v 0.500000 0.603553 0.353553 +v 0.500000 -0.059359 -0.309359 +v 0.500000 0.647748 0.309359 +v 0.500000 -0.015165 -0.353553 +v 0.500000 -0.059359 -0.397748 +v 0.500000 -0.103553 -0.353553 +v 0.437500 0.029029 -0.397748 +v 0.437500 -0.015165 -0.441942 +v -0.437500 -0.059359 -0.309359 +v -0.437500 0.603553 0.353553 +v -0.437500 0.647748 0.309359 +v -0.437500 -0.015165 -0.353553 +v -0.437500 -0.103553 -0.353553 +v -0.437500 -0.059359 -0.397748 +v -0.500000 0.603553 0.353553 +v -0.500000 -0.059359 -0.309359 +v -0.500000 0.647748 0.309359 +v -0.500000 -0.015165 -0.353553 +v -0.500000 -0.059359 -0.397748 +v -0.500000 -0.103553 -0.353553 +v -0.437500 0.029029 -0.397748 +v -0.437500 -0.015165 -0.441942 +vt 0.038462 0.461538 +vt 0.307692 0.435897 +vt 0.307692 0.461538 +vt 0.038462 0.051282 +vt 0.038462 0.435897 +vt 0.038462 0.974359 +vt 0.019231 0.948718 +vt 0.038462 0.948718 +vt 0.038462 0.538462 +vt 0.019231 0.512821 +vt 0.038462 0.512821 +vt 0.038462 0.564103 +vt 0.019231 0.538462 +vt 0.019231 0.948718 +vt 0.000000 0.564103 +vt 0.019231 0.564103 +vt 0.019231 0.512821 +vt 0.000000 0.538462 +vt 0.000000 0.512821 +vt 0.019231 0.435897 +vt 0.019231 0.564103 +vt 0.038462 0.564103 +vt 0.038462 0.461538 +vt 0.019231 0.487179 +vt 0.038462 0.487179 +vt 0.019231 0.051282 +vt 0.307692 0.487179 +vt 0.307692 0.974359 +vt 0.307692 0.948718 +vt 0.038462 0.487179 +vt 0.307692 0.512821 +vt 0.038462 0.512821 +vt 0.307692 0.564103 +vt 0.307692 0.948718 +vt 0.326923 0.974359 +vt 0.326923 0.948718 +vt 0.307692 0.512821 +vt 0.326923 0.538462 +vt 0.326923 0.512821 +vt 0.307692 0.538462 +vt 0.326923 0.564103 +vt 0.326923 0.564103 +vt 0.346154 0.948718 +vt 0.346154 0.564103 +vt 0.326923 0.538462 +vt 0.346154 0.512821 +vt 0.326923 0.512821 +vt 0.307692 0.435897 +vt 0.326923 0.461538 +vt 0.326923 0.435897 +vt 0.307692 0.564103 +vt 0.326923 0.564103 +vt 0.307692 0.487179 +vt 0.326923 0.461538 +vt 0.307692 0.051282 +vt 0.326923 0.051282 +vt 0.038462 0.564103 +vt 0.307692 0.538462 +vt 0.038462 0.538462 +vt 0.307692 0.512821 +vt 0.038462 0.512821 +vt 0.307692 0.051282 +vt 0.019231 0.974359 +vt 0.019231 0.538462 +vt 0.019231 0.564103 +vt 0.000000 0.948718 +vt 0.019231 0.538462 +vt 0.019231 0.461538 +vt 0.019231 0.461538 +vt 0.307692 0.974359 +vt 0.307692 0.538462 +vt 0.307692 0.564103 +vt 0.326923 0.948718 +vt 0.346154 0.538462 +vt 0.307692 0.461538 +vt 0.326923 0.487179 +vt 0.307692 0.564103 +vt 0.307692 0.538462 +vn 0.0000 -0.7071 0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 0.7071 -0.7071 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.7071 -0.7071 +vn -1.0000 0.0000 0.0000 +s off +f 105/286/9 115/287/9 119/288/9 +f 102/289/9 115/287/9 101/290/9 +f 102/291/10 109/292/10 103/293/10 +f 104/294/11 111/295/11 106/296/11 +f 106/297/12 113/298/12 104/294/12 +f 108/299/12 109/300/12 107/301/12 +f 108/302/12 111/303/12 110/304/12 +f 105/286/9 108/305/9 101/290/9 +f 103/293/11 110/306/11 104/307/11 +f 106/308/13 112/309/13 105/310/13 +f 101/290/9 107/311/9 102/289/9 +f 120/312/13 105/286/13 119/288/13 +f 116/313/10 103/293/10 117/314/10 +f 106/315/13 128/316/13 114/317/13 +f 118/318/11 103/293/11 104/307/11 +f 123/319/10 116/320/10 117/321/10 +f 125/322/11 118/323/11 120/324/11 +f 127/325/14 120/326/14 118/323/14 +f 123/327/14 122/328/14 121/329/14 +f 125/330/14 122/331/14 124/332/14 +f 122/333/9 119/334/9 115/335/9 +f 124/336/11 117/321/11 118/337/11 +f 126/338/13 120/339/13 119/288/13 +f 121/340/9 115/335/9 116/341/9 +f 113/342/10 118/343/10 104/294/10 +f 114/344/11 127/345/11 113/346/11 +f 105/286/9 101/290/9 115/287/9 +f 102/289/9 116/347/9 115/287/9 +f 102/291/10 107/348/10 109/292/10 +f 104/294/11 110/349/11 111/295/11 +f 106/297/12 114/350/12 113/298/12 +f 108/299/12 110/351/12 109/300/12 +f 108/302/12 112/352/12 111/303/12 +f 105/286/9 112/353/9 108/305/9 +f 103/293/11 109/292/11 110/306/11 +f 106/308/13 111/354/13 112/309/13 +f 101/290/9 108/305/9 107/311/9 +f 120/312/13 106/315/13 105/286/13 +f 116/313/10 102/291/10 103/293/10 +f 106/315/13 120/312/13 128/316/13 +f 118/318/11 117/314/11 103/293/11 +f 123/319/10 121/355/10 116/320/10 +f 125/322/11 124/356/11 118/323/11 +f 127/325/14 128/357/14 120/326/14 +f 123/327/14 124/358/14 122/328/14 +f 125/330/14 126/359/14 122/331/14 +f 122/333/9 126/360/9 119/334/9 +f 124/336/11 123/319/11 117/321/11 +f 126/338/13 125/361/13 120/339/13 +f 121/340/9 122/333/9 115/335/9 +f 113/342/10 127/362/10 118/343/10 +f 114/344/11 128/363/11 127/345/11 diff --git a/mods/cartographer/models/cartographer_simple_table_uvs.png b/mods/cartographer/models/cartographer_simple_table_uvs.png new file mode 100644 index 0000000..1933fc1 Binary files /dev/null and b/mods/cartographer/models/cartographer_simple_table_uvs.png differ diff --git a/mods/cartographer/models/cartographer_standard_table.blend b/mods/cartographer/models/cartographer_standard_table.blend new file mode 100644 index 0000000..0ef1f04 Binary files /dev/null and b/mods/cartographer/models/cartographer_standard_table.blend differ diff --git a/mods/cartographer/models/cartographer_standard_table.obj b/mods/cartographer/models/cartographer_standard_table.obj new file mode 100644 index 0000000..f3c00cf --- /dev/null +++ b/mods/cartographer/models/cartographer_standard_table.obj @@ -0,0 +1,657 @@ +# Blender v2.82 (sub 7) OBJ File: 'cartographer_standard_table.blend' +# www.blender.org +o Legs_Plane.001 +v 0.437500 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v 0.437500 -0.500000 0.375000 +v 0.375000 -0.500000 0.375000 +v 0.437500 -0.375000 0.375000 +v 0.437500 -0.375000 -0.375000 +v 0.375000 -0.375000 -0.375000 +v 0.375000 -0.375000 0.375000 +v 0.437500 -0.500000 0.250000 +v 0.375000 -0.437500 0.250000 +v 0.437500 -0.375000 0.250000 +v 0.375000 -0.375000 0.250000 +v 0.437500 -0.500000 0.125333 +v 0.437500 -0.375000 0.125333 +v 0.375000 -0.437500 0.125665 +v 0.375000 -0.375000 0.125665 +v 0.375000 0.125000 0.125665 +v 0.375000 0.125000 0.250000 +v 0.437500 0.125000 0.250000 +v 0.437500 0.125000 0.125333 +v 0.375000 0.437500 0.125665 +v 0.375000 0.500000 0.250000 +v 0.437500 0.500000 0.250000 +v 0.437500 0.437500 0.125333 +v -0.437500 -0.500000 -0.375000 +v -0.375000 -0.500000 -0.375000 +v -0.437500 -0.500000 0.375000 +v -0.375000 -0.500000 0.375000 +v -0.437500 -0.375000 0.375000 +v -0.437500 -0.375000 -0.375000 +v -0.375000 -0.375000 -0.375000 +v -0.375000 -0.375000 0.375000 +v -0.437500 -0.500000 0.250000 +v -0.375000 -0.437500 0.250000 +v -0.437500 -0.375000 0.250000 +v -0.375000 -0.375000 0.250000 +v -0.437500 -0.500000 0.125333 +v -0.437500 -0.375000 0.125333 +v -0.375000 -0.437500 0.125665 +v -0.375000 -0.375000 0.125665 +v -0.375000 0.125000 0.125665 +v -0.375000 0.125000 0.250000 +v -0.437500 0.125000 0.250000 +v -0.437500 0.125000 0.125333 +v -0.375000 0.437500 0.125665 +v -0.375000 0.500000 0.250000 +v -0.437500 0.500000 0.250000 +v -0.437500 0.437500 0.125333 +v 0.437500 0.062500 0.250000 +v 0.375000 0.062500 0.250000 +v 0.375000 0.062500 0.125665 +v 0.437500 0.062500 0.125333 +v -0.437500 0.062500 0.250000 +v -0.375000 0.062500 0.250000 +v -0.375000 0.062500 0.125665 +v -0.437500 0.062500 0.125333 +v 0.375000 0.125000 -0.186835 +v 0.437500 0.125000 -0.187167 +v -0.375000 0.125000 -0.186835 +v -0.437500 0.125000 -0.187167 +v 0.375000 0.062500 -0.186835 +v 0.437500 0.062500 -0.187167 +v -0.375000 0.062500 -0.186835 +v -0.437500 0.062500 -0.187167 +v -0.375000 0.125000 0.375000 +v -0.437500 0.125000 0.375000 +v -0.437500 0.062500 0.375000 +v -0.375000 0.062500 0.375000 +v 0.375000 0.125000 -0.186835 +v 0.437500 0.125000 -0.187167 +v 0.375000 0.062500 -0.186835 +v 0.437500 0.062500 -0.187167 +v 0.375000 0.125000 0.375000 +v 0.437500 0.125000 0.375000 +v 0.437500 0.062500 0.375000 +v 0.375000 0.062500 0.375000 +v 0.375000 -0.500000 0.250000 +v 0.375000 -0.500000 0.125665 +v -0.375000 -0.500000 0.250000 +v -0.375000 -0.500000 0.125665 +vt 0.403846 0.230769 +vt 0.365385 0.282051 +vt 0.365385 0.230769 +vt 0.403846 0.384615 +vt 0.365385 0.358974 +vt 0.403846 0.358974 +vt 0.442308 0.102564 +vt 0.596154 0.128205 +vt 0.442308 0.128205 +vt 0.596154 0.307692 +vt 0.442308 0.358974 +vt 0.442308 0.307692 +vt 0.365385 0.641026 +vt 0.596154 0.589744 +vt 0.365385 0.589744 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.403846 0.102564 +vt 0.442308 0.076923 +vt 0.442308 0.102564 +vt 0.403846 0.307692 +vt 0.365385 0.307692 +vt 0.403846 0.102564 +vt 0.596154 0.384615 +vt 0.596154 0.358974 +vt 0.403846 0.128205 +vt 0.365385 0.102564 +vt 0.846154 0.820513 +vt 0.884615 0.948718 +vt 0.846154 0.974359 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.788462 0.820513 +vt 0.807692 0.974359 +vt 0.807692 0.820513 +vt 1.000000 0.820513 +vt 0.980769 0.948718 +vt 0.980769 0.820513 +vt 0.596154 0.974359 +vt 0.365385 0.820513 +vt 0.596154 0.820513 +vt 0.596154 0.769231 +vt 0.365385 0.666667 +vt 0.596154 0.666667 +vt 0.365385 0.564103 +vt 0.596154 0.512821 +vt 0.596154 0.564103 +vt 0.403846 0.282051 +vt 0.442308 0.307692 +vt 0.442308 0.282051 +vt 0.365385 0.179487 +vt 0.403846 0.205128 +vt 0.403846 0.179487 +vt 0.596154 0.102564 +vt 0.442308 0.051282 +vt 0.442308 0.102564 +vt 0.442308 0.179487 +vt 0.596154 0.128205 +vt 0.442308 0.128205 +vt 0.365385 0.589744 +vt 0.596154 0.589744 +vt 0.750000 0.435897 +vt 0.788462 0.410256 +vt 0.750000 0.410256 +vt 0.442308 0.282051 +vt 0.403846 0.256410 +vt 0.403846 0.282051 +vt 0.403846 0.128205 +vt 0.365385 0.128205 +vt 0.403846 0.307692 +vt 0.365385 0.282051 +vt 0.365385 0.307692 +vt 0.596154 0.205128 +vt 0.596154 0.179487 +vt 0.365385 0.051282 +vt 0.403846 0.102564 +vt 0.403846 0.051282 +vt 0.846154 0.435897 +vt 0.884615 0.564103 +vt 0.884615 0.435897 +vt 0.711538 0.435897 +vt 0.711538 0.410256 +vt 0.884615 0.410256 +vt 0.846154 0.410256 +vt 0.807692 0.589744 +vt 0.788462 0.435897 +vt 0.807692 0.435897 +vt 1.000000 0.564103 +vt 0.980769 0.435897 +vt 1.000000 0.435897 +vt 0.596154 0.487179 +vt 0.365385 0.512821 +vt 0.596154 0.512821 +vt 0.884615 0.615385 +vt 0.846154 0.794872 +vt 0.846154 0.615385 +vt 0.980769 0.615385 +vt 1.000000 0.794872 +vt 1.000000 0.615385 +vt 0.750000 0.615385 +vt 0.711538 0.794872 +vt 0.711538 0.615385 +vt 0.788462 0.615385 +vt 0.807692 0.794872 +vt 0.807692 0.615385 +vt 0.884615 0.230769 +vt 0.846154 0.230769 +vt 1.000000 0.410256 +vt 0.980769 0.230769 +vt 1.000000 0.230769 +vt 0.750000 0.230769 +vt 0.711538 0.230769 +vt 0.807692 0.410256 +vt 0.788462 0.230769 +vt 0.807692 0.230769 +vt 0.807692 0.435897 +vt 0.788462 0.410256 +vt 0.807692 0.410256 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vt 0.615385 0.435897 +vt 0.711538 0.384615 +vt 0.615385 0.410256 +vt 0.711538 0.435897 +vt 0.615385 0.461538 +vt 0.615385 0.435897 +vt 0.980769 0.410256 +vt 0.750000 0.461538 +vt 0.788462 0.435897 +vt 0.000000 0.000000 +vt 0.750000 0.384615 +vt 0.750000 0.410256 +vt 0.807692 0.435897 +vt 0.750000 0.794872 +vt 0.788462 0.769231 +vt 0.750000 0.769231 +vt 0.750000 0.820513 +vt 0.711538 0.794872 +vt 0.711538 0.820513 +vt 0.884615 0.794872 +vt 0.980769 0.820513 +vt 0.884615 0.820513 +vt 0.711538 0.769231 +vt 0.615385 0.794872 +vt 0.615385 0.769231 +vt 0.788462 0.794872 +vt 0.807692 0.820513 +vt 0.807692 0.794872 +vt 0.711538 0.846154 +vt 0.615385 0.820513 +vt 0.711538 0.820513 +vt 0.615385 0.820513 +vt 0.750000 0.820513 +vt 0.788462 0.846154 +vt 0.750000 0.846154 +vt 0.750000 0.794872 +vt 0.788462 0.820513 +vt 0.807692 0.794872 +vt 0.346154 0.307692 +vt 0.365385 0.128205 +vt 0.346154 0.179487 +vt 0.346154 0.128205 +vt 0.615385 0.358974 +vt 0.615385 0.307692 +vt 0.615385 0.179487 +vt 0.615385 0.128205 +vt 0.596154 0.282051 +vt 0.442308 0.282051 +vt 0.596154 0.230769 +vt 0.403846 0.282051 +vt 0.365385 0.384615 +vt 0.596154 0.102564 +vt 0.596154 0.641026 +vt 0.403846 0.076923 +vt 0.442308 0.384615 +vt 0.788462 0.974359 +vt 1.000000 0.948718 +vt 0.365385 0.974359 +vt 0.365385 0.769231 +vt 0.365385 0.512821 +vt 0.365385 0.205128 +vt 0.596154 0.051282 +vt 0.442308 0.256410 +vt 0.442308 0.205128 +vt 0.365385 0.102564 +vt 0.846154 0.589744 +vt 0.788462 0.589744 +vt 0.980769 0.564103 +vt 0.365385 0.487179 +vt 0.980769 0.794872 +vt 0.788462 0.794872 +vt 0.980769 0.410256 +vt 0.788462 0.410256 +vt 0.788462 0.435897 +vt 0.615385 0.384615 +vt 0.711538 0.461538 +vt 0.980769 0.435897 +vt 0.788462 0.461538 +vt 0.788462 0.384615 +vt 0.807692 0.410256 +vt 0.750000 0.794872 +vt 0.980769 0.794872 +vt 0.788462 0.820513 +vt 0.615385 0.846154 +vt 0.615385 0.794872 +vt 0.788462 0.794872 +vt 0.807692 0.820513 +vt 0.346154 0.358974 +vt 0.365385 0.179487 +vt 0.442308 0.230769 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -0.0053 0.0000 -1.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0053 0.0000 -1.0000 +s off +f 12/1/1 4/2/1 8/3/1 +f 12/4/2 5/5/2 11/6/2 +f 37/7/3 26/8/3 80/9/3 +f 1/10/4 14/11/4 13/12/4 +f 16/13/2 36/14/2 12/15/2 +f 58/16/5 69/17/5 70/18/5 +f 34/19/4 80/20/4 39/21/4 +f 9/22/4 5/5/4 3/23/4 +f 13/12/4 11/6/4 9/22/4 +f 80/9/3 33/24/3 37/7/3 +f 7/25/2 14/11/2 6/26/2 +f 79/27/3 27/28/3 33/24/3 +f 19/29/4 24/30/4 23/31/4 +f 62/32/5 70/18/5 72/33/5 +f 19/34/5 22/35/5 18/36/5 +f 17/37/6 24/38/6 20/39/6 +f 22/40/5 42/41/5 18/42/5 +f 17/43/7 45/44/7 21/45/7 +f 34/46/3 15/47/3 10/48/3 +f 9/49/3 78/50/3 13/51/3 +f 29/52/2 36/53/2 35/54/2 +f 26/55/4 40/56/4 80/57/4 +f 38/58/1 25/59/1 37/60/1 +f 36/61/5 10/48/5 12/62/5 +f 42/63/4 68/64/4 54/65/4 +f 15/66/1 77/67/1 10/68/1 +f 29/52/1 33/69/1 27/70/1 +f 35/54/1 37/60/1 33/69/1 +f 77/71/3 3/72/3 4/73/3 +f 38/58/2 31/74/2 30/75/2 +f 32/76/4 79/77/4 36/78/4 +f 43/79/1 48/80/1 44/81/1 +f 41/82/4 54/65/4 55/83/4 +f 43/79/1 56/84/1 53/85/1 +f 46/86/5 43/87/5 42/88/5 +f 48/89/8 41/90/8 44/91/8 +f 42/41/3 17/43/3 18/42/3 +f 15/92/7 40/93/7 16/94/7 +f 14/95/4 49/96/4 11/97/4 +f 16/98/6 52/99/6 14/100/6 +f 12/101/1 51/102/1 16/103/1 +f 11/104/5 50/105/5 12/106/5 +f 53/85/1 38/107/1 35/108/1 +f 56/109/8 40/110/8 38/111/8 +f 55/83/4 36/112/4 40/113/4 +f 54/114/5 35/115/5 36/116/5 +f 65/117/5 67/118/5 68/119/5 +f 57/120/5 71/121/5 69/17/5 +f 55/83/4 59/122/4 41/82/4 +f 56/123/3 63/124/3 55/83/3 +f 44/125/2 59/126/2 60/127/2 +f 44/81/1 64/128/1 56/84/1 +f 43/129/2 65/130/2 42/63/2 +f 61/131/5 72/33/5 71/121/5 +f 54/132/3 67/118/3 53/133/3 +f 53/85/1 66/134/1 43/79/1 +f 49/135/3 76/136/3 50/137/3 +f 50/138/1 17/139/1 51/140/1 +f 52/141/4 70/142/4 20/143/4 +f 52/141/4 19/29/4 49/96/4 +f 52/144/3 71/145/3 72/146/3 +f 75/147/5 73/148/5 76/149/5 +f 20/150/2 69/151/2 17/152/2 +f 17/139/1 71/153/1 51/140/1 +f 18/154/2 74/155/2 19/156/2 +f 50/157/1 73/158/1 18/154/1 +f 19/29/4 75/159/4 49/96/4 +f 5/5/5 4/160/5 3/23/5 +f 28/161/5 29/162/5 27/163/5 +f 7/164/7 1/10/7 2/165/7 +f 25/59/7 31/166/7 26/167/7 +f 2/168/3 13/12/3 78/169/3 +f 78/169/1 7/170/1 2/168/1 +f 12/1/1 77/171/1 4/2/1 +f 12/4/2 8/172/2 5/5/2 +f 37/7/3 25/173/3 26/8/3 +f 1/10/4 6/26/4 14/11/4 +f 16/13/2 40/174/2 36/14/2 +f 58/16/5 57/120/5 69/17/5 +f 34/19/4 79/175/4 80/20/4 +f 9/22/4 11/6/4 5/5/4 +f 13/12/4 14/11/4 11/6/4 +f 80/9/3 79/27/3 33/24/3 +f 7/25/2 16/176/2 14/11/2 +f 79/27/3 28/161/3 27/28/3 +f 19/29/4 20/143/4 24/30/4 +f 62/32/5 58/16/5 70/18/5 +f 19/34/5 23/177/5 22/35/5 +f 17/37/6 21/178/6 24/38/6 +f 22/40/5 46/179/5 42/41/5 +f 17/43/7 41/180/7 45/44/7 +f 34/46/3 39/181/3 15/47/3 +f 9/49/3 77/71/3 78/50/3 +f 29/52/2 32/182/2 36/53/2 +f 26/55/4 31/183/4 40/56/4 +f 38/58/1 30/75/1 25/59/1 +f 36/61/5 34/46/5 10/48/5 +f 42/63/4 65/130/4 68/64/4 +f 15/66/1 78/184/1 77/67/1 +f 29/52/1 35/54/1 33/69/1 +f 35/54/1 38/58/1 37/60/1 +f 77/71/3 9/49/3 3/72/3 +f 38/58/2 40/185/2 31/74/2 +f 32/76/4 28/186/4 79/77/4 +f 43/79/1 47/187/1 48/80/1 +f 41/82/4 42/63/4 54/65/4 +f 43/79/1 44/81/1 56/84/1 +f 46/86/5 47/188/5 43/87/5 +f 48/89/8 45/189/8 41/90/8 +f 42/41/3 41/180/3 17/43/3 +f 15/92/7 39/190/7 40/93/7 +f 14/95/4 52/141/4 49/96/4 +f 16/98/6 51/191/6 52/99/6 +f 12/101/1 50/157/1 51/102/1 +f 11/104/5 49/192/5 50/105/5 +f 53/85/1 56/84/1 38/107/1 +f 56/109/8 55/193/8 40/110/8 +f 55/83/4 54/65/4 36/112/4 +f 54/114/5 53/194/5 35/115/5 +f 65/117/5 66/195/5 67/118/5 +f 57/120/5 61/131/5 71/121/5 +f 55/83/4 63/124/4 59/122/4 +f 56/123/3 64/196/3 63/124/3 +f 44/125/2 41/197/2 59/126/2 +f 44/81/1 60/198/1 64/128/1 +f 43/129/2 66/199/2 65/130/2 +f 61/131/5 62/32/5 72/33/5 +f 54/132/3 68/200/3 67/118/3 +f 53/85/1 67/201/1 66/134/1 +f 49/135/3 75/147/3 76/136/3 +f 50/138/1 18/202/1 17/139/1 +f 52/141/4 72/203/4 70/142/4 +f 52/141/4 20/143/4 19/29/4 +f 52/144/3 51/102/3 71/145/3 +f 75/147/5 74/204/5 73/148/5 +f 20/150/2 70/205/2 69/151/2 +f 17/139/1 69/206/1 71/153/1 +f 18/154/2 73/158/2 74/155/2 +f 50/157/1 76/207/1 73/158/1 +f 19/29/4 74/208/4 75/159/4 +f 5/5/5 8/209/5 4/160/5 +f 28/161/5 32/210/5 29/162/5 +f 7/164/7 6/26/7 1/10/7 +f 25/59/7 30/75/7 31/166/7 +f 2/168/3 1/10/3 13/12/3 +f 78/169/1 16/211/1 7/170/1 +o Surface_Plane.002 +v 0.437500 -0.004442 -0.254442 +v 0.437500 0.658471 0.408471 +v 0.437500 0.702665 0.364277 +v 0.437500 0.039752 -0.298636 +v 0.437500 -0.048636 -0.298636 +v 0.437500 -0.004442 -0.342830 +v 0.500000 0.658471 0.408471 +v 0.500000 -0.004442 -0.254442 +v 0.500000 0.702665 0.364277 +v 0.500000 0.039752 -0.298636 +v 0.500000 -0.004442 -0.342830 +v 0.500000 -0.048636 -0.298636 +v 0.437500 0.083947 -0.342830 +v 0.437500 0.039752 -0.387024 +v -0.437500 -0.004442 -0.254442 +v -0.437500 0.658471 0.408471 +v -0.437500 0.702665 0.364277 +v -0.437500 0.039752 -0.298636 +v -0.437500 -0.048636 -0.298636 +v -0.437500 -0.004442 -0.342830 +v -0.500000 0.658471 0.408471 +v -0.500000 -0.004442 -0.254442 +v -0.500000 0.702665 0.364277 +v -0.500000 0.039752 -0.298636 +v -0.500000 -0.004442 -0.342830 +v -0.500000 -0.048636 -0.298636 +v -0.437500 0.083947 -0.342830 +v -0.437500 0.039752 -0.387024 +vt 0.038462 0.461538 +vt 0.307692 0.435897 +vt 0.307692 0.461538 +vt 0.038462 0.051282 +vt 0.038462 0.435897 +vt 0.038462 0.974359 +vt 0.019231 0.948718 +vt 0.038462 0.948718 +vt 0.038462 0.538462 +vt 0.019231 0.512821 +vt 0.038462 0.512821 +vt 0.038462 0.564103 +vt 0.019231 0.538462 +vt 0.019231 0.564103 +vt 0.000000 0.948718 +vt 0.019231 0.948718 +vt 0.019231 0.512821 +vt 0.000000 0.538462 +vt 0.000000 0.512821 +vt 0.019231 0.435897 +vt 0.019231 0.564103 +vt 0.038462 0.564103 +vt 0.038462 0.461538 +vt 0.019231 0.487179 +vt 0.038462 0.487179 +vt 0.019231 0.051282 +vt 0.307692 0.487179 +vt 0.307692 0.974359 +vt 0.307692 0.948718 +vt 0.038462 0.487179 +vt 0.307692 0.512821 +vt 0.038462 0.512821 +vt 0.307692 0.564103 +vt 0.307692 0.948718 +vt 0.326923 0.974359 +vt 0.326923 0.948718 +vt 0.307692 0.512821 +vt 0.326923 0.538462 +vt 0.326923 0.512821 +vt 0.307692 0.538462 +vt 0.326923 0.564103 +vt 0.326923 0.564103 +vt 0.346154 0.948718 +vt 0.346154 0.564103 +vt 0.326923 0.538462 +vt 0.346154 0.512821 +vt 0.326923 0.512821 +vt 0.307692 0.435897 +vt 0.326923 0.461538 +vt 0.326923 0.435897 +vt 0.307692 0.564103 +vt 0.326923 0.564103 +vt 0.307692 0.487179 +vt 0.326923 0.461538 +vt 0.307692 0.051282 +vt 0.326923 0.051282 +vt 0.038462 0.564103 +vt 0.307692 0.538462 +vt 0.038462 0.538462 +vt 0.307692 0.512821 +vt 0.038462 0.512821 +vt 0.307692 0.051282 +vt 0.019231 0.974359 +vt 0.019231 0.538462 +vt 0.019231 0.564103 +vt 0.000000 0.564103 +vt 0.019231 0.538462 +vt 0.019231 0.461538 +vt 0.019231 0.461538 +vt 0.307692 0.974359 +vt 0.307692 0.538462 +vt 0.307692 0.564103 +vt 0.326923 0.948718 +vt 0.346154 0.538462 +vt 0.307692 0.461538 +vt 0.326923 0.487179 +vt 0.307692 0.564103 +vt 0.307692 0.538462 +vn 0.0000 -0.7071 0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 0.7071 -0.7071 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.7071 -0.7071 +vn -1.0000 0.0000 0.0000 +s off +f 85/212/9 95/213/9 99/214/9 +f 82/215/9 95/213/9 81/216/9 +f 82/217/10 89/218/10 83/219/10 +f 84/220/11 91/221/11 86/222/11 +f 86/223/12 93/224/12 84/220/12 +f 88/225/12 89/226/12 87/227/12 +f 88/228/12 91/229/12 90/230/12 +f 85/212/9 88/231/9 81/216/9 +f 83/219/11 90/232/11 84/233/11 +f 86/234/13 92/235/13 85/236/13 +f 81/216/9 87/237/9 82/215/9 +f 100/238/13 85/212/13 99/214/13 +f 96/239/10 83/219/10 97/240/10 +f 86/241/13 108/242/13 94/243/13 +f 98/244/11 83/219/11 84/233/11 +f 103/245/10 96/246/10 97/247/10 +f 105/248/11 98/249/11 100/250/11 +f 107/251/14 100/252/14 98/249/14 +f 103/253/14 102/254/14 101/255/14 +f 105/256/14 102/257/14 104/258/14 +f 102/259/9 99/260/9 95/261/9 +f 104/262/11 97/247/11 98/263/11 +f 106/264/13 100/265/13 99/214/13 +f 101/266/9 95/261/9 96/267/9 +f 93/268/10 98/269/10 84/220/10 +f 94/270/11 107/271/11 93/272/11 +f 85/212/9 81/216/9 95/213/9 +f 82/215/9 96/273/9 95/213/9 +f 82/217/10 87/274/10 89/218/10 +f 84/220/11 90/275/11 91/221/11 +f 86/223/12 94/276/12 93/224/12 +f 88/225/12 90/277/12 89/226/12 +f 88/228/12 92/278/12 91/229/12 +f 85/212/9 92/279/9 88/231/9 +f 83/219/11 89/218/11 90/232/11 +f 86/234/13 91/280/13 92/235/13 +f 81/216/9 88/231/9 87/237/9 +f 100/238/13 86/241/13 85/212/13 +f 96/239/10 82/217/10 83/219/10 +f 86/241/13 100/238/13 108/242/13 +f 98/244/11 97/240/11 83/219/11 +f 103/245/10 101/281/10 96/246/10 +f 105/248/11 104/282/11 98/249/11 +f 107/251/14 108/283/14 100/252/14 +f 103/253/14 104/284/14 102/254/14 +f 105/256/14 106/285/14 102/257/14 +f 102/259/9 106/286/9 99/260/9 +f 104/262/11 103/245/11 97/247/11 +f 106/264/13 105/287/13 100/265/13 +f 101/266/9 102/259/9 95/261/9 +f 93/268/10 107/288/10 98/269/10 +f 94/270/11 108/289/11 107/271/11 +o Cube +v 0.500000 -0.250000 0.062500 +v 0.500000 0.000000 0.062500 +v 0.500000 -0.250000 0.312500 +v 0.500000 0.000000 0.312500 +v 0.437500 -0.250000 0.062500 +v 0.437500 0.000000 0.062500 +v 0.437500 -0.250000 0.312500 +v 0.437500 0.000000 0.312500 +vt 0.750000 0.179487 +vt 0.673077 0.076923 +vt 0.750000 0.076923 +vt 0.673077 0.179487 +vt 0.653846 0.076923 +vt 0.846154 0.179487 +vt 0.769231 0.076923 +vt 0.846154 0.076923 +vt 0.769231 0.179487 +vt 0.673077 0.051282 +vt 0.750000 0.205128 +vt 0.673077 0.205128 +vt 0.653846 0.179487 +vt 0.750000 0.051282 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +s off +f 110/290/15 111/291/15 109/292/15 +f 112/293/16 115/294/16 111/291/16 +f 116/295/17 113/296/17 115/297/17 +f 114/298/18 109/292/18 113/296/18 +f 115/299/19 109/292/19 111/291/19 +f 112/293/20 114/300/20 116/301/20 +f 110/290/15 112/293/15 111/291/15 +f 112/293/16 116/302/16 115/294/16 +f 116/295/17 114/298/17 113/296/17 +f 114/298/18 110/290/18 109/292/18 +f 115/299/19 113/303/19 109/292/19 +f 112/293/20 110/290/20 114/300/20 diff --git a/mods/cartographer/models/cartographer_standard_table_uvs.png b/mods/cartographer/models/cartographer_standard_table_uvs.png new file mode 100644 index 0000000..3d00ab6 Binary files /dev/null and b/mods/cartographer/models/cartographer_standard_table_uvs.png differ diff --git a/mods/cartographer/scanner.lua b/mods/cartographer/scanner.lua new file mode 100644 index 0000000..a504e3e --- /dev/null +++ b/mods/cartographer/scanner.lua @@ -0,0 +1,268 @@ +-- Arguments +-- map_data: The cartographer map data table +-- chunk: The chunk coordinate conversion API +-- settings: The mod settings +local map_data, chunk, settings = ...; + +local scan_queue = {}; + +-- Register a new tile in map data +-- x: The x position in map coordinates +-- y: The y position in map coordinates +-- biome: The tile's biome id +-- height: The tile's height +-- (Optional): manual_scan: Indicates if this was a 'manual' (non-generated) +-- scan. Manual scans are overridden by generated +-- scans under normal circumstances. +local function register_tile(x, y, biome, height, manual_scan) + if not map_data.generated[x] then + map_data.generated[x] = { + [y] = { + biome = biome, + height = height, + } + }; + if manual_scan ~= nil then + map_data.generated[x][y].manual_scan = manual_scan; + end + elseif not map_data.generated[x][y] or map_data.generated[x][y].height < height then + map_data.generated[x][y] = { + biome = biome, + height = height, + }; + if manual_scan ~= nil or map_data.generated[x][y].manual_scan then + map_data.generated[x][y].manual_scan = manual_scan; + end + end +end + +-- Get the biome and height data for a region from mapgen data +-- +-- min: The min coord of the generated terrain +-- max: The max coord of the generated terrain +-- mmin: The min coord of the region to scan +-- mmax: The max coord of the region to scan +-- +-- Returns the biome and height of the scanned region +local function get_mapgen_biome(min, max, mmin, mmax) + local UNDERGROUND = minetest.get_biome_id("underground"); + local DEFAULT = minetest.get_biome_id("default"); + + local biomes = minetest.get_mapgen_object("biomemap"); + local heights = minetest.get_mapgen_object("heightmap"); + + local xx = max.x - min.x; + local zz = max.z - min.z; + + local xxx = mmax.x - mmin.x; + + local startx = min.x - mmin.x; + local startz = min.z - mmin.z; + + local scan_biomes = {}; + local scan_heights = {}; + + for i = startx,startx + xx,1 do + for k = startz,startz + zz,1 do + local b = biomes[i + (k * (xxx + 1))]; + if b ~= nil and b ~= UNDERGROUND and b ~= DEFAULT then + scan_biomes[b] = (scan_biomes[b] or 0) + 1; + scan_heights[b] = (scan_heights[b] or 0) + heights[i + (k * (xxx + 1))]; + end + end + end + + local biome = nil; + local high = 0; + for k,v in pairs(scan_biomes) do + if v > high then + biome = k; + high = v; + end + end + + local avg_height = 0; + if high > 0 then + avg_height = scan_heights[biome] / high; + end + + return biome, avg_height; +end + +-- Get the biome and height data for a region from existing terrain +-- +-- min: The min coord of the region to scan +-- max: The max coord of the region to scan +-- +-- Returns the biome and height of the scanned region +local function get_biome(min, max) + local UNDERGROUND = minetest.get_biome_id("underground"); + local DEFAULT = minetest.get_biome_id("default"); + local WATER_SOURCE = minetest.registered_aliases["mapgen_water_source"]; + + local scan_biomes = {}; + local scan_heights = {}; + + for i = min.x,max.x,1 do + for j = min.y,max.y,1 do + for k = min.z,max.z,1 do + local pos = { x=i, y=j, z=k }; + local b = minetest.get_biome_data(pos).biome; + local node = minetest.get_node(pos).name; + if b ~= nil and b ~= UNDERGROUND and b ~= DEFAULT and node ~= "air" and node ~= WATER_SOURCE then + pos.y = pos.y + 1; + node = minetest.get_node(pos).name; + if node == "air" or node == WATER_SOURCE then + scan_biomes[b] = (scan_biomes[b] or 0) + 1; + scan_heights[b] = (scan_heights[b] or 0) + j; + end + end + end + end + end + + local biome = nil; + local high = 0; + for k,v in pairs(scan_biomes) do + if v > high then + biome = k; + high = v; + end + end + + local avg_height = 0; + if high > 0 then + avg_height = scan_heights[biome] / high; + end + + return biome, avg_height; +end + +-- Called when new terrain is generated +-- +-- min: The min coord of the generated terrain +-- max: The max coord of the generated terrain +local function on_generated(min, max, _) + for i = chunk.to(min.x),chunk.to(max.x),1 do + for j = chunk.to(min.z),chunk.to(max.z),1 do + + local sub_min = { + x = chunk.from(i), + y = min.y, + z = chunk.from(j), + }; + local sub_max = { + x = chunk.from(i + 1), + y = max.y, + z = chunk.from(j + 1), + }; + local biome, height = get_mapgen_biome(sub_min, sub_max, min, max); + if biome ~= nil then + register_tile(i, j, biome, height) + end + + end + end +end +minetest.register_on_generated(on_generated); + +-- Is the scan of this position already handled? +-- +-- x: The x position, in map coordinates +-- y: The y position, in world coordinates +-- x: The z position, in map coordinates +-- +-- Returns true if the position is handled by the current map data +local function is_scan_handled(x, y, z) + if not map_data.generated[x] then + return false; + end + + local tile = map_data.generated[x][z]; + + return tile and ((not tile.manual_scan and tile.height > 0) or tile.height >= y); +end + +local scanner = {}; + +-- Queue a tile for manual scanning +-- +-- pos: The position as a table, in world coordinates +function scanner.queue_region(pos) + local converted = { + x = chunk.from(chunk.to(pos.x)), + y = chunk.from(chunk.to(pos.y)), + z = chunk.from(chunk.to(pos.z)), + }; + + if is_scan_handled(chunk.to(pos.x), pos.y, chunk.to(pos.z)) then + return; + end + + for _,queued_pos in ipairs(scan_queue) do + if vector.equals(converted, queued_pos) then + return; + end + end + + scan_queue[#scan_queue + 1] = converted; +end + +local function scan_internal() + local startpos = scan_queue[1]; + local chunk_x = chunk.to(startpos.x); + local chunk_y = chunk.to(startpos.y); + local chunk_z = chunk.to(startpos.z); + + local endpos = { + x = chunk.from(chunk_x + 1), + y = chunk.from(chunk_y + 1), + z = chunk.from(chunk_z + 1), + }; + + if is_scan_handled(chunk_x, startpos.y, chunk_z) then + table.remove(scan_queue, 1); + return; + end + + local biome,height = get_biome(startpos, endpos); + if biome ~= nil then + register_tile(chunk_x, chunk_z, biome, height, true) + end + + table.remove(scan_queue, 1); +end + +-- Scan the next N tiles on the queue, and remove them +-- N is determined by backup_scan_count +-- +-- flush: Flush the entire scan queue, scanning all queued regions +function scanner.scan_regions(flush) + if #scan_queue == 0 then + return; + end + + if settings.backup_scan_count == 0 or flush then + while #scan_queue > 0 do + scan_internal(); + end + else + for _=1,settings.backup_scan_count do + if #scan_queue == 0 then + break; + end + + scan_internal(); + end + end +end + +if settings.backup_scan_freq ~= 0 then + local function periodic_scan() + scanner.scan_regions(); + minetest.after(settings.backup_scan_freq, periodic_scan); + end + minetest.after(settings.backup_scan_freq, periodic_scan); +end + +return scanner; diff --git a/mods/cartographer/settingtypes.txt b/mods/cartographer/settingtypes.txt new file mode 100644 index 0000000..e1184a9 --- /dev/null +++ b/mods/cartographer/settingtypes.txt @@ -0,0 +1,14 @@ +# The default size of new maps, in tiles +default_size (Default Map Size) int 40 5 80 + +# The frequency that maps are filled in as players explore, in seconds. Set to 0 to disable. +autofill_freq (Map Auto-Fill Frequency) int 5 0 60 + +# The frequency that this mod saves its data to mod storage, in seconds. Set to 0 to disable. +autosave_freq (Data Auto-Save Frequency) int 60 0 3600 + +# The frequency that this mod scans already-generated map data to fill in existing terrain, in seconds. Set to 0 to disable. +backup_scan_freq (Map Scan Frequency) int 5 0 3600 + +# The number of map sections that this mod scans at a time. Set to 0 to scan all relevant areas +backup_scan_count (Map Scan Rate) int 20 0 100 diff --git a/mods/cartographer/skin_api.lua b/mods/cartographer/skin_api.lua new file mode 100644 index 0000000..6e492f2 --- /dev/null +++ b/mods/cartographer/skin_api.lua @@ -0,0 +1,186 @@ +-- Table used for skinning cartographer's look and feel +return { + -- The textures to use in maps for the sides of tiles + cliff_textures = { + "cartographer_simple_cliff", + "cartographer_cliff", + }; + + -- The textures to use in maps for uncovered/unknown tiles + unknown_biome_textures = { + "cartographer_unknown_biome", + }; + + -- The animated texture data to use for the player icon + player_icons = { + { + frame_count = 2, + frame_duration = 500, + texture = "cartographer_simple_player_icon", + }, + { + frame_count = 2, + frame_duration = 500, + texture = "cartographer_player_icon", + }, + }, + + -- The skinning data for the cartographer's tables + table_skins = { + simple_table = { + node_mesh = "cartographer_simple_table.obj", + node_texture = "cartographer_simple_table.png", + + background = { + texture = "cartographer_simple_table_bg", + radius = 16, + }, + inner_background = { + texture = "cartographer_simple_table_bg_2", + radius = 4, + }, + button = { + font_color = "#694a3a", + disabled_font_color = "#606060", + texture = "cartographer_simple_table_button", + selected_texture = "cartographer_simple_table_button_pressed", + hovered_texture = "cartographer_simple_table_button_hovered", + pressed_texture = "cartographer_simple_table_button_pressed", + radius = 8, + }, + slot = { + texture = "cartographer_simple_table_slot", + radius = 8, + }, + separator = { + texture = "cartographer_simple_table_separator", + radius = "9,1", + }, + label = { + font_color = "#694a3a", + texture = "cartographer_simple_table_slot", + radius = 8, + }, + tab = { + font_color = "#694a3a", + texture = "cartographer_simple_table_tab", + selected_texture = "cartographer_simple_table_tab_selected", + hovered_texture = "cartographer_simple_table_tab_hovered", + pressed_texture = "cartographer_simple_table_tab_hovered", + radius = 10, + }, + paper_texture = "cartographer_paper"; + pigment_texture = "cartographer_pigment"; + }, + standard_table = { + node_mesh = "cartographer_standard_table.obj", + node_texture = "cartographer_standard_table.png", + background = { + texture = "cartographer_standard_table_bg", + radius = 16, + }, + inner_background = { + texture = "cartographer_standard_table_bg_2", + radius = 4, + }, + button = { + font_color = "#694a3a", + disabled_font_color = "#606060", + texture = "cartographer_simple_table_button", + selected_texture = "cartographer_simple_table_button_pressed", + hovered_texture = "cartographer_simple_table_button_hovered", + pressed_texture = "cartographer_simple_table_button_pressed", + radius = 8, + }, + slot = { + texture = "cartographer_standard_table_slot", + radius = 8, + }, + separator = { + texture = "cartographer_standard_table_separator", + radius = "9,1", + }, + label = { + font_color = "#694a3a", + texture = "cartographer_standard_table_slot", + radius = 8, + }, + tab = { + font_color = "#694a3a", + texture = "cartographer_standard_table_tab", + selected_texture = "cartographer_standard_table_tab_selected", + hovered_texture = "cartographer_standard_table_tab_hovered", + pressed_texture = "cartographer_standard_table_tab_hovered", + radius = 10, + }, + paper_texture = "cartographer_paper"; + pigment_texture = "cartographer_pigment"; + }, + advanced_table = { + node_mesh = "cartographer_advanced_table.obj", + node_texture = "cartographer_advanced_table.png", + background = { + texture = "cartographer_advanced_table_bg", + radius = 16, + }, + inner_background = { + texture = "cartographer_advanced_table_bg_2", + radius = 2, + }, + button = { + font_color = "#1f2533", + disabled_font_color = "#606060", + texture = "cartographer_advanced_table_button", + selected_texture = "cartographer_advanced_table_button_pressed", + hovered_texture = "cartographer_advanced_table_button_hovered", + pressed_texture = "cartographer_advanced_table_button_pressed", + radius = 8, + }, + slot = { + texture = "cartographer_advanced_table_slot", + radius = 8, + }, + separator = { + texture = "cartographer_advanced_table_separator", + radius = "9,1", + }, + label = { + font_color = "#1f2533", + texture = "cartographer_advanced_table_slot", + radius = 8, + }, + tab = { + font_color = "#1f2533", + texture = "cartographer_advanced_table_tab", + selected_texture = "cartographer_advanced_table_tab_selected", + hovered_texture = "cartographer_advanced_table_tab_hovered", + pressed_texture = "cartographer_advanced_table_tab_hovered", + radius = 10, + }, + paper_texture = "cartographer_paper"; + pigment_texture = "cartographer_pigment"; + }, + }, + + -- The skinning data for the marker editor's background + marker_bg = { + texture = "cartographer_markers_bg", + radius = 6, + }, + + -- The skinning data for the marker editor's buttons + marker_button = { + font_color = "#694a3a", + texture = "cartographer_simple_table_button", + selected_texture = "cartographer_simple_table_button_pressed", + hovered_texture = "cartographer_simple_table_button_hovered", + pressed_texture = "cartographer_simple_table_button_pressed", + radius = 8, + }, + + -- The texture of the height toggle button when active + height_button_texture = "cartographer_height_button", + + -- The texture of the height toggle button when inactive + flat_button_texture = "cartographer_flat_button", +}; diff --git a/mods/cartographer/sounds/cartographer_open_map.ogg b/mods/cartographer/sounds/cartographer_open_map.ogg new file mode 100644 index 0000000..5eb54ef Binary files /dev/null and b/mods/cartographer/sounds/cartographer_open_map.ogg differ diff --git a/mods/cartographer/sounds/cartographer_turn_page.ogg b/mods/cartographer/sounds/cartographer_turn_page.ogg new file mode 100644 index 0000000..eecc564 Binary files /dev/null and b/mods/cartographer/sounds/cartographer_turn_page.ogg differ diff --git a/mods/cartographer/sounds/cartographer_write.0.ogg b/mods/cartographer/sounds/cartographer_write.0.ogg new file mode 100644 index 0000000..bdd5ec5 Binary files /dev/null and b/mods/cartographer/sounds/cartographer_write.0.ogg differ diff --git a/mods/cartographer/sounds/cartographer_write.1.ogg b/mods/cartographer/sounds/cartographer_write.1.ogg new file mode 100644 index 0000000..b50fa15 Binary files /dev/null and b/mods/cartographer/sounds/cartographer_write.1.ogg differ diff --git a/mods/cartographer/sounds/cartographer_write.2.ogg b/mods/cartographer/sounds/cartographer_write.2.ogg new file mode 100644 index 0000000..2c5a2d2 Binary files /dev/null and b/mods/cartographer/sounds/cartographer_write.2.ogg differ diff --git a/mods/cartographer/sounds/cartographer_write.3.ogg b/mods/cartographer/sounds/cartographer_write.3.ogg new file mode 100644 index 0000000..45f7847 Binary files /dev/null and b/mods/cartographer/sounds/cartographer_write.3.ogg differ diff --git a/mods/cartographer/storage.lua b/mods/cartographer/storage.lua new file mode 100644 index 0000000..f280741 --- /dev/null +++ b/mods/cartographer/storage.lua @@ -0,0 +1,46 @@ +-- Arguments +-- settings: The mod settings +local settings = ...; + +-- Storage and saving +local mod_storage = minetest.get_mod_storage(); +local map_data = { + -- Scanned map data + generated = minetest.deserialize(mod_storage:get_string("map")) or {}, + + -- Maps + maps = minetest.deserialize(mod_storage:get_string("maps")) or {}, + + -- The next id + next_map_id = mod_storage:get_int("next_map_id"), + + -- The version of the map api + api_version = mod_storage:get_int("api_version"), +}; + +if map_data.next_map_id == 0 then + map_data.next_map_id = 1; +end + +if map_data.api_version == 0 then + map_data.api_version = 1; +end + +local function save() + mod_storage:set_string("maps", minetest.serialize(map_data.maps)); + mod_storage:set_int("next_map_id", map_data.next_map_id); + mod_storage:set_string("map", minetest.serialize(map_data.generated)); + mod_storage:set_string("api_version", minetest.serialize(map_data.api_version)); +end +minetest.register_on_shutdown(save); +minetest.register_on_leaveplayer(save); + +if settings.autosave_freq ~= 0 then + local function periodic_save() + save(); + minetest.after(settings.autosave_freq, periodic_save); + end + minetest.after(settings.autosave_freq, periodic_save); +end + +return map_data; diff --git a/mods/cartographer/table.lua b/mods/cartographer/table.lua new file mode 100644 index 0000000..80903b5 --- /dev/null +++ b/mods/cartographer/table.lua @@ -0,0 +1,960 @@ +-- Arguments +-- gui: The GUI API +-- gui_skin: The GUI skin +-- audio: The audio playback API +-- maps: The map API +-- materials: The material API +-- map_item: The map item API +-- settings: The mod settings +local gui, gui_skin, audio, maps, materials, map_item, settings = ...; + +local SCALE_SMALL = 1; +local SCALE_MEDIUM = 2; +local SCALE_LARGE = 4; +local SCALE_HUGE = 8; + +-- Get the material cost for the given map scale and detail level +-- +-- scale: The map scale +-- detail: The detail level +-- +-- Returns a table with material costs +local function get_material_cost(scale, detail) + local paper = scale * 4; + local pigment = detail * 5; + + if scale == SCALE_SMALL then + pigment = pigment + 5; + elseif scale == SCALE_MEDIUM then + pigment = pigment + 10; + elseif scale == SCALE_LARGE then + pigment = pigment + 15; + elseif scale == SCALE_HUGE then + pigment = pigment + 20; + end + + return { + paper = math.max(paper, 0), + pigment = math.max(pigment, 0), + }; +end + +-- Get the material cost of the craft settings from the given table metadata +-- +-- meta: The metadata to read +-- +-- Returns a table with the material costs, and a boolean indicating if the +-- costs were positive or negative before clamping. +local function get_craft_material_cost(meta) + local cost = get_material_cost(meta:get_int("scale") or SCALE_SMALL, meta:get_int("detail") or 0); + local stack = meta:get_inventory():get_stack("output", 1); + local is_positive = true; + + if stack:get_name() == "cartographer:map" then + local smeta = stack:get_meta(); + local sub_cost = get_material_cost(smeta:get_int("cartographer:scale") or SCALE_SMALL, + (smeta:get_int("cartographer:detail") or 1) - 1); + is_positive = cost.paper >= sub_cost.paper and cost.pigment >= sub_cost.pigment; + cost.paper = math.max(cost.paper - sub_cost.paper, 0); + cost.pigment = math.max(cost.pigment - sub_cost.pigment, 0); + end + + return cost, is_positive; +end + +-- Check if the given table metadata has enough materials to cover the given +-- cost table. +-- +-- cost: A table of material costs +-- meta: The metadata +-- +-- Returns true if the table's materials can cover the cost +local function can_afford(cost, meta) + return cost.paper + cost.pigment > 0 + and cost.paper <= meta:get_int("paper") + and cost.pigment <= meta:get_int("pigment"); +end + +-- Get the material cost of the copy settings from the given table metadata +-- +-- meta: The metadata to read +-- +-- Returns a table with the material costs +local function get_copy_material_cost(meta) + local inv = meta:get_inventory(); + local in_stack = inv:get_stack("copy_input", 1); + local out_stack = inv:get_stack("copy_output", 1); + + + if out_stack:is_empty() and in_stack:get_name() == "cartographer:map" then + local smeta = in_stack:get_meta(); + local scale = smeta:get_int("cartographer:scale") or SCALE_SMALL; + local detail = smeta:get_int("cartographer:detail") or 1; + + return get_material_cost(scale, detail - 1); + end + + return { + paper = 0, + pigment = 0, + }; +end + +local fs = {}; + +-- Draw a 1px thick horizontal separator formspec element +-- +-- y: The y position of the separator +-- skin: A 9-slice background skin table +-- +-- Returns a formspec string +function fs.separator(y, skin) + return gui.bg9 { + x = 0.1, + y = y, + w = 10.05, + h = 0.01, + + skin = skin, + }; +end + +-- Draw all the essential formspec data (size, background, styles, tabs) +-- +-- w: The width of the formspec +-- h: The height of the formspec +-- rank: An into defining the 'rank' of the table being displayed +-- tab: An int defining the index of the selected tab +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.header(w, h, rank, tab, skin) + local data = { + gui.formspec { + w = w, + h = h, + + bg = skin.background, + }, + gui.bg9 { + x = 0.125, + y = 0.125, + + w = w - 0.25, + h = h - 0.25, + + skin = skin.inner_background, + }, + + gui.style_type { + selector = "button", + properties = { + noclip = true, + border = false, + + bgimg = skin.tab.texture .. ".png", + bgimg_hovered = skin.tab.hovered_texture .. ".png", + bgimg_pressed = skin.tab.pressed_texture .. ".png", + bgimg_middle = skin.tab.radius, + textcolor = skin.tab.font_color, + } + }, + gui.style { + selector = "tab" .. tostring(tab), + properties = { + bgimg = skin.tab.selected_texture .. ".png", + bgimg_hovered = skin.tab.selected_texture .. ".png", + bgimg_pressed = skin.tab.selected_texture .. ".png", + } + }, + + gui.button { + x = 0.25, + y = -0.425, + + w = 1.5, + h = 0.55, + + id = "tab1", + + text = "Materials" + }, + gui.button { + x = 1.75, + y = -0.425, + + w = 1.5, + h = 0.55, + + id = "tab2", + + text = "Create Map" + }, + }; + + if rank >= 2 then + table.insert(data, gui.button { + x = 3.25, + y = -0.425, + + w = 1.5, + h = 0.55, + + id = "tab3", + + text = "Copy Map" + }); + end + + table.insert(data, gui.style_type { + selector = "button", + properties = { + bgimg = skin.button.texture .. ".png", + bgimg_hovered = skin.button.hovered_texture .. ".png", + bgimg_pressed = skin.button.pressed_texture .. ".png", + bgimg_middle = skin.button.radius, + + textcolor = skin.button.font_color, + }, + }); + table.insert(data, gui.style { + selector = "disabled_button", + properties = { + bgimg = "", + bgimg_hovered = "", + bgimg_pressed = "", + + textcolor = skin.button.disabled_font_color, + }, + }); + + return table.concat(data); +end + +-- Draw material counters from a table's metadata +-- +-- x: The x position of the labels +-- y: The y position of the labels +-- meta: A metadata object containing the material quantities +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.materials(x, y, meta, skin) + return gui.container { + x = x, + y = y, + + gui.bg9 { + x = 0, + y = 0.125, + + w = 1.0, + h = 0.25, + + skin = skin.label, + }, + gui.image { + x = 0.125, + y = 0.125, + + w = 0.25, + h = 0.25, + + image = skin.paper_texture .. ".png", + }, + gui.label { + x = 0.375, + y = 0.25, + + textcolor = skin.label.font_color, + text = string.format("x %d", meta:get_int("paper")), + }, + + gui.bg9 { + x = 1.25, + y = 0.125, + + w = 1.0, + h = 0.25, + + skin = skin.label, + }, + gui.image { + x = 1.375, + y = 0.125, + + w = 0.25, + h = 0.25, + + image = skin.pigment_texture .. ".png", + }, + gui.label { + x = 1.625, + y = 0.25, + + textcolor = skin.label.font_color, + text = string.format("x %d", meta:get_int("pigment")), + }, + }; +end + +-- Draw a label with material costs from a table +-- +-- x: The x position of the interface +-- y: The y position of the interface +-- cost: A table of material costs, with string keys for the material +-- names and integer values +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.cost(x, y, cost, skin) + local data = { + gui.bg9 { + x = x, + y = y - 0.125, + w = 1, + h = 0.5, + + skin = skin.label, + }, + } + + local i = 0; + for name,value in pairs(cost) do + local texture = ""; + if name == "paper" then + texture = skin.paper_texture .. ".png"; + elseif name == "pigment" then + texture = skin.pigment_texture .. ".png"; + end + + table.insert(data, gui.image { + x = x + 0.125, + y = y + (i * 0.25) - 0.125, + w = 0.25, + h = 0.25, + + image = texture, + }); + + table.insert(data, gui.label { + x = x + 0.375, + y = y + (i * 0.25); + w = 0.25, + h = 0.25, + + textcolor = skin.label.font_color, + text = string.format("x %d", value); + }); + + i = i + 1; + end + + return table.concat(data); +end + +-- Draw the material conversion tab UI +-- +-- x: The x position of the interface +-- y: The y position of the interface +-- pos: The table position (for displaying the inventory) +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.convert(x, y, pos, skin) + local meta = minetest.get_meta(pos); + local value = materials.get_stack_value(meta:get_inventory():get_stack("input", 1)); + + return gui.container { + x = x, + y = y, + + gui.inventory { + x = 0, + y = 0, + w = 1, + h = 1, + + location = string.format("nodemeta:%d,%d,%d", pos.x, pos.y, pos.z), + id = "input", + bg = skin.slot, + tooltip = "Place items here to convert\nthem into mapmaking materials", + }, + + gui.button { + x = 2.5, + y = 0.25, + w = 2, + h = 0.5, + + id = "convert", + text = "Convert Materials", + disabled = value.paper + value.pigment <= 0, + }, + + fs.cost(1.25, 0.375, value, skin), + }; +end + +-- Draw the map crafting tab UI +-- +-- x: The x position of the interface +-- y: The y position of the interface +-- pos: The table position (for displaying the inventory) +-- rank: The 'rank' of the table +-- meta: A metadata object containing the table settings and material +-- quantities +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.craft(x, y, pos, rank, meta, skin) + local cost, is_positive = get_craft_material_cost(meta); + local stack = meta:get_inventory():get_stack("output", 1); + + local data = { + x = x, + y = y, + + gui.inventory { + x = 0, + y = 1, + w = 1, + h = 1, + + location = string.format("nodemeta:%d,%d,%d", pos.x, pos.y, pos.z), + id = "output", + bg = skin.slot, + tooltip = "Place a map here to upgrade it,\nor leave empty to craft", + }, + gui.button { + x = 2.5, + y = 1.25, + w = 2, + h = 0.5, + + id = "craft", + text = stack:get_name() == "cartographer:map" and "Upgrade Map" or "Craft Map", + disabled = not (is_positive and can_afford(cost, meta)), + }, + fs.cost(1.25, 1.375, cost, skin), + + gui.style { + selector = string.format("%dx,%d", meta:get_int("scale"), meta:get_int("detail") + 1), + properties = { + bgimg = skin.button.selected_texture .. ".png", + bgimg_hovered = skin.button.selected_texture .. ".png", + bgimg_pressed = skin.button.selected_texture .. ".png", + }, + }, + gui.label { + x = 0, + y = 0, + + text = "Detail Level", + textcolor = skin.label.font_color, + }, + }; + + if rank > 1 then + table.insert(data, gui.button { + x = 2.5, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "1x", + text = "1x", + }); + table.insert(data, gui.button { + x = 3.0, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "2x", + text = "2x", + }); + + if rank > 2 then + table.insert(data, gui.button { + x = 3.5, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "4x", + text = "4x", + }); + table.insert(data, gui.button { + x = 4.0, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "8x", + text = "8x", + }); + end + end + + table.insert(data, gui.button { + x = 0, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "1", + text = "1", + }); + table.insert(data, gui.button { + x = 0.5, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "2", + text = "2", + }); + if rank > 1 then + table.insert(data, gui.button { + x = 1.0, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "3", + text = "3", + }); + if rank > 2 then + table.insert(data, gui.button { + x = 1.5, + y = 0.25, + w = 0.5, + h = 0.5, + + id = "4", + text = "4", + }); + end + end + + return gui.container(data); +end + +-- Draw the map copying tab UI +-- +-- x: The x position of the interface +-- y: The y position of the interface +-- pos: The table position (for displaying the inventory) +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.copy(x, y, pos, skin) + local meta = minetest.get_meta(pos); + local costs = get_copy_material_cost(meta); + + return gui.container { + x = x, + y = y, + + gui.inventory { + x = 0, + y = 0, + w = 1, + h = 1, + + location = string.format("nodemeta:%d,%d,%d", pos.x, pos.y, pos.z), + id = "copy_input", + bg = skin.slot, + }, + gui.inventory { + x = 8.75, + y = 0, + w = 1, + h = 1, + + location = string.format("nodemeta:%d,%d,%d", pos.x, pos.y, pos.z), + id = "copy_output", + bg = skin.slot, + }, + gui.button { + x = 2.5, + y = 0.25, + w = 2, + h = 0.5, + + id = "copy", + text = "Copy Map", + disabled = not can_afford(costs, meta), + }, + fs.cost(1.25, 0.375, costs, skin), + }; +end + +-- Draw the player's inventory +-- +-- x: The x position of the inventory +-- y: The y position of the inventory +-- skin: A formspec skin table +-- +-- Returns a formspec string +function fs.inv(x, y, skin) + return gui.inventory { + x = x, + y = y, + w = 8, + h = 4, + + location = "current_player", + id = "main", + bg = skin.slot, + }; +end + +local player_tables = {}; + +-- Show the table formspec to the specified player +-- The player must be recorded in player_tables in order to receive +-- a formspec. +-- +-- player: The player's name +local function table_formspec(player) + local data = player_tables[player]; + local pos = data.pos; + + if not pos then + return; + end + + local meta = minetest.get_meta(pos); + + local rank = 1; + local skin = gui_skin.table_skins.simple_table; + local name = minetest.get_node(pos).name; + if name == "cartographer:standard_table" then + rank = 2; + skin = gui_skin.table_skins.standard_table; + elseif name == "cartographer:advanced_table" then + rank = 3; + skin = gui_skin.table_skins.advanced_table; + end + + if data.tab == 1 then + minetest.show_formspec(player, "cartographer:table", + fs.header(10.25, 7.375, rank, data.tab, skin) .. + fs.materials(0.25, 0.1875, meta, skin) .. + fs.separator(0.6875, skin.separator) .. + fs.convert(0.25, 0.875, pos, skin) .. + fs.separator(2.125, skin.separator) .. + fs.inv(0.25, 2.375, skin) + ); + elseif data.tab == 2 then + minetest.show_formspec(player, "cartographer:table", + fs.header(10.25, 8.25, rank, data.tab, skin) .. + fs.materials(0.25, 0.1875, meta, skin) .. + fs.separator(0.6875, skin.separator) .. + fs.craft(0.25, 0.875, pos, rank, meta, skin) .. + fs.separator(3, skin.separator) .. + fs.inv(0.25, 3.25, skin) + ); + elseif data.tab == 3 then + minetest.show_formspec(player, "cartographer:table", + fs.header(10.25, 7.375, rank, data.tab, skin) .. + fs.materials(0.25, 0.1875, meta, skin) .. + fs.separator(0.6875, skin.separator) .. + fs.copy(0.25, 0.875, pos, skin) .. + fs.separator(2.125, skin.separator) .. + fs.inv(0.25, 2.375, skin) + ); + end +end + +-- Called when a player sends input to the server from a formspec +-- This callback handles player input in the table formspec +-- +-- player: The player who sent the input +-- name: The formspec name +-- fields: A table containing the input +minetest.register_on_player_receive_fields(function(player, name, fields) + if name == "cartographer:table" then + local meta = minetest.get_meta(player_tables[player:get_player_name()].pos); + + local rank = 1; + local node_name = minetest.get_node(player_tables[player:get_player_name()].pos).name; + if node_name == "cartographer:standard_table" then + rank = 2; + elseif node_name == "cartographer:advanced_table" then + rank = 3; + end + + if fields["convert"] then + local inv = meta:get_inventory(); + local stack = inv:get_stack("input", 1); + + local value = materials.get_stack_value(stack); + + if value.paper + value.pigment > 0 then + meta:set_int("paper", meta:get_int("paper") + value.paper); + meta:set_int("pigment", meta:get_int("pigment") + value.pigment); + inv:set_stack("input", 1, ItemStack(nil)); + end + elseif fields["craft"] then + local size = meta:get_int("size"); + local detail = meta:get_int("detail"); + local scale = meta:get_int("scale"); + local cost, is_positive = get_craft_material_cost(meta); + + if is_positive and can_afford(cost, meta) then + meta:set_int("paper", meta:get_int("paper") - cost.paper); + meta:set_int("pigment", meta:get_int("pigment") - cost.pigment); + + local inv = meta:get_inventory(); + local stack = inv:get_stack("output", 1); + + if stack:is_empty() then + inv:set_stack("output", 1, map_item.create(size, 1 + detail, scale)); + else + local smeta = stack:get_meta(); + smeta:set_int("cartographer:detail", 1 + detail); + map_item.resize(smeta, size); + map_item.rescale(smeta, scale); + + local map = maps.get(smeta:get_int("cartographer:map_id")); + if map then + map.detail = 1 + detail; + end + inv:set_stack("output", 1, stack); + end + + audio.play_feedback("cartographer_write", player); + end + elseif fields["copy"] and rank >= 2 then + local cost = get_copy_material_cost(meta); + if can_afford(cost, meta) then + meta:set_int("paper", meta:get_int("paper") - cost.paper); + meta:set_int("pigment", meta:get_int("pigment") - cost.pigment); + + audio.play_feedback("cartographer_write", player); + + local inv = meta:get_inventory(); + inv:set_stack("copy_output", 1, map_item.copy(inv:get_stack("copy_input", 1))); + end + elseif fields["1"] then + meta:set_int("detail", 0); + elseif fields["2"] then + meta:set_int("detail", 1); + elseif fields["3"] and rank > 1 then + meta:set_int("detail", 2); + elseif fields["4"] and rank > 2 then + meta:set_int("detail", 3); + elseif fields["1x"] and rank > 1 then + meta:set_int("scale", SCALE_SMALL); + elseif fields["2x"] and rank > 1 then + meta:set_int("scale", SCALE_MEDIUM); + elseif fields["4x"] and rank > 2 then + meta:set_int("scale", SCALE_LARGE); + elseif fields["8x"] and rank > 2 then + meta:set_int("scale", SCALE_HUGE); + elseif fields["tab1"] then + player_tables[player:get_player_name()].tab = 1; + audio.play_feedback("cartographer_turn_page", player); + elseif fields["tab2"] then + player_tables[player:get_player_name()].tab = 2; + audio.play_feedback("cartographer_turn_page", player); + elseif fields["tab3"] and rank >= 2 then + player_tables[player:get_player_name()].tab = 3; + audio.play_feedback("cartographer_turn_page", player); + end + + if not fields["quit"] then + table_formspec(player:get_player_name()); + end + end +end); + +-- Called after a table is placed. Sets up the table's inventory and metadata. +-- +-- pos: The node's position +local function setup_table_node(pos) + local meta = minetest.get_meta(pos); + meta:get_inventory():set_size("input", 1); + meta:get_inventory():set_size("output", 1); + meta:get_inventory():set_size("copy_input", 1); + meta:get_inventory():set_size("copy_output", 1); + + meta:set_int("size", settings.default_size); + meta:set_int("scale", SCALE_SMALL); + meta:set_int("detail", 0); +end + +-- Called when the player tries to put an item into one of the table's +-- inventories. +-- +-- listname: The name of the inventory the item is being placed in. +-- stack: The itemstack +-- +-- Returns 0 if the place is invalid; otherwise, returns the number of items +-- that can be placed. +local function table_can_put(_, listname, _, stack, _) + if listname == "copy_output" then + return 0; + end + + if stack:get_name() ~= "cartographer:map" and (listname == "output" or listname == "copy_input") then + return 0; + end + + return stack:get_count(); +end + +-- Called when the player tries to move an item between two of the table's +-- inventories. +-- +-- to_list: The name of the inventory the item is being placed in. +-- count: The number of items being moved +-- +-- Returns 0 if the move is invalid; otherwise, returns the number of items +-- that can be moved. +local function table_can_move(_, _, _, to_list, _, count, _) + if to_list == "copy_output" then + return 0; + end + + return count; +end + +-- Called when a change occurs in a table's inventory +-- +-- pos: The node's position +-- listname: The name of the changed inventory list +local function table_on_items_changed(pos, listname, _, _, _) + for player, data in pairs(player_tables) do + if vector.equals(pos, data.pos) and ( + (data.tab == 1 and listname == "input") + or (data.tab == 2 and listname == "output") + or (data.tab == 3 and listname == "copy_input")) then + table_formspec(player); + end + end +end + +-- The table node definitions +minetest.register_node("cartographer:simple_table", { + description = "Shabby Cartographer's Table", + drawtype = "mesh", + mesh = gui_skin.table_skins.simple_table.node_mesh, + tiles = { gui_skin.table_skins.simple_table.node_texture }, + paramtype2 = "facedir", + groups = { + choppy = 2, + oddly_breakable_by_hand = 2, + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375}, + }, + }, + on_rightclick = function(_, _, player, _, pointed_thing) + player_tables[player:get_player_name()] = { + pos = minetest.get_pointed_thing_position(pointed_thing), + tab = 1, + }; + + audio.play_feedback("cartographer_open_map", player); + table_formspec(player:get_player_name()) + end, + + after_place_node = setup_table_node, + + allow_metadata_inventory_move = table_can_move, + allow_metadata_inventory_put = table_can_put, + on_metadata_inventory_put = table_on_items_changed, + on_metadata_inventory_take = table_on_items_changed, +}); + +minetest.register_node("cartographer:standard_table", { + description = "Simple Cartographer's Table", + drawtype = "mesh", + mesh = gui_skin.table_skins.standard_table.node_mesh, + tiles = { gui_skin.table_skins.standard_table.node_texture }, + paramtype2 = "facedir", + groups = { + choppy = 2, + oddly_breakable_by_hand = 2, + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375}, + }, + }, + on_rightclick = function(_, _, player, _, pointed_thing) + player_tables[player:get_player_name()] = { + pos = minetest.get_pointed_thing_position(pointed_thing), + tab = 1, + }; + + audio.play_feedback("cartographer_open_map", player); + table_formspec(player:get_player_name()) + end, + + after_place_node = setup_table_node, + + allow_metadata_inventory_move = table_can_move, + allow_metadata_inventory_put = table_can_put, + on_metadata_inventory_put = table_on_items_changed, + on_metadata_inventory_take = table_on_items_changed, +}); + +minetest.register_node("cartographer:advanced_table", { + description = "Advanced Cartographer's Table", + drawtype = "mesh", + mesh = gui_skin.table_skins.advanced_table.node_mesh, + tiles = { gui_skin.table_skins.advanced_table.node_texture }, + paramtype2 = "facedir", + groups = { + choppy = 2, + oddly_breakable_by_hand = 2, + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375}, + }, + }, + on_rightclick = function(_, _, player, _, pointed_thing) + player_tables[player:get_player_name()] = { + pos = minetest.get_pointed_thing_position(pointed_thing), + tab = 1, + }; + + audio.play_feedback("cartographer_open_map", player); + table_formspec(player:get_player_name()) + end, + + after_place_node = setup_table_node, + + allow_metadata_inventory_move = table_can_move, + allow_metadata_inventory_put = table_can_put, + on_metadata_inventory_put = table_on_items_changed, + on_metadata_inventory_take = table_on_items_changed, +}); diff --git a/mods/cartographer/textures/cartographer_advanced_table.png b/mods/cartographer/textures/cartographer_advanced_table.png new file mode 100644 index 0000000..5975247 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_bg.png b/mods/cartographer/textures/cartographer_advanced_table_bg.png new file mode 100644 index 0000000..5310507 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_bg.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_bg_2.png b/mods/cartographer/textures/cartographer_advanced_table_bg_2.png new file mode 100644 index 0000000..870fdbb Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_bg_2.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_button.png b/mods/cartographer/textures/cartographer_advanced_table_button.png new file mode 100644 index 0000000..2a40da2 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_button.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_button_hovered.png b/mods/cartographer/textures/cartographer_advanced_table_button_hovered.png new file mode 100644 index 0000000..bdb6966 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_button_hovered.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_button_pressed.png b/mods/cartographer/textures/cartographer_advanced_table_button_pressed.png new file mode 100644 index 0000000..246226e Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_button_pressed.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_separator.png b/mods/cartographer/textures/cartographer_advanced_table_separator.png new file mode 100644 index 0000000..f586bf0 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_separator.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_slot.png b/mods/cartographer/textures/cartographer_advanced_table_slot.png new file mode 100644 index 0000000..06c08ce Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_slot.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_tab.png b/mods/cartographer/textures/cartographer_advanced_table_tab.png new file mode 100644 index 0000000..11703ca Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_tab.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_tab_hovered.png b/mods/cartographer/textures/cartographer_advanced_table_tab_hovered.png new file mode 100644 index 0000000..5da1ba3 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_tab_hovered.png differ diff --git a/mods/cartographer/textures/cartographer_advanced_table_tab_selected.png b/mods/cartographer/textures/cartographer_advanced_table_tab_selected.png new file mode 100644 index 0000000..9018478 Binary files /dev/null and b/mods/cartographer/textures/cartographer_advanced_table_tab_selected.png differ diff --git a/mods/cartographer/textures/cartographer_cliff.png b/mods/cartographer/textures/cartographer_cliff.png new file mode 100644 index 0000000..281bb4d Binary files /dev/null and b/mods/cartographer/textures/cartographer_cliff.png differ diff --git a/mods/cartographer/textures/cartographer_flat_button.png b/mods/cartographer/textures/cartographer_flat_button.png new file mode 100644 index 0000000..a55b046 Binary files /dev/null and b/mods/cartographer/textures/cartographer_flat_button.png differ diff --git a/mods/cartographer/textures/cartographer_height_button.png b/mods/cartographer/textures/cartographer_height_button.png new file mode 100644 index 0000000..a2202c1 Binary files /dev/null and b/mods/cartographer/textures/cartographer_height_button.png differ diff --git a/mods/cartographer/textures/cartographer_map.png b/mods/cartographer/textures/cartographer_map.png new file mode 100644 index 0000000..afd2f42 Binary files /dev/null and b/mods/cartographer/textures/cartographer_map.png differ diff --git a/mods/cartographer/textures/cartographer_markers_bg.png b/mods/cartographer/textures/cartographer_markers_bg.png new file mode 100644 index 0000000..1f1326c Binary files /dev/null and b/mods/cartographer/textures/cartographer_markers_bg.png differ diff --git a/mods/cartographer/textures/cartographer_paper.png b/mods/cartographer/textures/cartographer_paper.png new file mode 100644 index 0000000..bfe06d4 Binary files /dev/null and b/mods/cartographer/textures/cartographer_paper.png differ diff --git a/mods/cartographer/textures/cartographer_pigment.png b/mods/cartographer/textures/cartographer_pigment.png new file mode 100644 index 0000000..2941b05 Binary files /dev/null and b/mods/cartographer/textures/cartographer_pigment.png differ diff --git a/mods/cartographer/textures/cartographer_player_icon.png b/mods/cartographer/textures/cartographer_player_icon.png new file mode 100644 index 0000000..fbeee59 Binary files /dev/null and b/mods/cartographer/textures/cartographer_player_icon.png differ diff --git a/mods/cartographer/textures/cartographer_simple_cliff.png b/mods/cartographer/textures/cartographer_simple_cliff.png new file mode 100644 index 0000000..82ff79b Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_cliff.png differ diff --git a/mods/cartographer/textures/cartographer_simple_player_icon.png b/mods/cartographer/textures/cartographer_simple_player_icon.png new file mode 100644 index 0000000..81b22d9 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_player_icon.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table.png b/mods/cartographer/textures/cartographer_simple_table.png new file mode 100644 index 0000000..de8dd6a Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_bg.png b/mods/cartographer/textures/cartographer_simple_table_bg.png new file mode 100644 index 0000000..cc464a9 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_bg.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_bg_2.png b/mods/cartographer/textures/cartographer_simple_table_bg_2.png new file mode 100644 index 0000000..8205a55 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_bg_2.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_button.png b/mods/cartographer/textures/cartographer_simple_table_button.png new file mode 100644 index 0000000..4efcac5 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_button.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_button_hovered.png b/mods/cartographer/textures/cartographer_simple_table_button_hovered.png new file mode 100644 index 0000000..dc81ded Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_button_hovered.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_button_pressed.png b/mods/cartographer/textures/cartographer_simple_table_button_pressed.png new file mode 100644 index 0000000..ae14d7a Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_button_pressed.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_separator.png b/mods/cartographer/textures/cartographer_simple_table_separator.png new file mode 100644 index 0000000..c115636 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_separator.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_slot.png b/mods/cartographer/textures/cartographer_simple_table_slot.png new file mode 100644 index 0000000..100113e Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_slot.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_tab.png b/mods/cartographer/textures/cartographer_simple_table_tab.png new file mode 100644 index 0000000..41e8c30 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_tab.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_tab_hovered.png b/mods/cartographer/textures/cartographer_simple_table_tab_hovered.png new file mode 100644 index 0000000..9500961 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_tab_hovered.png differ diff --git a/mods/cartographer/textures/cartographer_simple_table_tab_selected.png b/mods/cartographer/textures/cartographer_simple_table_tab_selected.png new file mode 100644 index 0000000..27618b9 Binary files /dev/null and b/mods/cartographer/textures/cartographer_simple_table_tab_selected.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table.png b/mods/cartographer/textures/cartographer_standard_table.png new file mode 100644 index 0000000..43ff6c9 Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_bg.png b/mods/cartographer/textures/cartographer_standard_table_bg.png new file mode 100644 index 0000000..d5f5cf3 Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_bg.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_bg_2.png b/mods/cartographer/textures/cartographer_standard_table_bg_2.png new file mode 100644 index 0000000..9534008 Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_bg_2.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_separator.png b/mods/cartographer/textures/cartographer_standard_table_separator.png new file mode 100644 index 0000000..a8c3160 Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_separator.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_slot.png b/mods/cartographer/textures/cartographer_standard_table_slot.png new file mode 100644 index 0000000..8daa479 Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_slot.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_tab.png b/mods/cartographer/textures/cartographer_standard_table_tab.png new file mode 100644 index 0000000..17cbfbc Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_tab.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_tab_hovered.png b/mods/cartographer/textures/cartographer_standard_table_tab_hovered.png new file mode 100644 index 0000000..d4ae901 Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_tab_hovered.png differ diff --git a/mods/cartographer/textures/cartographer_standard_table_tab_selected.png b/mods/cartographer/textures/cartographer_standard_table_tab_selected.png new file mode 100644 index 0000000..d86c87d Binary files /dev/null and b/mods/cartographer/textures/cartographer_standard_table_tab_selected.png differ diff --git a/mods/cartographer/textures/cartographer_unknown_biome.1.png b/mods/cartographer/textures/cartographer_unknown_biome.1.png new file mode 100644 index 0000000..bfa3e62 Binary files /dev/null and b/mods/cartographer/textures/cartographer_unknown_biome.1.png differ diff --git a/mods/cartographer/textures/cartographer_unknown_biome.2.png b/mods/cartographer/textures/cartographer_unknown_biome.2.png new file mode 100644 index 0000000..5e0672e Binary files /dev/null and b/mods/cartographer/textures/cartographer_unknown_biome.2.png differ diff --git a/mods/cartographer/textures/cartographer_unknown_biome.3.png b/mods/cartographer/textures/cartographer_unknown_biome.3.png new file mode 100644 index 0000000..57d6462 Binary files /dev/null and b/mods/cartographer/textures/cartographer_unknown_biome.3.png differ diff --git a/mods/cartographer/textures/cartographer_unknown_biome.4.png b/mods/cartographer/textures/cartographer_unknown_biome.4.png new file mode 100644 index 0000000..239f58c Binary files /dev/null and b/mods/cartographer/textures/cartographer_unknown_biome.4.png differ diff --git a/mods/cartographer/util.lua b/mods/cartographer/util.lua new file mode 100644 index 0000000..26a21ea --- /dev/null +++ b/mods/cartographer/util.lua @@ -0,0 +1,11 @@ +return { + -- Get an entry from a list for a given detail level + -- + -- textures: An array of textures + -- detail: The detail level + -- + -- Returns the entry at detail, or the last entry if detail is out-of-bounds + get_clamped = function(textures, detail) + return textures[math.min(detail, #textures)]; + end +}; diff --git a/mods/dye/textures/dye_black.png b/mods/dye/textures/dye_black.png new file mode 100644 index 0000000..1055b6c Binary files /dev/null and b/mods/dye/textures/dye_black.png differ diff --git a/mods/epic/armor.lua b/mods/epic/armor.lua index 08ee72c..598106c 100644 --- a/mods/epic/armor.lua +++ b/mods/epic/armor.lua @@ -38,5 +38,6 @@ dofile(minetest.get_modpath('epic')..'/armor/legendary-amulets.lua') dofile(minetest.get_modpath('epic')..'/armor/legendary-gloves.lua') dofile(minetest.get_modpath('epic')..'/armor/legendary-rings.lua') dofile(minetest.get_modpath('epic')..'/armor/legendary.lua') +dofile(minetest.get_modpath('epic')..'/armor/rings.lua') dofile(minetest.get_modpath('epic')..'/armor/thennium.lua') dofile(minetest.get_modpath('epic')..'/armor/titanium.lua') diff --git a/mods/epic/armor/amulets.lua b/mods/epic/armor/amulets.lua new file mode 100644 index 0000000..e69de29 diff --git a/mods/epic/armor/gloves.lua b/mods/epic/armor/gloves.lua new file mode 100644 index 0000000..e69de29 diff --git a/mods/epic/armor/legendary-amulets.lua b/mods/epic/armor/legendary-amulets.lua index 4744553..d8538a1 100644 --- a/mods/epic/armor/legendary-amulets.lua +++ b/mods/epic/armor/legendary-amulets.lua @@ -1,8 +1,8 @@ --Setting armor_use to 88 should yeild about 1000 uses. armor:register_armor('epic:amulet_of_speed', { - description = 'Amulet of Speed', - inventory_image = 'epic_ring_speed.png', + description = 'Amulet of Speed\n+.75 Speed', + inventory_image = 'epic_amulet_speed.png', texture = 'epic_blank.png', preview = 'epic_blank.png', groups = {armor_amulet=1, armor_use=88, physics_speed=.75, armor_dmg_resist=.5, not_in_creative_inventory=1}, diff --git a/mods/epic/armor/legendary-rings.lua b/mods/epic/armor/legendary-rings.lua index ab61fd5..bded365 100644 --- a/mods/epic/armor/legendary-rings.lua +++ b/mods/epic/armor/legendary-rings.lua @@ -1,7 +1,7 @@ --Setting armor_use to 88 should yeild about 1000 uses. armor:register_armor('epic:ring_of_speed', { - description = 'Ring of Speed', + description = 'Ring of Speed\n+.75 Speed', inventory_image = 'epic_ring_speed.png', texture = 'epic_blank.png', preview = 'epic_blank.png', @@ -11,20 +11,20 @@ armor:register_armor('epic:ring_of_speed', { }) armor:register_armor('epic:ring_of_health', { - description = 'Ring of Health', - inventory_image = 'epic_ring_speed.png', + description = 'Ring of Health\n+10 MaxHP', + inventory_image = 'epic_ring_health.png', texture = 'epic_blank.png', preview = 'epic_blank.png', groups = {armor_ring=1, armor_use=88, armor_dmg_resist=.5, not_in_creative_inventory=1}, armor_groups = {fleshy=1}, damage_groups = {cracky=2, snappy=1, level=3}, on_equip = function(player, index, stack) - maxhp.max_hp_change(player, 5) + maxhp.max_hp_change(player, 10) end, on_unequip = function(player, index, stack) - maxhp.max_hp_change(player, -5) + maxhp.max_hp_change(player, -10) end, on_destroy = function(player, index, stack) - maxhp.max_hp_change(player, -5) + maxhp.max_hp_change(player, -10) end, }) diff --git a/mods/epic/armor/rings.lua b/mods/epic/armor/rings.lua new file mode 100644 index 0000000..2fb56b1 --- /dev/null +++ b/mods/epic/armor/rings.lua @@ -0,0 +1,32 @@ +armor:register_armor('epic:ring00', { + _doc_items_create_entry = false, + description = 'Ring of Lesser Gravity\n-.15 Gravity', + inventory_image = 'epic_ring00.png', + texture = 'epic_blank.png', + preview = 'epic_blank.png', + groups = {armor_ring=1, armor_use=1, physics_gravity=-.15, not_in_creative_inventory=1}, + armor_groups = {fleshy=1}, + damage_groups = {cracky=2, snappy=1, level=3}, +}) + +armor:register_armor('epic:ring01', { + _doc_items_create_entry = false, + description = 'Lesser Ring of Speed\n+.15 Speed', + inventory_image = 'epic_ring01.png', + texture = 'epic_blank.png', + preview = 'epic_blank.png', + groups = {armor_ring=1, armor_use=1, physics_speed=.15, not_in_creative_inventory=1}, + armor_groups = {fleshy=1}, + damage_groups = {cracky=2, snappy=1, level=3}, +}) + +armor:register_armor('epic:ring02', { + _doc_items_create_entry = false, + description = 'Lesser Ring of Jump\n+.2 Jump', + inventory_image = 'epic_ring02.png', + texture = 'epic_blank.png', + preview = 'epic_blank.png', + groups = {armor_ring=1, armor_use=1, physics_jump=.2, not_in_creative_inventory=1}, + armor_groups = {fleshy=1}, + damage_groups = {cracky=2, snappy=1, level=3}, +}) diff --git a/mods/epic/nodes.lua b/mods/epic/nodes.lua index acecdac..21cec26 100644 --- a/mods/epic/nodes.lua +++ b/mods/epic/nodes.lua @@ -17,6 +17,7 @@ minetest.register_node('epic:border', { drawtype = 'airlike', paramtype = 'light', pointable = false, + tiles = {'epic_blank.png'}, groups = {not_in_creative_inventory=1}, }) diff --git a/mods/epic/textures/epic_amulet_speed.png b/mods/epic/textures/epic_amulet_speed.png new file mode 100644 index 0000000..35a529a Binary files /dev/null and b/mods/epic/textures/epic_amulet_speed.png differ diff --git a/mods/epic/textures/epic_ring00.png b/mods/epic/textures/epic_ring00.png new file mode 100644 index 0000000..0148c9f Binary files /dev/null and b/mods/epic/textures/epic_ring00.png differ diff --git a/mods/epic/textures/epic_ring01.png b/mods/epic/textures/epic_ring01.png new file mode 100644 index 0000000..0a33c7e Binary files /dev/null and b/mods/epic/textures/epic_ring01.png differ diff --git a/mods/epic/textures/epic_ring02.png b/mods/epic/textures/epic_ring02.png new file mode 100644 index 0000000..a36ea77 Binary files /dev/null and b/mods/epic/textures/epic_ring02.png differ diff --git a/mods/epic/textures/epic_ring_health.png b/mods/epic/textures/epic_ring_health.png new file mode 100644 index 0000000..87ba635 Binary files /dev/null and b/mods/epic/textures/epic_ring_health.png differ diff --git a/mods/farm_mobs/german_shepherd.lua b/mods/farm_mobs/german_shepherd.lua index 12f6c97..168cfce 100644 --- a/mods/farm_mobs/german_shepherd.lua +++ b/mods/farm_mobs/german_shepherd.lua @@ -1,3 +1,8 @@ +local get_distance = function(a, b) + local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z + return (x * x + y * y + z * z) +end + mobs:register_mob('farm_mobs:german_shepherd', { type = 'animal', passive = false, @@ -52,16 +57,41 @@ mobs:register_mob('farm_mobs:german_shepherd', { -- follow = 'mobs:meat_raw', view_range = 7, fear_height = 2, ---[[ on_rightclick = function(self, clicker) - self.order = 'stand' - --mobs:set_velocity(self, 0) - self.object:set_animation({x = 0, y = 20}, 12, 0, false) - if mobs:feed_tame(self, clicker, 8, true, true) then + on_rightclick = function(self, clicker) + if mobs:protect(self, clicker) then return end + local name = clicker:get_player_name() + local inv = clicker:get_inventory() + local tool = clicker:get_wielded_item() + local item = tool:get_name() + if mobs:feed_tame(self, clicker, 10, false, true) then return end - mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) + if mobs:protect(self, clicker) then return end + if self.owner and self.owner == name then + if self.order == 'follow' then + self.order = 'stand' + minetest.chat_send_player(name, ('Dog holding ground.')) + else + self.order = 'follow' + minetest.chat_send_player(name, ('Dog following you.')) + end + mobs:capture_mob(self, clicker, 20, 0, 100, false, nil) + end + end, + do_custom = function(self, dtime) --Thanks to IhrFussel for many ideas used in this code block. + local pet_pos = self.object:get_pos() + local owner = minetest.get_player_by_name(self.owner) or false + if owner and self.order == 'follow' then --and self.state == "walk + self.dtime = (self.dtime or 0) + dtime + if self.dtime > 5 then + local distance = get_distance(owner:get_pos(), pet_pos) + if distance > 1000 then --should teleport to player + self.object:set_pos(owner:get_pos()) + end + self.dtime = 0 + end + end end, ---]] }) mobs:spawn({ diff --git a/mods/farming/textures/farming_rice.png b/mods/farming/textures/farming_rice.png index 3d64c7e..f7c82ac 100644 Binary files a/mods/farming/textures/farming_rice.png and b/mods/farming/textures/farming_rice.png differ diff --git a/mods/food/recipes.lua b/mods/food/recipes.lua index f4088c6..d97473e 100644 --- a/mods/food/recipes.lua +++ b/mods/food/recipes.lua @@ -28,3 +28,11 @@ minetest.register_craft({ 'farming:rye', } }) + +minetest.register_craft({ + type = 'shapeless', + output = 'food:flour_multigrain', + recipe = { + 'group:food_flour', 'group:food_flour', 'group:food_flour', 'group:food_flour' + } +}) diff --git a/mods/spawn/news.lua b/mods/spawn/news.lua index 8a63a8c..41b89a5 100644 --- a/mods/spawn/news.lua +++ b/mods/spawn/news.lua @@ -1,4 +1,15 @@ local news = { + '8/13/20', + 'Added recipe for white fabric in unified inventory.', + 'New texure for rice, and rice can be threshed into rice grains.', + 'Fixed a wierd bug with sprinting crashing the server.', + '', + '8/9/20', + 'Fixed a crash from the cartographer mod.', + '', + '8/8/20', + 'Added Cartographer mod.', + '', '8/5/20', 'Added a threshing machine to collect seeds from grains.', '', diff --git a/mods/stations/station_threshing.lua b/mods/stations/station_threshing.lua index 82dcb3d..dee9ab6 100644 --- a/mods/stations/station_threshing.lua +++ b/mods/stations/station_threshing.lua @@ -3,6 +3,7 @@ stations.grains['farming:barley'] = true stations.grains['farming:oat'] = true stations.grains['farming:rye'] = true stations.grains['farming:wheat'] = true +stations.grains['farming:rice'] = true local function threshing_formspec(pos) local meta = minetest.get_meta(pos) @@ -75,8 +76,6 @@ minetest.register_node('stations:threshing', { return 0 end return 0 - elseif listname == 'output' then - return 0 else return 0 end diff --git a/mods/stations/station_weaving_loom.lua b/mods/stations/station_weaving_loom.lua index a0736a7..cdd7c95 100644 --- a/mods/stations/station_weaving_loom.lua +++ b/mods/stations/station_weaving_loom.lua @@ -1,3 +1,16 @@ +unified_inventory.register_craft_type('loom', { + description = 'Weaving Loom', + icon = 'stations_loom_icon.png', + width = 1, + height = 1 +}) + +unified_inventory.register_craft({ + type = 'loom', + items = {'farming:string 5'}, + output = 'furniture:fabric_white' +}) + local function loom_formspec(progress) local formspec = 'size[8,8.5]'.. diff --git a/mods/stations/textures/stations_loom_icon.png b/mods/stations/textures/stations_loom_icon.png new file mode 100644 index 0000000..6b213e6 Binary files /dev/null and b/mods/stations/textures/stations_loom_icon.png differ diff --git a/mods/stations/woodworking/misc.lua b/mods/stations/woodworking/misc.lua index 13d4482..9eebdad 100644 --- a/mods/stations/woodworking/misc.lua +++ b/mods/stations/woodworking/misc.lua @@ -4,3 +4,12 @@ stations.dual_register_recipe('woodworking', { }, output = 'compost:wood_barrel', }) + +stations.dual_register_recipe('woodworking', { + input = { + ['group:wood'] = 4, + ['default:paper'] = 1, + ['dye:black'] = 1, + }, + output = 'cartographer:simple_table', +})