summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-11-29 22:36:42 +0100
committerWuzzy <almikes@aol.com>2016-11-29 22:36:42 +0100
commitdaa07f938f5a91ccd8d2d3c71fc110d8945566bc (patch)
treec284a93e9dc7dcc08c458ab22a452aa548f0ab05 /init.lua
Initial commit
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..69a1250
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,29 @@
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter(minetest.get_current_modname())
+else
+ S = function(s) return s end
+end
+
+minetest.register_craftitem("doc_encyclopedia:encyclopedia", {
+ description = S("Encyclopedia"),
+ _doc_items_longdesc = S("Allows you to access the documentation system."),
+ _doc_items_usagehelp = S("Wield it, then leftclick to access the documentation system."),
+ stack_max = 1,
+ inventory_image = "doc_encyclopedia_encyclopedia.png",
+ wield_image = "doc_encyclopedia_encyclopedia.png",
+ wield_scale = { x=1, y=1, z=2.25 },
+ on_use = function(itemstack, user)
+ doc.show_doc(user:get_player_name())
+ end,
+ groups = { book=1 },
+})
+
+minetest.register_craft({
+ output = "doc_encyclopedia:encyclopedia",
+ recipe = {
+ {"group:stick", "group:stick", ""},
+ {"group:stick", "", "group:stick"},
+ {"group:stick", "group:stick", ""},
+ }
+})