Remove calendar_node, turn it back to a mod
parent
b8bbac0302
commit
bc35906cf3
|
@ -1,12 +0,0 @@
|
||||||
# Calendar Node
|
|
||||||
|
|
||||||
This mod adds a placable and craftable calendar.
|
|
||||||
(See the crafting guide to see how to craft it).
|
|
||||||
|
|
||||||
Provided you have the `calendar` mod, you can use the calendar to view
|
|
||||||
the current date in the HUD.
|
|
||||||
|
|
||||||
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.
|
|
|
@ -1,48 +0,0 @@
|
||||||
local S = minetest.get_translator("calendar_node")
|
|
||||||
|
|
||||||
local on_rightclick
|
|
||||||
if minetest.get_modpath("calendar") then
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
if not clicker:is_player() then
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
calendar.show_calendar(clicker:get_player_name())
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
-- If the calendar mod was not found, the calendar node is basically
|
|
||||||
-- just a decorative node.
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_node("calendar_node:calendar", {
|
|
||||||
drawtype = "signlike",
|
|
||||||
description = S("Calendar"),
|
|
||||||
tiles = { "calendar_node_calendar.png" },
|
|
||||||
inventory_image = "calendar_node_calendar.png",
|
|
||||||
wield_image = "calendar_node_calendar.png",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "wallmounted",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
groups = { dig_immediate = 3, attached_node = 1, },
|
|
||||||
selection_box = {
|
|
||||||
type = "wallmounted",
|
|
||||||
},
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_string("infotext", S("Calendar"))
|
|
||||||
end,
|
|
||||||
on_rightclick = on_rightclick,
|
|
||||||
})
|
|
||||||
|
|
||||||
if minetest.get_modpath("default") and minetest.get_modpath("dye") then
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "calendar_node:calendar",
|
|
||||||
recipe = {
|
|
||||||
{ "default:paper","default:paper","default:paper" },
|
|
||||||
{ "default:paper","dye:black","default:paper" },
|
|
||||||
{ "default:paper","default:paper","default:paper" },
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
|
@ -1,3 +0,0 @@
|
||||||
name = calendar_node
|
|
||||||
description = Adds a placable calendar
|
|
||||||
optional_depends = calendar, default, dye
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 70 B |
Loading…
Reference in New Issue