Compare commits

...

5 Commits

Author SHA1 Message Date
Wuzzy fc8141a86f Version 1.0.1 2020-09-08 22:51:52 +02:00
Wuzzy cec4087f9b Add depends.txt 2020-09-08 22:51:21 +02:00
Wuzzy 0069047522 Version 1.0.0 2020-09-08 22:45:27 +02:00
Wuzzy 22986ff287 Fix broken 0.4 compat 2020-09-08 22:44:01 +02:00
Wuzzy 58bb01a120 Version 0.1.0 2020-08-28 16:54:41 +02:00
4 changed files with 32 additions and 2 deletions

View File

@ -10,3 +10,9 @@ See the `calendar` mod to learn more about the calendar system.
If the `calendar` mod is not found, the placable calendar is basically just
a decorative block.
## Version
1.0.1
## License
This entire mod is licensed under the MIT License.

3
depends.txt Normal file
View File

@ -0,0 +1,3 @@
calendar?
default?
dye?

View File

@ -1,4 +1,26 @@
local S = minetest.get_translator("calendar_node")
local S
-- Compability translator code to support MT 0.4, which doesn't support
-- translations for mods.
if not minetest.translate then
-- No translation system available, use dummy functions
local function translate(textdomain, str, ...)
local arg = {n=select('#', ...), ...}
return str:gsub("@(.)", function(matched)
local c = string.byte(matched)
if string.byte("1") <= c and c <= string.byte("9") then
return arg[c - string.byte("0")]
else
return matched
end
end)
end
S = function(str, ...)
return translate("calendar_node", str, ...)
end
else
S = minetest.get_translator("calendar_node")
end
local on_rightclick
if minetest.get_modpath("calendar") then

View File

@ -1,3 +1,2 @@
name = calendar_node
description = Adds a placable calendar
optional_depends = calendar, default, dye