From daa07f938f5a91ccd8d2d3c71fc110d8945566bc Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 29 Nov 2016 22:36:42 +0100 Subject: Initial commit --- depends.txt | 2 ++ description.txt | 1 + init.lua | 29 +++++++++++++++++++++++++++++ locale/de.txt | 3 +++ locale/template.txt | 3 +++ mod.conf | 1 + screenshot.png | Bin 0 -> 14662 bytes textures/doc_encyclopedia_encyclopedia.png | Bin 0 -> 452 bytes 8 files changed, 39 insertions(+) create mode 100644 depends.txt create mode 100644 description.txt create mode 100644 init.lua create mode 100644 locale/de.txt create mode 100644 locale/template.txt create mode 100644 mod.conf create mode 100644 screenshot.png create mode 100644 textures/doc_encyclopedia_encyclopedia.png diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..31aa390 --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +doc +intllib? diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..3ca4425 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Adds an encyclopedia item which allows you to access the documentation system. 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", ""}, + } +}) diff --git a/locale/de.txt b/locale/de.txt new file mode 100644 index 0000000..3b77b24 --- /dev/null +++ b/locale/de.txt @@ -0,0 +1,3 @@ +Encyclopedia = Enzyklopädie +Allows you to access the documentation system. = Damit kann man auf das Dokumentationssystem zuzugreifen. +Wield it, then leftclick to access the documentation system. = Halten Sie sie in der Hand und linksklicken Sie, um auf das Dokumentationssystem zuzugreifen. diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..3866d22 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,3 @@ +Encyclopedia = +Allows you to access the documentation system. = +Wield it, then leftclick to access the documentation system. = diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..318d238 --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = doc_encyclopedia diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..f01defe Binary files /dev/null and b/screenshot.png differ diff --git a/textures/doc_encyclopedia_encyclopedia.png b/textures/doc_encyclopedia_encyclopedia.png new file mode 100644 index 0000000..2d5014b Binary files /dev/null and b/textures/doc_encyclopedia_encyclopedia.png differ -- cgit v1.2.3