Version 1.2.0
[minetest_doc_encyclopedia.git] / init.lua
blobdc6c70535f8f15c81e4ba5b5c4941b391244bf9f
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 help."),
11 _doc_items_usagehelp = S("Wield it, then leftclick to access the help."),
12 _doc_items_hidden = false,
13 stack_max = 1,
14 inventory_image = "doc_encyclopedia_encyclopedia.png",
15 wield_image = "doc_encyclopedia_encyclopedia.png",
16 wield_scale = { x=1, y=1, z=2.25 },
17 on_use = function(itemstack, user)
18 doc.show_doc(user:get_player_name())
19 end,
20 groups = { book=1 },
23 minetest.register_craft({
24 output = "doc_encyclopedia:encyclopedia",
25 recipe = {
26 {"group:stick", "group:stick", ""},
27 {"group:stick", "", "group:stick"},
28 {"group:stick", "group:stick", ""},
32 -- Bonus recipe for Minetest Game
33 if minetest.get_modpath("default") then
34 minetest.register_craft({
35 output = "doc_encyclopedia:encyclopedia",
36 recipe = {
37 { "default:book" },
38 { "default:book" },
39 { "default:book" },
42 end
44 minetest.register_craft({
45 type = "fuel",
46 recipe = "doc_encyclopedia:encyclopedia",
47 burntime = 6,