Compare commits
56 Commits
fix1
...
2019-05-31
Author | SHA1 | Date | |
---|---|---|---|
16f839943b | |||
1d33e15ea5 | |||
dfa47c2519 | |||
34a7242616 | |||
c199a33bb8 | |||
b057341a07 | |||
eee4cb8112 | |||
0f78ef70de | |||
fac33e369f | |||
00148f4770 | |||
e57faeb8cf | |||
6995c3e768 | |||
69b172f001 | |||
908a087570 | |||
a2f7f62bf2 | |||
907797ba11 | |||
c30e7ce0fa | |||
dc16606b8a | |||
2a521af511 | |||
2af55ad7c5 | |||
fa5b88197e | |||
c6e81f2882 | |||
fc529993b8 | |||
2ac9f2d3f4 | |||
a755607f7d | |||
f6b8c941c3 | |||
96161c18dc | |||
217ea08cac | |||
cba3e847d9 | |||
3e001599a6 | |||
347d6ffaa4 | |||
1470570405 | |||
a33f58df61 | |||
770978c632 | |||
2c36937054 | |||
523978edcf | |||
7657d0d1f2 | |||
66265132dd | |||
9daf035d44 | |||
db0973439c | |||
4481ea8726 | |||
9dab7d8736 | |||
a6caa51a85 | |||
707f28c309 | |||
a6be7f222d | |||
b85eabb58d | |||
5bbaa4f294 | |||
9d6d9b11e1 | |||
931a3e2b15 | |||
fef163662a | |||
7735a3a382 | |||
700baef196 | |||
d85713cf63 | |||
cbe3c8a811 | |||
f40f588367 | |||
62989f1e1d |
600
LICENSE
Normal file
@ -0,0 +1,600 @@
|
||||
License for code: LGPL 3.0
|
||||
License for media and all other assets: CC-by-SA 4.0
|
||||
|
||||
###############################################################################
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
###############################################################################
|
||||
|
||||
Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
|
||||
including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
@ -1,8 +1,4 @@
|
||||
Most code and all textures by Vanessa Ezekowitz.
|
||||
Most code and all textures by Vanessa Dannenberg.
|
||||
|
||||
Some code copied and modified from the game's default mods (especially
|
||||
doors) and ironzorg's flowers mod.
|
||||
|
||||
Licenses:
|
||||
* For the lua code, BSD.
|
||||
* For all images and everything else, WTFPL.
|
||||
|
@ -1,4 +1,6 @@
|
||||
default
|
||||
basic_materials
|
||||
intllib?
|
||||
screwdriver?
|
||||
keyword_interact?
|
||||
craft_guide?
|
||||
|
1
description.txt
Normal file
@ -0,0 +1 @@
|
||||
Adds signs with readable text.
|
265
encoding.lua
Normal file
@ -0,0 +1,265 @@
|
||||
-- encoding borrowed from signs_lib mod of https://github.com/lord-server/lord
|
||||
|
||||
local ansi_decode = {
|
||||
[128] = "\208\130",
|
||||
[129] = "\208\131",
|
||||
[130] = "\226\128\154",
|
||||
[131] = "\209\147",
|
||||
[132] = "\226\128\158",
|
||||
[133] = "\226\128\166",
|
||||
[134] = "\226\128\160",
|
||||
[135] = "\226\128\161",
|
||||
[136] = "\226\130\172",
|
||||
[137] = "\226\128\176",
|
||||
[138] = "\208\137",
|
||||
[139] = "\226\128\185",
|
||||
[140] = "\208\138",
|
||||
[141] = "\208\140",
|
||||
[142] = "\208\139",
|
||||
[143] = "\208\143",
|
||||
[144] = "\209\146",
|
||||
[145] = "\226\128\152",
|
||||
[146] = "\226\128\153",
|
||||
[147] = "\226\128\156",
|
||||
[148] = "\226\128\157",
|
||||
[149] = "\226\128\162",
|
||||
[150] = "\226\128\147",
|
||||
[151] = "\226\128\148",
|
||||
[152] = "\194\152",
|
||||
[153] = "\226\132\162",
|
||||
[154] = "\209\153",
|
||||
[155] = "\226\128\186",
|
||||
[156] = "\209\154",
|
||||
[157] = "\209\156",
|
||||
[158] = "\209\155",
|
||||
[159] = "\209\159",
|
||||
[160] = "\194\160",
|
||||
[161] = "\209\142",
|
||||
[162] = "\209\158",
|
||||
[163] = "\208\136",
|
||||
[164] = "\194\164",
|
||||
[165] = "\210\144",
|
||||
[166] = "\194\166",
|
||||
[167] = "\194\167",
|
||||
[168] = "\208\129",
|
||||
[169] = "\194\169",
|
||||
[170] = "\208\132",
|
||||
[171] = "\194\171",
|
||||
[172] = "\194\172",
|
||||
[173] = "\194\173",
|
||||
[174] = "\194\174",
|
||||
[175] = "\208\135",
|
||||
[176] = "\194\176",
|
||||
[177] = "\194\177",
|
||||
[178] = "\208\134",
|
||||
[179] = "\209\150",
|
||||
[180] = "\210\145",
|
||||
[181] = "\194\181",
|
||||
[182] = "\194\182",
|
||||
[183] = "\194\183",
|
||||
[184] = "\209\145",
|
||||
[185] = "\226\132\150",
|
||||
[186] = "\209\148",
|
||||
[187] = "\194\187",
|
||||
[188] = "\209\152",
|
||||
[189] = "\208\133",
|
||||
[190] = "\209\149",
|
||||
[191] = "\209\151"
|
||||
}
|
||||
local utf8_decode = {
|
||||
[128] = {
|
||||
[147] = "\150",
|
||||
[148] = "\151",
|
||||
[152] = "\145",
|
||||
[153] = "\146",
|
||||
[154] = "\130",
|
||||
[156] = "\147",
|
||||
[157] = "\148",
|
||||
[158] = "\132",
|
||||
[160] = "\134",
|
||||
[161] = "\135",
|
||||
[162] = "\149",
|
||||
[166] = "\133",
|
||||
[176] = "\137",
|
||||
[185] = "\139",
|
||||
[186] = "\155"
|
||||
},
|
||||
[130] = {[172] = "\136"},
|
||||
[132] = {[150] = "\185", [162] = "\153"},
|
||||
[194] = {
|
||||
[152] = "\152",
|
||||
[160] = "\160",
|
||||
[164] = "\164",
|
||||
[166] = "\166",
|
||||
[167] = "\167",
|
||||
[169] = "\169",
|
||||
[171] = "\171",
|
||||
[172] = "\172",
|
||||
[173] = "\173",
|
||||
[174] = "\174",
|
||||
[176] = "\176",
|
||||
[177] = "\177",
|
||||
[181] = "\181",
|
||||
[182] = "\182",
|
||||
[183] = "\183",
|
||||
[187] = "\187"
|
||||
},
|
||||
[208] = {
|
||||
[129] = "\168",
|
||||
[130] = "\128",
|
||||
[131] = "\129",
|
||||
[132] = "\170",
|
||||
[133] = "\189",
|
||||
[134] = "\178",
|
||||
[135] = "\175",
|
||||
[136] = "\163",
|
||||
[137] = "\138",
|
||||
[138] = "\140",
|
||||
[139] = "\142",
|
||||
[140] = "\141",
|
||||
[143] = "\143",
|
||||
[144] = "\192",
|
||||
[145] = "\193",
|
||||
[146] = "\194",
|
||||
[147] = "\195",
|
||||
[148] = "\196",
|
||||
[149] = "\197",
|
||||
[150] = "\198",
|
||||
[151] = "\199",
|
||||
[152] = "\200",
|
||||
[153] = "\201",
|
||||
[154] = "\202",
|
||||
[155] = "\203",
|
||||
[156] = "\204",
|
||||
[157] = "\205",
|
||||
[158] = "\206",
|
||||
[159] = "\207",
|
||||
[160] = "\208",
|
||||
[161] = "\209",
|
||||
[162] = "\210",
|
||||
[163] = "\211",
|
||||
[164] = "\212",
|
||||
[165] = "\213",
|
||||
[166] = "\214",
|
||||
[167] = "\215",
|
||||
[168] = "\216",
|
||||
[169] = "\217",
|
||||
[170] = "\218",
|
||||
[171] = "\219",
|
||||
[172] = "\220",
|
||||
[173] = "\221",
|
||||
[174] = "\222",
|
||||
[175] = "\223",
|
||||
[176] = "\224",
|
||||
[177] = "\225",
|
||||
[178] = "\226",
|
||||
[179] = "\227",
|
||||
[180] = "\228",
|
||||
[181] = "\229",
|
||||
[182] = "\230",
|
||||
[183] = "\231",
|
||||
[184] = "\232",
|
||||
[185] = "\233",
|
||||
[186] = "\234",
|
||||
[187] = "\235",
|
||||
[188] = "\236",
|
||||
[189] = "\237",
|
||||
[190] = "\238",
|
||||
[191] = "\239"
|
||||
},
|
||||
[209] = {
|
||||
[128] = "\240",
|
||||
[129] = "\241",
|
||||
[130] = "\242",
|
||||
[131] = "\243",
|
||||
[132] = "\244",
|
||||
[133] = "\245",
|
||||
[134] = "\246",
|
||||
[135] = "\247",
|
||||
[136] = "\248",
|
||||
[137] = "\249",
|
||||
[138] = "\250",
|
||||
[139] = "\251",
|
||||
[140] = "\252",
|
||||
[141] = "\253",
|
||||
[142] = "\254",
|
||||
[143] = "\255",
|
||||
[144] = "\161",
|
||||
[145] = "\184",
|
||||
[146] = "\144",
|
||||
[147] = "\131",
|
||||
[148] = "\186",
|
||||
[149] = "\190",
|
||||
[150] = "\179",
|
||||
[151] = "\191",
|
||||
[152] = "\188",
|
||||
[153] = "\154",
|
||||
[154] = "\156",
|
||||
[155] = "\158",
|
||||
[156] = "\157",
|
||||
[158] = "\162",
|
||||
[159] = "\159"
|
||||
},
|
||||
[210] = {[144] = "\165", [145] = "\180"}
|
||||
}
|
||||
|
||||
local nmdc = {
|
||||
[36] = "$",
|
||||
[124] = "|"
|
||||
}
|
||||
|
||||
function AnsiToUtf8(s)
|
||||
local r, b = ""
|
||||
for i = 1, s and s:len() or 0 do
|
||||
b = s:byte(i)
|
||||
if b < 128 then
|
||||
r = r .. string.char(b)
|
||||
else
|
||||
if b > 239 then
|
||||
r = r .. "\209" .. string.char(b - 112)
|
||||
elseif b > 191 then
|
||||
r = r .. "\208" .. string.char(b - 48)
|
||||
elseif ansi_decode[b] then
|
||||
r = r .. ansi_decode[b]
|
||||
else
|
||||
r = r .. "_"
|
||||
end
|
||||
end
|
||||
end
|
||||
return r
|
||||
end
|
||||
|
||||
function Utf8ToAnsi(s)
|
||||
local a, j, r, b = 0, 0, ""
|
||||
for i = 1, s and s:len() or 0 do
|
||||
b = s:byte(i)
|
||||
if b < 128 then
|
||||
if nmdc[b] then
|
||||
r = r .. nmdc[b]
|
||||
else
|
||||
r = r .. string.char(b)
|
||||
end
|
||||
elseif a == 2 then
|
||||
a, j = a - 1, b
|
||||
elseif a == 1 then
|
||||
--if j == nil or b == nil then return r end
|
||||
--print(j)
|
||||
--print(b)
|
||||
--local ansi = utf8_decode[j]
|
||||
--if ansi == nil then return r end
|
||||
--if ansi[b] == nil then return r end
|
||||
if utf8_decode[j] then
|
||||
if utf8_decode[j][b] then
|
||||
a, r = a - 1, r .. utf8_decode[j][b]
|
||||
end
|
||||
end
|
||||
elseif b == 226 then
|
||||
a = 2
|
||||
elseif b == 194 or b == 208 or b == 209 or b == 210 then
|
||||
j, a = b, 1
|
||||
else
|
||||
r = r .. "_"
|
||||
end
|
||||
end
|
||||
return r
|
||||
end
|
536
init.lua
@ -9,28 +9,86 @@
|
||||
-- { delta = {entity position for 270° yaw}, exact yaw expression }
|
||||
-- { delta = {entity position for 90° yaw}, exact yaw expression }
|
||||
-- }
|
||||
-- Made colored metal signs optionals
|
||||
local enable_colored_metal_signs = true
|
||||
|
||||
-- CWz's keyword interact mod uses this setting.
|
||||
local current_keyword = minetest.setting_get("interact_keyword") or "iaccept"
|
||||
local current_keyword = minetest.settings:get("interact_keyword") or "iaccept"
|
||||
|
||||
signs_lib = {}
|
||||
signs_lib.path = minetest.get_modpath(minetest.get_current_modname())
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
|
||||
if mode ~= screwdriver.ROTATE_AXIS then return false end
|
||||
minetest.swap_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
|
||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
||||
local e = v:get_luaentity()
|
||||
if e and e.name == "signs:text" then
|
||||
v:remove()
|
||||
-- Load support for intllib.
|
||||
local S, NS = dofile(signs_lib.path .. "/intllib.lua")
|
||||
signs_lib.gettext = S
|
||||
|
||||
-- text encoding
|
||||
dofile(signs_lib.path .. "/encoding.lua");
|
||||
|
||||
-- Initialize character texture cache
|
||||
local ctexcache = {}
|
||||
|
||||
|
||||
local wall_dir_change = {
|
||||
[0] = 4,
|
||||
0,
|
||||
5,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
0
|
||||
}
|
||||
|
||||
signs_lib.wallmounted_rotate = function(pos, node, user, mode)
|
||||
if minetest.is_protected(pos, user:get_player_name()) then
|
||||
minetest.record_protection_violation(pos,
|
||||
sender:get_player_name())
|
||||
return false
|
||||
end
|
||||
end
|
||||
signs_lib.update_sign(pos)
|
||||
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||
minetest.swap_node(pos, { name = node.name, param2 = wall_dir_change[node.param2 % 6] })
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
return true
|
||||
end
|
||||
|
||||
signs_lib.facedir_rotate = function(pos, node, user, mode)
|
||||
if minetest.is_protected(pos, user:get_player_name()) then
|
||||
minetest.record_protection_violation(pos,
|
||||
sender:get_player_name())
|
||||
return false
|
||||
end
|
||||
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||
local newparam2 = (node.param2 %8) + 1
|
||||
if newparam2 == 5 then
|
||||
newparam2 = 6
|
||||
elseif newparam2 > 6 then
|
||||
newparam2 = 0
|
||||
end
|
||||
minetest.swap_node(pos, { name = node.name, param2 = newparam2 })
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
return true
|
||||
end
|
||||
|
||||
signs_lib.facedir_rotate_simple = function(pos, node, user, mode)
|
||||
if minetest.is_protected(pos, user:get_player_name()) then
|
||||
minetest.record_protection_violation(pos,
|
||||
sender:get_player_name())
|
||||
return false
|
||||
end
|
||||
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||
local newparam2 = (node.param2 %8) + 1
|
||||
if newparam2 > 3 then newparam2 = 0 end
|
||||
minetest.swap_node(pos, { name = node.name, param2 = newparam2 })
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
signs_lib.modpath = minetest.get_modpath("signs_lib")
|
||||
|
||||
local DEFAULT_TEXT_SCALE = {x=0.8, y=0.5}
|
||||
|
||||
signs_lib.regular_wall_sign_model = {
|
||||
nodebox = {
|
||||
type = "wallmounted",
|
||||
@ -41,10 +99,10 @@ signs_lib.regular_wall_sign_model = {
|
||||
textpos = {
|
||||
nil,
|
||||
nil,
|
||||
{delta = {x = 0.43, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = {x = -0.43, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
{delta = {x = 0, y = 0.07, z = 0.43 }, yaw = 0},
|
||||
{delta = {x = 0, y = 0.07, z = -0.43 }, yaw = math.pi},
|
||||
{delta = { x = 0.41, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = { x = -0.41, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
{delta = { x = 0, y = 0.07, z = 0.41 }, yaw = 0},
|
||||
{delta = { x = 0, y = 0.07, z = -0.41 }, yaw = math.pi},
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,10 +112,10 @@ signs_lib.metal_wall_sign_model = {
|
||||
fixed = {-0.4375, -0.25, 0.4375, 0.4375, 0.375, 0.5}
|
||||
},
|
||||
textpos = {
|
||||
{delta = {x = 0, y = 0.07, z = 0.43 }, yaw = 0},
|
||||
{delta = {x = 0.43, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = {x = 0, y = 0.07, z = -0.43 }, yaw = math.pi},
|
||||
{delta = {x = -0.43, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
{delta = { x = 0, y = 0.07, z = 0.41 }, yaw = 0},
|
||||
{delta = { x = 0.41, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = { x = 0, y = 0.07, z = -0.41 }, yaw = math.pi},
|
||||
{delta = { x = -0.41, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,10 +128,10 @@ signs_lib.yard_sign_model = {
|
||||
}
|
||||
},
|
||||
textpos = {
|
||||
{delta = {x = 0, y = 0.07, z = -0.068}, yaw = 0},
|
||||
{delta = {x = -0.068, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = {x = 0, y = 0.07, z = 0.068}, yaw = math.pi},
|
||||
{delta = {x = 0.068, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
{delta = { x = 0, y = 0.07, z = -0.08 }, yaw = 0},
|
||||
{delta = { x = -0.08, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = { x = 0, y = 0.07, z = 0.08 }, yaw = math.pi},
|
||||
{delta = { x = 0.08, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,10 +144,10 @@ signs_lib.hanging_sign_model = {
|
||||
}
|
||||
},
|
||||
textpos = {
|
||||
{delta = {x = 0, y = -0.02, z = -0.063}, yaw = 0},
|
||||
{delta = {x = -0.063, y = -0.02, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = {x = 0, y = -0.02, z = 0.063}, yaw = math.pi},
|
||||
{delta = {x = 0.063, y = -0.02, z = 0 }, yaw = math.pi / 2},
|
||||
{delta = { x = 0, y = -0.02, z = -0.08 }, yaw = 0},
|
||||
{delta = { x = -0.08, y = -0.02, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = { x = 0, y = -0.02, z = 0.08 }, yaw = math.pi},
|
||||
{delta = { x = 0.08, y = -0.02, z = 0 }, yaw = math.pi / 2},
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,21 +160,24 @@ signs_lib.sign_post_model = {
|
||||
}
|
||||
},
|
||||
textpos = {
|
||||
{delta = {x = 0, y = 0.07, z = -0.188}, yaw = 0},
|
||||
{delta = {x = -0.188, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = {x = 0, y = 0.07, z = 0.188 }, yaw = math.pi},
|
||||
{delta = {x = 0.188, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
{delta = { x = 0, y = 0.07, z = -0.2 }, yaw = 0},
|
||||
{delta = { x = -0.2, y = 0.07, z = 0 }, yaw = math.pi / -2},
|
||||
{delta = { x = 0, y = 0.07, z = 0.2 }, yaw = math.pi},
|
||||
{delta = { x = 0.2, y = 0.07, z = 0 }, yaw = math.pi / 2},
|
||||
}
|
||||
}
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
|
||||
signs_lib.gettext = S
|
||||
|
||||
-- the list of standard sign nodes
|
||||
|
||||
local default_sign = "default:sign_wall_wood"
|
||||
local default_sign_image = "default_sign_wood.png"
|
||||
|
||||
local default_sign_metal = "default:sign_wall_steel"
|
||||
local default_sign_metal_image = "default_sign_steel.png"
|
||||
|
||||
signs_lib.sign_node_list = {
|
||||
"default:sign_wall_wood",
|
||||
default_sign,
|
||||
default_sign_metal,
|
||||
"signs:sign_yard",
|
||||
"signs:sign_hanging",
|
||||
"signs:sign_wall_green",
|
||||
@ -130,21 +191,10 @@ signs_lib.sign_node_list = {
|
||||
"locked_sign:sign_wall_locked"
|
||||
}
|
||||
|
||||
local default_sign, default_sign_image
|
||||
|
||||
-- Default sign was renamed in 0.4.14. Support both & old versions.
|
||||
if minetest.registered_nodes["default:sign_wall_wood"] then
|
||||
default_sign = "default:sign_wall_wood"
|
||||
default_sign_image = "default_sign_wood.png"
|
||||
else
|
||||
default_sign = "default:sign_wall"
|
||||
default_sign_image = "default_sign_wall.png"
|
||||
end
|
||||
|
||||
--table copy
|
||||
|
||||
function signs_lib.table_copy(t)
|
||||
local nt = { };
|
||||
local nt = { }
|
||||
for k, v in pairs(t) do
|
||||
if type(v) == "table" then
|
||||
nt[k] = signs_lib.table_copy(v)
|
||||
@ -157,7 +207,7 @@ end
|
||||
|
||||
-- infinite stacks
|
||||
|
||||
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
signs_lib.expect_infinite_stacks = false
|
||||
else
|
||||
signs_lib.expect_infinite_stacks = true
|
||||
@ -165,30 +215,48 @@ end
|
||||
|
||||
-- CONSTANTS
|
||||
|
||||
local MP = minetest.get_modpath("signs_lib")
|
||||
|
||||
-- Used by `build_char_db' to locate the file.
|
||||
local FONT_FMT = "%s/hdf_%02x.png"
|
||||
|
||||
-- Simple texture name for building text texture.
|
||||
local FONT_FMT_SIMPLE = "hdf_%02x.png"
|
||||
|
||||
-- Path to the textures.
|
||||
local TP = MP.."/textures"
|
||||
local TP = signs_lib.path .. "/textures"
|
||||
-- Font file formatter
|
||||
local CHAR_FILE = "%s_%02x.png"
|
||||
-- Fonts path
|
||||
local CHAR_PATH = TP .. "/" .. CHAR_FILE
|
||||
|
||||
local TEXT_SCALE = {x=0.8, y=0.5}
|
||||
-- Font name.
|
||||
local font_name = "hdf"
|
||||
|
||||
-- Lots of overkill here. KISS advocates, go away, shoo! ;) -- kaeza
|
||||
|
||||
local PNG_HDR = string.char(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)
|
||||
|
||||
-- check if a file does exist
|
||||
-- to avoid reopening file after checking again
|
||||
-- pass TRUE as second argument
|
||||
function file_exists(name, return_handle, mode)
|
||||
mode = mode or "r";
|
||||
local f = io.open(name, mode)
|
||||
if f ~= nil then
|
||||
if (return_handle) then
|
||||
return f
|
||||
end
|
||||
io.close(f)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Read the image size from a PNG file.
|
||||
-- Returns image_w, image_h.
|
||||
-- Only the LSB is read from each field!
|
||||
local function read_image_size(filename)
|
||||
local f = io.open(filename, "rb")
|
||||
local f = file_exists(filename, true, "rb")
|
||||
-- file might not exist (don't crash the game)
|
||||
if (not f) then
|
||||
return 0, 0
|
||||
end
|
||||
f:seek("set", 0x0)
|
||||
local hdr = f:read(8)
|
||||
local hdr = f:read(string.len(PNG_HDR))
|
||||
if hdr ~= PNG_HDR then
|
||||
f:close()
|
||||
return
|
||||
@ -236,8 +304,8 @@ local function build_char_db()
|
||||
local total_width = 0
|
||||
local char_count = 0
|
||||
|
||||
for c = 32, 126 do
|
||||
local w, h = read_image_size(FONT_FMT:format(TP, c))
|
||||
for c = 32, 255 do
|
||||
local w, h = read_image_size(CHAR_PATH:format(font_name, c))
|
||||
if w and h then
|
||||
local ch = string.char(c)
|
||||
charwidth[ch] = w
|
||||
@ -301,19 +369,57 @@ local function fill_line(x, y, w, c)
|
||||
return table.concat(tex)
|
||||
end
|
||||
|
||||
local function make_line_texture(line, lineno)
|
||||
-- make char texture file name
|
||||
-- if texture file does not exist use fallback texture instead
|
||||
local function char_tex(font_name, ch)
|
||||
if ctexcache[font_name..ch] then
|
||||
return ctexcache[font_name..ch], true
|
||||
else
|
||||
local c = ch:byte()
|
||||
local exists, tex = file_exists(CHAR_PATH:format(font_name, c))
|
||||
if exists and c ~= 14 then
|
||||
tex = CHAR_FILE:format(font_name, c)
|
||||
else
|
||||
tex = CHAR_FILE:format(font_name, 0x0)
|
||||
end
|
||||
ctexcache[font_name..ch] = tex
|
||||
return tex, exists
|
||||
end
|
||||
end
|
||||
|
||||
local function make_line_texture(line, lineno, pos)
|
||||
|
||||
local width = 0
|
||||
local maxw = 0
|
||||
|
||||
local words = { }
|
||||
local n = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||
local default_color = n.default_color or 0
|
||||
|
||||
local cur_color = 0
|
||||
local cur_color = tonumber(default_color, 16)
|
||||
|
||||
-- We check which chars are available here.
|
||||
for word_i, word in ipairs(line) do
|
||||
local chars = { }
|
||||
local ch_offs = 0
|
||||
word = string.gsub(word, "%^[12345678abcdefgh]", {
|
||||
["^1"] = string.char(0x81),
|
||||
["^2"] = string.char(0x82),
|
||||
["^3"] = string.char(0x83),
|
||||
["^4"] = string.char(0x84),
|
||||
["^5"] = string.char(0x85),
|
||||
["^6"] = string.char(0x86),
|
||||
["^7"] = string.char(0x87),
|
||||
["^8"] = string.char(0x88),
|
||||
["^a"] = string.char(0x8a),
|
||||
["^b"] = string.char(0x8b),
|
||||
["^c"] = string.char(0x8c),
|
||||
["^d"] = string.char(0x8d),
|
||||
["^e"] = string.char(0x8e),
|
||||
["^f"] = string.char(0x8f),
|
||||
["^g"] = string.char(0x90),
|
||||
["^h"] = string.char(0x91)
|
||||
})
|
||||
local word_l = #word
|
||||
local i = 1
|
||||
while i <= word_l do
|
||||
@ -336,7 +442,7 @@ local function make_line_texture(line, lineno)
|
||||
if #chars < MAX_INPUT_CHARS then
|
||||
table.insert(chars, {
|
||||
off = ch_offs,
|
||||
tex=FONT_FMT_SIMPLE:format(c:byte()),
|
||||
tex = char_tex(font_name, c),
|
||||
col = ("%X"):format(cur_color),
|
||||
})
|
||||
end
|
||||
@ -378,7 +484,10 @@ local function make_line_texture(line, lineno)
|
||||
end
|
||||
table.insert(texture, (":%d,%d=%s"):format(xpos + ch.off, ypos, ch.tex))
|
||||
end
|
||||
table.insert(texture, (":%d,%d=hdf_20.png"):format(xpos + word.w, ypos))
|
||||
table.insert(
|
||||
texture,
|
||||
(":%d,%d="):format(xpos + word.w, ypos) .. char_tex(font_name, " ")
|
||||
)
|
||||
xpos = xpos + word.w + charwidth[" "]
|
||||
if xpos >= (SIGN_WIDTH + charwidth[" "]) then break end
|
||||
end
|
||||
@ -389,12 +498,12 @@ local function make_line_texture(line, lineno)
|
||||
return table.concat(texture), lineno
|
||||
end
|
||||
|
||||
local function make_sign_texture(lines)
|
||||
local function make_sign_texture(lines, pos)
|
||||
local texture = { ("[combine:%dx%d"):format(SIGN_WIDTH, LINE_HEIGHT * NUMBER_OF_LINES) }
|
||||
local lineno = 0
|
||||
for i = 1, #lines do
|
||||
if lineno >= NUMBER_OF_LINES then break end
|
||||
local linetex, ln = make_line_texture(lines[i], lineno)
|
||||
local linetex, ln = make_line_texture(lines[i], lineno, pos)
|
||||
table.insert(texture, linetex)
|
||||
lineno = ln + 1
|
||||
end
|
||||
@ -402,11 +511,14 @@ local function make_sign_texture(lines)
|
||||
return table.concat(texture, "")
|
||||
end
|
||||
|
||||
local function set_obj_text(obj, text, new)
|
||||
local function set_obj_text(obj, text, new, pos)
|
||||
local split = new and split_lines_and_words or split_lines_and_words_old
|
||||
local text_ansi = Utf8ToAnsi(text)
|
||||
local n = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||
local text_scale = (n and n.text_scale) or DEFAULT_TEXT_SCALE
|
||||
obj:set_properties({
|
||||
textures={make_sign_texture(split(text))},
|
||||
visual_size = TEXT_SCALE,
|
||||
textures={make_sign_texture(split(text_ansi), pos)},
|
||||
visual_size = text_scale,
|
||||
})
|
||||
end
|
||||
|
||||
@ -416,7 +528,7 @@ signs_lib.construct_sign = function(pos, locked)
|
||||
"formspec",
|
||||
"size[6,4]"..
|
||||
"textarea[0,-0.3;6.5,3;text;;${text}]"..
|
||||
"button_exit[2,3.4;2,1;ok;Write]"..
|
||||
"button_exit[2,3.4;2,1;ok;"..S("Write").."]"..
|
||||
"background[-0.5,-0.5;7,5;bg_signs_lib.jpg]")
|
||||
meta:set_string("infotext", "")
|
||||
end
|
||||
@ -441,7 +553,7 @@ local function make_infotext(text)
|
||||
return table.concat(lines2, "\n")
|
||||
end
|
||||
|
||||
signs_lib.update_sign = function(pos, fields, owner)
|
||||
signs_lib.update_sign = function(pos, fields, owner, node)
|
||||
|
||||
-- First, check if the interact keyword from CWz's mod is being set,
|
||||
-- or has been changed since the last restart...
|
||||
@ -463,7 +575,7 @@ signs_lib.update_sign = function(pos, fields, owner)
|
||||
signs_lib.destruct_sign(pos)
|
||||
meta:set_string("keyword", current_keyword)
|
||||
local ownstr = ""
|
||||
if owner then ownstr = "Locked sign, owned by "..owner.."\n" end
|
||||
if owner then ownstr = S("Locked sign, owned by @1\n", owner) end
|
||||
meta:set_string("infotext", ownstr..string.gsub(make_infotext(stored_text), "@KEYWORD", current_keyword).." ")
|
||||
end
|
||||
end
|
||||
@ -475,7 +587,7 @@ signs_lib.update_sign = function(pos, fields, owner)
|
||||
fields.text = trim_input(fields.text)
|
||||
|
||||
local ownstr = ""
|
||||
if owner then ownstr = "Locked sign, owned by "..owner.."\n" end
|
||||
if owner then ownstr = S("Locked sign, owned by @1\n", owner) end
|
||||
|
||||
meta:set_string("infotext", ownstr..string.gsub(make_infotext(fields.text), "@KEYWORD", current_keyword).." ")
|
||||
meta:set_string("text", fields.text)
|
||||
@ -485,17 +597,22 @@ signs_lib.update_sign = function(pos, fields, owner)
|
||||
else
|
||||
new = (meta:get_int("__signslib_new_format") ~= 0)
|
||||
end
|
||||
signs_lib.destruct_sign(pos)
|
||||
local text = meta:get_string("text")
|
||||
if text == nil then return end
|
||||
|
||||
if text == nil or text == "" then return end
|
||||
local sign_info
|
||||
local signnode = minetest.get_node(pos)
|
||||
if signnode.name == "signs:sign_yard" then
|
||||
local signnode = node or minetest.get_node(pos)
|
||||
local signname = signnode.name
|
||||
local textpos = minetest.registered_nodes[signname].textpos
|
||||
if textpos then
|
||||
sign_info = textpos[minetest.get_node(pos).param2 + 1]
|
||||
elseif signnode.name == "signs:sign_yard" then
|
||||
sign_info = signs_lib.yard_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||
elseif signnode.name == "signs:sign_hanging" then
|
||||
sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||
elseif string.find(signnode.name, "sign_wall") then
|
||||
if signnode.name == default_sign
|
||||
or signnode.name == default_sign_metal
|
||||
or signnode.name == "locked_sign:sign_wall_locked" then
|
||||
sign_info = signs_lib.regular_wall_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||
else
|
||||
@ -507,33 +624,10 @@ signs_lib.update_sign = function(pos, fields, owner)
|
||||
if sign_info == nil then
|
||||
return
|
||||
end
|
||||
|
||||
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||
local sign_obj
|
||||
for _, v in ipairs(objects) do
|
||||
local e = v:get_luaentity()
|
||||
if e and e.name == "signs:text" then
|
||||
if sign_obj then
|
||||
v:remove()
|
||||
else
|
||||
set_obj_text(v, text, new)
|
||||
sign_obj = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- if there is no entity, create one
|
||||
if not sign_obj then
|
||||
sign_obj = minetest.add_entity(pos, "signs:text")
|
||||
end
|
||||
|
||||
-- set pos and yaw here. solves issue #2
|
||||
sign_obj:setpos({
|
||||
x = pos.x + sign_info.delta.x,
|
||||
local text = minetest.add_entity({x = pos.x + sign_info.delta.x,
|
||||
y = pos.y + sign_info.delta.y,
|
||||
z = pos.z + sign_info.delta.z,
|
||||
})
|
||||
sign_obj:setyaw(sign_info.yaw)
|
||||
z = pos.z + sign_info.delta.z}, "signs:text")
|
||||
text:setyaw(sign_info.yaw)
|
||||
end
|
||||
|
||||
-- What kind of sign do we need to place, anyway?
|
||||
@ -562,8 +656,10 @@ function signs_lib.determine_sign_type(itemstack, placer, pointed_thing, locked)
|
||||
|
||||
local node=minetest.get_node(pointed_thing.under)
|
||||
|
||||
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
|
||||
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack)
|
||||
if minetest.registered_nodes[node.name] and
|
||||
minetest.registered_nodes[node.name].on_rightclick and
|
||||
not placer:get_player_control().sneak then
|
||||
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack, pointed_thing)
|
||||
else
|
||||
local above = pointed_thing.above
|
||||
local under = pointed_thing.under
|
||||
@ -581,29 +677,32 @@ function signs_lib.determine_sign_type(itemstack, placer, pointed_thing, locked)
|
||||
z = above.z - placer_pos.z
|
||||
}
|
||||
end
|
||||
local finalpos = above
|
||||
|
||||
local fdir = minetest.dir_to_facedir(dir)
|
||||
|
||||
local pt_name = minetest.get_node(under).name
|
||||
local signname = itemstack:get_name()
|
||||
|
||||
if fences_with_sign[pt_name] and signname == default_sign then
|
||||
minetest.add_node(under, {name = fences_with_sign[pt_name], param2 = fdir})
|
||||
finalpos = under
|
||||
elseif wdir == 0 and signname == default_sign then
|
||||
minetest.add_node(above, {name = "signs:sign_hanging", param2 = fdir})
|
||||
elseif wdir == 1 and signname == default_sign then
|
||||
minetest.add_node(above, {name = "signs:sign_yard", param2 = fdir})
|
||||
elseif signname ~= default_sign
|
||||
and signname ~= "locked_sign:sign_wall_locked" then -- it's a metal wall sign.
|
||||
minetest.add_node(above, {name = signname, param2 = fdir})
|
||||
else -- it must be a default or locked wooden wall sign
|
||||
minetest.add_node(above, {name = signname, param2 = wdir }) -- note it's wallmounted here!
|
||||
elseif signname == default_sign
|
||||
or signname == default_sign_metal
|
||||
or signname == "locked_sign:sign_wall_locked" then
|
||||
minetest.add_node(above, {name = signname, param2 = wdir })
|
||||
else
|
||||
minetest.add_node(above, {name = signname, param2 = fdir}) -- it must be a colored metal sign
|
||||
end
|
||||
|
||||
if locked then
|
||||
local meta = minetest.get_meta(above)
|
||||
local meta = minetest.get_meta(finalpos)
|
||||
local owner = placer:get_player_name()
|
||||
meta:set_string("owner", owner)
|
||||
end
|
||||
end
|
||||
|
||||
if not signs_lib.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
@ -618,11 +717,12 @@ function signs_lib.receive_fields(pos, formname, fields, sender, lock)
|
||||
sender:get_player_name())
|
||||
return
|
||||
end
|
||||
local lockstr = lock and "locked " or ""
|
||||
local lockstr = lock and S("locked ") or ""
|
||||
if fields and fields.text and fields.ok then
|
||||
minetest.log("action", S("%s wrote \"%s\" to "..lockstr.."sign at %s"):format(
|
||||
minetest.log("action", S("@1 wrote \"@2\" to @3sign at @4",
|
||||
(sender:get_player_name() or ""),
|
||||
fields.text,
|
||||
fields.text:gsub('\\', '\\\\'):gsub("\n", "\\n"),
|
||||
lockstr,
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
if lock then
|
||||
@ -659,7 +759,7 @@ minetest.register_node(":"..default_sign, {
|
||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
signs_lib.update_sign(pos)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end,
|
||||
on_rotate = signs_lib.wallmounted_rotate
|
||||
})
|
||||
@ -688,8 +788,10 @@ minetest.register_node(":signs:sign_yard", {
|
||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
signs_lib.update_sign(pos)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end,
|
||||
on_rotate = signs_lib.facedir_rotate_simple
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node(":signs:sign_hanging", {
|
||||
@ -723,8 +825,9 @@ minetest.register_node(":signs:sign_hanging", {
|
||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
signs_lib.update_sign(pos)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end,
|
||||
on_rotate = signs_lib.facedir_rotate_simple
|
||||
})
|
||||
|
||||
minetest.register_node(":signs:sign_post", {
|
||||
@ -749,14 +852,15 @@ minetest.register_node(":signs:sign_post", {
|
||||
{ items = { "default:fence_wood" }},
|
||||
},
|
||||
},
|
||||
on_rotate = signs_lib.facedir_rotate_simple
|
||||
})
|
||||
|
||||
-- Locked wall sign
|
||||
|
||||
minetest.register_privilege("sign_editor", "Can edit all locked signs")
|
||||
minetest.register_privilege("sign_editor", S("Can edit all locked signs"))
|
||||
|
||||
minetest.register_node(":locked_sign:sign_wall_locked", {
|
||||
description = S("Sign"),
|
||||
description = S("Locked Sign"),
|
||||
inventory_image = "signs_locked_inv.png",
|
||||
wield_image = "signs_locked_inv.png",
|
||||
node_placement_prediction = "",
|
||||
@ -780,34 +884,106 @@ minetest.register_node(":locked_sign:sign_wall_locked", {
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
local pname = sender:get_player_name() or ""
|
||||
if pname ~= owner and pname ~= minetest.setting_get("name")
|
||||
if pname ~= owner and pname ~= minetest.settings:get("name")
|
||||
and not minetest.check_player_privs(pname, {sign_editor=true}) then
|
||||
return
|
||||
end
|
||||
signs_lib.receive_fields(pos, formname, fields, sender, true)
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
signs_lib.update_sign(pos)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
local pname = player:get_player_name()
|
||||
return pname == owner or pname == minetest.setting_get("name")
|
||||
return pname == owner or pname == minetest.settings:get("name")
|
||||
or minetest.check_player_privs(pname, {sign_editor=true})
|
||||
end,
|
||||
on_rotate = signs_lib.wallmounted_rotate
|
||||
on_rotate = function(pos, node, user, mode)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
if owner == user:get_player_name() then
|
||||
signs_lib.wallmounted_rotate(pos, node, user, mode)
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- default metal sign
|
||||
|
||||
minetest.register_node(":"..default_sign_metal, {
|
||||
description = S("Sign"),
|
||||
inventory_image = default_sign_metal_image,
|
||||
wield_image = default_sign_metal_image,
|
||||
node_placement_prediction = "",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
drawtype = "nodebox",
|
||||
node_box = signs_lib.regular_wall_sign_model.nodebox,
|
||||
tiles = {"signs_wall_sign_metal.png"},
|
||||
groups = sign_groups,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return signs_lib.determine_sign_type(itemstack, placer, pointed_thing, true)
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
signs_lib.construct_sign(pos, true)
|
||||
end,
|
||||
on_destruct = function(pos)
|
||||
signs_lib.destruct_sign(pos)
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
local pname = sender:get_player_name() or ""
|
||||
if pname ~= owner and pname ~= minetest.settings:get("name")
|
||||
and not minetest.check_player_privs(pname, {sign_editor=true}) then
|
||||
return
|
||||
end
|
||||
signs_lib.receive_fields(pos, formname, fields, sender, true)
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
local pname = player:get_player_name()
|
||||
return pname == owner or pname == minetest.settings:get("name")
|
||||
or minetest.check_player_privs(pname, {sign_editor=true})
|
||||
end,
|
||||
on_rotate = function(pos, node, user, mode)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
if owner == user:get_player_name() then
|
||||
signs_lib.wallmounted_rotate(pos, node, user, mode)
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- metal, colored signs
|
||||
if enable_colored_metal_signs then
|
||||
-- array : color, translated color, default text color
|
||||
local sign_colors = {
|
||||
{"green", S("green"), "f"},
|
||||
{"yellow", S("yellow"), "0"},
|
||||
{"red", S("red"), "f"},
|
||||
{"white_red", S("white_red"), "4"},
|
||||
{"white_black", S("white_black"), "0"},
|
||||
{"orange", S("orange"), "0"},
|
||||
{"blue", S("blue"), "f"},
|
||||
{"brown", S("brown"), "f"},
|
||||
}
|
||||
|
||||
local sign_colors = { "green", "yellow", "red", "white_red", "white_black", "orange", "blue", "brown" }
|
||||
|
||||
for _, color in ipairs(sign_colors) do
|
||||
minetest.register_node(":signs:sign_wall_"..color, {
|
||||
description = S("Sign ("..color..", metal)"),
|
||||
inventory_image = "signs_"..color.."_inv.png",
|
||||
wield_image = "signs_"..color.."_inv.png",
|
||||
for i, color in ipairs(sign_colors) do
|
||||
minetest.register_node(":signs:sign_wall_"..color[1], {
|
||||
description = S("Sign (@1, metal)", color[2]),
|
||||
inventory_image = "signs_"..color[1].."_inv.png",
|
||||
wield_image = "signs_"..color[1].."_inv.png",
|
||||
node_placement_prediction = "",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
@ -820,8 +996,9 @@ for _, color in ipairs(sign_colors) do
|
||||
"signs_metal_sides.png",
|
||||
"signs_metal_sides.png",
|
||||
"signs_metal_back.png",
|
||||
"signs_"..color.."_front.png"
|
||||
"signs_"..color[1].."_front.png"
|
||||
},
|
||||
default_color = color[3],
|
||||
groups = sign_groups,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return signs_lib.determine_sign_type(itemstack, placer, pointed_thing)
|
||||
@ -836,20 +1013,23 @@ for _, color in ipairs(sign_colors) do
|
||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
signs_lib.update_sign(pos)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end,
|
||||
on_rotate = signs_lib.facedir_rotate
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local signs_text_on_activate
|
||||
|
||||
signs_text_on_activate = function(self)
|
||||
local meta = minetest.get_meta(self.object:getpos())
|
||||
local pos = self.object:getpos()
|
||||
local meta = minetest.get_meta(pos)
|
||||
local text = meta:get_string("text")
|
||||
local new = (meta:get_int("__signslib_new_format") ~= 0)
|
||||
if text then
|
||||
if text and minetest.registered_nodes[minetest.get_node(pos).name] then
|
||||
text = trim_input(text)
|
||||
set_obj_text(self.object, text, new)
|
||||
set_obj_text(self.object, text, new, pos)
|
||||
end
|
||||
end
|
||||
|
||||
@ -867,7 +1047,7 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
||||
local def = minetest.registered_nodes[fencename]
|
||||
local def_sign = minetest.registered_nodes[fencewithsignname]
|
||||
if not (def and def_sign) then
|
||||
minetest.log("warning", "[signs_lib] Attempt to register unknown node as fence")
|
||||
minetest.log("warning", "[signs_lib] "..S("Attempt to register unknown node as fence"))
|
||||
return
|
||||
end
|
||||
def = signs_lib.table_copy(def)
|
||||
@ -893,7 +1073,7 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
||||
end
|
||||
|
||||
if def_under and def_under.on_rightclick then
|
||||
return def_under.on_rightclick(pointed_thing.under, node_under, placer, itemstack) or itemstack
|
||||
return def_under.on_rightclick(pointed_thing.under, node_under, placer, itemstack, pointed_thing) or itemstack
|
||||
elseif def_under and def_under.buildable_to then
|
||||
minetest.add_node(pointed_thing.under, {name = fencename, param2 = fdir})
|
||||
if not signs_lib.expect_infinite_stacks then
|
||||
@ -919,18 +1099,19 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||
end
|
||||
def_sign.on_punch = function(pos, node, puncher, ...)
|
||||
signs_lib.update_sign(pos)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end
|
||||
local fencename = fencename
|
||||
def_sign.after_dig_node = function(pos, node, ...)
|
||||
node.name = fencename
|
||||
minetest.add_node(pos, node)
|
||||
end
|
||||
def_sign.on_rotate = signs_lib.facedir_rotate_simple
|
||||
|
||||
def_sign.drop = default_sign
|
||||
minetest.register_node(":"..fencename, def)
|
||||
minetest.register_node(":"..fencewithsignname, def_sign)
|
||||
table.insert(signs_lib.sign_node_list, fencewithsignname)
|
||||
minetest.log("debug", S("Registered %s and %s"):format(fencename, fencewithsignname))
|
||||
minetest.log("verbose", S("Registered @1 and @2", fencename, fencewithsignname))
|
||||
end
|
||||
|
||||
build_char_db()
|
||||
@ -940,45 +1121,37 @@ minetest.register_alias("sign_wall_locked", "locked_sign:sign_wall_locked")
|
||||
|
||||
signs_lib.register_fence_with_sign("default:fence_wood", "signs:sign_post")
|
||||
|
||||
-- restore signs' text after /clearobjects and the like
|
||||
-- restore signs' text after /clearobjects and the like, the next time
|
||||
-- a block is reloaded by the server.
|
||||
|
||||
minetest.register_abm({
|
||||
minetest.register_lbm({
|
||||
nodenames = signs_lib.sign_node_list,
|
||||
interval = 15,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
signs_lib.update_sign(pos)
|
||||
name = "signs_lib:restore_sign_text",
|
||||
label = "Restore sign text",
|
||||
run_at_every_load = true,
|
||||
action = function(pos, node)
|
||||
signs_lib.update_sign(pos,nil,nil,node)
|
||||
end
|
||||
})
|
||||
|
||||
-- locked sign
|
||||
|
||||
minetest.register_craft({
|
||||
output = "locked_sign:sign_wall_locked",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "group:wood", "default:steel_ingot"},
|
||||
{"", "group:stick", ""},
|
||||
}
|
||||
})
|
||||
|
||||
--Alternate recipe.
|
||||
|
||||
minetest.register_craft({
|
||||
output = "locked_sign:sign_wall_locked",
|
||||
recipe = {
|
||||
{default_sign},
|
||||
{"default:steel_ingot"},
|
||||
{"basic_materials:padlock"},
|
||||
},
|
||||
})
|
||||
|
||||
-- craft recipes for the metal signs
|
||||
if enable_colored_metal_signs then
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_green 4",
|
||||
output = "signs:sign_wall_green",
|
||||
recipe = {
|
||||
{ "dye:dark_green", "dye:white", "dye:dark_green" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -991,10 +1164,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_yellow 4",
|
||||
output = "signs:sign_wall_yellow",
|
||||
recipe = {
|
||||
{ "dye:yellow", "dye:black", "dye:yellow" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1007,10 +1180,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_red 4",
|
||||
output = "signs:sign_wall_red",
|
||||
recipe = {
|
||||
{ "dye:red", "dye:white", "dye:red" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1023,10 +1196,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_white_red 4",
|
||||
output = "signs:sign_wall_white_red",
|
||||
recipe = {
|
||||
{ "dye:white", "dye:red", "dye:white" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1039,10 +1212,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_white_black 4",
|
||||
output = "signs:sign_wall_white_black",
|
||||
recipe = {
|
||||
{ "dye:white", "dye:black", "dye:white" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1055,10 +1228,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_orange 4",
|
||||
output = "signs:sign_wall_orange",
|
||||
recipe = {
|
||||
{ "dye:orange", "dye:black", "dye:orange" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1071,10 +1244,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_blue 4",
|
||||
output = "signs:sign_wall_blue",
|
||||
recipe = {
|
||||
{ "dye:blue", "dye:white", "dye:blue" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1087,10 +1260,10 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "signs:sign_wall_brown 4",
|
||||
output = "signs:sign_wall_brown",
|
||||
recipe = {
|
||||
{ "dye:brown", "dye:white", "dye:brown" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ "", default_sign_metal, "" }
|
||||
},
|
||||
})
|
||||
|
||||
@ -1101,7 +1274,8 @@ minetest.register_craft( {
|
||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", S("signs loaded"))
|
||||
end
|
||||
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", S("[MOD] signs loaded"))
|
||||
end
|
||||
|
45
intllib.lua
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
97
locale/de.po
Normal file
@ -0,0 +1,97 @@
|
||||
# German Translation for the signs_lib mod.
|
||||
# Copyright (C) 2018 Vanessa Ezekowitz
|
||||
# This file is distributed under the same license as the signs_lib package.
|
||||
# Xanthin, 2017.
|
||||
# CodeXP <codexp@gmx.net>, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-31 18:31+0200\n"
|
||||
"PO-Revision-Date: 2018-03-24 22:00+0100\n"
|
||||
"Last-Translator: CodeXP <codexp@gmx.net>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Write"
|
||||
msgstr "schreiben"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked sign, owned by @1\n"
|
||||
msgstr "gesperrter Schild, gehört @1\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "locked "
|
||||
msgstr "gesperrt "
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
||||
msgstr "@1 schrieb \"@2\" auf das @3Schild bei @4"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign"
|
||||
msgstr "Schild"
|
||||
|
||||
#: init.lua
|
||||
msgid "Can edit all locked signs"
|
||||
msgstr "Kann alle gesperrte Schilder bearbeiten"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked Sign"
|
||||
msgstr "gesperrter Schild"
|
||||
|
||||
#: init.lua
|
||||
msgid "green"
|
||||
msgstr "grün"
|
||||
|
||||
#: init.lua
|
||||
msgid "yellow"
|
||||
msgstr "gelb"
|
||||
|
||||
#: init.lua
|
||||
msgid "red"
|
||||
msgstr "rot"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_red"
|
||||
msgstr "weißrot"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_black"
|
||||
msgstr "schwarzweiß"
|
||||
|
||||
#: init.lua
|
||||
msgid "orange"
|
||||
msgstr "orange"
|
||||
|
||||
#: init.lua
|
||||
msgid "blue"
|
||||
msgstr "blau"
|
||||
|
||||
#: init.lua
|
||||
msgid "brown"
|
||||
msgstr "braun"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign (@1, metal)"
|
||||
msgstr "Schild (@1, Metall)"
|
||||
|
||||
#: init.lua
|
||||
msgid "Attempt to register unknown node as fence"
|
||||
msgstr "Versuch ein unbekanntes Element als Zaun zu registrieren"
|
||||
|
||||
#: init.lua
|
||||
msgid "Registered @1 and @2"
|
||||
msgstr "Registrierte @1 und @2"
|
||||
|
||||
#: init.lua
|
||||
msgid "[MOD] signs loaded"
|
||||
msgstr "[MOD] Schilder-Mod geladen"
|
@ -1,9 +0,0 @@
|
||||
# Translation by Xanthin
|
||||
|
||||
Reading cached character database. = Lese zwischengespeicherte Buchstabendatenbank.
|
||||
Font seems to have changed. Rebuilding cache. = Schriftart scheint sich geaendert zu haben. Wiederaufbau des Zwischenspeichers.
|
||||
Could not find font line height in cached DB. Trying brute force. = Konnte die Schriftzeilenhoehe nicht in der zwischengespeicherten DB finden. Versuche Brute-Force.
|
||||
Sign = Schild
|
||||
%s wrote "%s" to sign at %s = %s schrieb "%s" auf das Schild bei %s
|
||||
Registered %s and %s = Registrierte %s und %s
|
||||
signs loaded = signs geladen
|
95
locale/es.po
Normal file
@ -0,0 +1,95 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-31 18:22+0200\n"
|
||||
"PO-Revision-Date: 2017-07-31 18:30+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Last-Translator: Carlos Barraza\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: es\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked sign, owned by @1\n"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "locked "
|
||||
msgstr "bloqueada "
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
||||
msgstr "@1 escribio \"@2\" en el cartel @3en @4"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign"
|
||||
msgstr "Letrero"
|
||||
|
||||
#: init.lua
|
||||
msgid "Can edit all locked signs"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Locked Sign"
|
||||
msgstr "Letrero bloqueada"
|
||||
|
||||
#: init.lua
|
||||
msgid "green"
|
||||
msgstr "verde"
|
||||
|
||||
#: init.lua
|
||||
msgid "yellow"
|
||||
msgstr "amarillo"
|
||||
|
||||
#: init.lua
|
||||
msgid "red"
|
||||
msgstr "rojo"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "white_red"
|
||||
msgstr "rojo y blanco"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "white_black"
|
||||
msgstr "negro y blanco"
|
||||
|
||||
#: init.lua
|
||||
msgid "orange"
|
||||
msgstr "naranja"
|
||||
|
||||
#: init.lua
|
||||
msgid "blue"
|
||||
msgstr "azul"
|
||||
|
||||
#: init.lua
|
||||
msgid "brown"
|
||||
msgstr "marrón"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Sign (@1, metal)"
|
||||
msgstr "Letrero (@1, metal)"
|
||||
|
||||
#: init.lua
|
||||
msgid "Attempt to register unknown node as fence"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Registered @1 and @2"
|
||||
msgstr "Registrado @1 y @2"
|
||||
|
||||
#: init.lua
|
||||
msgid "[MOD] signs loaded"
|
||||
msgstr "[MOD] signs cargados"
|
91
locale/fr.po
Normal file
@ -0,0 +1,91 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-31 18:13+0200\n"
|
||||
"PO-Revision-Date: 2017-07-31 18:22+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Last-Translator: fat115 <fat115@framasoft.org>\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"Language: fr\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked sign, owned by @1\n"
|
||||
msgstr "Panneau verrouillé, appartient à @1\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "locked "
|
||||
msgstr "verrouillé "
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
||||
msgstr "@1 a écrit \"@2\" sur le panneau @3en @4"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign"
|
||||
msgstr "Panneau"
|
||||
|
||||
#: init.lua
|
||||
msgid "Can edit all locked signs"
|
||||
msgstr "Peut modifier les panneaux verrouillés"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked Sign"
|
||||
msgstr "Panneau (verrouillé)"
|
||||
|
||||
#: init.lua
|
||||
msgid "green"
|
||||
msgstr "vert"
|
||||
|
||||
#: init.lua
|
||||
msgid "yellow"
|
||||
msgstr "jaune"
|
||||
|
||||
#: init.lua
|
||||
msgid "red"
|
||||
msgstr "rouge"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_red"
|
||||
msgstr "rouge et blanc"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_black"
|
||||
msgstr "noir et blanc"
|
||||
|
||||
#: init.lua
|
||||
msgid "orange"
|
||||
msgstr "orange"
|
||||
|
||||
#: init.lua
|
||||
msgid "blue"
|
||||
msgstr "bleu"
|
||||
|
||||
#: init.lua
|
||||
msgid "brown"
|
||||
msgstr "marron"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign (@1, metal)"
|
||||
msgstr "Panneau (@1, métal)"
|
||||
|
||||
#: init.lua
|
||||
msgid "Attempt to register unknown node as fence"
|
||||
msgstr "Tentative d'enregistrer un nœud inconnu comme barrière"
|
||||
|
||||
#: init.lua
|
||||
msgid "Registered @1 and @2"
|
||||
msgstr "Enregistrement de @1 et @"
|
||||
|
||||
#: init.lua
|
||||
msgid "[MOD] signs loaded"
|
||||
msgstr "[MOD] signs chargé"
|
91
locale/ms.po
Normal file
@ -0,0 +1,91 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-31 18:00+0200\n"
|
||||
"PO-Revision-Date: 2017-11-17 02:38+0800\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.4\n"
|
||||
"Last-Translator: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: ms\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked sign, owned by @1\n"
|
||||
msgstr "Papan tanda berkunci, milik @1\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "locked "
|
||||
msgstr "berkunci "
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
||||
msgstr "@1 menulis \"@2\" atas papan tanda @3dekat @4"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign"
|
||||
msgstr "Papan Tanda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Can edit all locked signs"
|
||||
msgstr "Boleh sunting semua papan tanda berkunci"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked Sign"
|
||||
msgstr "Papan Tanda Berkunci"
|
||||
|
||||
#: init.lua
|
||||
msgid "green"
|
||||
msgstr "hijau"
|
||||
|
||||
#: init.lua
|
||||
msgid "yellow"
|
||||
msgstr "kuning"
|
||||
|
||||
#: init.lua
|
||||
msgid "red"
|
||||
msgstr "merah"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_red"
|
||||
msgstr "putih_merah"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_black"
|
||||
msgstr "putih_hitam"
|
||||
|
||||
#: init.lua
|
||||
msgid "orange"
|
||||
msgstr "jingga"
|
||||
|
||||
#: init.lua
|
||||
msgid "blue"
|
||||
msgstr "biru"
|
||||
|
||||
#: init.lua
|
||||
msgid "brown"
|
||||
msgstr "perang"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign (@1, metal)"
|
||||
msgstr "Papan Tanda (@1, logam)"
|
||||
|
||||
#: init.lua
|
||||
msgid "Attempt to register unknown node as fence"
|
||||
msgstr "Cuba untuk mendaftar nod tidak diketahui sebagai pagar"
|
||||
|
||||
#: init.lua
|
||||
msgid "Registered @1 and @2"
|
||||
msgstr "Telah daftar @1 dan @2"
|
||||
|
||||
#: init.lua
|
||||
msgid "[MOD] signs loaded"
|
||||
msgstr "[MODS] signs telah dimuatkan"
|
94
locale/ru.po
Normal file
@ -0,0 +1,94 @@
|
||||
# Russian Translation for the signs_lib mod.
|
||||
# Copyright (C) 2018 Vanessa Ezekowitz
|
||||
# This file is distributed under the same license as the signs_lib package.
|
||||
# CodeXP <codexp@gmx.net>, 2018.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: signs_lib\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-03-24 22:23+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: CodeXP <codexp@gmx.net>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Write"
|
||||
msgstr "записать"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked sign, owned by @1\n"
|
||||
msgstr "защищенная табличка, пренадлежит @1\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "locked "
|
||||
msgstr "защищенный "
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
||||
msgstr "@1 записал \"@2\" в @3sign на @4"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign"
|
||||
msgstr "табличка"
|
||||
|
||||
#: init.lua
|
||||
msgid "Can edit all locked signs"
|
||||
msgstr "Может редактировать все защищенные таблички"
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked Sign"
|
||||
msgstr "защищенная табличка"
|
||||
|
||||
#: init.lua
|
||||
msgid "green"
|
||||
msgstr "зеленая"
|
||||
|
||||
#: init.lua
|
||||
msgid "yellow"
|
||||
msgstr "желтая"
|
||||
|
||||
#: init.lua
|
||||
msgid "red"
|
||||
msgstr "красная"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_red"
|
||||
msgstr "краснобелая"
|
||||
|
||||
#: init.lua
|
||||
msgid "white_black"
|
||||
msgstr "чернобелая"
|
||||
|
||||
#: init.lua
|
||||
msgid "orange"
|
||||
msgstr "оранжевая"
|
||||
|
||||
#: init.lua
|
||||
msgid "blue"
|
||||
msgstr "синея"
|
||||
|
||||
#: init.lua
|
||||
msgid "brown"
|
||||
msgstr "коричневая"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign (@1, metal)"
|
||||
msgstr "Табличка (@1, металл)"
|
||||
|
||||
#: init.lua
|
||||
msgid "Attempt to register unknown node as fence"
|
||||
msgstr "Попытка зарегистрировать неизвестный узел как забор"
|
||||
|
||||
#: init.lua
|
||||
msgid "Registered @1 and @2"
|
||||
msgstr "Зарегистрировано @1 для @2"
|
||||
|
||||
#: init.lua
|
||||
msgid "[MOD] signs loaded"
|
||||
msgstr "[MOD] мод табличек загружен"
|
94
locale/template.pot
Normal file
@ -0,0 +1,94 @@
|
||||
# LANGUAGE Translation for the signs_lib mod.
|
||||
# Copyright (C) 2018 Vanessa Ezekowitz
|
||||
# This file is distributed under the same license as the signs_lib package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: signs_lib\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-03-24 22:23+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Write"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked sign, owned by @1\n"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "locked "
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Can edit all locked signs"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Locked Sign"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "green"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "yellow"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "red"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "white_red"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "white_black"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "orange"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "blue"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "brown"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Sign (@1, metal)"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Attempt to register unknown node as fence"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Registered @1 and @2"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "[MOD] signs loaded"
|
||||
msgstr ""
|
@ -1,9 +0,0 @@
|
||||
#Template
|
||||
|
||||
Reading cached character database. =
|
||||
Font seems to have changed. Rebuilding cache. =
|
||||
Could not find font line height in cached DB. Trying brute force. =
|
||||
Sign =
|
||||
%s wrote "%s" to sign at %s =
|
||||
Registered %s and %s =
|
||||
signs loaded =
|
BIN
screenshot.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
textures/hdf_00.png
Normal file
After Width: | Height: | Size: 87 B |
BIN
textures/hdf_81.png
Normal file
After Width: | Height: | Size: 121 B |
BIN
textures/hdf_82.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/hdf_83.png
Normal file
After Width: | Height: | Size: 117 B |
BIN
textures/hdf_84.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/hdf_85.png
Normal file
After Width: | Height: | Size: 119 B |
BIN
textures/hdf_86.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/hdf_87.png
Normal file
After Width: | Height: | Size: 118 B |
BIN
textures/hdf_88.png
Normal file
After Width: | Height: | Size: 146 B |
BIN
textures/hdf_8a.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
textures/hdf_8b.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
textures/hdf_8c.png
Normal file
After Width: | Height: | Size: 133 B |
BIN
textures/hdf_8d.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_8e.png
Normal file
After Width: | Height: | Size: 138 B |
BIN
textures/hdf_8f.png
Normal file
After Width: | Height: | Size: 162 B |
BIN
textures/hdf_90.png
Normal file
After Width: | Height: | Size: 136 B |
BIN
textures/hdf_91.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
textures/hdf_a8.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
textures/hdf_b8.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/hdf_b9.png
Normal file
After Width: | Height: | Size: 179 B |
BIN
textures/hdf_c0.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
textures/hdf_c1.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
textures/hdf_c2.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/hdf_c3.png
Normal file
After Width: | Height: | Size: 141 B |
BIN
textures/hdf_c4.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/hdf_c5.png
Normal file
After Width: | Height: | Size: 149 B |
BIN
textures/hdf_c6.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_c7.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_c8.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
textures/hdf_c9.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
textures/hdf_ca.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
textures/hdf_cb.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_cc.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_cd.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
textures/hdf_ce.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
textures/hdf_cf.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/hdf_d0.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
textures/hdf_d1.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
textures/hdf_d2.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
textures/hdf_d3.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
textures/hdf_d4.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
textures/hdf_d5.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
textures/hdf_d6.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
textures/hdf_d7.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
textures/hdf_d8.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
textures/hdf_d9.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
textures/hdf_da.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/hdf_db.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/hdf_dc.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_dd.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
textures/hdf_de.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
textures/hdf_df.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
textures/hdf_e0.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_e1.png
Normal file
After Width: | Height: | Size: 178 B |
BIN
textures/hdf_e2.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_e3.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
textures/hdf_e4.png
Normal file
After Width: | Height: | Size: 162 B |
BIN
textures/hdf_e5.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
textures/hdf_e6.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
textures/hdf_e7.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_e8.png
Normal file
After Width: | Height: | Size: 163 B |
BIN
textures/hdf_e9.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/hdf_ea.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/hdf_eb.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
textures/hdf_ec.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
textures/hdf_ed.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/hdf_ee.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_ef.png
Normal file
After Width: | Height: | Size: 146 B |
BIN
textures/hdf_f0.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
textures/hdf_f1.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_f2.png
Normal file
After Width: | Height: | Size: 148 B |
BIN
textures/hdf_f3.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_f4.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_f5.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_f6.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/hdf_f7.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
textures/hdf_f8.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
textures/hdf_f9.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
textures/hdf_fa.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_fb.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
textures/hdf_fc.png
Normal file
After Width: | Height: | Size: 156 B |
BIN
textures/hdf_fd.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
textures/hdf_fe.png
Normal file
After Width: | Height: | Size: 164 B |