forked from mtcontrib/homedecor_modpack
simplify calendar construction
This commit is contained in:
parent
2ed7ae6a56
commit
7402f30c3a
@ -78,11 +78,7 @@ homedecor.register("calendar", {
|
|||||||
groups = {choppy=2,attached_node=1},
|
groups = {choppy=2,attached_node=1},
|
||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
on_construct = function(pos)
|
infotext = "Date (right-click to update):\n" .. os.date("%Y-%m-%d"), -- ISO 8601 format
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local date = os.date("%Y-%m-%d") -- ISO 8601 format
|
|
||||||
meta:set_string("infotext", "Date (right-click to update):\n"..date)
|
|
||||||
end,
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local date = os.date("%Y-%m-%d")
|
local date = os.date("%Y-%m-%d")
|
||||||
|
Loading…
Reference in New Issue
Block a user