mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-16 12:40:25 +02:00
Always return the ItemStack for on_rightclick to comply with the API.
This commit is contained in:
@ -81,10 +81,11 @@ homedecor.register("calendar", {
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_defaults(),
|
||||
infotext = "Date (right-click to update):\n" .. os.date("%Y-%m-%d"), -- ISO 8601 format
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local date = os.date("%Y-%m-%d")
|
||||
meta:set_string("infotext", "Date (right-click to update):\n"..date)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user