Format README
[minetest_doc_encyclopedia.git] / init.lua
blobe8b5ead2fba319c2ffa40a6d8307e370ad21e91c
1 local S
2 if minetest.get_modpath("intllib") then
3 S = intllib.Getter(minetest.get_current_modname())
4 else
5 S = function(s) return s end
6 end
8 minetest.register_craftitem("doc_encyclopedia:encyclopedia", {
9 description = S("Encyclopedia"),
10 _doc_items_longdesc = S("Allows you to access the documentation system."),
11 _doc_items_usagehelp = S("Wield it, then leftclick to access the documentation system."),
12 stack_max = 1,
13 inventory_image = "doc_encyclopedia_encyclopedia.png",
14 wield_image = "doc_encyclopedia_encyclopedia.png",
15 wield_scale = { x=1, y=1, z=2.25 },
16 on_use = function(itemstack, user)
17 doc.show_doc(user:get_player_name())
18 end,
19 groups = { book=1 },
22 minetest.register_craft({
23 output = "doc_encyclopedia:encyclopedia",
24 recipe = {
25 {"group:stick", "group:stick", ""},
26 {"group:stick", "", "group:stick"},
27 {"group:stick", "group:stick", ""},
31 minetest.register_craft({
32 type = "fuel",
33 recipe = "doc_encyclopedia:encyclopedia",
34 burntime = 6,