add german letters
47
README.md
|
@ -1,15 +1,40 @@
|
||||||
# ehlphabet
|
# ehlphabet
|
||||||
Fork of the original abjphabet mod by ABJ
|
Fork of the original [abjphabet mod](https://forum.minetest.net/viewtopic.php?f=11&t=11744) by ABJ
|
||||||
https://forum.minetest.net/viewtopic.php?f=11&t=11744
|
|
||||||
|
![screenshot](screenshot.png)
|
||||||
Letter blocks can be created with the Letter Machine or given with /giveme ehlphabet:(ascii decimal)
|
|
||||||
Example: '/giveme ehlphabet:65' will give you a block with the letter 'A' on it.
|
**Letter Machine Reciepe**|**Letter Machine UI**
|
||||||
http://www.asciitable.com/
|
----|----
|
||||||
|
![Letter Machine Reciepe](reciepe.png)|![Letter Machine UI](lmui.png)
|
||||||
Textures were created using Title Wave font by Digital Graphic Labs
|
|
||||||
|
Letter blocks can be created with the Letter Machine or given with /giveme ehlphabet:(ascii decimal)
|
||||||
|
|
||||||
|
Example: `/giveme ehlphabet:65` will give you a block with the letter [**A**] on it.
|
||||||
|
http://www.asciitable.com/
|
||||||
|
|
||||||
|
For UTF-8 characters add one more identifier /giveme ehlphabet:(first byte decimal)_(second byle decimal)
|
||||||
|
|
||||||
|
Example: `/giveme ehlphabet:195_132` will give you a block with the letter [**Ä**] on it.
|
||||||
|
http://www.utf8-chartable.de/
|
||||||
|
|
||||||
|
## Textures
|
||||||
|
|
||||||
|
Textures were generated using [**phantomjs**](http://phantomjs.org/download.html) script "gen.js" included in this repository.
|
||||||
|
|
||||||
|
To (re)generate textures run:
|
||||||
|
|
||||||
|
$ phantomjs gen.js
|
||||||
|
|
||||||
|
To customize the look and size of letters, you need to know basic HTML and CSS and change it inside "gen.js".
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
Textures are licensed under CC-BY-SA 3.0
|
Textures are licensed under CC-BY-SA 3.0
|
||||||
|
|
||||||
|
## Changelist
|
||||||
|
|
||||||
20180124
|
2018-01-24 patched by Och_Noe to use it as replacement for abjphabet (create aliases)
|
||||||
patched by Och_Noe to use it as replacement for abjphabet
|
|
||||||
(create aliases)
|
2018-03-29 support for UTF-8 and cyrillic letters added
|
||||||
|
|
||||||
|
2018-03-31 german letters added
|
2
gen.js
|
@ -20,6 +20,8 @@ var chars = [
|
||||||
// special chars
|
// special chars
|
||||||
"!", "#", "$", "%", "&", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";",
|
"!", "#", "$", "%", "&", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";",
|
||||||
"<", "=", ">", "?", "@", '"', "'",
|
"<", "=", ">", "?", "@", '"', "'",
|
||||||
|
// german
|
||||||
|
"Ä", "Ö", "Ü", "ß",
|
||||||
// cyrillic
|
// cyrillic
|
||||||
"А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "И", "Й", "К", "Л", "М", "Н",
|
"А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "И", "Й", "К", "Л", "М", "Н",
|
||||||
"О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь",
|
"О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь",
|
||||||
|
|
6
init.lua
|
@ -7,6 +7,7 @@ local special_chars = {
|
||||||
"!", "#", "$", "%", "&", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";",
|
"!", "#", "$", "%", "&", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";",
|
||||||
"<", "=", ">", "?", "@", "'", '"'
|
"<", "=", ">", "?", "@", "'", '"'
|
||||||
}
|
}
|
||||||
|
local german_chars = {"Ä", "Ö", "Ü", "ß"}
|
||||||
local cyrillic_chars = {
|
local cyrillic_chars = {
|
||||||
"А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "И", "Й", "К", "Л", "М", "Н",
|
"А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "И", "Й", "К", "Л", "М", "Н",
|
||||||
"О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь",
|
"О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь",
|
||||||
|
@ -26,12 +27,13 @@ end
|
||||||
|
|
||||||
local function is_multibyte(ch)
|
local function is_multibyte(ch)
|
||||||
local byte = ch:byte()
|
local byte = ch:byte()
|
||||||
return (208 == byte) or (209 == byte)
|
return (195 == byte) or (208 == byte) or (209 == byte)
|
||||||
end
|
end
|
||||||
|
|
||||||
table_merge(characters, base_chars)
|
table_merge(characters, base_chars)
|
||||||
table_merge(characters, digits)
|
table_merge(characters, digits)
|
||||||
table_merge(characters, special_chars)
|
table_merge(characters, special_chars)
|
||||||
|
table_merge(characters, german_chars)
|
||||||
table_merge(characters, cyrillic_chars)
|
table_merge(characters, cyrillic_chars)
|
||||||
|
|
||||||
local create_alias = true
|
local create_alias = true
|
||||||
|
@ -135,7 +137,7 @@ minetest.register_node(
|
||||||
local mb = is_multibyte(ch)
|
local mb = is_multibyte(ch)
|
||||||
local key = mb and (ch:byte(1) .. ch:byte(2)) or ch:byte()
|
local key = mb and (ch:byte(1) .. ch:byte(2)) or ch:byte()
|
||||||
for _, v in pairs(characters) do
|
for _, v in pairs(characters) do
|
||||||
if v == fields.lettername then
|
if v == ch then
|
||||||
local give = {}
|
local give = {}
|
||||||
give[1] = inv:add_item("output", "ehlphabet:" .. key)
|
give[1] = inv:add_item("output", "ehlphabet:" .. key)
|
||||||
inputstack:take_item()
|
inputstack:take_item()
|
||||||
|
|
After Width: | Height: | Size: 21 KiB |
BIN
screenshot.png
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 584 B |
After Width: | Height: | Size: 661 B |
After Width: | Height: | Size: 454 B |
After Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 33 KiB |