Compare commits
5 Commits
734df34bc8
...
fc8141a86f
Author | SHA1 | Date |
---|---|---|
Wuzzy | fc8141a86f | |
Wuzzy | cec4087f9b | |
Wuzzy | 0069047522 | |
Wuzzy | 22986ff287 | |
Wuzzy | 58bb01a120 |
|
@ -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
|
If the `calendar` mod is not found, the placable calendar is basically just
|
||||||
a decorative block.
|
a decorative block.
|
||||||
|
|
||||||
|
## Version
|
||||||
|
1.0.1
|
||||||
|
|
||||||
|
## License
|
||||||
|
This entire mod is licensed under the MIT License.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
calendar?
|
||||||
|
default?
|
||||||
|
dye?
|
24
init.lua
24
init.lua
|
@ -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
|
local on_rightclick
|
||||||
if minetest.get_modpath("calendar") then
|
if minetest.get_modpath("calendar") then
|
||||||
|
|
Loading…
Reference in New Issue