Use new translation system
[minetest_doc_encyclopedia.git] / init.lua
blobf5cf09d2df34499412a2be093a83abe469d73eff
1 local S = minetest.get_translator("doc_encyclopedia")
3 minetest.register_craftitem("doc_encyclopedia:encyclopedia", {
4 description = S("Encyclopedia"),
5 _doc_items_longdesc = S("Allows you to access the help."),
6 _doc_items_usagehelp = S("Wield it, then leftclick to access the help."),
7 _doc_items_hidden = false,
8 stack_max = 1,
9 inventory_image = "doc_encyclopedia_encyclopedia.png",
10 wield_image = "doc_encyclopedia_encyclopedia.png",
11 wield_scale = { x=1, y=1, z=2.25 },
12 on_use = function(itemstack, user)
13 doc.show_doc(user:get_player_name())
14 end,
15 groups = { book=1 },
18 minetest.register_craft({
19 output = "doc_encyclopedia:encyclopedia",
20 recipe = {
21 {"group:stick", "group:stick", ""},
22 {"group:stick", "", "group:stick"},
23 {"group:stick", "group:stick", ""},
27 -- Bonus recipe for Minetest Game
28 if minetest.get_modpath("default") then
29 minetest.register_craft({
30 output = "doc_encyclopedia:encyclopedia",
31 recipe = {
32 { "default:book" },
33 { "default:book" },
34 { "default:book" },
37 end
39 minetest.register_craft({
40 type = "fuel",
41 recipe = "doc_encyclopedia:encyclopedia",
42 burntime = 6,