Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47abe2b2ef | ||
|
|
44264d6c8b | ||
|
|
d9d4ea32f7 | ||
|
|
0ec62a1732 | ||
|
|
0f6624f5a5 | ||
|
|
8156b45724 | ||
|
|
2878a1b45a | ||
|
|
4dc2bb661c | ||
|
|
c315900c24 | ||
|
|
394166ca56 | ||
|
|
fce192d288 | ||
|
|
27f582b041 | ||
|
|
afe8f517d7 | ||
|
|
03953f0fc0 | ||
|
|
cdc3cf55f5 | ||
|
|
7b87099f2c | ||
|
|
2c00acf230 | ||
|
|
2c1efede4d | ||
|
|
e25588cf91 | ||
|
|
d7d55fbb79 | ||
|
|
e52b742b9b | ||
|
|
bd59f7f78b | ||
|
|
1f8e99c9c5 | ||
|
|
ac4bb3d3d3 | ||
|
|
1440f35fa6 | ||
|
|
e0e0305836 |
10
.github/workflows/luacheck.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: luacheck
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Luacheck
|
||||
uses: lunarmodules/luacheck@master
|
||||
3
.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*~
|
||||
_*
|
||||
|
||||
19
.luacheckrc
Normal file
@@ -0,0 +1,19 @@
|
||||
unused_args = false
|
||||
|
||||
read_globals = {
|
||||
"minetest",
|
||||
"table",
|
||||
"vector",
|
||||
"xcompat"
|
||||
}
|
||||
|
||||
globals = {
|
||||
"boards",
|
||||
"display_api",
|
||||
"font_api",
|
||||
"ontime_clocks",
|
||||
"signs",
|
||||
"signs_api",
|
||||
"signs_road",
|
||||
"steles"
|
||||
}
|
||||
28
README.md
@@ -1,22 +1,26 @@
|
||||
# Display Modpack
|
||||
Version 1.3.1
|
||||
|
||||
This modpack provides mods with dynamic display. Mods are :
|
||||

