diff --git a/LICENSE b/LICENSE
index b6eb4b8c89..94a9ed024d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,674 @@
-MIT License
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
-Copyright (c) 2017 Anton Kramskoi
+ 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.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+ Preamble
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+ 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.
+
+
+ Copyright (C)
+
+ 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:
+
+ Copyright (C)
+ 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/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties
index 178741165e..d16d893c16 100644
--- a/core/assets/bundles/bundle.properties
+++ b/core/assets/bundles/bundle.properties
@@ -38,6 +38,7 @@ text.server.kicked.invalidPassword=Invalid password!
text.server.kicked.clientOutdated=Outdated client! Update your game!
text.server.kicked.serverOutdated=Outdated server! Ask the host to update!
text.server.kicked.banned=You are banned on this server.
+text.server.kicked.recentKick=You have been kicked recently.\nWait before connecting again.
text.server.connected={0} has joined.
text.server.disconnected={0} has disconnected.
text.nohost=Can't host server on a custom map!
@@ -262,7 +263,7 @@ setting.sensitivity.name=Controller Sensitivity
setting.saveinterval.name=Autosave Interval
setting.seconds={0} Seconds
setting.fullscreen.name=Fullscreen
-setting.multithread.name=Multithreading [scarlet](unstable!)
+setting.multithread.name=Multithreading
setting.fps.name=Show FPS
setting.vsync.name=VSync
setting.lasers.name=Show Power Lasers
diff --git a/core/assets/bundles/bundle_uk_UA.properties b/core/assets/bundles/bundle_uk_UA.properties
new file mode 100644
index 0000000000..0630b6e4bc
--- /dev/null
+++ b/core/assets/bundles/bundle_uk_UA.properties
@@ -0,0 +1,500 @@
+text.about = Створено [ROYAL] Anuken. []\nСпочатку запис у [orange] GDL [] MM Jam.\nТворці:\n- SFX зроблено з [YELLOW] bfxr []\n- Музика зроблена [GREEN] RoccoW [] / Знайдено на [lime] FreeMusicArchive.org [] \nОсоблива подяка:\n- [coral] MitchellFJN []: екстенсивне тестування та відгуки\n- [sky] Luxray5474 []: робота з вікі, вклади коду\n- Всі бета-тестери на itch.io та Google Play\n
+text.discord = Приєднуйтесь до нашого Discord!
+text.changes = [SCARLET] Увага! \n[] Деякі важливі механіки гри були змінені.\n- [accent] Телепорти [] тепер використовують електроенергію. \n- [accent] Домінна піч [] та [accent] Тиглі [] тепер мають ліміт. \n- [accent] Тиглі [] зараз вимагають вугілля як паливо.
+text.gameover = Ядро було зруйновано.
+text.highscore = [YELLOW] Новий рекорд!
+text.lasted = Ви тримались до хвилі
+text.level.highscore = Рекорд: [accent] {0}
+text.level.delete.title = Підтвердьте видалення
+text.level.delete = Ви впевнені, що хочете видалити карту \"[orange] {0} \"?
+text.level.select = Вибір рівня
+text.level.mode = Ігровий режим
+text.savegame = Зберегти гру
+text.loadgame = Завантажити гру
+text.joingame = Приєднатися\nдо гри
+text.newgame=Нова гра
+text.quit = Вийти
+text.about.button = Про
+text.name = Назва:
+text.public = Публічний
+text.players = {0} гравців онлайн
+text.server.player.host = {0} (host)
+text.players.single = {0} гравців онлайн
+text.server.mismatch = Пакетна помилка: невідповідність версії версії клієнта / сервера. Переконайтеся, що ви та хост мають останню версію Mindustry!
+text.server.closing = [accent] Закриття сервера ...
+text.server.kicked.kick = Ви були вигнані з сервера!
+text.server.kicked.invalidPassword = Невірний пароль!
+text.server.kicked.clientOutdated = Застарілий клієнт! Оновіть свою гру!
+text.server.kicked.serverOutdated = Застарілий сервер! Попросіть хост оновити!
+text.server.connected = {0} приєднався.
+text.server.disconnected = {0} від'єднано.
+text.nohost = Неможливо розмістити сервер на власній карті!
+text.hostserver = Хост-сервер
+text.host = Хост
+text.hosting = [accent] Відкриття сервера ...
+text.hosts.refresh = Оновити
+text.hosts.discovering = Знайомство з мережевими іграми
+text.server.refreshing = Оновити сервери
+text.hosts.none = [lightgray] Ніяких ігор у мережі не знайдено!
+text.host.invalid = [scarlet] Неможливо підключитися до хосту.
+text.server.friendlyfire = Дружній вогонь
+text.server.add = Додати сервер
+text.server.delete = Ви впевнені, що хочете видалити цей сервер?
+text.server.hostname = Хост: {0}
+text.server.edit = Редагувати сервер
+text.joingame.byip = [] Приєднатися по IP ...[]
+text.joingame.title = Приєднатися до гри
+text.joingame.ip = IP
+text.disconnect = Роз'єднано
+text.connecting = [accent] Підключення ...
+text.connecting.data = [accent] Завантаження світових даних ...
+text.connectfail = [crimson] Не вдалося підключитися до сервера: [orange] {0}
+text.server.port = Порт
+text.server.addressinuse = Адреса вже використовується!
+text.server.invalidport = Недійсний номер порту.
+text.server.error = [crimson] Помилка хостингу сервера: [orange] {0}
+text.tutorial.back = < Попер.
+text.tutorial.next = Далі >
+text.save.new = Нове збереження
+text.save.overwrite = Ви впевнені, що хочете перезаписати цей слот для збереження?
+text.overwrite = Перезаписати
+text.save.none = Не знайдено жодних збережень!
+text.saveload = [accent] Збереження ...
+text.savefail = Не вдалося зберегти гру!
+text.save.delete.confirm = Ви впевнені, що хочете видалити це збереження?
+text.save.delete = Видалити
+text.save.export = Експорт збереження
+text.save.import.invalid = [orange] Це збереження недійсне!
+text.save.import.fail = [crimson] Не вдалося імпортувати збереження: [orange] {0}
+text.save.export.fail = [crimson] Не вдалося експортувати збереження: [orange] {0}
+text.save.import = Імпортувати збереження
+text.save.newslot = Назва збереження:
+text.save.rename = Переіменувати
+text.save.rename.text = Нова назва:
+text.selectslot = Виберіть збереження.
+text.slot = [accent] слот {0}
+text.save.corrupted = [orange] Збережений файл пошкоджений або він невірний!
+text.empty = <порожньо>
+text.on = Увімкнути
+text.off = Вимкнути
+text.save.autosave = Автозбереження: {0}
+text.save.map = Карта
+text.save.wave = Хвиля {0}
+text.save.difficulty = Складність
+text.save.date = Останнє збережено: {0}
+text.confirm = Підтвердити
+text.delete = Видалити
+text.ok = ОК
+text.open = Відкрити
+text.cancel = Скасувати
+text.openlink = Відкрити посилання
+text.back = Назад
+text.quit.confirm = Ти впевнений що хочеш піти?
+text.loading = [accent] Завантаження ...
+text.wave = [orange] хвиля {0}
+text.wave.waiting = Хвиля через {0}
+text.waiting = Очікування…
+text.enemies = {0} Вороги
+text.enemies.single = Противник
+text.loadimage = Завантажити зображення
+text.saveimage = Зберегти зображення
+text.oregen = Генерація руд
+text.editor.badsize = [orange] Недійсні розміри зображення! [] Дійсні розміри карти: {0}
+text.editor.errorimageload = Помилка завантаження файлу зображень: [orange] {0}
+text.editor.errorimagesave = Помилка збереження файлу зображення: [orange] {0}
+text.editor.generate = Генератор
+text.editor.resize = Змінити розмір
+text.editor.loadmap = // Завантажити карту
+text.editor.savemap = Зберегти карту
+text.editor.loadimage = Завантажити зображення
+text.editor.saveimage = Зберегти зображення
+text.editor.unsaved = [scarlet] У вас є незбережені зміни! [] Ви впевнені, що хочете вийти?
+text.editor.brushsize = Розмір пензля: {0}
+text.editor.noplayerspawn = Ця карта не має ігрового поля для гравця!
+text.editor.manyplayerspawns = Карти не можуть мати більше одного ігрового поля для гравців!
+text.editor.manyenemyspawns = Не може бути більше ніж {0} ворожих точок!
+text.editor.resizemap = Змінити розмір карти
+text.editor.resizebig = [scarlet] Попередження! [] Карти, розмір яких перевищує 256 одиниць, можуть виснути і можуть бути нестабільними.
+text.editor.mapname = Назва карти:
+text.editor.overwrite = [accent] Попередження! Це перезаписує існуючу карту.
+text.editor.failoverwrite = [crimson] Неможливо перезаписати карту за замовчуванням!
+text.editor.selectmap = Виберіть карту для завантаження:
+text.width = Ширина
+text.height = Висота
+text.randomize = Рандомізувати
+text.apply = Застосувати
+text.update = Оновити
+text.menu = Меню
+text.play = Відтворити
+text.load = Завантаження
+text.save = Зберегти
+text.language.restart = Будь ласка, перезапустіть свою гру, щоб налаштування мови набули чинності.
+text.settings.language = Мова
+text.settings = Налаштування
+text.tutorial = Навчальний\nпосібник
+text.editor = Редактор
+text.mapeditor = Редактор карт
+text.donate = Підтримати проект
+text.settings.reset = Скинути до стандартних
+text.settings.controls = Елементи управління
+text.settings.game = Гра
+text.settings.sound = Звук
+text.settings.graphics = Графіка
+text.upgrades = Оновлення
+text.purchased = [LIME] Створено!
+text.weapons = Зброя
+text.paused = Пауза
+text.respawn = Відновлення за
+text.info.title = [accent] інформація
+text.error.title = [crimson] Виникла помилка
+text.error.crashmessage = [SCARLET] Виникла несподівана помилка, що призвела до збою. [] Будь ласка, повідомте про конкретні обставини, розробнику: [ORANGE] anukendev@gmail.com []
+text.error.crashtitle = Виникла помилка
+text.mode.break = Режим зносу: {0}
+text.mode.place = Режим будівництва: {0}
+placemode.hold.name = Лінія
+placemode.areadelete.name = Площа
+placemode.touchdelete.name = Дотик
+placemode.holddelete.name = Утримування.
+placemode.none.name = (None)
+placemode.touch.name = Дотик
+placemode.cursor.name = курсор
+text.blocks.extrainfo = [accent] додатковий інформаційний блок:
+text.blocks.blockinfo = Блокування інформації
+text.blocks.powercapacity = Потужність
+text.blocks.powershot = Потужність / постріл
+text.blocks.powersecond = Потужність / секунда
+text.blocks.powerdraindamage = Потужність дренажу / пошкодження
+text.blocks.shieldradius = Радіус щита
+text.blocks.itemspeedsecond = Швидкість / секунда
+text.blocks.range = Радіус
+text.blocks.size = Розмір
+text.blocks.powerliquid = Потужність / Рідина
+text.blocks.maxliquidsecond = Макс. Рідина / секунда
+text.blocks.liquidcapacity = Ємкість рідини
+text.blocks.liquidsecond = Рідина / секунда
+text.blocks.damageshot = Пошкодження / постріл
+text.blocks.ammocapacity = Місткість боєприпасів
+text.blocks.ammo = Набої
+text.blocks.ammoitem = Боєприпаси / предмет
+text.blocks.maxitemssecond = Макс. Елементи / секунду
+text.blocks.powerrange = Радіус потужності
+text.blocks.lasertilerange = Радіус лазерних плиток
+text.blocks.capacity = Ємкість
+text.blocks.itemcapacity = Ємкість предмету
+text.blocks.maxpowergenerationsecond = Максимальна потужність / секунда
+text.blocks.powergenerationsecond = Потужність / секунда
+text.blocks.generationsecondsitem = Генерація за секунду / предмет
+text.blocks.input = Ввід
+text.blocks.inputliquid = Ввід речовини
+text.blocks.inputitem = Вхідний матеріал
+text.blocks.output = Вивід
+text.blocks.secondsitem = Секунда / предмет
+text.blocks.maxpowertransfersecond = Максимальна передача потужності / секунда
+text.blocks.explosive = Вибухонебезпечний!
+text.blocks.repairssecond = Ремонт / секунда
+text.blocks.health = Здоров'я
+text.blocks.inaccuracy = Неточність
+text.blocks.shots = Постріли
+text.blocks.shotssecond = Постріли / секунду
+text.blocks.fuel = Паливо:
+text.blocks.fuelduration = Тривалість палива
+text.blocks.maxoutputsecond = Макс. Вихід / секунду
+text.blocks.inputcapacity = Вхідна ємність
+text.blocks.outputcapacity = Випускна ємність
+text.blocks.poweritem = Потужність / виріб
+text.placemode = Місцевий режим
+text.breakmode = Перерваний режим
+text.health = Здоров'я
+setting.difficulty.easy = Легкий
+setting.difficulty.normal = Нормальний
+setting.difficulty.hard = Важкий
+setting.difficulty.insane = Божевільний
+setting.difficulty.purge = Очистити
+setting.difficulty.name = Складність
+setting.screenshake.name = Тряска екрана
+setting.smoothcam.name = Гладка камера
+setting.indicators.name = Індикатори ворога
+setting.effects.name = Ефекти відображення
+setting.sensitivity.name = Чутливість контролера
+setting.saveinterval.name = Інтервал автозбереження
+setting.seconds = {0} секунд
+setting.fullscreen.name = Повноекранний
+setting.multithread.name = Багатопотоковий [scarlet] (нестабільний!)
+setting.fps.name = Показати FPS
+setting.vsync.name = VSunc
+setting.lasers.name = Показати енергетичні лазери
+setting.healthbars.name = Показати здоров'я
+setting.pixelate.name = Пікселяція екрану
+setting.musicvol.name = Гучність музики
+setting.mutemusic.name = Вимкнути музику
+setting.sfxvol.name = Гучність ефектів
+setting.mutesound.name = Вимкнути звук
+map.maze.name = Лабіринт
+map.fortress.name = Фортеця
+map.sinkhole.name = Свердловина
+map.caves.name = Печери
+map.volcano.name = Вулкан
+map.caldera.name = Кальдера
+map.scorch.name = Мертва земля
+map.desert.name = Пустеля
+map.island.name = Острів
+map.grassland.name = Пасовища
+map.tundra.name = Тундра
+map.spiral.name = Спіраль
+map.tutorial.name = Навчання
+tutorial.intro.text = [yellow] Ласкаво просимо до підручника. [] Для початку натисніть \"далі\".
+tutorial.moveDesktop.text = Для переміщення використовуйте клавіші [orange] [[WASD] []. Утримуйте [orange] SHIFT[], для прискорення. Утримуйте [orange] CTRL [], використовуючи [orange] колесо прокручування [] для збільшення або зменшення.
+tutorial.shoot.text = Використовуйте мишу, щоб націлитись, утримуйте [orange] ліву кнопку миші [], щоб стріляти. Попрактикуйтесь на [yellow] мішені [].
+tutorial.moveAndroid.text = Щоб перетягнути панораму, перетягніть один палець по екрану. Використовуйте два пальця, щоб збільшити чи зменшити маштаб.
+tutorial.placeSelect.text = Спробуйте вибрати [yellow] конвеєр [] у меню блоку внизу справа.
+tutorial.placeConveyorDesktop.text = Використовуйте [orange] [[колесико миші] [], щоб повернути конвеєр [orange] вперед [], а потім помістіть його в [yellow] позначене місце [], використовуючи [orange] [[ліву кнопку миші] [].
+tutorial.placeConveyorAndroid.text = Використовуйте [orange] [[кнопку оберту] [], щоб обернути конвеєр [оранжевий] вперед [], перетягуйте його одним пальцем, а потім помістіть його в [yellow] позначене місце [], використовуючи [orange] [[галочка][].
+tutorial.placeConveyorAndroidInfo.text = Крім того, ви можете натиснути піктограму перехрестя внизу ліворуч, щоб переключитися на [orange] [[сенсорний режим]] [], і помістити блоки, натиснувши на екран. У сенсорному режимі блоки можна повертати зі стрілкою внизу ліворуч. Натисніть [yellow] наступний [], щоб спробувати.
+tutorial.placeDrill.text = Тепер виберіть та розмістіть [yellow] кам'яне свердло [] у зазначеному місці.
+tutorial.blockInfo.text = Якщо ви хочете дізнатись більше про блок, ви можете торкнутися [orange] знак питання [] у верхньому правому куті, щоб прочитати його опис.
+tutorial.deselectDesktop.text = Ви можете вимкнути блок, використовуючи [orange] [[клацання правою кнопкою миші] [].
+tutorial.deselectAndroid.text = Ви можете скасувати вибір блоку, натиснувши кнопку [orange] X [].
+tutorial.drillPlaced.text = Дриль тепер видобуває [yellow] камінь, [] та виведе його на конвеєр, а потім переміщає його в [yellow] ядро [].
+tutorial.drillInfo.text = Різні руди потребують різних дрилі. Камінь вимагає кам'яні свердла, залізо вимагає залізні свердла та ін
+tutorial.drillPlaced2.text = Переміщення елементів у ядро вказує їх у ваш [yellow] предметний інвентар [] у верхньому лівому куті. Розміщення блоків використовує предмети з вашого інвентарю.
+tutorial.moreDrills.text = Ви можете пов'язати багато свердлів і конвеєрів разом в одну гілку конвеєра.
+tutorial.deleteBlock.text = Ви можете видалити блоки, натиснувши правою клавішею [orange] правою кнопкою миші [] по блоці, який ви хочете видалити. Спробуйте видалити цей конвеєр.
+tutorial.deleteBlockAndroid.text = Ви можете видалити блоки за допомогою [orange], перехрестя [] в меню [mode] зламу [orange] у нижньому лівому куті та натиснувши на блок. Спробуйте видалити цей конвеєр.
+tutorial.placeTurret.text = Тепер виділіть та розмістіть [yellow] турель [] у [yellow] позначеному місці [].
+tutorial.placedTurretAmmo.text = Ця турель тепер приймає [yellow] боєприпас [] з конвеєра. Ви можете побачити, скільки боєприпасів вона має, натискаючи на неї і перевіряючи [green] зелену полоску [].
+tutorial.turretExplanation.text = Турелі будуть автоматично стріляти у найближчого ворога, якщо вони мають достатню кількість боєприпасів.
+tutorial.waves.text = Кожні [yellow] 60 [] секунд, хвиля [coral] ворогів [] буде виникати в певних місцях і намагатися знищити ядро.
+tutorial.coreDestruction.text = Ваша мета полягає в тому, щоб [yellow] захищати ядро []. Якщо ядро знищено, ви [coral] програєте[].
+tutorial.pausingDesktop.text = Якщо вам коли-небудь потрібно зробити перерву, натисніть кнопку [orange] паузи [] у верхньому лівому куті або на кнопку [orange] пропуск [], щоб призупинити гру. Ви можете вибрати і розмістити блоки під час призупинення, але не можете переміщатися чи стріляти.
+tutorial.pausingAndroid.text = Якщо вам коли-небудь потрібно зробити перерву, натисніть кнопку [orange] пауза [] у верхньому лівому куті, щоб призупинити гру. Ти можеш ще знищувати та будувати блоки під час призупинення.
+tutorial.purchaseWeapons.text = Ви можете придбати нову [yellow] зброю [] для вашого механізму, відкривши меню оновлення в лівому нижньому кутку.
+tutorial.switchWeapons.text = Перемикати зброю будь-яким натисканням його піктограми внизу ліворуч або за допомогою цифр [orange] [[1-9] [].
+tutorial.spawnWave.text = Ось хвиля зараз. Знищи їх
+tutorial.pumpDesc.text = У пізніших хвилях, можливо, доведеться використовувати [yellow] насоси [] для розподілу рідин для генераторів або екстракторів.
+tutorial.pumpPlace.text = Насоси працюють аналогічно свердлам, за винятком того, що вони виробляють рідини замість предметів. Спробуйте встановити насос на [yellow] призначене мастило [].
+tutorial.conduitUse.text = Тепер покладіть [orange] трубопровід [], віддаляючись від насоса.
+tutorial.conduitUse2.text = І ще кілька ...
+tutorial.conduitUse3.text = І ще кілька ...
+tutorial.generator.text = Тепер, помістіть блок [orange] базовий генератор енергії [] в кінці каналу.
+tutorial.generatorExplain.text = Цей генератор тепер створить [yellow] енергію [] від масла.
+tutorial.lasers.text = Потужність розподіляється за допомогою [yellow] лазерів потужності []. Поверніть і помістіть його тут.
+tutorial.laserExplain.text = Тепер генератор переведе енергію в лазерний блок. Промінь [yellow] непрозорий [] означає, що в даний час він передає потужність, а промінь [yellow] прозорий [] означає, що це не так.
+tutorial.laserMore.text = Ви можете перевірити, скільки енергії в блоку, наведіть курсор миші на нього і перевірте [yellow] жовту стрічку [] у верхній частині екрана.
+tutorial.healingTurret.text = Цей лазер може бути використаний для живлення турелі для ремонту [lime] []. Помістіть одну тут.
+tutorial.healingTurretExplain.text = Поки вона має енергію, ця турель може [lime] відремонтувати блоки. [] Під час гри постарайтеся збудувати одну таку чим швидше!
+tutorial.smeltery.text = Для багатьох блоків потрібна [orange] сталь [], для цього потрібна[orange] доминна піч [] . Місце тут.
+tutorial.smelterySetup.text = Ця піч буде тепер виробляти [orange] сталь [] із вхідного заліза, використовуючи вугілля як паливо.
+tutorial.tunnelExplain.text = Також зауважте, що елементи проходять через [yellow] тунельний блок [] і з'являються з іншого боку, проходячи через кам'яний блок. Майте на увазі, що тунелі можуть проходити лише до 2 блоків.
+tutorial.end.text = Ви завершили підручник! Удачі!
+text.keybind.title = Ключ перемотки
+keybind.move_x.name = move_x
+keybind.move_y.name = move_y
+keybind.select.name = Вибрати
+keybind.break.name = {0}break{/0}{1}; {/1}
+keybind.shoot.name = Постріл
+keybind.zoom_hold.name = zoom_hold
+keybind.zoom.name = Збільшити
+keybind.block_info.name = Інформація про блок
+keybind.menu.name = Меню
+keybind.pause.name = Пауза
+keybind.dash.name = Тире
+keybind.chat.name = Чат
+keybind.player_list.name = Список гравців
+keybind.console.name = // Консоль 1
+keybind.rotate_alt.name = rotate_alt
+keybind.rotate.name = Повернути
+keybind.weapon_1.name = Зброя!
+keybind.weapon_2.name = Зброя!
+keybind.weapon_3.name = Зброя!
+keybind.weapon_4.name = Зброя!
+keybind.weapon_5.name = Зброя!
+keybind.weapon_6.name = Зброя!
+mode.waves.name = Хвилі
+mode.sandbox.name = Пісочниця
+mode.freebuild.name = Вільний режим
+upgrade.standard.name = Стандартний
+upgrade.standard.description = Стандартний механ.
+upgrade.blaster.name = Бластер
+upgrade.blaster.description = Стріляє повільно, слабкі кулі.
+upgrade.triblaster.name = Трипластер
+upgrade.triblaster.description = Вистрілює 3 кулі в розповсюдженні.
+upgrade.clustergun.name = Касетна гармата
+upgrade.clustergun.description = Вистрілює неточними вибуховими гранатами.
+upgrade.beam.name = Пушечна гармата
+upgrade.beam.description = Вистрілює далекобійним,пробірний лазерний промінь.
+upgrade.vulcan.name = Вулкан
+upgrade.vulcan.description = Вистрілює шквал швидких куль.
+upgrade.shockgun.name = Шок-пушка
+upgrade.shockgun.description = Стріляє руйнівним вибухом заряженої шрапнелі.
+item.stone.name = Камінь
+item.iron.name = Залізо
+item.coal.name = Вугівалля
+item.steel.name = Сталь
+item.titanium.name = Титан
+item.dirium.name = Дириум
+item.uranium.name = Уран
+item.sand.name = Пісок
+liquid.water.name = Вода
+liquid.plasma.name = Плазма
+liquid.lava.name = Лава
+liquid.oil.name = Нафта
+block.weaponfactory.name = Фабрика зброї
+block.weaponfactory.fulldescription = Використовується для створення зброї для гравця mech. Натисніть, щоб використати. Автоматично приймає ресурси з основного ядра.
+block.air.name = Повітря
+block.blockpart.name = Блокчастина
+block.deepwater.name = Глибока вода
+block.water.name = Вода
+block.lava.name = Лава
+block.oil.name = Нафта
+block.stone.name = Камінь
+block.blackstone.name = Чорний камінь
+block.iron.name = Залізо
+block.coal.name = Вугілля
+block.titanium.name = Титан
+block.uranium.name = Уран
+block.dirt.name = Бруд
+block.sand.name = Пісок
+block.ice.name = Лід
+block.snow.name = Сніг
+block.grass.name = Трава
+block.sandblock.name = Блок піску
+block.snowblock.name = Блок снігу
+block.stoneblock.name = Блок камню
+block.blackstoneblock.name = Блок чорного камню
+block.grassblock.name = Блок бруду
+block.mossblock.name = Моссблок
+block.shrub.name = Чагарник
+block.rock.name = Камень
+block.icerock.name = Ледяний камень
+block.blackrock.name = Чорний камінь
+block.dirtblock.name = Блок землі
+block.stonewall.name = Кам'яна стіна
+block.stonewall.fulldescription = Недорогий захисний блок. Корисно для захисту ядра та турелі в перші кілька хвиль.
+block.ironwall.name = Залізна стіна
+block.ironwall.fulldescription = Основний захисний блок. Забезпечує захист від ворогів.
+block.steelwall.name = Сталева стіна
+block.steelwall.fulldescription = Стандартний захисний блок. адекватний захист від ворогів.
+block.titaniumwall.name = Титанова стіна
+block.titaniumwall.fulldescription = Сильний захисний блок. Забезпечує захист від ворогів.
+block.duriumwall.name = Діріумова стіна
+block.duriumwall.fulldescription = Дуже сильний захисний блок. Забезпечує захист від ворогів.
+block.compositewall.name = Композитна стіна
+block.steelwall-large.name = Велика сталева стіна
+block.steelwall-large.fulldescription = Стандартний захисний блок. Поєднує в собі кілька блоків.
+block.titaniumwall-large.name = Велика титанова стіна
+block.titaniumwall-large.fulldescription = Сильний захисний блок. Поєднує в собі кілька блоків.
+block.duriumwall-large.name = Велика дирмітова стіна
+block.duriumwall-large.fulldescription = Дуже сильний захисний блок.Поєднує в собі кілька блоків.
+block.titaniumshieldwall.name = Стіна з щитом
+block.titaniumshieldwall.fulldescription = Сильний захисний блок з додатковим вбудованим щитом. Потрібна енергія. Використовує енергію для поглинання ворожих куль. Рекомендується використовувати силові пристосування для забезпечення енергії цього блоку.
+block.repairturret.name = Ремонтна турель
+block.repairturret.fulldescription = Ремонтує недалекі пошкодженні блоки.Повільний темп. Використовує невелику кількість енергії.
+block.megarepairturret.name = Ремонтна турель II
+block.megarepairturret.fulldescription = Ремонтує недалекі пошкодженні блоки.Збільшений радіус та швидший темп ремонту . Використовує багато енергії.
+block.shieldgenerator.name = Генератор щиту
+block.shieldgenerator.fulldescription = Передовий захисний блок. Захищає всі блоки в радіусі від нападу. Не вкористовує енергію при бездіяльності, але швидко витрачає енергію на захист від куль.
+block.door.name = Двері
+block.door.fulldescription = Блок, який можна відкрити та закрити, торкнувшись його.
+block.door-large.name = Великі двері
+block.door-large.fulldescription = Блок, який можна відкрити та закрити, торкнувшись його.
+block.conduit.name = Трубопровід
+block.conduit.fulldescription = Основний транспортний блок. Працює як конвеєр, але з рідинами. Найкраще використовується з насосами або іншими трубопроводами. Може використовуватися як міст через рідини для ворогів та гравців.
+block.pulseconduit.name = Імпульсний канал
+block.pulseconduit.fulldescription = Покращенний блок перевезення рідин. Транспортує рідини швидше і зберігає більше стандартних каналів.
+block.liquidrouter.name = маршрутизатор для рідини
+block.liquidrouter.fulldescription = Працює аналогічно маршрутизатору. Приймає рідину ввід з одного боку і виводить його на інші сторони. Корисний для розщеплення рідини з одного каналу на кілька інших трубопроводів.
+block.conveyor.name = Конвеєр
+block.conveyor.fulldescription = Базовий транспортний блок. Переміщує предмети вперед і автоматично вкладає їх у турелі або ремісники. Поворотний Може використовуватися як міст через рідину для ворогів та гравців.
+block.steelconveyor.name = Сталевий конвеєр
+block.steelconveyor.fulldescription = Розширений блок транспортування предметів. Переміщення елементів швидше, ніж стандартні конвеєри.
+block.poweredconveyor.name = Імпульсний конвеєр
+block.poweredconveyor.fulldescription = Кінцевий транспортний блок. Переміщення елементів швидше, ніж сталеві конвеєри.
+block.router.name = Маршрутизатор
+block.router.fulldescription = Приймає елементи з одного напрямку і виводить їх на 3 інших напрямках. Можна також зберігати певну кількість предметів. Використовується для розщеплення матеріалів з одного свердла на декілька башточок.
+block.junction.name = Міст
+block.junction.fulldescription = Виступає як міст для двох перехресних конвеєрних стрічок. Корисне у ситуаціях з двома різними конвеєрами, що несуть різні матеріали в різних місцях.
+block.conveyortunnel.name = Конвеєрний тунель
+block.conveyortunnel.fulldescription = Транспортує предмети під блоками. Щоб використати, помістіть один тунель, що веде у блок, щоб бути підсвіченим, а один - з іншого боку. Переконайтеся, що обидва тунелі стикаються з протилежними напрямками, тобто до блоків, які вони вводять або виводять.
+block.liquidjunction.name = Міст для рідини
+block.liquidjunction.fulldescription = Діє як міст для двох перехресних трубопроводів. Корисно в ситуаціях з двома різними трубами, що несуть різні рідини в різних місцях.
+block.liquiditemjunction.name = Перехрестя рідкого пункту
+block.liquiditemjunction.fulldescription = Виступає як міст для перетину трубопроводів і конвеєрів.
+block.powerbooster.name = Підсилювач потужності
+block.powerbooster.fulldescription = Поширює енергію на всі блоки в межах його радіуса.
+block.powerlaser.name = Енергетичний лазер
+block.powerlaser.fulldescription = Створює лазер, який передає енергію блоку перед ним. Не створює жодної сили сама. Найкраще використовується з генераторами або іншими лазерами.
+block.powerlaserrouter.name = Лазерний маршрутизатор
+block.powerlaserrouter.fulldescription = Лазер, який розподіляє енергію у три напрямки одночасно. Корисно в ситуаціях, коли потрібно живити кілька блоків від одного генератора.
+block.powerlasercorner.name = Лазерний кут
+block.powerlasercorner.fulldescription = Лазер, який розподіляє енергію одночасно на два напрямки. Корисно в ситуаціях, коли потрібно живити кілька блоків від одного генератора, а маршрутизатор неточний.
+block.teleporter.name = Телепорт
+block.teleporter.fulldescription = Продвинутий блок транспортування предметів.Щоб телепортувати предмети з одного місця в інше потрібно збудувати 2 телепорти і назначити на них одинаковий колір. Використовує енергію. Натисніть, щоб змінити колір.
+block.sorter.name = Сортувальник
+block.sorter.fulldescription = Сортує предмети за типом матеріалу. Матеріал для прийняття позначається кольором у блоці. Всі елементи, що відповідають матеріалу сортування, виводяться вперед, а все інше виводить ліворуч і праворуч.
+block.core.name = Ядро
+block.pump.name = Насос
+block.pump.fulldescription = Насоси рідини з вихідного блоку - зазвичай вода, лава чи олія. Виводить рідину в сусідні трубопроводи.
+block.fluxpump.name = Флюсовий насос
+block.fluxpump.fulldescription = Розширений варіант насоса. Зберігає більше рідини та перекачує швидше.
+block.smelter.name = Плавильня
+block.smelter.fulldescription = Основний ремісничий блок. Коли вводиться 1 залізо та 1 вугілля в якості палива, виводить одну сталь. Рекомендується вводити залізо та вугілля на різних поясах, щоб запобігти засміченню.
+block.crucible.name = Тигель
+block.crucible.fulldescription = Розширений блок обробки. При введенні 1 титану, 1 сталі та 1 вугілля в якості пального, виводить один дирний. Рекомендується вводити вугілля, сталь та титан на різних поясах, щоб запобігти засміченню.
+block.coalpurifier.name = вугільний екстрактор
+block.coalpurifier.fulldescription = Основний екстрактор. Виходить вугілля при постачанні великої кількості води та каменю.
+block.titaniumpurifier.name = Титановий екстрактор
+block.titaniumpurifier.fulldescription = Стандартний блок екстрактора. Виходить титан при постачанні великої кількості води та заліза.
+block.oilrefinery.name = Нафтопереробний завод
+block.oilrefinery.fulldescription = Очищує велику кількість нафти і перетворює на вугілля. Корисний для заправки вугільних башточок, коли вугільні родовища є дефіцитними.
+block.stoneformer.name = Кам'янний екстрактор
+block.stoneformer.fulldescription = Здавлюється рідка лава в камінь. Корисно для виготовлення великої кількості каменю для очищувачів вугілля.
+block.lavasmelter.name = Лавовий завод
+block.lavasmelter.fulldescription = Використовує лаву для перетворення залізо на сталь. Альтернатива плавильні. Корисно в ситуаціях, коли вугілля є дефіцитним.
+block.stonedrill.name = Кам'янна свердловина
+block.stonedrill.fulldescription = Основна свердловина.Розміщюється на кам'яній плитці виводить камінь повільними темпами.
+block.irondrill.name = Залізна свердловина
+block.irondrill.fulldescription = Базова свердловина.Розміщюється на родовищі залізної руди, випускає залізо в повільному темпі.
+block.coaldrill.name = Вугільна свердловина
+block.coaldrill.fulldescription = Базова свердловина.Розміщюється на родовищі вугільної руди ,видобуває вугілля повільними темпами.
+block.uraniumdrill.name = Уранова свердловина
+block.uraniumdrill.fulldescription = Продвинута свердловина. Розміщюється на родовищі уранової руди.Видобуток урану відбувається повільними темпами.
+block.titaniumdrill.name = Титанова свердловина
+block.titaniumdrill.fulldescription = Продвинута свердловина.Розміщюється на родовищі титанової руди, Видобуток титану відбувається повільним темпом.
+block.omnidrill.name = Убер свердловина
+block.omnidrill.fulldescription = Кінцева свердловина.Дуже швидко видобуває будь-який вид руди.
+block.coalgenerator.name = Вугільний генератор
+block.coalgenerator.fulldescription = Основний генератор. Генерує енергію з вугілля. Виводиться потужність лазерів на 4 сторони.
+block.thermalgenerator.name = Теплогенератор
+block.thermalgenerator.fulldescription = Генерує енергію від лави. Виводиться потужність лазерів на 4 сторони.
+block.combustiongenerator.name = Генератор горіння
+block.combustiongenerator.fulldescription = Генерує енергію з нафти. Виводиться потужність лазерів на 4 сторони.
+block.rtgenerator.name = RTG генератор
+block.rtgenerator.fulldescription = Генерує невелику кількість енергії з радіоактивного розпаду урану. Виводиться потужність лазерів на 4 сторони.
+block.nuclearreactor.name = Ядерний реактор
+block.nuclearreactor.fulldescription = Розширений варіант RTG Generator і кінцевий генератор електроенергії. Генерує енергію з урану. Потребує постійного водяного охолодження.Сильно вибухне якщо не буде постачання води у великії кількості
+block.turret.name = Турель
+block.turret.fulldescription = Базова, дешева турель. Використовує камінь для боєприпасів. Має трохи більше діапазону, ніж подвійна турель.
+block.doubleturret.name = Подвійна турель
+block.doubleturret.fulldescription = Дещо потужна версія турель. Використовує камінь для боєприпасів. Значно більший урон, але менший діапазон. Вистрілює дві кулі.
+block.machineturret.name = Кулеметна турель
+block.machineturret.fulldescription = Стандартна всеосяжна турель. Використовує залізо для боєприпасів. Має швидку швидкість пострілу і гідну шкоду.
+block.shotgunturret.name = Розріджуюча турель
+block.shotgunturret.fulldescription = Стандартна турель. Використовує залізо для боєприпасів. Вистрілює 7 куль навколо себе.Наносить значних ушкоджень,звісно якщо поцілить :)
+block.flameturret.name = Вогнемет
+block.flameturret.fulldescription = Продвинута турель ближнього діапазону. Використовує вугілля для боєприпасів. Має дуже низький радіус, але дуже високий збиток. Добре для близьких дистанцій. Рекомендується використовувати за стінами.
+block.sniperturret.name = Лазерна турель.
+block.sniperturret.fulldescription = Продвинута далекобійна турель. Використовує сталь для боєприпасів. Дуже високий збиток, але низький рівень урону. Дорогі для використання, але можуть бути розташовані далеко від ліній ворога через його радіус.
+block.mortarturret.name = Флак турель
+block.mortarturret.fulldescription = Продвинута,неточна турель. Використовує вугілля для боєприпасів. Стріляє кулями, що вибухають у шрапнеллв. Корисне для великих натовпів ворогів.
+block.laserturret.name = Лазерна турель
+block.laserturret.fulldescription = Продвинута однопушечна турель. Використовує енергію. Хороша на середніх дистанціях. Ніколи не пропускає.
+block.waveturret.name = Тесла
+block.waveturret.fulldescription = Передова багатоцільова турель. Використовує енергію. Середній радіус. Ніколи не пропускає. Активно знижує, але може вражати декількох ворогів одночасно з ланцюговим освітленням.
+block.plasmaturret.name = Плазмова турель
+block.plasmaturret.fulldescription = Дуже продвинута версія Вогнеметної турелі. Використовує вугілля як боєприпаси. Дуже високий урон, від близької до середньої дистанції.
+block.chainturret.name = Уранова турель
+block.chainturret.fulldescription = Остаточна швидкістна вежа. Використовує уран як боєприпаси. Вистрілює великі кулі при високій швидкості вогню. Середній радіус. Промінь кілька плиток. Надзвичайно жорсткий.
+block.titancannon.name = Титанова гармата
+block.titancannon.fulldescription = Найбільш далекобійна турель. Використовує уран як боєприпаси. Вистрілює великі снаряди. Далекобійний. Промінь кілька плиток. Надзвичайно жорсткий.
+block.playerspawn.name = Спавн Гравця
+block.enemyspawn.name = Спавн ворогів
diff --git a/core/assets/ui/square.fnt b/core/assets/ui/square.fnt
index 85e2b5833c..3ab33bd043 100644
--- a/core/assets/ui/square.fnt
+++ b/core/assets/ui/square.fnt
@@ -70,10 +70,13 @@ char id=98 x=204 y=102 width=22 height=22 xoffset=-1 yoffset=15 x
char id=99 x=226 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=100 x=248 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=101 x=270 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
+char id=1108 x=270 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=102 x=292 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=103 x=314 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=104 x=336 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=105 x=358 y=102 width=14 height=22 xoffset=-1 yoffset=15 xadvance=16 page=0 chnl=0
+char id=1110 x=358 y=102 width=14 height=22 xoffset=-1 yoffset=15 xadvance=16 page=0 chnl=0
+char id=1111 x=358 y=102 width=14 height=22 xoffset=-1 yoffset=15 xadvance=16 page=0 chnl=0
char id=106 x=372 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=107 x=394 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
char id=108 x=416 y=102 width=22 height=22 xoffset=-1 yoffset=15 xadvance=24 page=0 chnl=0
diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java
index 8ce518a629..5923ebe6f0 100644
--- a/core/src/io/anuke/mindustry/Vars.java
+++ b/core/src/io/anuke/mindustry/Vars.java
@@ -96,7 +96,7 @@ public class Vars{
public static final int tilesize = 8;
- public static final Locale[] locales = {new Locale("en"), new Locale("fr", "FR"), new Locale("ru"), new Locale("pl", "PL"),
+ public static final Locale[] locales = {new Locale("en"), new Locale("fr", "FR"), new Locale("ru"), new Locale("uk", "UA"), new Locale("pl", "PL"),
new Locale("de"), new Locale("es", "LA"), new Locale("pt", "BR"), new Locale("ko"), new Locale("in", "ID")};
public static final Color[] playerColors = {
diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java
index 6e9ea73031..4252ce07aa 100644
--- a/core/src/io/anuke/mindustry/core/NetServer.java
+++ b/core/src/io/anuke/mindustry/core/NetServer.java
@@ -8,10 +8,9 @@ import io.anuke.mindustry.entities.SyncEntity;
import io.anuke.mindustry.game.EventType.GameOverEvent;
import io.anuke.mindustry.io.Platform;
import io.anuke.mindustry.io.Version;
-import io.anuke.mindustry.net.Administration;
-import io.anuke.mindustry.net.Net;
+import io.anuke.mindustry.net.*;
+import io.anuke.mindustry.net.Administration.PlayerInfo;
import io.anuke.mindustry.net.Net.SendMode;
-import io.anuke.mindustry.net.NetworkIO;
import io.anuke.mindustry.net.Packets.*;
import io.anuke.mindustry.resource.*;
import io.anuke.mindustry.world.Block;
@@ -32,7 +31,7 @@ import java.nio.ByteBuffer;
import static io.anuke.mindustry.Vars.*;
public class NetServer extends Module{
- private final static float serverSyncTime = 4, itemSyncTime = 10;
+ private final static float serverSyncTime = 4, itemSyncTime = 10, kickDuration = 30 * 1000;
private final static int timerEntitySync = 0;
private final static int timerStateSync = 1;
@@ -52,40 +51,48 @@ public class NetServer extends Module{
Net.handleServer(Connect.class, (id, connect) -> {
if(admins.isIPBanned(connect.addressTCP)){
- Net.kickConnection(id, KickReason.banned);
+ kick(id, KickReason.banned);
}
});
Net.handleServer(ConnectPacket.class, (id, packet) -> {
String uuid = new String(Base64Coder.encode(packet.uuid));
+
if(Net.getConnection(id) == null ||
admins.isIPBanned(Net.getConnection(id).address)) return;
+ TraceInfo trace = admins.getTrace(Net.getConnection(id).address);
+ PlayerInfo info = admins.getInfo(uuid);
+
if(admins.isIDBanned(uuid)){
- Net.kickConnection(id, KickReason.banned);
+ kick(id, KickReason.banned);
+ return;
+ }
+
+ if(TimeUtils.millis() - info.lastKicked < kickDuration){
+ kick(id, KickReason.recentKick);
return;
}
String ip = Net.getConnection(id).address;
- admins.setKnownName(ip, packet.name);
- admins.setKnownIP(uuid, ip);
- admins.getTrace(ip).uuid = uuid;
- admins.getTrace(ip).android = packet.android;
+ admins.updatePlayerJoined(uuid, ip, packet.name);
+ trace.uuid = uuid;
+ trace.android = packet.android;
if(packet.version != Version.build && Version.build != -1 && packet.version != -1){
- Net.kickConnection(id, packet.version > Version.build ? KickReason.serverOutdated : KickReason.clientOutdated);
+ kick(id, packet.version > Version.build ? KickReason.serverOutdated : KickReason.clientOutdated);
return;
}
if(packet.version == -1){
- admins.getTrace(ip).modclient = true;
+ trace.modclient = true;
}
Log.info("Sending data to player '{0}' / {1}", packet.name, id);
Player player = new Player();
- player.isAdmin = admins.isAdmin(Net.getConnection(id).address);
+ player.isAdmin = admins.isAdmin(uuid, ip);
player.clientid = id;
player.name = packet.name;
player.mech = packet.android ? Mech.standardShip : Mech.standard;
@@ -95,7 +102,7 @@ public class NetServer extends Module{
player.color.set(packet.color);
connections.put(id, player);
- admins.getTrace(ip).playerid = player.id;
+ trace.playerid = player.id;
//TODO try DeflaterOutputStream
ByteArrayOutputStream stream = new ByteArrayOutputStream();
@@ -137,6 +144,7 @@ public class NetServer extends Module{
Net.send(dc, SendMode.tcp);
Platform.instance.updateRPC();
+ admins.save();
});
Net.handleServer(PositionPacket.class, (id, packet) -> {
@@ -149,9 +157,23 @@ public class NetServer extends Module{
BulletType type = BaseBulletType.getByID(packet.bulletid);
player.onRemoteShoot(type, packet.x, packet.y, packet.rotation, packet.data);
+ TraceInfo info = admins.getTrace(Net.getConnection(id).address);
+ Weapon weapon = Upgrade.getByID((byte)packet.data);
- packet.entityid = player.id;
- packet.groupid = (byte)player.getGroup().getID();
+ float wtrc = 40f;
+
+ if(!Timers.get(info.ip + "-weapontrace", wtrc)){
+ info.fastShots ++;
+ }else{
+
+ if(info.fastShots - 2 > (int)(wtrc / (weapon.getReload() / 2f))){
+ kick(id, KickReason.kick);
+ }
+
+ info.fastShots = 0;
+ }
+
+ packet.entityid = connections.get(id).id;
Net.sendExcept(id, packet, SendMode.udp);
});
@@ -173,6 +195,7 @@ public class NetServer extends Module{
admins.getTrace(Net.getConnection(id).address).lastBlockPlaced = block;
admins.getTrace(Net.getConnection(id).address).totalBlocksPlaced ++;
+ admins.getInfo(admins.getTrace(Net.getConnection(id).address).uuid).totalBlockPlaced ++;
Net.send(packet, SendMode.tcp);
});
@@ -188,6 +211,7 @@ public class NetServer extends Module{
if(block != null) {
admins.getTrace(Net.getConnection(id).address).lastBlockBroken = block;
admins.getTrace(Net.getConnection(id).address).totalBlocksBroken++;
+ admins.getInfo(admins.getTrace(Net.getConnection(id).address).uuid).totalBlocksBroken ++;
if (block.update || block.destructible)
admins.getTrace(Net.getConnection(id).address).structureBlocksBroken++;
}
@@ -270,10 +294,10 @@ public class NetServer extends Module{
if(packet.action == AdminAction.ban){
admins.banPlayerIP(ip);
- Net.kickConnection(other.clientid, KickReason.banned);
+ kick(other.clientid, KickReason.banned);
Log.info("&lc{0} has banned {1}.", player.name, other.name);
}else if(packet.action == AdminAction.kick){
- Net.kickConnection(other.clientid, KickReason.kick);
+ kick(other.clientid, KickReason.kick);
Log.info("&lc{0} has kicked {1}.", player.name, other.name);
}else if(packet.action == AdminAction.trace){
TracePacket trace = new TracePacket();
@@ -306,6 +330,31 @@ public class NetServer extends Module{
admins.clearTraces();
}
+ public void kick(int connection, KickReason reason){
+ NetConnection con = Net.getConnection(connection);
+ if(con == null){
+ Log.err("Cannot kick unknown player!");
+ return;
+ }else{
+ Log.info("Kicking connection #{0} / IP: {1}. Reason: {2}", connection, con.address, reason);
+ }
+
+ PlayerInfo info = admins.getInfo(admins.getTrace(con.address).uuid);
+
+ if(reason == KickReason.kick || reason == KickReason.banned){
+ info.timesKicked ++;
+ info.lastKicked = TimeUtils.millis();
+ }
+
+ KickPacket p = new KickPacket();
+ p.reason = reason;
+
+ con.send(p, SendMode.tcp);
+ Timers.runTask(2f, con::close);
+
+ admins.save();
+ }
+
void sync(){
if(timer.get(timerEntitySync, serverSyncTime)){
diff --git a/core/src/io/anuke/mindustry/core/UI.java b/core/src/io/anuke/mindustry/core/UI.java
index c3341f9f3f..a6f1585b32 100644
--- a/core/src/io/anuke/mindustry/core/UI.java
+++ b/core/src/io/anuke/mindustry/core/UI.java
@@ -156,12 +156,12 @@ public class UI extends SceneModule{
language = new LanguageDialog();
settings = new SettingsMenuDialog();
paused = new PausedDialog();
+ changelog = new ChangelogDialog();
about = new AboutDialog();
host = new HostDialog();
bans = new BansDialog();
admins = new AdminsDialog();
traces = new TraceDialog();
- changelog = new ChangelogDialog();
build.begin(scene);
diff --git a/core/src/io/anuke/mindustry/input/DefaultKeybinds.java b/core/src/io/anuke/mindustry/input/DefaultKeybinds.java
index 7140b8269b..72608d7d20 100644
--- a/core/src/io/anuke/mindustry/input/DefaultKeybinds.java
+++ b/core/src/io/anuke/mindustry/input/DefaultKeybinds.java
@@ -26,6 +26,8 @@ public class DefaultKeybinds {
"block_info", Input.CONTROL_LEFT,
"player_list", Input.TAB,
"chat", Input.ENTER,
+ "chat_scroll_up", Input.UP,
+ "chat_scroll_down", Input.DOWN,
"console", Input.GRAVE,
"weapon_1", Input.NUM_1,
"weapon_2", Input.NUM_2,
@@ -53,6 +55,8 @@ public class DefaultKeybinds {
"rotate", new Axis(Input.CONTROLLER_A, Input.CONTROLLER_B),
"player_list", Input.CONTROLLER_START,
"chat", Input.ENTER,
+ "chat_scroll_up", Input.UP,
+ "chat_scroll_down", Input.DOWN,
"console", Input.GRAVE,
"weapon_1", Input.NUM_1,
"weapon_2", Input.NUM_2,
diff --git a/core/src/io/anuke/mindustry/input/DesktopInput.java b/core/src/io/anuke/mindustry/input/DesktopInput.java
index f370845a3d..674a71f542 100644
--- a/core/src/io/anuke/mindustry/input/DesktopInput.java
+++ b/core/src/io/anuke/mindustry/input/DesktopInput.java
@@ -107,6 +107,10 @@ public class DesktopInput extends InputHandler{
Cursors.restoreCursor();
}
}
+
+ if(target != null && target.block().isConfigurable(target)){
+ showCursor = true;
+ }
if(target != null && Inputs.keyTap("select") && !ui.hasMouse()){
if(target.block().isConfigurable(target)){
diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java
index 2335a6225a..c1bd04785d 100644
--- a/core/src/io/anuke/mindustry/input/InputHandler.java
+++ b/core/src/io/anuke/mindustry/input/InputHandler.java
@@ -116,19 +116,23 @@ public abstract class InputHandler extends InputAdapter{
}
public void placeBlock(int x, int y, Block result, int rotation, boolean effects, boolean sound){
- if(!Net.client()){
+ if(!Net.client()){ //is server or singleplayer
Placement.placeBlock(player.team, x, y, result, rotation, effects, sound);
- Tile tile = world.tile(x, y);
- if(tile != null) result.placed(tile);
}
if(Net.active()){
NetEvents.handlePlace(x, y, result, rotation);
}
+
+ if(!Net.client()){
+ Tile tile = world.tile(x, y);
+ if(tile != null) result.placed(tile);
+ }
}
public void breakBlock(int x, int y, boolean sound){
- if(!Net.client()) Placement.breakBlock(player.team, x, y, true, sound);
+ if(!Net.client())
+ Placement.breakBlock(player.team, x, y, true, sound);
if(Net.active()){
NetEvents.handleBreak(x, y);
diff --git a/core/src/io/anuke/mindustry/net/Administration.java b/core/src/io/anuke/mindustry/net/Administration.java
index a37db3aefd..f34fe8aafb 100644
--- a/core/src/io/anuke/mindustry/net/Administration.java
+++ b/core/src/io/anuke/mindustry/net/Administration.java
@@ -7,177 +7,228 @@ import io.anuke.ucore.core.Settings;
public class Administration {
private Json json = new Json();
+ /**All player info. Maps UUIDs to info. This persists throughout restarts.*/
+ private ObjectMap playerInfo = new ObjectMap<>();
+ /**Maps UUIDs to trace infos. This is wiped when a player logs off.*/
+ private ObjectMap traceInfo = new ObjectMap<>();
private Array bannedIPs = new Array<>();
- private Array bannedIDs = new Array<>();
- private Array admins = new Array<>();
- private ObjectMap ipNames = new ObjectMap<>();
- private ObjectMap idIPs = new ObjectMap<>();
- private ObjectMap traces = new ObjectMap<>();
public Administration(){
- Settings.defaultList(
- "bans", "{}",
- "bannedIDs", "{}",
- "admins", "{}",
- "knownIPs", "{}",
- "knownIDs", "{}"
- );
+ Settings.defaults("playerInfo", "{}");
+ Settings.defaults("bannedIPs", "{}");
load();
}
- public TraceInfo getTrace(String ip){
- if(!traces.containsKey(ip)) traces.put(ip, new TraceInfo(ip));
+ /**Call when a player joins to update their information here.*/
+ public void updatePlayerJoined(String id, String ip, String name){
+ PlayerInfo info = getCreateInfo(id);
+ info.lastName = name;
+ info.lastIP = ip;
+ info.timesJoined ++;
+ if(!info.names.contains(name, false)) info.names.add(name);
+ if(!info.ips.contains(ip, false)) info.ips.add(ip);
+ }
- return traces.get(ip);
+ /**Returns trace info by IP.*/
+ public TraceInfo getTrace(String ip){
+ if(!traceInfo.containsKey(ip)) traceInfo.put(ip, new TraceInfo(ip));
+
+ return traceInfo.get(ip);
}
public void clearTraces(){
- traces.clear();
+ traceInfo.clear();
}
- /**Sets last known name for an IP.*/
- public void setKnownName(String ip, String name){
- ipNames.put(ip, name);
- saveKnown();
- }
-
- /**Sets last known UUID for an IP.*/
- public void setKnownIP(String id, String ip){
- idIPs.put(id, ip);
- saveKnown();
- }
-
- /**Returns the last known name for an IP. Returns 'unknown' if this IP has an unknown username.*/
- public String getLastName(String ip){
- return ipNames.get(ip, "unknown");
- }
-
- /**Returns the last known IP for a UUID. Returns 'unknown' if this IP has an unknown IP.*/
- public String getLastIP(String id){
- return idIPs.get(id, "unknown");
- }
-
- /**Return the last known device ID associated with an IP. Returns 'unknown' if this IP has an unknown device.*/
- public String getLastID(String ip){
- for(String id : idIPs.keys()){
- if(idIPs.get(id).equals(ip)){
- return id;
- }
- }
- return "unknown";
- }
-
- /**Returns list of banned IPs.*/
- public Array getBanned(){
- return bannedIPs;
- }
-
- /**Returns list of banned IDs.*/
- public Array getBannedIDs(){
- return bannedIDs;
- }
-
- /**Bans a player by IP; returns whether this player was already banned.*/
+ /**Bans a player by IP; returns whether this player was already banned.
+ * If there are players who at any point had this IP, they will be UUID banned as well.*/
public boolean banPlayerIP(String ip){
if(bannedIPs.contains(ip, false))
return false;
+
+ for(PlayerInfo info : playerInfo.values()){
+ if(info.ips.contains(ip, false)){
+ info.banned = true;
+ }
+ }
+
bannedIPs.add(ip);
- saveBans();
+ save();
return true;
}
- /**Bans a player by UUID.*/
+ /**Bans a player by UUID; returns whether this player was already banned.*/
public boolean banPlayerID(String id){
- if(bannedIDs.contains(id, false))
+ if(playerInfo.containsKey(id) && playerInfo.get(id).banned)
return false;
- bannedIDs.add(id);
- saveBans();
+
+ getCreateInfo(id).banned = true;
+
+ save();
return true;
}
- /**Unbans a player by IP; returns whether this player was banned in the first place..*/
+ /**Unbans a player by IP; returns whether this player was banned in the first place.
+ * This method also unbans any player that was banned and had this IP.*/
public boolean unbanPlayerIP(String ip){
- if(!bannedIPs.contains(ip, false))
- return false;
+ boolean found = bannedIPs.contains(ip, false);
+
+ for(PlayerInfo info : playerInfo.values()){
+ if(info.ips.contains(ip, false)){
+ info.banned = false;
+ found = true;
+ }
+ }
+
bannedIPs.removeValue(ip, false);
- saveBans();
- return true;
+ if(found) save();
+
+ return found;
}
- /**Unbans a player by IP; returns whether this player was banned in the first place..*/
- public boolean unbanPlayerID(String ip){
- if(!bannedIDs.contains(ip, false))
+ /**Unbans a player by ID; returns whether this player was banned in the first place.
+ * This also unbans all IPs the player used.*/
+ public boolean unbanPlayerID(String id){
+ PlayerInfo info = getCreateInfo(id);
+
+ if(!info.banned)
return false;
- bannedIDs.removeValue(ip, false);
- saveBans();
+
+ info.banned = false;
+ bannedIPs.removeAll(info.ips, false);
+ save();
return true;
}
- /**Returns list of banned IPs.*/
- public Array getAdmins(){
- return admins;
+ /**Returns list of all players with admin status*/
+ public Array getAdmins(){
+ Array result = new Array<>();
+ for(PlayerInfo info : playerInfo.values()){
+ if(info.admin){
+ result.add(info);
+ }
+ }
+ return result;
+ }
+
+ /**Returns list of all players with admin status*/
+ public Array getBanned(){
+ Array result = new Array<>();
+ for(PlayerInfo info : playerInfo.values()){
+ if(info.banned){
+ result.add(info);
+ }
+ }
+ return result;
+ }
+
+ /**Returns all banned IPs. This does not include the IPs of ID-banned players.*/
+ public Array getBannedIPs(){
+ return bannedIPs;
}
/**Makes a player an admin. Returns whether this player was already an admin.*/
- public boolean adminPlayer(String ip){
- if(admins.contains(ip, false))
+ public boolean adminPlayer(String id, String ip){
+ PlayerInfo info = getCreateInfo(id);
+
+ if(info.admin)
return false;
- admins.add(ip);
- saveAdmins();
+
+ info.validAdminIP = ip;
+ info.admin = true;
+ save();
return true;
}
/**Makes a player no longer an admin. Returns whether this player was an admin in the first place.*/
- public boolean unAdminPlayer(String ip){
- if(!admins.contains(ip, false))
+ public boolean unAdminPlayer(String id){
+ PlayerInfo info = getCreateInfo(id);
+
+ if(!info.admin)
return false;
- admins.removeValue(ip, false);
- saveAdmins();
+
+ info.admin = false;
+ save();
return true;
}
public boolean isIPBanned(String ip){
- return bannedIPs.contains(ip, false);
+ return bannedIPs.contains(ip, false) || (findByIP(ip) != null && findByIP(ip).banned);
}
public boolean isIDBanned(String uuid){
- return bannedIDs.contains(uuid, false);
+ return getCreateInfo(uuid).banned;
}
- public boolean isAdmin(String ip){
- return admins.contains(ip, false);
+ public boolean isAdmin(String id, String ip){
+ PlayerInfo info = getCreateInfo(id);
+ return info.admin && ip.equals(info.validAdminIP);
}
- private void saveKnown(){
- Settings.putString("knownIPs", json.toJson(ipNames));
- Settings.putString("knownIDs", json.toJson(idIPs));
- Settings.save();
+ public PlayerInfo getInfo(String id){
+ return getCreateInfo(id);
}
- private void saveBans(){
- Settings.putString("bans", json.toJson(bannedIPs));
- Settings.putString("bannedIDs", json.toJson(bannedIDs));
- Settings.save();
+ public PlayerInfo getInfoOptional(String id){
+ return playerInfo.get(id);
}
- private void saveAdmins(){
- Settings.putString("admins", json.toJson(admins));
+ public PlayerInfo findByIP(String ip){
+ for(PlayerInfo info : playerInfo.values()){
+ if(info.ips.contains(ip, false)){
+ return info;
+ }
+ }
+ return null;
+ }
+
+ private PlayerInfo getCreateInfo(String id){
+ if(playerInfo.containsKey(id)){
+ return playerInfo.get(id);
+ }else{
+ PlayerInfo info = new PlayerInfo(id);
+ playerInfo.put(id, info);
+ save();
+ return info;
+ }
+ }
+
+ public void save(){
+ Settings.putString("playerInfo", json.toJson(playerInfo));
+ Settings.putString("bannedIPs", json.toJson(bannedIPs));
Settings.save();
}
private void load(){
- bannedIPs = json.fromJson(Array.class, Settings.getString("bans"));
- bannedIDs = json.fromJson(Array.class, Settings.getString("bannedIDs"));
- admins = json.fromJson(Array.class, Settings.getString("admins"));
- ipNames = json.fromJson(ObjectMap.class, Settings.getString("knownIPs"));
- idIPs = json.fromJson(ObjectMap.class, Settings.getString("knownIDs"));
+ playerInfo = json.fromJson(ObjectMap.class, Settings.getString("playerInfo"));
+ bannedIPs = json.fromJson(Array.class, Settings.getString("bannedIPs"));
+ }
+
+ public static class PlayerInfo{
+ public String id;
+ public String lastName = "", lastIP = "";
+ public String validAdminIP;
+ public Array ips = new Array<>();
+ public Array names = new Array<>();
+ public int timesKicked; //TODO not implemented!
+ public int timesJoined;
+ public int totalBlockPlaced;
+ public int totalBlocksBroken;
+ public boolean banned, admin;
+ public long lastKicked; //last kicked timestamp
+
+ PlayerInfo(String id){
+ this.id = id;
+ }
+
+ private PlayerInfo(){}
}
}
diff --git a/core/src/io/anuke/mindustry/net/Net.java b/core/src/io/anuke/mindustry/net/Net.java
index 636ff7dd12..e41b960694 100644
--- a/core/src/io/anuke/mindustry/net/Net.java
+++ b/core/src/io/anuke/mindustry/net/Net.java
@@ -12,7 +12,6 @@ import com.badlogic.gdx.utils.reflect.ClassReflection;
import io.anuke.mindustry.io.Platform;
import io.anuke.mindustry.net.Packet.ImportantPacket;
import io.anuke.mindustry.net.Packet.UnimportantPacket;
-import io.anuke.mindustry.net.Packets.KickReason;
import io.anuke.mindustry.net.Streamable.StreamBegin;
import io.anuke.mindustry.net.Streamable.StreamBuilder;
import io.anuke.mindustry.net.Streamable.StreamChunk;
@@ -101,11 +100,6 @@ public class Net{
clientProvider.discover(cons);
}
- /**Kick a specified connection from the server.*/
- public static void kickConnection(int id, KickReason reason){
- serverProvider.kick(id, reason);
- }
-
/**Returns a list of all connections IDs.*/
public static Array getConnections(){
return (Array)serverProvider.getConnections();
@@ -307,10 +301,6 @@ public class Net{
Array extends NetConnection> getConnections();
/**Returns a connection by ID.*/
NetConnection getByID(int id);
- /**Kick a certain connection.*/
- void kick(int connection, KickReason reason);
- /**Returns the ping for a certain connection.*/
- int getPingFor(NetConnection connection);
/**Close all connections.*/
void dispose();
}
diff --git a/core/src/io/anuke/mindustry/net/Packets.java b/core/src/io/anuke/mindustry/net/Packets.java
index 467ad3b6b8..7bca405807 100644
--- a/core/src/io/anuke/mindustry/net/Packets.java
+++ b/core/src/io/anuke/mindustry/net/Packets.java
@@ -350,7 +350,7 @@ public class Packets {
}
public enum KickReason{
- kick, invalidPassword, clientOutdated, serverOutdated, banned, gameover(true);
+ kick, invalidPassword, clientOutdated, serverOutdated, banned, gameover(true), recentKick;
public final boolean quiet;
KickReason(){ quiet = false; }
diff --git a/core/src/io/anuke/mindustry/net/TraceInfo.java b/core/src/io/anuke/mindustry/net/TraceInfo.java
index 2f37a99efa..940f98726f 100644
--- a/core/src/io/anuke/mindustry/net/TraceInfo.java
+++ b/core/src/io/anuke/mindustry/net/TraceInfo.java
@@ -9,6 +9,8 @@ public class TraceInfo {
public boolean modclient;
public boolean android;
+ public int fastShots;
+
public int totalBlocksBroken;
public int structureBlocksBroken;
public Block lastBlockBroken = Blocks.air;
diff --git a/core/src/io/anuke/mindustry/resource/Weapon.java b/core/src/io/anuke/mindustry/resource/Weapon.java
index 6b9cefcbbb..23a9c120f3 100644
--- a/core/src/io/anuke/mindustry/resource/Weapon.java
+++ b/core/src/io/anuke/mindustry/resource/Weapon.java
@@ -117,6 +117,10 @@ public class Weapon extends Upgrade{
Effects.sound(shootsound, x, y);
}
+ public float getReload(){
+ return reload;
+ }
+
public void shoot(Player p, float x, float y, float angle){
shootInternal(p, x, y, angle);
diff --git a/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java
index 56ca6fab5f..1e311e964b 100644
--- a/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java
+++ b/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java
@@ -2,7 +2,6 @@ package io.anuke.mindustry.ui.dialogs;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
-import io.anuke.mindustry.Vars;
import io.anuke.mindustry.ui.Links;
import io.anuke.mindustry.ui.Links.LinkEntry;
import io.anuke.ucore.core.Core;
@@ -10,6 +9,8 @@ import io.anuke.ucore.core.Timers;
import io.anuke.ucore.scene.ui.ScrollPane;
import io.anuke.ucore.scene.ui.layout.Table;
+import static io.anuke.mindustry.Vars.ui;
+
public class AboutDialog extends FloatingDialog {
public AboutDialog(){
@@ -45,7 +46,7 @@ public class AboutDialog extends FloatingDialog {
table.addImageButton("icon-link", 14*3, () -> {
if(!Gdx.net.openURI(link.link)){
- Vars.ui.showError("$text.linkfail");
+ ui.showError("$text.linkfail");
Gdx.app.getClipboard().setContents(link.link);
}
}).size(h-5, h);
@@ -58,6 +59,7 @@ public class AboutDialog extends FloatingDialog {
content().add(pane).growX();
buttons().addButton("$text.credits", this::showCredits).size(200f, 64f);
+ buttons().addButton("$text.changelog.title", ui.changelog::show).size(200f, 64f);
}
private void showCredits(){
diff --git a/core/src/io/anuke/mindustry/ui/dialogs/AdminsDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/AdminsDialog.java
index c23348a91a..b1986af887 100644
--- a/core/src/io/anuke/mindustry/ui/dialogs/AdminsDialog.java
+++ b/core/src/io/anuke/mindustry/ui/dialogs/AdminsDialog.java
@@ -1,6 +1,7 @@
package io.anuke.mindustry.ui.dialogs;
import io.anuke.mindustry.entities.Player;
+import io.anuke.mindustry.net.Administration.PlayerInfo;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.NetConnection;
import io.anuke.mindustry.net.NetEvents;
@@ -36,15 +37,15 @@ public class AdminsDialog extends FloatingDialog {
table.add("$text.server.admins.none");
}
- for(String ip : netServer.admins.getAdmins()){
+ for(PlayerInfo info : netServer.admins.getAdmins()){
Table res = new Table("button");
res.margin(14f);
- res.labelWrap("[LIGHT_GRAY]" + netServer.admins.getLastName(ip)).width(w - h - 24f);
+ res.labelWrap("[LIGHT_GRAY]" + info.lastName).width(w - h - 24f);
res.add().growX();
res.addImageButton("icon-cancel", 14*3, () -> {
ui.showConfirm("$text.confirm", "$text.confirmunadmin", () -> {
- netServer.admins.unAdminPlayer(ip);
+ netServer.admins.unAdminPlayer(info.id);
for(Player player : playerGroup.all()){
NetConnection c = Net.getConnection(player.clientid);
if(c != null){
diff --git a/core/src/io/anuke/mindustry/ui/dialogs/BansDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/BansDialog.java
index bb6633bef5..d8165c0ae6 100644
--- a/core/src/io/anuke/mindustry/ui/dialogs/BansDialog.java
+++ b/core/src/io/anuke/mindustry/ui/dialogs/BansDialog.java
@@ -1,5 +1,6 @@
package io.anuke.mindustry.ui.dialogs;
+import io.anuke.mindustry.net.Administration.PlayerInfo;
import io.anuke.ucore.scene.ui.ScrollPane;
import io.anuke.ucore.scene.ui.layout.Table;
@@ -33,15 +34,15 @@ public class BansDialog extends FloatingDialog {
table.add("$text.server.bans.none");
}
- for(String ip : netServer.admins.getBanned()){
+ for(PlayerInfo info : netServer.admins.getBanned()){
Table res = new Table("button");
res.margin(14f);
- res.labelWrap("IP: [LIGHT_GRAY]" + ip + "\n[]Name: [LIGHT_GRAY]" + netServer.admins.getLastName(ip)).width(w - h - 24f);
+ res.labelWrap("IP: [LIGHT_GRAY]" + info.lastIP + "\n[]Name: [LIGHT_GRAY]" + info.lastName).width(w - h - 24f);
res.add().growX();
res.addImageButton("icon-cancel", 14*3, () -> {
ui.showConfirm("$text.confirm", "$text.confirmunban", () -> {
- netServer.admins.unbanPlayerIP(ip);
+ netServer.admins.unbanPlayerID(info.id);
setup();
});
}).size(h).pad(-14f);
diff --git a/core/src/io/anuke/mindustry/ui/fragments/BackgroundFragment.java b/core/src/io/anuke/mindustry/ui/fragments/BackgroundFragment.java
index e8ae0e4d3b..a786df7686 100644
--- a/core/src/io/anuke/mindustry/ui/fragments/BackgroundFragment.java
+++ b/core/src/io/anuke/mindustry/ui/fragments/BackgroundFragment.java
@@ -31,7 +31,7 @@ public class BackgroundFragment implements Fragment {
float logoh = logo.getRegionHeight()*logoscl;
Draw.color();
- Core.batch.draw(logo, w/2 - logow/2, h - logoh + 15 - Unit.dp.scl(portrait ? 30f : 30), logow, logoh);
+ Core.batch.draw(logo, w/2 - logow/2, h - logoh + 15 - Unit.dp.scl(portrait ? 30f : 0), logow, logoh);
}).visible(() -> state.is(State.menu)).grow();
}
}
diff --git a/core/src/io/anuke/mindustry/ui/fragments/ChatFragment.java b/core/src/io/anuke/mindustry/ui/fragments/ChatFragment.java
index 6ef83b3c89..2f7f5d71c4 100644
--- a/core/src/io/anuke/mindustry/ui/fragments/ChatFragment.java
+++ b/core/src/io/anuke/mindustry/ui/fragments/ChatFragment.java
@@ -20,6 +20,7 @@ import io.anuke.ucore.scene.ui.TextField;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.scene.ui.layout.Unit;
import io.anuke.ucore.util.Log;
+import java.util.Arrays;
import static io.anuke.mindustry.Vars.state;
import static io.anuke.ucore.core.Core.scene;
@@ -39,6 +40,8 @@ public class ChatFragment extends Table implements Fragment{
private float textWidth = Unit.dp.scl(600);
private Color shadowColor = new Color(0, 0, 0, 0.4f);
private float textspacing = Unit.dp.scl(10);
+ private Array history = new Array();
+ private int historyPos = 0;
public ChatFragment(){
super();
@@ -57,8 +60,21 @@ public class ChatFragment extends Table implements Fragment{
if(Net.active() && Inputs.keyTap("chat")){
toggle();
}
+
+ if (chatOpen) {
+ if (Inputs.keyTap("chat_scroll_up") && historyPos < history.size - 1) {
+ if (historyPos == 0) history.set(0, chatfield.getText());
+ historyPos++;
+ updateChat();
+ }
+ if (Inputs.keyTap("chat_scroll_down") && historyPos > 0) {
+ historyPos--;
+ updateChat();
+ }
+ }
});
+ history.insert(0, "");
setup();
}
@@ -69,6 +85,8 @@ public class ChatFragment extends Table implements Fragment{
public void clearMessages(){
messages.clear();
+ history.clear();
+ history.insert(0, "");
}
private void setup(){
@@ -144,7 +162,8 @@ public class ChatFragment extends Table implements Fragment{
private void sendMessage(){
String message = chatfield.getText();
- chatfield.clearText();
+ clearChatInput();
+ history.insert(1, message);
if(message.replaceAll(" ", "").isEmpty()) return;
@@ -170,6 +189,17 @@ public class ChatFragment extends Table implements Fragment{
public void hide(){
scene.setKeyboardFocus(null);
chatOpen = false;
+ clearChatInput();
+ }
+
+ public void updateChat() {
+ chatfield.setText(history.get(historyPos));
+ chatfield.setCursorPosition(chatfield.getText().length());
+ }
+
+ public void clearChatInput() {
+ historyPos = 0;
+ history.set(0, "");
chatfield.setText("");
}
diff --git a/core/src/io/anuke/mindustry/ui/fragments/PlayerListFragment.java b/core/src/io/anuke/mindustry/ui/fragments/PlayerListFragment.java
index def05e2203..c25dc549c6 100644
--- a/core/src/io/anuke/mindustry/ui/fragments/PlayerListFragment.java
+++ b/core/src/io/anuke/mindustry/ui/fragments/PlayerListFragment.java
@@ -128,7 +128,7 @@ public class PlayerListFragment implements Fragment{
ui.showConfirm("$text.confirm", "$text.confirmban", () -> {
if(Net.server()) {
netServer.admins.banPlayerIP(connection.address);
- Net.kickConnection(player.clientid, KickReason.banned);
+ netServer.kick(player.clientid, KickReason.banned);
}else{
NetEvents.handleAdministerRequest(player, AdminAction.ban);
}
@@ -137,7 +137,7 @@ public class PlayerListFragment implements Fragment{
t.addImageButton("icon-cancel", 14*2, () -> {
if(Net.server()) {
- Net.kickConnection(player.clientid, KickReason.kick);
+ netServer.kick(player.clientid, KickReason.kick);
}else{
NetEvents.handleAdministerRequest(player, AdminAction.kick);
}
@@ -148,14 +148,16 @@ public class PlayerListFragment implements Fragment{
t.addImageButton("icon-admin", "toggle", 14*2, () -> {
if(Net.client()) return;
- if(netServer.admins.isAdmin(connection.address)){
+ String id = netServer.admins.getTrace(connection.address).uuid;
+
+ if(netServer.admins.isAdmin(id, connection.address)){
ui.showConfirm("$text.confirm", "$text.confirmunadmin", () -> {
- netServer.admins.unAdminPlayer(connection.address);
+ netServer.admins.unAdminPlayer(id);
NetEvents.handleAdminSet(player, false);
});
}else{
ui.showConfirm("$text.confirm", "$text.confirmadmin", () -> {
- netServer.admins.adminPlayer(connection.address);
+ netServer.admins.adminPlayer(id, connection.address);
NetEvents.handleAdminSet(player, true);
});
}
diff --git a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java
index f04a4b484d..1540963cc9 100644
--- a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java
+++ b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java
@@ -74,7 +74,7 @@ public class Teleporter extends PowerBlock{
@Override
public void placed(Tile tile){
tile.entity().color = lastColor;
- Timers.run(1f, () -> setConfigure(tile, lastColor));
+ setConfigure(tile, lastColor);
}
@Override
diff --git a/kryonet/src/io/anuke/kryonet/KryoServer.java b/kryonet/src/io/anuke/kryonet/KryoServer.java
index 9e1cd8f27f..876f0ac3a3 100644
--- a/kryonet/src/io/anuke/kryonet/KryoServer.java
+++ b/kryonet/src/io/anuke/kryonet/KryoServer.java
@@ -134,23 +134,6 @@ public class KryoServer implements ServerProvider {
return null;
}
- @Override
- public void kick(int connection, KickReason reason) {
- KryoConnection con = getByID(connection);
- if(con == null){
- Log.err("Cannot kick unknown player!");
- return;
- }else{
- Log.info("Kicking connection #{0} / IP: {1}. Reason: {2}", connection, con.address, reason);
- }
-
- KickPacket p = new KickPacket();
- p.reason = reason;
-
- con.send(p, SendMode.tcp);
- Timers.runTask(2f, con::close);
- }
-
@Override
public void host(int port) throws IOException {
lastconnection = 0;
@@ -278,12 +261,6 @@ public class KryoServer implements ServerProvider {
}
}
- @Override
- public int getPingFor(NetConnection con) {
- KryoConnection k = (KryoConnection)con;
- return k.connection == null ? 0 : k.connection.getReturnTripTime();
- }
-
@Override
public void dispose(){
close();
diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java
index 4256303087..74fee3237d 100644
--- a/server/src/io/anuke/mindustry/server/ServerControl.java
+++ b/server/src/io/anuke/mindustry/server/ServerControl.java
@@ -11,6 +11,7 @@ import io.anuke.mindustry.game.GameMode;
import io.anuke.mindustry.io.Map;
import io.anuke.mindustry.io.SaveIO;
import io.anuke.mindustry.io.Version;
+import io.anuke.mindustry.net.Administration.PlayerInfo;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.NetConnection;
import io.anuke.mindustry.net.NetEvents;
@@ -75,7 +76,7 @@ public class ServerControl extends Module {
info("Game over!");
for(NetConnection connection : Net.getConnections()){
- Net.kickConnection(connection.id, KickReason.gameover);
+ netServer.kick(connection.id, KickReason.gameover);
}
if (mode != ShuffleMode.off) {
@@ -124,27 +125,33 @@ public class ServerControl extends Module {
Log.info("Stopped server.");
});
- handler.register("host", " ", "Open the server with a specific map.", arg -> {
+ handler.register("host", "[mapname] [mode]", "Open the server with a specific map.", arg -> {
if(state.is(State.playing)){
err("Already hosting. Type 'stop' to stop hosting first.");
return;
}
- String search = arg[0];
Map result = null;
- for(Map map : world.maps().all()){
- if(map.name.equalsIgnoreCase(search))
- result = map;
- }
- if(result == null){
- err("No map with name &y'{0}'&lr found.", search);
- return;
+ if(arg.length > 0) {
+ String search = arg[0];
+ for (Map map : world.maps().all()) {
+ if (map.name.equalsIgnoreCase(search))
+ result = map;
+ }
+
+ if(result == null){
+ err("No map with name &y'{0}'&lr found.", search);
+ return;
+ }
+ }else{
+ while(result == null || result.visible)
+ result = world.maps().getAllMaps().random();
}
GameMode mode = null;
try{
- mode = GameMode.valueOf(arg[1]);
+ mode = arg.length < 2 ? GameMode.waves : GameMode.valueOf(arg[1]);
}catch (IllegalArgumentException e){
err("No gamemode '{0}' found.", arg[1]);
return;
@@ -270,7 +277,7 @@ public class ServerControl extends Module {
}
if(target != null){
- Net.kickConnection(target.clientid, KickReason.kick);
+ netServer.kick(target.clientid, KickReason.kick);
info("It is done.");
}else{
info("Nobody with that name could be found...");
@@ -296,7 +303,7 @@ public class ServerControl extends Module {
String ip = Net.getConnection(target.clientid).address;
netServer.admins.banPlayerIP(ip);
netServer.admins.banPlayerID(netServer.admins.getTrace(ip).uuid);
- Net.kickConnection(target.clientid, KickReason.banned);
+ netServer.kick(target.clientid, KickReason.banned);
info("Banned player by IP and ID: {0} / {1}", ip, netServer.admins.getTrace(ip).uuid);
}else{
info("Nobody with that name could be found.");
@@ -304,26 +311,26 @@ public class ServerControl extends Module {
});
handler.register("bans", "List all banned IPs and IDs.", arg -> {
- Array bans = netServer.admins.getBanned();
+ Array bans = netServer.admins.getBanned();
if(bans.size == 0){
- Log.info("No IP-banned players have been found.");
+ Log.info("No ID-banned players have been found.");
}else{
- Log.info("&lyBanned players [IP]:");
- for(String string : bans){
- Log.info(" &ly {0} / Last known name: '{1}'", string, netServer.admins.getLastName(string));
+ Log.info("&lyBanned players [ID]:");
+ for(PlayerInfo info : bans){
+ Log.info(" &ly {0} / Last known name: '{1}'", info.id, info.lastName);
}
}
- Array idbans = netServer.admins.getBannedIDs();
+ Array ipbans = netServer.admins.getBannedIPs();
- if(idbans.size == 0){
- Log.info("No ID-banned players have been found.");
+ if(ipbans.size == 0){
+ Log.info("No IP-banned players have been found.");
}else{
- Log.info("&lmBanned players [ID]:");
- for(String string : idbans){
- Log.info(" &lm '{0}' / Last known name: '{1}' / Last known IP: '{2}'", string,
- netServer.admins.getLastName(netServer.admins.getLastIP(string)), netServer.admins.getLastIP(string));
+ Log.info("&lmBanned players [IP]:");
+ for(String string : ipbans){
+ PlayerInfo info = netServer.admins.findByIP(string);
+ Log.info(" &lm '{0}' / Last known name: '{1}' / ID: '{2}'", string, info.lastName, info.id);
}
}
});
@@ -334,7 +341,7 @@ public class ServerControl extends Module {
for(Player player : playerGroup.all()){
if(Net.getConnection(player.clientid).address.equals(arg[0])){
- Net.kickConnection(player.clientid, KickReason.banned);
+ netServer.kick(player.clientid, KickReason.banned);
break;
}
}
@@ -349,7 +356,7 @@ public class ServerControl extends Module {
for(Player player : playerGroup.all()){
if(netServer.admins.getTrace(Net.getConnection(player.clientid).address).uuid.equals(arg[0])){
- Net.kickConnection(player.clientid, KickReason.banned);
+ netServer.kick(player.clientid, KickReason.banned);
break;
}
}
@@ -361,12 +368,6 @@ public class ServerControl extends Module {
handler.register("unbanip", "", "Completely unban a person by IP.", arg -> {
if(netServer.admins.unbanPlayerIP(arg[0])) {
info("Unbanned player by IP: {0}.", arg[0]);
- for(String s : netServer.admins.getBannedIDs()){
- if(netServer.admins.getLastIP(s).equals(arg[0])){
- netServer.admins.unbanPlayerID(s);
- Log.info("Also unbanned UUID '{0}' as it corresponds to this IP.", s);
- }
- }
}else{
err("That IP is not banned!");
}
@@ -375,11 +376,6 @@ public class ServerControl extends Module {
handler.register("unbanid", "", "Completely unban a person by ID.", arg -> {
if(netServer.admins.unbanPlayerID(arg[0])) {
info("&lmUnbanned player by ID: {0}.", arg[0]);
- String ip = netServer.admins.getLastIP(arg[0]);
- if(!ip.equals("unknown")) {
- netServer.admins.unbanPlayerIP(ip);
- Log.info("Also unbanned IP '{0}' as it corresponds to this ID.", ip);
- }
}else{
err("That IP is not banned!");
}
@@ -401,10 +397,10 @@ public class ServerControl extends Module {
}
if(target != null){
- String ip = Net.getConnection(target.clientid).address;
- netServer.admins.adminPlayer(ip);
+ String id = netServer.admins.getTrace(Net.getConnection(target.clientid).address).uuid;
+ netServer.admins.adminPlayer(id, Net.getConnection(target.clientid).address);
NetEvents.handleAdminSet(target, true);
- info("Admin-ed player by IP: {0} / {1}", ip, arg[0]);
+ info("Admin-ed player by ID: {0} / {1}", id, arg[0]);
}else{
info("Nobody with that name could be found.");
}
@@ -426,24 +422,24 @@ public class ServerControl extends Module {
}
if(target != null){
- String ip = Net.getConnection(target.clientid).address;
- netServer.admins.unAdminPlayer(ip);
+ String id = netServer.admins.getTrace(Net.getConnection(target.clientid).address).uuid;
+ netServer.admins.unAdminPlayer(id);
NetEvents.handleAdminSet(target, false);
- info("Un-admin-ed player by IP: {0} / {1}", ip, arg[0]);
+ info("Un-admin-ed player by ID: {0} / {1}", id, arg[0]);
}else{
info("Nobody with that name could be found.");
}
});
handler.register("admins", "List all admins.", arg -> {
- Array admins = netServer.admins.getAdmins();
+ Array admins = netServer.admins.getAdmins();
if(admins.size == 0){
Log.info("No admins have been found.");
}else{
Log.info("&lyAdmins:");
- for(String string : admins){
- Log.info(" &luy {0} / Name: '{1}'", string, netServer.admins.getLastName(string));
+ for(PlayerInfo info : admins){
+ Log.info(" &luy {0} / ID: '{1}' / IP: '{2}'", info.lastName, info.id, info.lastIP);
}
}
});
@@ -508,7 +504,7 @@ public class ServerControl extends Module {
info("Core destroyed.");
});
- handler.register("info", "Print debug info", arg -> {
+ handler.register("debug", "Print debug info", arg -> {
info(DebugFragment.debugInfo());
});
@@ -539,6 +535,23 @@ public class ServerControl extends Module {
}
});
+ handler.register("info", "", "Get global info for a player's UUID.", arg -> {
+ PlayerInfo info = netServer.admins.getInfoOptional(arg[0]);
+
+ if(info != null){
+ Log.info("&lcTrace info for player '{0}':", info.lastName);
+ Log.info(" &lyall names used: {0}", info.names);
+ Log.info(" &lyIP: {0}", info.lastIP);
+ Log.info(" &lyall IPs used: {0}", info.ips);
+ Log.info(" &lytimes joined: {0}", info.timesJoined);
+ Log.info("");
+ Log.info(" &lytotal blocks broken: {0}", info.totalBlocksBroken);
+ Log.info(" &lytotal blocks placed: {0}", info.totalBlockPlaced);
+ }else{
+ info("Nobody with that UUID could be found.");
+ }
+ });
+
handler.register("trace", "", "Trace a player's actions", arg -> {
if(!state.is(State.playing)) {
err("Open the server first.");