|
||||
[](https://content.minetest.net/packages/mt-mods/display_modpack/)
|
||||
|
||||
- **[display_api](https://github.com/pyrollo/display_modpack/tree/master/display_api)**: A library for adding display entities to nodes;
|
||||
- **[font_api](https://github.com/pyrollo/display_modpack/tree/master/font_api)**: A library for displaying fonts on entities;
|
||||
- **[signs_api](https://github.com/pyrollo/display_modpack/tree/master/signs_api)**: A library for the easy creation of signs;
|
||||
- **[font_metro](https://github.com/pyrollo/display_modpack/tree/master/font_metro)**: A font mod used as default font (includes uppercase, lowercase and accentuated latin letters, usual signs, cyrillic and greek letters)
|
||||
Requires Minetest 5.4+
|
||||
|
||||
- **[boards](https://github.com/pyrollo/display_modpack/tree/master/boards)**: A mod providing school boards (includes *tiny cursive font*, a handwriting style font);
|
||||
- **[ontime_clocks](https://github.com/pyrollo/display_modpack/tree/master/ontime_clocks)**: A mod providing clocks which display the ingame time;
|
||||
- **[signs](https://github.com/pyrollo/display_modpack/tree/master/signs)**: A mod providing signs and direction signs displaying text;
|
||||
- **[signs_road](https://github.com/pyrollo/display_modpack/tree/master/signs_road)**: A mod providing road signs displaying text;
|
||||
- **[steles](https://github.com/pyrollo/display_modpack/tree/master/steles)**: A mod providing stone steles with text;
|
||||
This modpack provides mods with dynamic display. Mods are:
|
||||
|
||||
- **[display_api](https://github.com/mt-mods/display_modpack/tree/master/display_api)**: A library for adding display entities to nodes;
|
||||
- **[font_api](https://github.com/mt-mods/display_modpack/tree/master/font_api)**: A library for displaying fonts on entities;
|
||||
- **[signs_api](https://github.com/mt-mods/display_modpack/tree/master/signs_api)**: A library for the easy creation of signs;
|
||||
- **[font_metro](https://github.com/mt-mods/display_modpack/tree/master/font_metro)**: A font mod used as default font (includes uppercase, lowercase and accentuated latin letters, usual signs, cyrillic and greek letters)
|
||||
|
||||
- **[boards](https://github.com/mt-mods/display_modpack/tree/master/boards)**: A mod providing school boards (includes *tiny cursive font*, a handwriting style font);
|
||||
- **[ontime_clocks](https://github.com/mt-mods/display_modpack/tree/master/ontime_clocks)**: A mod providing clocks which display the ingame time;
|
||||
- **[signs](https://github.com/mt-mods/display_modpack/tree/master/signs)**: A mod providing signs and direction signs displaying text;
|
||||
- **[signs_road](https://github.com/mt-mods/display_modpack/tree/master/signs_road)**: A mod providing road signs displaying text;
|
||||
- **[steles](https://github.com/mt-mods/display_modpack/tree/master/steles)**: A mod providing stone steles with text;
|
||||
|
||||
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
|
||||
|
||||

|
||||

|
||||
|
||||
## Extra fonts
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
theme: jekyll-theme-minimal
|
||||
@@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Code by Pierre-Yves Rollo (pyrollo)
|
||||
Font by (cyfry77)
|
||||
@@ -12,6 +12,8 @@
|
||||
Code is under LGPL v3 license
|
||||
--]]
|
||||
|
||||
-- widths is not split into several lines, because the font is generated by 'make_font_lua.sh'
|
||||
-- luacheck: ignore
|
||||
font_api.register_font('tinycurs',
|
||||
{
|
||||
default = false, -- Don't register this font as a possible default font
|
||||
|
||||
@@ -22,21 +22,21 @@ boards = {}
|
||||
boards.name = minetest.get_current_modname()
|
||||
boards.path = minetest.get_modpath(boards.name)
|
||||
|
||||
-- Load support for intllib.
|
||||
local S, NS = dofile(boards.path.."/intllib.lua")
|
||||
boards.intllib = S
|
||||
local F = function(...) return minetest.formspec_escape(S(...)) end
|
||||
-- Translation support
|
||||
local S = minetest.get_translator(boards.name)
|
||||
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
|
||||
-- Load font
|
||||
dofile(boards.path.."/font_tinycurs.lua")
|
||||
|
||||
local function set_formspec(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local display_text = minetest.formspec_escape(meta:get_string("display_text"))
|
||||
meta:set_string("formspec",
|
||||
"size[6,4]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
|
||||
"textarea[0.5,0.7;5.5,3;display_text;"..F("Text")..";${display_text}]"..
|
||||
"button_exit[3,3.5;2,1;ok;"..F("Write").."]"..
|
||||
"button_exit[1,3.5;2,1;wipe;"..F("Wipe").."]")
|
||||
"size[6,3.5]"..
|
||||
"textarea[0.55,0.25;5.5,3;display_text;"..FS("Text")..";" .. display_text .. "]"..
|
||||
"button_exit[1,2.75;2,1;ok;"..FS("Write").."]"..
|
||||
"button[3,2.75;2,1;font;"..FS("Font").."]")
|
||||
end
|
||||
|
||||
-- On boards, everyone is allowed to write and wipe
|
||||
@@ -45,13 +45,16 @@ local function on_receive_fields(pos, formname, fields, player)
|
||||
if fields.ok or fields.key_enter then
|
||||
signs_api.set_display_text(pos, fields.display_text, fields.font)
|
||||
end
|
||||
if fields.wipe then
|
||||
signs_api.set_display_text(pos, "", fields.font)
|
||||
if fields.font then
|
||||
signs_api.set_display_text(pos, fields.display_text)
|
||||
font_api.show_font_list(player, pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
models = {
|
||||
local wood_texture = xcompat.textures.wood.planks
|
||||
|
||||
local models = {
|
||||
black_board = {
|
||||
depth = 1/16, width = 1, height = 1,
|
||||
entity_fields = {
|
||||
@@ -64,9 +67,10 @@ models = {
|
||||
},
|
||||
node_fields = {
|
||||
description = S("Black board"),
|
||||
tiles = { "default_wood.png", "default_wood.png",
|
||||
"default_wood.png", "default_wood.png",
|
||||
"default_wood.png", "board_black_front.png" },
|
||||
tiles = {wood_texture, wood_texture,
|
||||
wood_texture, wood_texture,
|
||||
wood_texture, "board_black_front.png"},
|
||||
_itemframe_texture = "board_black_front.png",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@@ -79,6 +83,13 @@ models = {
|
||||
set_formspec(pos)
|
||||
display_api.on_construct(pos)
|
||||
end,
|
||||
on_punch = function(pos)
|
||||
set_formspec(pos)
|
||||
display_api.update_entities(pos)
|
||||
end,
|
||||
on_rightclick = function(pos)
|
||||
set_formspec(pos)
|
||||
end,
|
||||
on_receive_fields = on_receive_fields,
|
||||
},
|
||||
},
|
||||
@@ -94,10 +105,11 @@ models = {
|
||||
},
|
||||
node_fields = {
|
||||
description = S("Green board"),
|
||||
tiles = { "default_wood.png", "default_wood.png",
|
||||
"default_wood.png", "default_wood.png",
|
||||
"default_wood.png", "board_green_front.png" },
|
||||
tiles = {wood_texture, wood_texture,
|
||||
wood_texture, wood_texture,
|
||||
wood_texture, "board_green_front.png"},
|
||||
drawtype = "nodebox",
|
||||
_itemframe_texture = "board_green_front.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@@ -109,6 +121,13 @@ models = {
|
||||
set_formspec(pos)
|
||||
display_api.on_construct(pos)
|
||||
end,
|
||||
on_punch = function(pos)
|
||||
set_formspec(pos)
|
||||
display_api.update_entities(pos)
|
||||
end,
|
||||
on_rightclick = function(pos)
|
||||
set_formspec(pos)
|
||||
end,
|
||||
on_receive_fields = on_receive_fields,
|
||||
},
|
||||
},
|
||||
@@ -121,11 +140,13 @@ do
|
||||
end
|
||||
|
||||
-- Recipes
|
||||
local mat = xcompat.materials
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "boards:black_board",
|
||||
recipe = {
|
||||
{"group:wood", "group:stone", "dye:black"},
|
||||
{"group:wood", "group:stone", mat.dye_black},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -133,8 +154,7 @@ minetest.register_craft(
|
||||
{
|
||||
output = "boards:green_board",
|
||||
recipe = {
|
||||
{"group:wood", "group:stone", "dye:dark_green"},
|
||||
{"group:wood", "group:stone", mat.dye_dark_green},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.log("action", "[boards] loaded.")
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
-- 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
|
||||
6
boards/locale/boards.de.tr
Normal file
@@ -0,0 +1,6 @@
|
||||
# textdomain: boards
|
||||
Text=Text
|
||||
Write=Schreiben
|
||||
Font=Schriftart
|
||||
Black board=Schwarze Tafel
|
||||
Green board=Grüne Tafel
|
||||
6
boards/locale/boards.fr.tr
Normal file
@@ -0,0 +1,6 @@
|
||||
# textdomain: boards
|
||||
Text=Texte
|
||||
Write=Écrire
|
||||
Font=Police
|
||||
Black board=Tableau noir
|
||||
Green board=Tableau vert
|
||||
6
boards/locale/boards.ms.tr
Normal file
@@ -0,0 +1,6 @@
|
||||
# textdomain: boards
|
||||
Text=
|
||||
Write=
|
||||
Font=
|
||||
Black board=Papan hitam
|
||||
Green board=
|
||||
@@ -1,40 +0,0 @@
|
||||
# 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.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-16 10:00+0200\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=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Text"
|
||||
msgstr "Texte"
|
||||
|
||||
#: init.lua
|
||||
msgid "Write"
|
||||
msgstr "Ecrire"
|
||||
|
||||
#: init.lua
|
||||
msgid "Wipe"
|
||||
msgstr "Effacer"
|
||||
|
||||
#: init.lua
|
||||
msgid "Black board"
|
||||
msgstr "Tableau noir"
|
||||
|
||||
#: init.lua
|
||||
msgid "Green board"
|
||||
msgstr "Tableau vert"
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Yaya (Nurul Azeera Hidayah @ Muhammad Nur Hidayat) <translation@mnh48.moe>, 2020.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Display Modpack\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-16 10:00+0200\n"
|
||||
"PO-Revision-Date: 2020-07-05 11:31+0000\n"
|
||||
"Language-Team: Malay <translation@mnh48.moe>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.3\n"
|
||||
"Last-Translator: Yaya MNH48 <translation@mnh48.moe>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: ms\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Text"
|
||||
msgstr "Teks"
|
||||
|
||||
#: init.lua
|
||||
msgid "Write"
|
||||
msgstr "Tulis"
|
||||
|
||||
#: init.lua
|
||||
msgid "Wipe"
|
||||
msgstr "Padam"
|
||||
|
||||
#: init.lua
|
||||
msgid "Black board"
|
||||
msgstr "Papan hitam"
|
||||
@@ -1,34 +0,0 @@
|
||||
# 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.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-16 10:00+0200\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=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua
|
||||
msgid "Text"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Write"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Wipe"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Black board"
|
||||
msgstr ""
|
||||
6
boards/locale/template.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
# textdomain: boards
|
||||
Text=
|
||||
Write=
|
||||
Font=
|
||||
Black board=
|
||||
Green board=
|
||||
@@ -1,4 +1,4 @@
|
||||
name = boards
|
||||
title = Black boards
|
||||
description = Writable school boards using sign_api
|
||||
depends = default,signs_api
|
||||
depends = signs_api, xcompat
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# To create a new translation:
|
||||
# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/..";
|
||||
|
||||
# Extract translatable strings.
|
||||
xgettext --from-code=UTF-8 \
|
||||
--language=Lua \
|
||||
--sort-by-file \
|
||||
--keyword=S \
|
||||
--keyword=NS:1,2 \
|
||||
--keyword=N_ \
|
||||
--keyword=F \
|
||||
--add-comments='Translators:' \
|
||||
--add-location=file \
|
||||
-o locale/template.pot \
|
||||
$(find . -name '*.lua')
|
||||
|
||||
# Update translations.
|
||||
find locale -name '*.po' | while read -r file; do
|
||||
echo $file
|
||||
msgmerge --update $file locale/template.pot;
|
||||
done
|
||||
9
copyright.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
display_modpack (all mods):
|
||||
- Original author: Pierre-Yves Rollo (pyrollo) License: LGPL v3, font_metro LGPL v2.1
|
||||
- Many other contributors, see `git log`
|
||||
|
||||
boards:
|
||||
- Font author: cyfry77 License: CC-BY-SA 3.0
|
||||
|
||||
font_metro:
|
||||
- Font author: Christian Munk (CMunk) License: CC-BY-SA 3.0
|
||||
@@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
@@ -4,7 +4,7 @@ This library's purpose is to ease creation of nodes with one or more displays on
|
||||
|
||||
**Limitations**: This lib uses entities to draw display. This means display has to be vertical (and "upside up") on Minetest before version 5.0.
|
||||
|
||||
**Dependancies**:default
|
||||
**Dependencies**: xcompat
|
||||
|
||||
**License**: LGPLv2
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Code by Pierre-Yves Rollo (pyrollo)
|
||||
Contributors:
|
||||
(gpcf): Compatibility with signs lib
|
||||
(Thomas--S): Fix /clearobjects bug
|
||||
(12Me21): on_place and on_rotate improvements
|
||||
@@ -19,17 +19,17 @@
|
||||
|
||||
-- Deprecation
|
||||
|
||||
function deprecated_group(deprecated_group, replacement_group)
|
||||
local function deprecated_group(old_group, replacement_group)
|
||||
for name, ndef in pairs(minetest.registered_nodes) do
|
||||
if ndef.groups and ndef.groups[deprecated_group] then
|
||||
if ndef.groups and ndef.groups[old_group] then
|
||||
minetest.log("warning", string.format(
|
||||
'Node %s belongs to deprecated "%s" group which should be replaced with new "%s" group.',
|
||||
name, deprecated_group, replacement_group))
|
||||
name, old_group, replacement_group))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function deprecated_global_table(deprecated_global_name, replacement_global_name)
|
||||
local function deprecated_global_table(deprecated_global_name, replacement_global_name)
|
||||
assert(type(deprecated_global_name) == 'string', "deprecated_global_name should be a string.")
|
||||
assert(type(replacement_global_name) == 'string', "replacement_global_name should be a string.")
|
||||
assert(deprecated_global_name ~= '', "deprecated_global_name should not be empty.")
|
||||
|
||||
@@ -65,9 +65,7 @@ local function compute_values(r)
|
||||
for _ = 1, r.x do d, w, h = rx(d), rx(w), rx(h) end
|
||||
for _ = 1, r.y do d, w, h = ry(d), ry(w), ry(h) end
|
||||
|
||||
return {
|
||||
rotation=r, depth=d, width=w, height=h,
|
||||
restricted=(r.x==0 and r.z==0) }
|
||||
return {rotation=r, depth=d, width=w, height=h}
|
||||
end
|
||||
|
||||
for i, r in pairs(facedir_rotations) do
|
||||
@@ -78,25 +76,6 @@ for i, r in pairs(wallmounted_rotations) do
|
||||
wallmounted_values[i] = compute_values(r)
|
||||
end
|
||||
|
||||
-- Detect rotation restriction
|
||||
local rotation_restricted = nil
|
||||
minetest.register_entity('display_api:dummy_entity', {
|
||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||
visual = "upright_sprite",
|
||||
textures = {} })
|
||||
|
||||
function display_api.is_rotation_restricted()
|
||||
if rotation_restricted == nil then
|
||||
local objref = minetest.add_entity(
|
||||
{x=0, y=0, z=0}, 'display_api:dummy_entity')
|
||||
if objref then
|
||||
rotation_restricted = objref.set_rotation == nil
|
||||
objref:remove()
|
||||
end
|
||||
end
|
||||
return rotation_restricted
|
||||
end
|
||||
|
||||
-- Clip position property to maximum entity position
|
||||
|
||||
local function clip_pos_prop(posprop)
|
||||
@@ -168,7 +147,8 @@ function display_api.update_entities(pos)
|
||||
end
|
||||
|
||||
for _, objref in pairs(get_display_objrefs(pos, true)) do
|
||||
local edef = ndef.display_entities[objref:get_luaentity().name]
|
||||
local entity = objref:get_luaentity()
|
||||
local edef = ndef.display_entities[entity.name]
|
||||
local depth = clip_pos_prop(edef.depth)
|
||||
local right = clip_pos_prop(edef.right)
|
||||
local top = clip_pos_prop(edef.top)
|
||||
@@ -181,14 +161,19 @@ function display_api.update_entities(pos)
|
||||
|
||||
if objref.set_rotation then
|
||||
objref:set_rotation({
|
||||
x = ov.rotation.x*math.pi/2,
|
||||
y = ov.rotation.y*math.pi/2 + (edef.yaw or 0),
|
||||
z = ov.rotation.z*math.pi/2,
|
||||
x = ov.rotation.x * math.pi / 2 +
|
||||
(entity.rotation and entity.rotation.x or 0),
|
||||
y = ov.rotation.y * math.pi / 2 +
|
||||
(entity.rotation and entity.rotation.y or 0) +
|
||||
(edef.yaw or 0),
|
||||
z = ov.rotation.z * math.pi / 2 +
|
||||
(entity.rotation and entity.rotation.z or 0),
|
||||
})
|
||||
else
|
||||
if ov.rotation.x ~=0 or ov.rotation.y ~= 0 then
|
||||
minetest.log("warning", string.format(
|
||||
"[display_api] unable to rotate correctly entity for node at %s without set_rotation method.",
|
||||
"[display_api] unable to rotate correctly entity for " ..
|
||||
"node at %s without set_rotation method.",
|
||||
minetest.pos_to_string(pos)))
|
||||
end
|
||||
objref:set_yaw(ov.rotation.y*math.pi/2 + (edef.yaw or 0))
|
||||
@@ -243,16 +228,6 @@ function display_api.on_place(itemstack, placer, pointed_thing, override_param2)
|
||||
z = pointed_thing.under.z - pointed_thing.above.z,
|
||||
}
|
||||
|
||||
local rotation_restriction = display_api.is_rotation_restricted()
|
||||
|
||||
if rotation_restriction then
|
||||
-- If item is not placed on a wall, use the player's view direction instead
|
||||
if dir.x == 0 and dir.z == 0 then
|
||||
dir = placer:get_look_dir()
|
||||
end
|
||||
dir.y = 0
|
||||
end
|
||||
|
||||
local param2 = 0
|
||||
if ndef then
|
||||
if ndef.paramtype2 == "wallmounted" or
|
||||
@@ -261,7 +236,7 @@ function display_api.on_place(itemstack, placer, pointed_thing, override_param2)
|
||||
|
||||
elseif ndef.paramtype2 == "facedir" or
|
||||
ndef.paramtype2 == "colorfacedir" then
|
||||
param2 = minetest.dir_to_facedir(dir, not rotation_restriction)
|
||||
param2 = minetest.dir_to_facedir(dir, true)
|
||||
end
|
||||
end
|
||||
return minetest.item_place(itemstack, placer, pointed_thing,
|
||||
@@ -282,6 +257,15 @@ function display_api.on_destruct(pos)
|
||||
end
|
||||
end
|
||||
|
||||
function display_api.on_blast(pos, intensity)
|
||||
if not minetest.is_protected(pos, "") then
|
||||
local node = minetest.get_node(pos)
|
||||
local drops = minetest.get_node_drops(node, "tnt:blast")
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
end
|
||||
end
|
||||
|
||||
-- On_rotate (screwdriver) callback for display_api items. Prevents invalid
|
||||
-- rotations and reorients entities.
|
||||
function display_api.on_rotate(pos, node, user, _, new_param2)
|
||||
@@ -291,28 +275,34 @@ function display_api.on_rotate(pos, node, user, _, new_param2)
|
||||
return
|
||||
end
|
||||
|
||||
if ov.restricted or not display_api.is_rotation_restricted() then
|
||||
minetest.swap_node(pos, node)
|
||||
display_api.update_entities(pos)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--- Creates display entity with some fields and the on_activate callback
|
||||
function display_api.register_display_entity(entity_name)
|
||||
if not minetest.registered_entities[entity_name] then
|
||||
|
||||
if minetest.registered_entities[entity_name] then
|
||||
return
|
||||
end
|
||||
|
||||
minetest.register_entity(':'..entity_name, {
|
||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||
initial_properties = {
|
||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||
visual = "upright_sprite",
|
||||
textures = {},
|
||||
collide_with_objects = false,
|
||||
pointable = false,
|
||||
},
|
||||
on_activate = display_api.on_activate,
|
||||
get_staticdata = function(self)
|
||||
return minetest.serialize({ nodepos = self.nodepos })
|
||||
end,
|
||||
on_blast = function(self, damage)
|
||||
return false, false, {}
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
@@ -320,6 +310,7 @@ minetest.register_lbm({
|
||||
name = "display_api:update_entities",
|
||||
run_at_every_load = true,
|
||||
nodenames = {"group:display_api",
|
||||
"group:display_modpack_node", "group:display_lib_node"}, -- See deprecated(1)
|
||||
"group:display_modpack_node",
|
||||
"group:display_lib_node"}, -- See deprecated(1)
|
||||
action = function(pos, node) display_api.update_entities(pos) end,
|
||||
})
|
||||
|
||||
@@ -29,5 +29,3 @@ display_api.path = minetest.get_modpath(display_api.name)
|
||||
|
||||
dofile(display_api.path.."/display.lua")
|
||||
dofile(display_api.path.."/deprecation.lua")
|
||||
|
||||
minetest.log("action", "[display_api] loaded.")
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
A library for rendernig text on textures (to be used with display_api for sign creation).
|
||||
|
||||
**Dependancies**: default
|
||||
**Dependencies**: xcompat
|
||||
|
||||
**License**: LGPL
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Code by Pierre-Yves Rollo (pyrollo)
|
||||
Contributors:
|
||||
Andrzej Pieńkowski (apienk): Unicode support and tool for creating texturess
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
-- Deprecation
|
||||
|
||||
function deprecated_global_table(deprecated_global_name, replacement_global_name)
|
||||
local function deprecated_global_table(deprecated_global_name, replacement_global_name)
|
||||
assert(type(deprecated_global_name) == 'string', "deprecated_global_name should be a string.")
|
||||
assert(type(replacement_global_name) == 'string', "replacement_global_name should be a string.")
|
||||
assert(deprecated_global_name ~= '', "deprecated_global_name should not be empty.")
|
||||
|
||||
@@ -53,7 +53,7 @@ return {
|
||||
['×'] = 'x', ['Ý'] = 'Y',
|
||||
|
||||
-- Lower case accents
|
||||
['à'] = 'a', ['à'] = 'a', ['á'] = 'a', ['â'] = 'a',
|
||||
['à'] = 'a', ['á'] = 'a', ['â'] = 'a',
|
||||
['ã'] = 'a', ['ä'] = 'a', ['å'] = 'a',
|
||||
['æ'] = 'ae', ['ç'] = 'c',
|
||||
['è'] = 'e', ['é'] = 'e', ['ê'] = 'e', ['ë'] = 'e',
|
||||
|
||||
@@ -212,7 +212,7 @@ end
|
||||
-- @return Texture string
|
||||
|
||||
function Font:render(text, texturew, textureh, style)
|
||||
local style = style or {}
|
||||
style = style or {}
|
||||
|
||||
-- Split text into lines (and limit to style.lines # of lines)
|
||||
local lines = {}
|
||||
@@ -243,17 +243,17 @@ function Font:render(text, texturew, textureh, style)
|
||||
|
||||
y = y + (self.margintop or 0)
|
||||
|
||||
for _, line in pairs(lines) do
|
||||
for _, l in pairs(lines) do
|
||||
if style.halign == "left" then
|
||||
x = 0
|
||||
elseif style.halign == "right" then
|
||||
x = texturew - line.width
|
||||
x = texturew - l.width
|
||||
else
|
||||
x = (texturew - line.width) / 2
|
||||
x = (texturew - l.width) / 2
|
||||
end
|
||||
|
||||
while line.text ~= '' do
|
||||
codepoint, line.text = self:get_next_char(line.text)
|
||||
while l.text ~= '' do
|
||||
codepoint, l.text = self:get_next_char(l.text)
|
||||
if codepoint == nil then return '' end -- UTF Error
|
||||
|
||||
-- Add image only if it is visible (at least partly)
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
local S = font_api.S
|
||||
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
local contexts = {}
|
||||
@@ -51,15 +54,9 @@ local function show_node_formspec(playername, pos)
|
||||
fs = fs:gsub("context", nodemeta)
|
||||
|
||||
-- Change all ${} to their corresponding metadata values
|
||||
local s, e
|
||||
repeat
|
||||
s, e = fs:find('%${.*}')
|
||||
if s and e then
|
||||
fs = fs:sub(1, s-1)..
|
||||
minetest.formspec_escape(meta:get_string(fs:sub(s+2,e-1)))..
|
||||
fs:sub(e+1)
|
||||
end
|
||||
until s == nil
|
||||
fs = fs:gsub("([^\\])${(.-)}", function(prefix, key)
|
||||
return prefix .. minetest.formspec_escape(meta:get_string(key))
|
||||
end)
|
||||
|
||||
local context = get_context(playername)
|
||||
context.node_pos = pos
|
||||
@@ -101,9 +98,8 @@ local function show_font_formspec(playername)
|
||||
table.sort(fonts)
|
||||
|
||||
local fs = string.format(
|
||||
"size[4,%s]%s%s%sbutton_exit[0,%s;4,1;cancel;Cancel]",
|
||||
#fonts + 0.8, default.gui_bg, default.gui_bg_img, default.gui_slots,
|
||||
#fonts)
|
||||
"size[4,%s]button_exit[0,%s;4,1;cancel;%s]",
|
||||
#fonts + 0.8, #fonts, FS("Cancel"))
|
||||
|
||||
for line = 1, #fonts do
|
||||
local font = font_api.get_font(fonts[line])
|
||||
|
||||
@@ -23,6 +23,9 @@ font_api = {}
|
||||
font_api.name = minetest.get_current_modname()
|
||||
font_api.path = minetest.get_modpath(font_api.name)
|
||||
|
||||
-- Translation support
|
||||
font_api.S = minetest.get_translator(font_api.name)
|
||||
|
||||
-- Inclusions
|
||||
-------------
|
||||
|
||||
@@ -33,5 +36,3 @@ if minetest.get_modpath("display_api") then
|
||||
dofile(font_api.path.."/display_api.lua")
|
||||
end
|
||||
dofile(font_api.path.."/deprecation.lua")
|
||||
|
||||
minetest.log("action", "[font_api] loaded.")
|
||||
|
||||
2
font_api/locale/font_api.de.tr
Normal file
@@ -0,0 +1,2 @@
|
||||
# textdomain: font_api
|
||||
Cancel=Schließen
|
||||
2
font_api/locale/font_api.fr.tr
Normal file
@@ -0,0 +1,2 @@
|
||||
# textdomain: font_api
|
||||
Cancel=Annuler
|
||||
2
font_api/locale/template.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# textdomain: font_api
|
||||
Cancel=
|
||||
@@ -58,12 +58,9 @@ local function get_default_font()
|
||||
end
|
||||
end
|
||||
|
||||
-- If failed, chose first font
|
||||
-- If failed, choose the first registered font
|
||||
if default_font == nil then
|
||||
for _, font in pairs(font_api.registered_fonts) do
|
||||
default_font = font
|
||||
break
|
||||
end
|
||||
default_font = next(font_api.registered_fonts)
|
||||
end
|
||||
|
||||
-- Error, no font registered
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Font by Christian Munk (CMunk)
|
||||
Code by Pierre-Yves Rollo (pyrollo)
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
Derivative textures and code are under CC-BY-SA license
|
||||
--]]
|
||||
|
||||
-- widths is not split into several lines, because the font is generated by 'make_font_lua.sh'
|
||||
-- luacheck: ignore
|
||||
font_api.register_font(
|
||||
'metro',
|
||||
{
|
||||
@@ -22,4 +24,3 @@ font_api.register_font(
|
||||
}
|
||||
);
|
||||
|
||||
minetest.log("action", "[font_metro] loaded.")
|
||||
|
||||
4
modpack.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
name = display_modpack
|
||||
description = Display modpack for Minetest, provides mods with dynamic display and font display: clocks, signs, and more.
|
||||
title = Display Modpack
|
||||
min_minetest_version = 5.4.0
|
||||
@@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
@@ -4,7 +4,7 @@ This mod provides clocks that display real ingame time.
|
||||
|
||||
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
|
||||
|
||||
**Dependancies**: display_api, default
|
||||
**Dependencies**: display_api, xcompat
|
||||
|
||||
**License**: Code under LGPL, textures under CC-BY-SA
|
||||
|
||||
|
||||
@@ -18,9 +18,13 @@
|
||||
along with ontime_clocks. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
-- Entity for time display
|
||||
-- Entity for time display of most of clocks
|
||||
display_api.register_display_entity("ontime_clocks:display")
|
||||
|
||||
-- Entities for two needles of large clocks
|
||||
display_api.register_display_entity("ontime_clocks:hours_needle")
|
||||
display_api.register_display_entity("ontime_clocks:minutes_needle")
|
||||
|
||||
function ontime_clocks.get_h24()
|
||||
return math.floor(minetest.get_timeofday()*24)%24
|
||||
end
|
||||
@@ -58,4 +62,3 @@ function ontime_clocks.get_needles_properties(color, size, hour, minute)
|
||||
visual_size = {x=size/64, y=size/64}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Code, Textures and Models by Pierre-Yves Rollo (pyrollo)
|
||||
intllib support (i18n) by (fat115)
|
||||
intllib fallback code and tools by Diego Martínez (kaeza)
|
||||
Extra contibutors:
|
||||
(Thomas--S)
|
||||
Translations:
|
||||
Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat)
|
||||
(fat115)
|
||||
@@ -18,11 +18,13 @@
|
||||
along with ontime_clocks. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
local mat = xcompat.materials
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:green_digital',
|
||||
recipe = {
|
||||
{'', 'dye:green', ''},
|
||||
{'default:glass', 'default:mese_crystal', 'default:glass'},
|
||||
{'', mat.dye_green, ''},
|
||||
{mat.glass, mat.mese_crystal, mat.glass},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
@@ -30,8 +32,8 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:red_digital',
|
||||
recipe = {
|
||||
{'', 'dye:red', ''},
|
||||
{'default:glass', 'default:mese_crystal', 'default:glass'},
|
||||
{'', mat.dye_red, ''},
|
||||
{mat.glass, mat.mese_crystal, mat.glass},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
@@ -39,8 +41,8 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:white',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:paper', 'default:steel_ingot'},
|
||||
{'', 'default:mese_crystal', ''},
|
||||
{mat.steel_ingot, mat.paper, mat.steel_ingot},
|
||||
{'', mat.mese_crystal, ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
@@ -48,8 +50,26 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:frameless_black',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'dye:black', 'default:steel_ingot'},
|
||||
{'', 'default:mese_crystal', ''},
|
||||
{mat.steel_ingot, mat.dye_black, mat.steel_ingot},
|
||||
{'', mat.mese_crystal, ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:3x3_clock_black',
|
||||
recipe = {
|
||||
{mat.steel_ingot, mat.dye_black, mat.steel_ingot},
|
||||
{'', 'ontime_clocks:frameless_black', ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:5x5_clock_black',
|
||||
recipe = {
|
||||
{mat.steel_ingot, mat.dye_black, mat.steel_ingot},
|
||||
{'', 'ontime_clocks:3x3_clock_black', ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
@@ -57,8 +77,26 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:frameless_gold',
|
||||
recipe = {
|
||||
{'default:gold_ingot', '', 'default:gold_ingot'},
|
||||
{'', 'default:mese_crystal', ''},
|
||||
{mat.gold_ingot, '', mat.gold_ingot},
|
||||
{'', mat.mese_crystal, ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:3x3_clock_gold',
|
||||
recipe = {
|
||||
{mat.gold_ingot, '', mat.gold_ingot},
|
||||
{'', 'ontime_clocks:frameless_gold', ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:5x5_clock_gold',
|
||||
recipe = {
|
||||
{mat.gold_ingot, '', mat.gold_ingot},
|
||||
{'', 'ontime_clocks:3x3_clock_gold', ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
@@ -66,10 +104,27 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:frameless_white',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'dye:white', 'default:steel_ingot'},
|
||||
{'', 'default:mese_crystal', ''},
|
||||
{mat.steel_ingot, mat.dye_white, mat.steel_ingot},
|
||||
{'', mat.mese_crystal, ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:3x3_clock_white',
|
||||
recipe = {
|
||||
{mat.steel_ingot, mat.dye_white, mat.steel_ingot},
|
||||
{'', 'ontime_clocks:frameless_white', ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ontime_clocks:5x5_clock_white',
|
||||
recipe = {
|
||||
{mat.steel_ingot, mat.dye_white, mat.steel_ingot},
|
||||
{'', 'ontime_clocks:3x3_clock_white', ''},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
112
ontime_clocks/design/ontime_clocks_large_clock_inventory.svg
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 8.4666665 8.4666666"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="ontime_clocks_large_clock_inventory.svg"
|
||||
inkscape:export-filename="../textures/ontime_clocks_5x5_clock_inventory.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#cccccc"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
showgrid="true"
|
||||
inkscape:zoom="7.6898428"
|
||||
inkscape:cx="66.061168"
|
||||
inkscape:cy="-37.321959"
|
||||
inkscape:window-width="2514"
|
||||
inkscape:window-height="1371"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
shape-rendering="crispEdges">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid132"
|
||||
empspacing="8"
|
||||
empcolor="#9f00e5"
|
||||
empopacity="0.30196078"
|
||||
originx="0"
|
||||
originy="0" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="clock"
|
||||
style="display:inline">
|
||||
<path
|
||||
id="rect2410-3-1-2-3-9-4-7-8-6"
|
||||
style="display:inline;opacity:1;fill:#ffffff;fill-rule:evenodd;stroke-width:0.0273861;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.5;stop-color:#000000"
|
||||
d="M 3.96875,1.5875 H 4.2333333 V 1.8520833 H 3.96875 Z M 3.7041667,1.8520833 H 4.2333333 V 2.1166666 H 3.7041667 Z M 3.4395833,2.1166666 H 3.9687499 V 2.3812499 H 3.4395833 Z M 3.175,2.3812499 H 3.7041666 V 2.6458332 H 3.175 Z M 2.9104166,2.6458333 H 3.4395832 V 2.9104166 H 2.9104166 Z M 2.6458333,2.9104166 H 3.1749999 V 3.1749999 H 2.6458333 Z M 2.2489583,3.7041667 H 2.5135417 V 3.96875 H 2.2489583 Z M 1.984375,3.4395833 H 2.6458334 V 3.7041666 H 1.984375 Z M 1.7197917,3.175 H 2.9104166 V 3.4395833 H 1.7197917 Z M 1.4552083,2.9104166 H 2.38125 V 3.1749999 H 1.4552083 Z M 1.190625,2.6458333 H 2.1166667 V 2.9104166 H 1.190625 Z M 0.9260416,2.3812499 H 1.8520833 V 2.6458332 H 0.9260416 Z M 0.79374999,2.1166666 H 1.5875 V 2.3812499 H 0.79374999 Z M 0.92604166,1.5875 H 1.0583333 V 1.8520833 H 0.92604166 Z M 0.79374999,1.8520833 H 1.3229166 V 2.1166666 H 0.79374999 Z"
|
||||
inkscape:label="clock"
|
||||
transform="matrix(2,0,0,1,-0.52916664,0.52916667)" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="5x5"
|
||||
style="display:none;fill:#ffffff">
|
||||
<path
|
||||
id="rect1383"
|
||||
style="display:inline;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke-width:0.0499999;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.5;stop-color:#000000"
|
||||
d="m 1.0583333,6.0854167 v 0.79375 h 0.2645834 0.79375 V 6.6145833 h -0.79375 V 6.35 h 0.79375 V 6.0854167 h -0.79375 z m 1.0583334,0.79375 V 7.14375 H 2.38125 V 6.8791667 Z m 0,0.2645833 H 1.0583333 v 0.2645833 h 1.0583334 z m 1.5875,-1.0583333 v 0.79375 H 3.96875 4.7625 V 6.6145833 H 3.96875 V 6.35 H 4.7625 V 6.0854167 H 3.96875 Z M 4.7625,6.8791667 V 7.14375 H 5.0270833 V 6.8791667 Z m 0,0.2645833 H 3.7041667 V 7.4083333 H 4.7625 Z M 2.6458333,6.6145833 V 6.8791667 H 2.9104167 V 6.6145833 Z M 2.9104167,6.8791667 V 7.14375 H 3.175 V 6.8791667 Z m 0.2645833,0 H 3.4395833 V 6.6145833 H 3.175 Z m 0,0.2645833 V 7.4083333 H 3.4395833 V 7.14375 Z m -0.2645833,0 H 2.6458333 v 0.2645833 h 0.2645834 z"
|
||||
inkscape:label="5x5" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="3x3"
|
||||
style="display:none">
|
||||
<path
|
||||
id="rect1383-3"
|
||||
style="display:inline;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke-width:0.0499999;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.5;stop-color:#000000"
|
||||
d="M 1.0583333,6.0854167 V 6.35 H 2.1166667 V 6.0854167 Z M 2.1166667,6.35 V 6.6145833 H 2.38125 V 6.35 Z m 0,0.2645833 H 1.3229166 v 0.2645834 h 0.7937501 z m 0,0.2645834 V 7.14375 H 2.38125 V 6.8791667 Z m 0,0.2645833 H 1.0583333 v 0.2645833 h 1.0583334 z m 1.5875,-1.0583333 V 6.35 H 4.7624999 V 6.0854167 Z M 4.7624999,6.35 V 6.6145833 H 5.0270833 V 6.35 Z m 0,0.2645833 H 3.96875 v 0.2645834 h 0.7937499 z m 0,0.2645834 V 7.14375 H 5.0270833 V 6.8791667 Z m 0,0.2645833 H 3.7041667 V 7.4083333 H 4.7624999 Z M 2.6458334,6.6145833 V 6.8791667 H 2.9104167 V 6.6145833 Z M 2.9104167,6.8791667 V 7.14375 H 3.175 V 6.8791667 Z m 0.2645833,0 H 3.4395834 V 6.6145833 H 3.175 Z m 0,0.2645833 V 7.4083333 H 3.4395834 V 7.14375 Z m -0.2645833,0 H 2.6458334 v 0.2645833 h 0.2645833 z"
|
||||
inkscape:label="3x3" />
|
||||
</g>
|
||||
<metadata
|
||||
id="metadata209">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.9 KiB |
304
ontime_clocks/design/ontime_clocks_large_clock_parts.svg
Normal file
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="35.98333mm"
|
||||
height="21.166664mm"
|
||||
viewBox="0 0 35.98333 21.166664"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="ontime_clocks_large_clock_parts.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="true"
|
||||
inkscape:zoom="2.71877"
|
||||
inkscape:cx="51.309968"
|
||||
inkscape:cy="44.321513"
|
||||
inkscape:window-width="1720"
|
||||
inkscape:window-height="1282"
|
||||
inkscape:window-x="26"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer4">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid132"
|
||||
empspacing="8"
|
||||
empcolor="#9f00e5"
|
||||
empopacity="0.30196078"
|
||||
originx="-23.283334"
|
||||
originy="-12.699997" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:label="Guides"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
style="display:none"
|
||||
transform="translate(-23.283334,-12.699999)">
|
||||
<g
|
||||
id="g5227"
|
||||
style="display:inline"
|
||||
inkscape:label="center 3x3"
|
||||
inkscape:export-filename="../textures/ontime_clocks_3x3_center.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="display:inline;fill:#ff0000;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:0.433012;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
|
||||
id="rect236-23"
|
||||
width="2.1166666"
|
||||
height="6.3500009"
|
||||
x="31.75"
|
||||
y="16.933332"
|
||||
inkscape:label="Size"
|
||||
transform="matrix(2.0000002,0,0,0.66666676,-40.216672,9.8777758)" />
|
||||
<path
|
||||
style="display:inline;fill:#ff0000;stroke:#ff0000;stroke-width:0.05;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="m 23.283334,23.283333 h 4.233333"
|
||||
id="path1869-2" />
|
||||
<path
|
||||
style="display:inline;fill:#ff0000;stroke:#ff0000;stroke-width:0.05;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="M 25.4,21.166667 V 25.4"
|
||||
id="path1869-2-2" />
|
||||
</g>
|
||||
<g
|
||||
id="g792"
|
||||
style="display:inline"
|
||||
inkscape:label="center 5x5"
|
||||
transform="translate(6.3500021)"
|
||||
inkscape:export-filename="../textures/ontime_clocks_5x5_center.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="display:inline;fill:#ff0000;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:0.433012;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
|
||||
id="rect786"
|
||||
width="2.1166666"
|
||||
height="6.3500009"
|
||||
x="31.75"
|
||||
y="16.933332"
|
||||
inkscape:label="Size"
|
||||
transform="matrix(2.0000002,0,0,0.66666676,-40.216672,9.8777758)" />
|
||||
<path
|
||||
style="display:inline;fill:#ff0000;stroke:#ff0000;stroke-width:0.05;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="m 23.283334,23.283333 h 4.233333"
|
||||
id="path788" />
|
||||
<path
|
||||
style="display:inline;fill:#ff0000;stroke:#ff0000;stroke-width:0.05;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="M 25.4,21.166667 V 25.4"
|
||||
id="path790" />
|
||||
</g>
|
||||
<g
|
||||
id="g1880"
|
||||
inkscape:label="minutes 3x3"
|
||||
transform="matrix(2.0000002,0,0,2.333333,-27.516673,-23.636104)"
|
||||
style="stroke-width:0.46291"
|
||||
inkscape:export-filename="../textures/ontime_clocks_3x3_needle_minutes.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="fill:#ff0000;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:0.231455;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
|
||||
id="rect236"
|
||||
width="2.1166666"
|
||||
height="6.3500009"
|
||||
x="31.75"
|
||||
y="16.933332"
|
||||
inkscape:label="Size" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.0231455;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="m 31.75,20.108333 h 2.116666"
|
||||
id="path1869" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.0231455;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="m 32.808333,16.933333 v 6.35"
|
||||
id="path1871" />
|
||||
</g>
|
||||
<g
|
||||
id="g1885"
|
||||
inkscape:label="minutes 5x5"
|
||||
transform="matrix(1.9999998,0,0,1.9999995,-29.633327,-16.933326)"
|
||||
style="stroke-width:0.5"
|
||||
inkscape:export-filename="../textures/ontime_clocks_5x5_needle_minutes.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="fill:#ff0000;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:0.250001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
|
||||
id="rect236-3"
|
||||
width="2.1166663"
|
||||
height="10.583334"
|
||||
x="35.983334"
|
||||
y="14.816667"
|
||||
inkscape:label="Size" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.025;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="M 37.041666,25.4 V 14.816666"
|
||||
id="path1873" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.025;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="M 35.983333,20.108333 H 38.1"
|
||||
id="path1875" />
|
||||
</g>
|
||||
<g
|
||||
id="g1880-6"
|
||||
inkscape:label="hours 3x3"
|
||||
transform="matrix(2.0000002,0,0,2.333333,-14.816673,-23.636104)"
|
||||
style="display:inline;stroke-width:0.46291"
|
||||
inkscape:export-filename="../textures/ontime_clocks_3x3_needle_hours.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="fill:#ff0000;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:0.231455;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
|
||||
id="rect236-2"
|
||||
width="2.1166666"
|
||||
height="6.3500009"
|
||||
x="31.75"
|
||||
y="16.933332"
|
||||
inkscape:label="Size" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.0231455;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="m 31.75,20.108333 h 2.116666"
|
||||
id="path1869-6" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.0231455;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="m 32.808333,16.933333 v 6.35"
|
||||
id="path1871-1" />
|
||||
</g>
|
||||
<g
|
||||
id="g1885-8"
|
||||
inkscape:label="hours 5x5"
|
||||
transform="matrix(1.9999998,0,0,1.9999995,-16.933327,-16.933326)"
|
||||
style="display:inline;stroke-width:0.5"
|
||||
inkscape:export-filename="../textures/ontime_clocks_5x5_needle_hours.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="fill:#ff0000;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:0.250001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
|
||||
id="rect236-3-7"
|
||||
width="2.1166663"
|
||||
height="10.583334"
|
||||
x="35.983334"
|
||||
y="14.816667"
|
||||
inkscape:label="Size" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.025;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="M 37.041666,25.4 V 14.816666"
|
||||
id="path1873-9" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:0.025;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.5"
|
||||
d="M 35.983333,20.108333 H 38.1"
|
||||
id="path1875-2" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="Centers"
|
||||
style="display:inline"
|
||||
transform="translate(-23.283334,-12.699999)">
|
||||
<g
|
||||
id="g4762-3-3-8"
|
||||
transform="matrix(1.4999983,0,0,0.17647065,-31.749933,19.874876)"
|
||||
style="display:inline;stroke-width:1.94365">
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0971825;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.5;stop-color:#000000"
|
||||
id="rect1943-5-6-9"
|
||||
width="1.0583333"
|
||||
height="8.9958334"
|
||||
x="37.570831"
|
||||
y="14.816667"
|
||||
ry="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g4762-3-3-8-3"
|
||||
transform="matrix(1.9999979,0,0,0.23529412,-44.449917,18.738726)"
|
||||
style="display:inline;stroke-width:1.45774">
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0728869;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.5;stop-color:#000000"
|
||||
id="rect1943-5-6-9-6"
|
||||
width="1.0583333"
|
||||
height="8.9958334"
|
||||
x="37.570831"
|
||||
y="14.816667"
|
||||
ry="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Minutes"
|
||||
style="display:inline"
|
||||
transform="translate(-23.283334,-12.699999)">
|
||||
<g
|
||||
id="g4762-7"
|
||||
transform="matrix(0.9999994,0,0,1.2352942,6.350025,-5.6029436)"
|
||||
style="stroke-width:0.899737">
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0449866;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.5;stop-color:#000000"
|
||||
id="rect1943-0"
|
||||
width="1.0583333"
|
||||
height="8.9958334"
|
||||
x="37.570831"
|
||||
y="14.816667"
|
||||
ry="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g4762-3-3"
|
||||
transform="matrix(0.50000006,0,0,0.85294118,19.049999,3.2372533)"
|
||||
style="stroke-width:1.53128">
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.076564;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.5;stop-color:#000000"
|
||||
id="rect1943-5-6"
|
||||
width="1.0583333"
|
||||
height="8.9958334"
|
||||
x="37.570831"
|
||||
y="14.816667"
|
||||
ry="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Hours"
|
||||
style="display:inline"
|
||||
transform="translate(-23.283334,-12.699999)">
|
||||
<g
|
||||
id="g4762"
|
||||
transform="matrix(1.4999979,0,0,1,8.3634505e-5,3.2499997e-8)"
|
||||
style="stroke-width:0.816497">
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0408248;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.5;stop-color:#000000"
|
||||
id="rect1943"
|
||||
width="1.0583333"
|
||||
height="8.9958334"
|
||||
x="37.570831"
|
||||
y="14.816667"
|
||||
ry="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g4762-3"
|
||||
transform="matrix(1,0,0,0.76470588,12.700002,5.6029412)"
|
||||
style="stroke-width:1.14354">
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0571771;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.5;stop-color:#000000"
|
||||
id="rect1943-5"
|
||||
width="1.0583333"
|
||||
height="8.9958334"
|
||||
x="37.570831"
|
||||
y="14.816667"
|
||||
ry="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -22,12 +22,9 @@ ontime_clocks = {}
|
||||
ontime_clocks.name = minetest.get_current_modname()
|
||||
ontime_clocks.path = minetest.get_modpath(ontime_clocks.name)
|
||||
|
||||
-- Load support for intllib.
|
||||
local S, NS = dofile(ontime_clocks.path.."/intllib.lua")
|
||||
ontime_clocks.intllib = S
|
||||
-- Translation support
|
||||
ontime_clocks.S = minetest.get_translator(ontime_clocks.name)
|
||||
|
||||
dofile(ontime_clocks.path.."/common.lua")
|
||||
dofile(ontime_clocks.path.."/nodes.lua")
|
||||
dofile(ontime_clocks.path.."/crafts.lua")
|
||||
|
||||
minetest.log("action", "[ontime_clocks] loaded.")
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
-- 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
|
||||
@@ -1,43 +0,0 @@
|
||||
# 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-08-05 09:50+0200\n"
|
||||
"PO-Revision-Date: 2017-05-08 06:20+0200\n"
|
||||
"Last-Translator: Peppy <peppy@twang-factory.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\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"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Green digital clock"
|
||||
msgstr "Horloge numérique verte"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Red digital clock"
|
||||
msgstr "Horloge numérique rouge"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "White clock"
|
||||
msgstr "Horloge blanche"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless clock"
|
||||
msgstr "Horloge sans cadre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless gold clock"
|
||||
msgstr "Horloge dorée sans cadre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless white clock"
|
||||
msgstr "Horloge blanche sans cadre"
|
||||
@@ -1,42 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Yaya (Nurul Azeera Hidayah @ Muhammad Nur Hidayat) <translation@mnh48.moe>, 2017.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Display Modpack\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-26 11:21+0200\n"
|
||||
"PO-Revision-Date: 2020-07-05 11:32+0000\n"
|
||||
"Last-Translator: Yaya MNH48 <translation@mnh48.moe>\n"
|
||||
"Language-Team: Malay <translation@mnh48.moe>\n"
|
||||
"Language: ms\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.3\n"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Green digital clock"
|
||||
msgstr "Jam digital hijau"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Red digital clock"
|
||||
msgstr "Jam digital merah"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "White clock"
|
||||
msgstr "Jam putih"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless clock"
|
||||
msgstr "Jam tanpa bingkai"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless gold clock"
|
||||
msgstr "Jam emas tanpa bingkai"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless white clock"
|
||||
msgstr "Jam putih tanpa bingkai"
|
||||
16
ontime_clocks/locale/ontime_clocks.de.tr
Normal file
@@ -0,0 +1,16 @@
|
||||
# textdomain: ontime_clocks
|
||||
Green digital clock=Grüne Digitaluhr
|
||||
Red digital clock=Rote Digitaluhr
|
||||
White clock=Weiße Uhr
|
||||
@1 frameless @2 clock=@1 rahmenlose @2 Uhr
|
||||
gold=goldene
|
||||
black=schwarze
|
||||
white=weiße
|
||||
Frameless @1 clock=Rahmenlosse @1 Uhr
|
||||
|
||||
|
||||
##### not used anymore #####
|
||||
|
||||
Frameless clock=Rahmenlose Uhr
|
||||
Frameless gold clock=Rahmenlose goldene Uhr
|
||||
Frameless white clock=Rahmenlose weiße Uhr
|
||||
9
ontime_clocks/locale/ontime_clocks.fr.tr
Normal file
@@ -0,0 +1,9 @@
|
||||
# textdomain: ontime_clocks
|
||||
Green digital clock=Horloge numérique verte
|
||||
Red digital clock=Horloge numérique rouge
|
||||
White clock=Horloge blanche
|
||||
@1 frameless @2 clock=Horloge @2 sans cadre @1
|
||||
gold=dorée
|
||||
black=noire
|
||||
white=blanche
|
||||
Frameless @1 clock=Horloge @1 sans cadre
|
||||
16
ontime_clocks/locale/ontime_clocks.ms.tr
Normal file
@@ -0,0 +1,16 @@
|
||||
# textdomain: ontime_clocks
|
||||
Green digital clock=Jam digital hijau
|
||||
Red digital clock=Jam digital merah
|
||||
White clock=Jam putih
|
||||
@1 frameless @2 clock=
|
||||
gold=
|
||||
black=
|
||||
white=
|
||||
Frameless @1 clock=
|
||||
|
||||
|
||||
##### not used anymore #####
|
||||
|
||||
Frameless clock=Jam tanpa bingkai
|
||||
Frameless gold clock=Jam emas tanpa bingkai
|
||||
Frameless white clock=Jam putih tanpa bingkai
|
||||
@@ -1,42 +0,0 @@
|
||||
# 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.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-26 11:21+0200\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=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Green digital clock"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Red digital clock"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "White clock"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless clock"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless gold clock"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Frameless white clock"
|
||||
msgstr ""
|
||||
9
ontime_clocks/locale/template.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
# textdomain: ontime_clocks
|
||||
Green digital clock=
|
||||
Red digital clock=
|
||||
White clock=
|
||||
@1 frameless @2 clock=
|
||||
gold=
|
||||
black=
|
||||
white=
|
||||
Frameless @1 clock=
|
||||
@@ -1,5 +1,4 @@
|
||||
name = ontime_clocks
|
||||
title = Ontime Clocks
|
||||
description = Clocks displaing real ingame time
|
||||
depends = default,dye,display_api
|
||||
optional_depends = intllib
|
||||
depends = display_api, xcompat
|
||||
|
||||
@@ -18,10 +18,44 @@
|
||||
along with ontime_clocks. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
local S = ontime_clocks.intllib
|
||||
local S = ontime_clocks.S
|
||||
|
||||
local function clock_on_construct(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(5)
|
||||
display_api.on_construct(pos)
|
||||
end
|
||||
|
||||
local function clock_on_timer(pos)
|
||||
display_api.update_entities(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "ontime_clocks:nodetimer_init",
|
||||
nodenames = {"group:ontime_clocks_tick"},
|
||||
run_at_every_load = false,
|
||||
action = function(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(5)
|
||||
end
|
||||
})
|
||||
|
||||
local function register_clock(name, def)
|
||||
def.on_place = display_api.on_place
|
||||
def.on_construct = clock_on_construct
|
||||
def.on_destruct = display_api.on_destruct
|
||||
def.on_blast = display_api.on_blast
|
||||
def.on_rotate = display_api.on_rotate
|
||||
def.on_timer = clock_on_timer
|
||||
def.groups.ontime_clocks_tick = 1
|
||||
def.groups.display_api = 1
|
||||
|
||||
minetest.register_node(name, def)
|
||||
end
|
||||
|
||||
-- Green digital clock
|
||||
minetest.register_node("ontime_clocks:green_digital", {
|
||||
register_clock("ontime_clocks:green_digital", {
|
||||
description = S("Green digital clock"),
|
||||
inventory_image = "ontime_clocks_green_digital_inventory.png",
|
||||
wield_image = "ontime_clocks_green_digital_inventory.png",
|
||||
@@ -30,12 +64,15 @@ minetest.register_node("ontime_clocks:green_digital", {
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.5, -3/16, -7/16, -13/32, 7/32, 7/16 },
|
||||
wall_top = { -7/16, 0.5, -7/32, 7/16, 13/32, 3/16 },
|
||||
wall_bottom = { -7/16, -0.5, -3/16, 7/16, -13/32, 7/32 },
|
||||
wall_side = {-0.5, -3/16, -7/16, -13/32, 7/32, 7/16},
|
||||
wall_bottom = {-7/16, -0.5, -3/16, 7/16, -13/32, 7/32},
|
||||
wall_top = {-7/16, 0.5, -7/32, 7/16, 13/32, 3/16}
|
||||
},
|
||||
tiles = {"ontime_clocks_digital.png"},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, handy = 1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
is_ground_content = false,
|
||||
display_entities = {
|
||||
["ontime_clocks:display"] = {
|
||||
depth = 13/32 - 0.01,
|
||||
@@ -45,21 +82,11 @@ minetest.register_node("ontime_clocks:green_digital", {
|
||||
"#040", "#0F0", ontime_clocks.get_h24(), ontime_clocks.get_m12()))
|
||||
end },
|
||||
},
|
||||
on_place = display_api.on_place,
|
||||
on_construct = display_api.on_construct,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_rotate = display_api.on_rotate,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"ontime_clocks:green_digital"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = display_api.update_entities,
|
||||
})
|
||||
|
||||
-- Red digital clock
|
||||
minetest.register_node("ontime_clocks:red_digital", {
|
||||
register_clock("ontime_clocks:red_digital", {
|
||||
description = S("Red digital clock"),
|
||||
inventory_image = "ontime_clocks_red_digital_inventory.png",
|
||||
wield_image = "ontime_clocks_red_digital_inventory.png",
|
||||
@@ -68,12 +95,15 @@ minetest.register_node("ontime_clocks:red_digital", {
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.5, -3/16, -7/16, -13/32, 7/32, 7/16 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
wall_side = {-0.5, -3/16, -7/16, -13/32, 7/32, 7/16},
|
||||
wall_bottom = {-7/16, -0.5, -3/16, 7/16, -13/32, 7/32},
|
||||
wall_top = {-7/16, 0.5, -7/32, 7/16, 13/32, 3/16}
|
||||
},
|
||||
tiles = {"ontime_clocks_digital.png"},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, handy = 1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
is_ground_content = false,
|
||||
display_entities = {
|
||||
["ontime_clocks:display"] = {
|
||||
depth = 13/32 - 0.01,
|
||||
@@ -83,21 +113,10 @@ minetest.register_node("ontime_clocks:red_digital", {
|
||||
"#400", "#F00", ontime_clocks.get_h24(), ontime_clocks.get_m12()))
|
||||
end },
|
||||
},
|
||||
on_place = display_api.on_place,
|
||||
on_construct = display_api.on_construct,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_rotate = display_api.on_rotate,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"ontime_clocks:red_digital"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = display_api.update_entities,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("ontime_clocks:white", {
|
||||
register_clock("ontime_clocks:white", {
|
||||
description = S("White clock"),
|
||||
inventory_image = "ontime_clocks_white_inventory.png",
|
||||
wield_image = "ontime_clocks_white_inventory.png",
|
||||
@@ -111,7 +130,10 @@ minetest.register_node("ontime_clocks:white", {
|
||||
wall_top = { -7/16, 0.5, -7/16, 7/16, 7/16, 7/16},
|
||||
},
|
||||
tiles = {"ontime_clocks_white.png"},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, handy = 1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
is_ground_content = false,
|
||||
display_entities = {
|
||||
["ontime_clocks:display"] = {
|
||||
depth = 6/16 - 0.01,
|
||||
@@ -121,126 +143,105 @@ minetest.register_node("ontime_clocks:white", {
|
||||
"#000", 36, ontime_clocks.get_h12(), ontime_clocks.get_m12()))
|
||||
end },
|
||||
},
|
||||
on_place = display_api.on_place,
|
||||
on_construct = display_api.on_construct,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_rotate = display_api.on_rotate,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"ontime_clocks:white"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = display_api.update_entities,
|
||||
})
|
||||
|
||||
minetest.register_node("ontime_clocks:frameless_black", {
|
||||
description = S("Frameless clock"),
|
||||
inventory_image = "ontime_clocks_frameless_inventory.png",
|
||||
wield_image = "ontime_clocks_frameless_inventory.png",
|
||||
local function register_large_clock(name, label, color, size)
|
||||
local sstr = size .. "x" .. size -- Size string
|
||||
register_clock("ontime_clocks:" .. sstr .. "_clock_" .. name, {
|
||||
description = S("@1 frameless @2 clock", sstr, label),
|
||||
inventory_image = "ontime_clocks_large_clock_inventory.png^[colorize:" ..
|
||||
color .. "^ontime_clocks_" .. sstr .. "_clock_inventory.png",
|
||||
wield_image = "ontime_clocks_large_clock_inventory.png^[colorize:" .. color,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
drawtype = "nodebox",
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.5, -7/16, -7/16, -15/32, 7/16, 7/16 },
|
||||
wall_bottom = { -7/16, -0.5, -7/16, 7/16, -15/32, 7/16 },
|
||||
wall_top = { -7/16, 0.5, -7/16, 7/16, 15/32, 7/16 }
|
||||
},
|
||||
tiles = {"ontime_clocks_" .. sstr .. "_center.png^[colorize:" .. color},
|
||||
groups = {oddly_breakable_by_hand = 1, not_blocking_trains = 1, handy = 1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
is_ground_content = false,
|
||||
display_entities = {
|
||||
["ontime_clocks:hours_needle"] = {
|
||||
depth = 14/32,
|
||||
on_display_update = function(pos, objref)
|
||||
objref:set_properties({
|
||||
textures={"ontime_clocks_" .. sstr .. "_needle_hours.png^[colorize:" .. color},
|
||||
visual_size = {x=1, y=size},
|
||||
})
|
||||
objref:get_luaentity()["rotation"] = {
|
||||
z = math.floor(minetest.get_timeofday() * 24) / 6 * math.pi
|
||||
}
|
||||
end
|
||||
},
|
||||
["ontime_clocks:minutes_needle"] = {
|
||||
depth = 13/32,
|
||||
on_display_update = function(pos, objref)
|
||||
objref:set_properties({
|
||||
textures={"ontime_clocks_" .. sstr .. "_needle_minutes.png^[colorize:" .. color},
|
||||
visual_size = {x=1, y=size},
|
||||
})
|
||||
objref:get_luaentity()["rotation"] = {
|
||||
z = math.floor(minetest.get_timeofday() * 288) / 6 * math.pi
|
||||
}
|
||||
end
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
local models = {
|
||||
{ name = "gold", label = S("gold"), color = "#FF0" },
|
||||
{ name = "black", label = S("black"), color = "#000" },
|
||||
{ name = "white", label = S("white"), color = "#FFF" },
|
||||
}
|
||||
|
||||
for _, model in ipairs(models) do
|
||||
-- Frameless clock
|
||||
register_clock("ontime_clocks:frameless_" .. model.name, {
|
||||
description = S("Frameless @1 clock", model.label),
|
||||
inventory_image = "ontime_clocks_frameless_inventory.png^[colorize:" .. model.color,
|
||||
wield_image = "ontime_clocks_frameless_inventory.png^[colorize:" .. model.color,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
drawtype = "nodebox",
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.5, -7/16, -7/16, -0.45, 7/16, 7/16 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
tiles = {"ontime_clocks_frameless.png"},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||
tiles = {"ontime_clocks_frameless.png^[colorize:" .. model.color},
|
||||
groups = { oddly_breakable_by_hand=1, not_blocking_trains=1, handy = 1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
is_ground_content = false,
|
||||
display_entities = {
|
||||
["ontime_clocks:display"] = {
|
||||
depth = 7/16,
|
||||
on_display_update = function(pos, objref)
|
||||
objref:set_properties(
|
||||
ontime_clocks.get_needles_properties(
|
||||
"#000", 48, ontime_clocks.get_h12(), ontime_clocks.get_m12()))
|
||||
model.color, 48,
|
||||
ontime_clocks.get_h12(),
|
||||
ontime_clocks.get_m12()
|
||||
)
|
||||
)
|
||||
end },
|
||||
},
|
||||
on_place = display_api.on_place,
|
||||
on_construct = display_api.on_construct,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_rotate = display_api.on_rotate,
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"ontime_clocks:frameless_black"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = display_api.update_entities,
|
||||
})
|
||||
-- 3x3 large clock
|
||||
register_large_clock(model.name, model.label, model.color, 3)
|
||||
|
||||
minetest.register_node("ontime_clocks:frameless_gold", {
|
||||
description = S("Frameless gold clock"),
|
||||
inventory_image = "ontime_clocks_frameless_inventory.png^[colorize:#FF0",
|
||||
wield_image = "ontime_clocks_frameless_inventory.png^[colorize:#FF0",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.5, -7/16, -7/16, -0.45, 7/16, 7/16 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
tiles = {"ontime_clocks_frameless.png^[colorize:#FF0"},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||
display_entities = {
|
||||
["ontime_clocks:display"] = {
|
||||
depth = 7/16,
|
||||
on_display_update = function(pos, objref)
|
||||
objref:set_properties(
|
||||
ontime_clocks.get_needles_properties(
|
||||
"#FF0", 48, ontime_clocks.get_h12(), ontime_clocks.get_m12()))
|
||||
end },
|
||||
},
|
||||
on_place = display_api.on_place,
|
||||
on_construct = display_api.on_construct,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_rotate = display_api.on_rotate,
|
||||
})
|
||||
-- 5x5 large clock
|
||||
register_large_clock(model.name, model.label, model.color, 5)
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"ontime_clocks:frameless_gold"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = display_api.update_entities,
|
||||
})
|
||||
|
||||
minetest.register_node("ontime_clocks:frameless_white", {
|
||||
description = S("Frameless white clock"),
|
||||
inventory_image = "ontime_clocks_frameless_inventory.png^[colorize:#FFF",
|
||||
wield_image = "ontime_clocks_frameless_inventory.png^[colorize:#FFF",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = { -0.5, -7/16, -7/16, -0.45, 7/16, 7/16 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
tiles = {"ontime_clocks_frameless.png^[colorize:#FFF"},
|
||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||
display_entities = {
|
||||
["ontime_clocks:display"] = {
|
||||
depth = 7/16,
|
||||
on_display_update = function(pos, objref)
|
||||
objref:set_properties(
|
||||
ontime_clocks.get_needles_properties(
|
||||
"#FFF", 48, ontime_clocks.get_h12(), ontime_clocks.get_m12()))
|
||||
end },
|
||||
},
|
||||
on_place = display_api.on_place,
|
||||
on_construct = display_api.on_construct,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_rotate = display_api.on_rotate,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"ontime_clocks:frameless_white"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = display_api.update_entities,
|
||||
})
|
||||
|
||||
BIN
ontime_clocks/textures/ontime_clocks_3x3_center.png
Normal file
|
After Width: | Height: | Size: 162 B |
BIN
ontime_clocks/textures/ontime_clocks_3x3_clock_inventory.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
ontime_clocks/textures/ontime_clocks_3x3_needle_hours.png
Normal file
|
After Width: | Height: | Size: 163 B |
BIN
ontime_clocks/textures/ontime_clocks_3x3_needle_minutes.png
Normal file
|
After Width: | Height: | Size: 162 B |
BIN
ontime_clocks/textures/ontime_clocks_5x5_center.png
Normal file
|
After Width: | Height: | Size: 162 B |
BIN
ontime_clocks/textures/ontime_clocks_5x5_clock_inventory.png
Normal file
|
After Width: | Height: | Size: 270 B |
BIN
ontime_clocks/textures/ontime_clocks_5x5_needle_hours.png
Normal file
|
After Width: | Height: | Size: 164 B |
BIN
ontime_clocks/textures/ontime_clocks_5x5_needle_minutes.png
Normal file
|
After Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 164 B |
BIN
ontime_clocks/textures/ontime_clocks_large_clock_inventory.png
Normal file
|
After Width: | Height: | Size: 463 B |
@@ -1,25 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# To create a new translation:
|
||||
# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/..";
|
||||
|
||||
# Extract translatable strings.
|
||||
xgettext --from-code=UTF-8 \
|
||||
--language=Lua \
|
||||
--sort-by-file \
|
||||
--keyword=S \
|
||||
--keyword=NS:1,2 \
|
||||
--keyword=N_ \
|
||||
--keyword=F \
|
||||
--add-comments='Translators:' \
|
||||
--add-location=file \
|
||||
-o locale/template.pot \
|
||||
$(find . -name '*.lua')
|
||||
|
||||
# Update translations.
|
||||
find locale -name '*.po' | while read -r file; do
|
||||
echo $file
|
||||
msgmerge --update $file locale/template.pot;
|
||||
done
|
||||
@@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
@@ -4,7 +4,7 @@ This mod provides various signs with text display. Text is locked if area is pro
|
||||
|
||||
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
|
||||
|
||||
**Dependancies**: default, display\_lib, font\_lib
|
||||
**Dependencies**: xcompat, display\_lib, font\_lib
|
||||
|
||||
**License**: Code under LGPL, Textures and models under CC-BY-SA
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
along with signs. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
local S = signs.intllib
|
||||
local F = function(...) return minetest.formspec_escape(S(...)) end
|
||||
|
||||
-- Generic callback for show_formspec displayed formspecs of "sign" mod
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
|
||||
@@ -61,9 +61,16 @@ minetest.register_lbm({ name = "signs:conpatibility_1",
|
||||
-- We need to have this entity registered to be able to remove it.
|
||||
if minetest.registered_entities["signs:text"] == nil then
|
||||
minetest.register_entity("signs:text", {
|
||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||
on_activate = function(self)
|
||||
if self.object then
|
||||
self.object:remove()
|
||||
end
|
||||
end,
|
||||
initial_properties = {
|
||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||
visual = "upright_sprite",
|
||||
textures = {},
|
||||
textures = {}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Code, Textures and Models by Pierre-Yves Rollo (pyrollo)
|
||||
intllib support (i18n) by (fat115)
|
||||
intllib fallback code and tools by Diego Martínez (kaeza)
|
||||
Extra contributors:
|
||||
(gpcf)
|
||||
(Thomas--S)
|
||||
Translations:
|
||||
Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat)
|
||||
(fat115)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
local mat = xcompat.materials
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'signs:wooden_right_sign',
|
||||
recipe = {
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'group:wood', 'group:wood', 'dye:black'},
|
||||
{'group:wood', 'group:wood', mat.dye_black},
|
||||
{'', '', ''},
|
||||
}
|
||||
})
|
||||
@@ -16,7 +18,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'signs:wooden_long_sign',
|
||||
recipe = {
|
||||
{'group:wood', 'dye:black', 'group:wood'},
|
||||
{'group:wood', mat.dye_black, 'group:wood'},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'', '', ''},
|
||||
}
|
||||
@@ -31,7 +33,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'signs:wooden_sign',
|
||||
recipe = {
|
||||
{'', 'dye:black', ''},
|
||||
{'', mat.dye_black, ''},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
}
|
||||
@@ -40,22 +42,40 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'signs:paper_poster',
|
||||
recipe = {
|
||||
{'default:paper', 'default:paper', 'dye:black'},
|
||||
{'default:paper', 'default:paper', ''},
|
||||
{'default:paper', 'default:paper', ''},
|
||||
{mat.paper, mat.paper, mat.dye_black},
|
||||
{mat.paper, mat.paper, ''},
|
||||
{mat.paper, mat.paper, ''},
|
||||
}
|
||||
})
|
||||
|
||||
local dyes = {
|
||||
mat.dye_white,
|
||||
mat.dye_grey,
|
||||
mat.dye_orange,
|
||||
mat.dye_brown,
|
||||
mat.dye_dark_grey,
|
||||
mat.dye_yellow,
|
||||
mat.dye_green,
|
||||
mat.dye_red,
|
||||
}
|
||||
for i, dye in ipairs(dyes) do
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = minetest.itemstring_with_palette("signs:paper_poster", (i-1) * 32),
|
||||
recipe = {"signs:paper_poster", dye},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'signs:label_small',
|
||||
recipe = {
|
||||
{'default:paper', 'dye:black'},
|
||||
{mat.paper, mat.dye_black},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'signs:label_medium',
|
||||
recipe = {
|
||||
{'default:paper', 'default:paper', 'dye:black'},
|
||||
{mat.paper, mat.paper, mat.dye_black},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,13 +22,14 @@ signs = {}
|
||||
signs.name = minetest.get_current_modname()
|
||||
signs.path = minetest.get_modpath(signs.name)
|
||||
|
||||
-- Load support for intllib.
|
||||
local S, NS = dofile(signs.path.."/intllib.lua")
|
||||
signs.intllib = S
|
||||
-- Translation support
|
||||
signs.S = minetest.get_translator(signs.name)
|
||||
|
||||
dofile(signs.path.."/common.lua")
|
||||
dofile(signs.path.."/nodes.lua")
|
||||
dofile(signs.path.."/crafts.lua")
|
||||
dofile(signs.path.."/compatibility.lua")
|
||||
|
||||
minetest.log("action", "[signs] loaded.")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
-- 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
|
||||
@@ -1,54 +0,0 @@
|
||||
# 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-08-26 13:20+0200\n"
|
||||
"PO-Revision-Date: 2017-05-08 07:08+0200\n"
|
||||
"Last-Translator: Peppy <peppy@twang-factory.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\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"
|
||||
|
||||
#: common.lua nodes.lua
|
||||
msgid "Text"
|
||||
msgstr "Texte"
|
||||
|
||||
#: common.lua nodes.lua
|
||||
msgid "Write"
|
||||
msgstr "Écrire"
|
||||
|
||||
#: common.lua
|
||||
#, lua-format
|
||||
msgid " (first %s lines only)"
|
||||
msgstr " (uniquement les %s premières lignes)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Title"
|
||||
msgstr "Titre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Close"
|
||||
msgstr "Fermer"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "(right-click to read more text)"
|
||||
msgstr "(Clic-droit pour afficher le texte entier)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Wooden direction sign"
|
||||
msgstr "Panneau de direction en bois"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Poster"
|
||||
msgstr "Affiche"
|
||||
|
||||
#~ msgid "Textd"
|
||||
#~ msgstr "Texte"
|
||||
@@ -1,51 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Yaya (Nurul Azeera Hidayah @ Muhammad Nur Hidayat) <translation@mnh48.moe>, 2017.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Display Modpack\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-26 13:20+0200\n"
|
||||
"PO-Revision-Date: 2020-07-05 11:34+0000\n"
|
||||
"Last-Translator: Yaya MNH48 <translation@mnh48.moe>\n"
|
||||
"Language-Team: Malay <translation@mnh48.moe>\n"
|
||||
"Language: ms\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.3\n"
|
||||
|
||||
#: common.lua nodes.lua
|
||||
msgid "Text"
|
||||
msgstr "Teks"
|
||||
|
||||
#: common.lua nodes.lua
|
||||
msgid "Write"
|
||||
msgstr "Tulis"
|
||||
|
||||
#: common.lua
|
||||
#, lua-format
|
||||
msgid " (first %s lines only)"
|
||||
msgstr " (%s baris pertama sahaja)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Title"
|
||||
msgstr "Tajuk"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Close"
|
||||
msgstr "Tutup"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "(right-click to read more text)"
|
||||
msgstr "(klik-kanan untuk baca teks penuh)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Wooden direction sign"
|
||||
msgstr "Papan tanda arah kayu"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Poster"
|
||||
msgstr "Poster"
|
||||
14
signs/locale/signs.de.tr
Normal file
@@ -0,0 +1,14 @@
|
||||
# textdomain: signs
|
||||
Close=Schließen
|
||||
Edit=Bearbeiten
|
||||
Title=Titel
|
||||
Text=Text
|
||||
Title font=Titel Schriftart
|
||||
Write=Schreiben
|
||||
(right-click to read more text)=(Rechtsklick für mehr Text)
|
||||
Wooden sign=Hölzernes Schild
|
||||
Wooden long sign=Langes hölzernes Schild
|
||||
Wooden direction sign=Hölzerner Wegweiser
|
||||
Poster=Poster
|
||||
Small label=Kleines Etikett
|
||||
Label=Etikett
|
||||
14
signs/locale/signs.fr.tr
Normal file
@@ -0,0 +1,14 @@
|
||||
# textdomain: signs
|
||||
Close=Fermer
|
||||
Edit=Éditer
|
||||
Title=Titre
|
||||
Text=Texte
|
||||
Title font=Police de titre
|
||||
Write=Écrire
|
||||
(right-click to read more text)=(Clic-droit pour afficher le texte entier)
|
||||
Wooden sign=Signe en bois
|
||||
Wooden long sign=Long signe en bois
|
||||
Wooden direction sign=Panneau de direction en bois
|
||||
Poster=Affiche
|
||||
Small label=Petite étiquette
|
||||
Label=Étiquette
|
||||
14
signs/locale/signs.ms.tr
Normal file
@@ -0,0 +1,14 @@
|
||||
# textdomain: signs
|
||||
Close=
|
||||
Edit=
|
||||
Title=
|
||||
Text=
|
||||
Title font=
|
||||
Write=
|
||||
(right-click to read more text)=(klik-kanan untuk baca teks penuh)
|
||||
Wooden sign=
|
||||
Wooden long sign=
|
||||
Wooden direction sign=Papan tanda arah kayu
|
||||
Poster=Poster
|
||||
Small label=
|
||||
Label=
|
||||
@@ -1,51 +0,0 @@
|
||||
# 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.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-26 13:20+0200\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=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: common.lua nodes.lua
|
||||
msgid "Text"
|
||||
msgstr ""
|
||||
|
||||
#: common.lua nodes.lua
|
||||
msgid "Write"
|
||||
msgstr ""
|
||||
|
||||
#: common.lua
|
||||
#, lua-format
|
||||
msgid " (first %s lines only)"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "(right-click to read more text)"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Wooden direction sign"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Poster"
|
||||
msgstr ""
|
||||
14
signs/locale/template.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
# textdomain: signs
|
||||
Close=
|
||||
Edit=
|
||||
Title=
|
||||
Text=
|
||||
Title font=
|
||||
Write=
|
||||
(right-click to read more text)=
|
||||
Wooden sign=
|
||||
Wooden long sign=
|
||||
Wooden direction sign=
|
||||
Poster=
|
||||
Small label=
|
||||
Label=
|
||||
@@ -1,5 +1,4 @@
|
||||
name = signs
|
||||
title = Signs
|
||||
description = Basic signs and posters with text display using signs_api
|
||||
depends = default,dye,signs_api
|
||||
optional_depends = intllib
|
||||
depends = signs_api, xcompat
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
along with signs. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
local S = signs.intllib
|
||||
local F = function(...) return minetest.formspec_escape(S(...)) end
|
||||
local S = signs.S
|
||||
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
|
||||
-- Poster specific formspec
|
||||
local function display_poster(pos, node, player)
|
||||
@@ -43,15 +43,14 @@ local function display_poster(pos, node, player)
|
||||
style_type[textarea;textcolor=#111]
|
||||
textarea[0.3,1.5;7,8;;%s;]]=],
|
||||
titletexture,
|
||||
minetest.colorize("#111",
|
||||
minetest.formspec_escape(meta:get_string("text"))))
|
||||
minetest.formspec_escape(meta:get_string("text")))
|
||||
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, F("Close"))
|
||||
fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, FS("Close"))
|
||||
else
|
||||
fs = string.format(
|
||||
"%sbutton[1,8;2,1;edit;%s]button_exit[4,8;2,1;ok;%s]",
|
||||
fs, F("Edit"), F("Close"))
|
||||
fs, FS("Edit"), FS("Close"))
|
||||
end
|
||||
minetest.show_formspec(player:get_player_name(), fname, fs)
|
||||
end
|
||||
@@ -65,15 +64,15 @@ local function edit_poster(pos, node, player)
|
||||
|
||||
if not minetest.is_protected(pos, player:get_player_name()) then
|
||||
fs = string.format([=[
|
||||
size[6.5,7.5]%s%s%s
|
||||
size[6.5,7.5]
|
||||
field[0.5,0.7;6,1;display_text;%s;%s]
|
||||
textarea[0.5,1.7;6,6;text;%s;%s]
|
||||
button[1.25,7;2,1;font;%s]
|
||||
button_exit[3.25,7;2,1;write;%s]]=],
|
||||
default.gui_bg, default.gui_bg_img, default.gui_slots, F("Title"),
|
||||
FS("Title"),
|
||||
minetest.formspec_escape(meta:get_string("display_text")),
|
||||
F("Text"), minetest.formspec_escape(meta:get_string("text")),
|
||||
F("Title font"), F("Write"))
|
||||
FS("Text"), minetest.formspec_escape(meta:get_string("text")),
|
||||
FS("Title font"), FS("Write"))
|
||||
minetest.show_formspec(player:get_player_name(), fname, fs)
|
||||
end
|
||||
end
|
||||
@@ -95,17 +94,17 @@ local function on_receive_fields_poster(pos, formname, fields, player)
|
||||
meta:set_string("display_text", fields.display_text)
|
||||
meta:set_string("text", fields.text)
|
||||
meta:set_string("infotext", "\""..fields.display_text
|
||||
.."\"\n"..S("(right-click to read more text)"))
|
||||
.."\"\n"..FS("(right-click to read more text)"))
|
||||
display_api.update_entities(pos)
|
||||
end
|
||||
if (fields.write or fields.key_enter) then
|
||||
display_poster(pos, node, player)
|
||||
elseif (fields.font) then
|
||||
font_api.show_font_list(player, pos, function (playername, pos)
|
||||
local player = minetest.get_player_by_name(playername)
|
||||
local node = minetest.get_node(pos)
|
||||
if player and node then
|
||||
edit_poster(pos, node, player)
|
||||
font_api.show_font_list(player, pos, function (playername, npos)
|
||||
local user = minetest.get_player_by_name(playername)
|
||||
local node2 = minetest.get_node(npos)
|
||||
if user and node2 then
|
||||
edit_poster(npos, node2, user)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -131,6 +130,8 @@ local models = {
|
||||
tiles = { "signs_wooden.png" },
|
||||
inventory_image = "signs_wooden_inventory.png",
|
||||
groups= { dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
},
|
||||
},
|
||||
wooden_long_sign = {
|
||||
@@ -149,6 +150,8 @@ local models = {
|
||||
},
|
||||
inventory_image = "signs_wooden_long_inventory.png",
|
||||
groups= { dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
},
|
||||
},
|
||||
wooden_right_sign = {
|
||||
@@ -168,8 +171,10 @@ local models = {
|
||||
drawtype = "mesh",
|
||||
mesh = "signs_dir_right.obj",
|
||||
selection_box = { type="fixed", fixed = {-0.5, -7/32, 0.5, 7/16, 7/32, 7/16}},
|
||||
collision_box = { type="fixed", fixed = {-0,5, -7/32, 0.5, 7/16, 7/32, 7/16}},
|
||||
collision_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}},
|
||||
groups= { dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
},
|
||||
},
|
||||
wooden_left_sign = {
|
||||
@@ -190,6 +195,8 @@ local models = {
|
||||
selection_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}},
|
||||
collision_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}},
|
||||
groups = { not_in_creative_inventory = 1, dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
drop = "signs:wooden_right_sign",
|
||||
},
|
||||
},
|
||||
@@ -207,7 +214,12 @@ local models = {
|
||||
"signs_poster_sides.png", "signs_poster_sides.png",
|
||||
"signs_poster_sides.png", "signs_poster.png" },
|
||||
inventory_image = "signs_poster_inventory.png",
|
||||
groups= { dig_immediate = 3 },
|
||||
use_texture_alpha = "clip",
|
||||
paramtype2 = "colorfacedir",
|
||||
palette = "signs_poster_palette.png",
|
||||
groups= { dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
on_construct = display_api.on_construct,
|
||||
on_rightclick = display_poster,
|
||||
on_receive_fields = on_receive_fields_poster,
|
||||
@@ -227,7 +239,9 @@ local models = {
|
||||
description = S("Small label"),
|
||||
tiles = { "signs_label.png" },
|
||||
inventory_image = "signs_label_small_inventory.png",
|
||||
groups= { dig_immediate = 3 },
|
||||
groups= { dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
},
|
||||
},
|
||||
label_medium = {
|
||||
@@ -241,7 +255,9 @@ local models = {
|
||||
description = S("Label"),
|
||||
tiles = { "signs_label.png" },
|
||||
inventory_image = "signs_label_medium_inventory.png",
|
||||
groups= { dig_immediate = 3 },
|
||||
groups= { dig_immediate = 2 },
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
signs/textures/signs_poster_palette.png
Normal file
|
After Width: | Height: | Size: 101 B |
@@ -1,25 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# To create a new translation:
|
||||
# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/..";
|
||||
|
||||
# Extract translatable strings.
|
||||
xgettext --from-code=UTF-8 \
|
||||
--language=Lua \
|
||||
--sort-by-file \
|
||||
--keyword=S \
|
||||
--keyword=NS:1,2 \
|
||||
--keyword=N_ \
|
||||
--keyword=F \
|
||||
--add-comments='Translators:' \
|
||||
--add-location=file \
|
||||
-o locale/template.pot \
|
||||
$(find . -name '*.lua')
|
||||
|
||||
# Update translations.
|
||||
find locale -name '*.po' | while read -r file; do
|
||||
echo $file
|
||||
msgmerge --update $file locale/template.pot;
|
||||
done
|
||||
@@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
@@ -5,7 +5,7 @@ No actual signs get registered by this mod, the signs are defined in the sign su
|
||||
|
||||
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
|
||||
|
||||
**Dependancies**: default, display\_lib, font\_lib
|
||||
**Dependencies**: xcompat, display\_lib, font\_lib
|
||||
|
||||
**License**: Code under LGPL, Textures and models under CC-BY-SA
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Code by Pierre-Yves Rollo (pyrollo)
|
||||
intllib support (i18n) by (fat115)
|
||||
intllib fallback code and tools by Diego Martínez (kaeza)
|
||||
Extra contributors:
|
||||
(gpcf)
|
||||
(Thomas--S)
|
||||
Translations:
|
||||
Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat)
|
||||
(fat115)
|
||||
|
||||
@@ -22,13 +22,14 @@ signs_api = {}
|
||||
signs_api.name = minetest.get_current_modname()
|
||||
signs_api.path = minetest.get_modpath(signs_api.name)
|
||||
|
||||
-- Load support for intllib.
|
||||
local S, NS = dofile(signs_api.path.."/intllib.lua")
|
||||
signs_api.intllib = S
|
||||
local F = function(...) return minetest.formspec_escape(S(...)) end
|
||||
-- Translation support
|
||||
local S = minetest.get_translator(signs_api.name)
|
||||
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
|
||||
function signs_api.set_display_text(pos, text, font)
|
||||
local meta = minetest.get_meta(pos)
|
||||
-- Fix pasting from Windows: CR instead of LF
|
||||
text = string.gsub(text, "\r\n?", "\n")
|
||||
meta:set_string("display_text", text)
|
||||
if text and text ~= "" then
|
||||
meta:set_string("infotext", "\""..text.."\"")
|
||||
@@ -48,27 +49,27 @@ function signs_api.set_formspec(pos)
|
||||
and ndef.display_entities["signs:display_text"] then
|
||||
local maxlines = ndef.display_entities["signs:display_text"].maxlines
|
||||
local fs, y
|
||||
local display_text = minetest.formspec_escape(meta:get_string("display_text"))
|
||||
|
||||
if maxlines == 1 then
|
||||
fs = "field[0.5,0.7;5.5,1;display_text;"..F("Text")..
|
||||
";${display_text}]"
|
||||
fs = "field[0.5,0.7;5.5,1;display_text;"..FS("Text")..
|
||||
";" .. display_text .. "]"
|
||||
y = 1.2
|
||||
else
|
||||
local extralabel = ""
|
||||
if maxlines then
|
||||
extralabel = F(" (first %s lines only)"):format(maxlines)
|
||||
extralabel = FS(" (first @1 lines only)", maxlines)
|
||||
end
|
||||
|
||||
fs = "textarea[0.5,0.7;5.5,2;display_text;"..F("Text")..""..
|
||||
extralabel..";${display_text}]"
|
||||
fs = "textarea[0.5,0.7;5.5,2;display_text;"..FS("Text")..""..
|
||||
extralabel..";" .. display_text .. "]"
|
||||
y = 2.4
|
||||
end
|
||||
|
||||
fs = fs.."button[1,"..y..";2,1;font;"..F("Font").."]"
|
||||
fs = fs.."button_exit[3,"..y..";2,1;ok;"..F("Write").."]"
|
||||
fs = fs.."button[1,"..y..";2,1;font;"..FS("Font").."]"
|
||||
fs = fs.."button_exit[3,"..y..";2,1;ok;"..FS("Write").."]"
|
||||
y = y + 0.8
|
||||
fs = "size[6,"..y.."]"..default.gui_bg..
|
||||
default.gui_bg_img..default.gui_slots..fs
|
||||
fs = "size[6,"..y.."]"..fs
|
||||
|
||||
meta:set_string("formspec", fs)
|
||||
end
|
||||
@@ -78,9 +79,11 @@ function signs_api.on_receive_fields(pos, formname, fields, player)
|
||||
if not minetest.is_protected(pos, player:get_player_name()) then
|
||||
if fields and (fields.ok or fields.key_enter) then
|
||||
signs_api.set_display_text(pos, fields.display_text)
|
||||
signs_api.set_formspec(pos)
|
||||
end
|
||||
if fields and (fields.font) then
|
||||
signs_api.set_display_text(pos, fields.display_text)
|
||||
signs_api.set_formspec(pos)
|
||||
font_api.show_font_list(player, pos)
|
||||
end
|
||||
end
|
||||
@@ -91,7 +94,6 @@ end
|
||||
function signs_api.on_place_direction(itemstack, placer, pointed_thing)
|
||||
local name = itemstack:get_name()
|
||||
local ndef = minetest.registered_nodes[name]
|
||||
local restriction = display_api.is_rotation_restricted()
|
||||
|
||||
local bdir = {
|
||||
x = pointed_thing.under.x - pointed_thing.above.x,
|
||||
@@ -102,33 +104,25 @@ function signs_api.on_place_direction(itemstack, placer, pointed_thing)
|
||||
|
||||
local ndir, test
|
||||
|
||||
if ndef.paramtype2 == "facedir" then
|
||||
-- If legacy mode, only accept upright nodes
|
||||
if restriction and bdir.x == 0 and bdir.z == 0 then
|
||||
-- Ceiling or floor pointed (facedir chosen from player dir)
|
||||
ndir = minetest.dir_to_facedir({x=pdir.x, y=0, z=pdir.z})
|
||||
else
|
||||
-- Wall pointed or no rotation restriction
|
||||
ndir = minetest.dir_to_facedir(bdir, not restriction)
|
||||
end
|
||||
if ndef and (ndef.paramtype2 == "facedir" or ndef.paramtype2 == "colorfacedir") then
|
||||
-- Wall pointed
|
||||
ndir = minetest.dir_to_facedir(bdir, true)
|
||||
|
||||
test = { [0]=-pdir.x, pdir.z, pdir.x, -pdir.z, -pdir.x, [8]=pdir.x }
|
||||
end
|
||||
|
||||
if ndef.paramtype2 == "wallmounted" then
|
||||
if ndef and ndef.paramtype2 == "wallmounted" then
|
||||
ndir = minetest.dir_to_wallmounted(bdir)
|
||||
-- If legacy mode, only accept upright nodes
|
||||
if restriction and (ndir == 0 or ndir == 1) then
|
||||
ndir = minetest.dir_to_wallmounted({x=pdir.x, y=0, z=pdir.z})
|
||||
end
|
||||
|
||||
test = { [0]=-pdir.x, -pdir.x, pdir.z, -pdir.z, -pdir.x, pdir.x}
|
||||
end
|
||||
|
||||
-- Only for direction signs
|
||||
-- TODO:Maybe improve ground and ceiling placement in every directions
|
||||
if ndef.signs_other_dir then
|
||||
if test[ndir] > 0 then
|
||||
if ndef and ndef.signs_other_dir then
|
||||
if not test[ndir] then -- https://github.com/pyrollo/display_modpack/issues/48
|
||||
return itemstack
|
||||
elseif test[ndir] > 0 then
|
||||
itemstack:set_name(ndef.signs_other_dir)
|
||||
end
|
||||
itemstack = minetest.item_place(itemstack, placer, pointed_thing, ndir)
|
||||
@@ -141,13 +135,12 @@ function signs_api.on_place_direction(itemstack, placer, pointed_thing)
|
||||
end
|
||||
|
||||
-- Handles screwdriver rotation
|
||||
-- (see "if" block below for rotation restriction mode).
|
||||
signs_api.on_rotate = function(pos, node, player, mode, new_param2)
|
||||
-- If rotation mode is 1 and sign is directional, swap direction between
|
||||
-- each rotation.
|
||||
if mode == 1 then
|
||||
local ndef = minetest.registered_nodes[node.name]
|
||||
if ndef.signs_other_dir then
|
||||
if ndef and ndef.signs_other_dir then
|
||||
-- Switch direction
|
||||
node = {name = ndef.signs_other_dir,
|
||||
param1 = node.param1, param2 = node.param2}
|
||||
@@ -165,25 +158,6 @@ signs_api.on_rotate = function(pos, node, player, mode, new_param2)
|
||||
return display_api.on_rotate(pos, node, player, mode, new_param2)
|
||||
end
|
||||
|
||||
-- Legacy mode with rotation restriction
|
||||
-- TODO:When MT < 5.0 no more in use, to be removed
|
||||
if display_api.is_rotation_restricted() then
|
||||
signs_api.on_rotate = function(pos, node, player, mode, new_param2)
|
||||
-- If rotation mode is 2 and sign is directional, swap direction.
|
||||
-- Otherwise use display_api's on_rotate function.
|
||||
if mode == 2 then
|
||||
local ndef = minetest.registered_nodes[node.name]
|
||||
if ndef.signs_other_dir then
|
||||
minetest.swap_node(pos, {name = ndef.signs_other_dir,
|
||||
param1 = node.param1, param2 = node.param2})
|
||||
display_api.update_entities(pos)
|
||||
return true
|
||||
end
|
||||
end
|
||||
return display_api.on_rotate(pos, node, player, mode, new_param2)
|
||||
end
|
||||
end
|
||||
|
||||
function signs_api.register_sign(mod, name, model)
|
||||
-- Default fields
|
||||
local fields = {
|
||||
@@ -196,8 +170,9 @@ function signs_api.register_sign(mod, name, model)
|
||||
fixed = {-model.width/2, -model.height/2, 0.5,
|
||||
model.width/2, model.height/2, 0.5 - model.depth},
|
||||
},
|
||||
groups = {choppy=2, dig_immediate=2, not_blocking_trains=1, display_api=1},
|
||||
sounds = default.node_sound_defaults(),
|
||||
groups = {choppy=2, dig_immediate=2, not_blocking_trains=1, display_api=1,signs_api_formspec_lbm=1},
|
||||
is_ground_content = false,
|
||||
sounds = xcompat.sounds.node_sound_default(),
|
||||
display_entities = {
|
||||
["signs:display_text"] = {
|
||||
on_display_update = font_api.on_display_update,
|
||||
@@ -212,12 +187,13 @@ function signs_api.register_sign(mod, name, model)
|
||||
on_construct = function(pos)
|
||||
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("font", ndef.display_entities.font_name or
|
||||
meta:set_string("font", ndef and ndef.display_entities.font_name or
|
||||
font_api.get_default_font_name())
|
||||
signs_api.set_formspec(pos)
|
||||
display_api.on_construct(pos)
|
||||
end,
|
||||
on_destruct = display_api.on_destruct,
|
||||
on_blast = display_api.on_blast,
|
||||
on_rotate = signs_api.on_rotate,
|
||||
on_receive_fields = signs_api.on_receive_fields,
|
||||
on_punch = function(pos, node, player, pointed_thing)
|
||||
@@ -250,4 +226,13 @@ end
|
||||
-- Text entity for all signs
|
||||
display_api.register_display_entity("signs:display_text")
|
||||
|
||||
minetest.log("action", "[signs_api] loaded.")
|
||||
-- Update sign formspecs
|
||||
minetest.register_lbm({
|
||||
label = "Update signs_api formspecs",
|
||||
name = "signs_api:update_formspecs",
|
||||
run_at_every_load = false,
|
||||
nodenames = {"group:signs_api_formspec_lbm"},
|
||||
action = function(pos)
|
||||
signs_api.set_formspec(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
-- 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
|
||||
@@ -1,49 +0,0 @@
|
||||
# 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: 2018-02-01 05:56+0100\n"
|
||||
"PO-Revision-Date: 2017-05-08 07:08+0200\n"
|
||||
"Last-Translator: Peppy <peppy@twang-factory.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\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"
|
||||
|
||||
#: common.lua
|
||||
msgid "Text"
|
||||
msgstr "Texte"
|
||||
|
||||
#: common.lua
|
||||
msgid "Write"
|
||||
msgstr "Écrire"
|
||||
|
||||
#: common.lua
|
||||
#, lua-format
|
||||
msgid " (first %s lines only)"
|
||||
msgstr " (uniquement les %s premières lignes)"
|
||||
|
||||
#~ msgid "Title"
|
||||
#~ msgstr "Titre"
|
||||
|
||||
#~ msgid "Close"
|
||||
#~ msgstr "Fermer"
|
||||
|
||||
#~ msgid "(right-click to read more text)"
|
||||
#~ msgstr "(Clic-droit pour afficher le texte entier)"
|
||||
|
||||
#~ msgid "Wooden direction sign"
|
||||
#~ msgstr "Panneau de direction en bois"
|
||||
|
||||
#~ msgid "Poster"
|
||||
#~ msgstr "Affiche"
|
||||
|
||||
#~ msgid "Textd"
|
||||
#~ msgstr "Texte"
|
||||
@@ -1,46 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Yaya (Nurul Azeera Hidayah @ Muhammad Nur Hidayat) <translation@mnh48.moe>, 2017.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Display Modpack\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-02-01 05:56+0100\n"
|
||||
"PO-Revision-Date: 2020-07-05 11:31+0000\n"
|
||||
"Last-Translator: Yaya MNH48 <translation@mnh48.moe>\n"
|
||||
"Language-Team: Malay <translation@mnh48.moe>\n"
|
||||
"Language: ms\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.3\n"
|
||||
|
||||
#: common.lua
|
||||
msgid "Text"
|
||||
msgstr "Teks"
|
||||
|
||||
#: common.lua
|
||||
msgid "Write"
|
||||
msgstr "Tulis"
|
||||
|
||||
#: common.lua
|
||||
#, lua-format
|
||||
msgid " (first %s lines only)"
|
||||
msgstr " (%s baris pertama sahaja)"
|
||||
|
||||
#~ msgid "Title"
|
||||
#~ msgstr "Tajuk"
|
||||
|
||||
#~ msgid "Close"
|
||||
#~ msgstr "Tutup"
|
||||
|
||||
#~ msgid "(right-click to read more text)"
|
||||
#~ msgstr "(klik-kanan untuk baca teks penuh)"
|
||||
|
||||
#~ msgid "Wooden direction sign"
|
||||
#~ msgstr "Papan tanda arah kayu"
|
||||
|
||||
#~ msgid "Poster"
|
||||
#~ msgstr "Poster"
|
||||
5
signs_api/locale/signs_api.de.tr
Normal file
@@ -0,0 +1,5 @@
|
||||
# textdomain: signs_api
|
||||
Text=Text
|
||||
(first @1 lines only)= (nur die ersten @1 Zeilen)
|
||||
Font=Schriftart
|
||||
Write=Schreiben
|
||||
5
signs_api/locale/signs_api.fr.tr
Normal file
@@ -0,0 +1,5 @@
|
||||
# textdomain: signs_api
|
||||
Text=Texte
|
||||
(first @1 lines only)= (uniquement les @1 premières lignes)
|
||||
Font=Police
|
||||
Write=Écrire
|
||||