diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | depends.txt | 1 | ||||
-rw-r--r-- | init.lua | 20 | ||||
-rw-r--r-- | locale/de.txt | 1 | ||||
-rw-r--r-- | locale/template.txt | 1 |
5 files changed, 22 insertions, 5 deletions
@@ -10,8 +10,8 @@ Current version: 0.9.0 To open the help, there are multiple ways: - Use the `/doc` chat command. This works always. -- If you use Unified Inventory, click on the blue question mark icon in the - inventory menu +- If you use Unified Inventory or Minetest Game, you will find an extra + button in the inventory The documentation system itself should be more or less self-explanatory. diff --git a/depends.txt b/depends.txt index e5f139a..c6040df 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ intllib? unified_inventory? +sfinv_buttons? central_message? @@ -1197,18 +1197,32 @@ minetest.register_on_leaveplayer(function(player) end) ---[[ Add buttons for inventory mods ]] +local button_action = function(player) + doc.show_doc(player:get_player_name()) +end + -- Unified Inventory if minetest.get_modpath("unified_inventory") ~= nil then unified_inventory.register_button("doc", { type = "image", image = "doc_button_icon_hires.png", tooltip = S("Documentation System"), - action = function(player) - doc.show_doc(player:get_player_name()) - end, + action = button_action, }) end +-- sfinv_buttons +if minetest.get_modpath("sfinv_buttons") ~= nil then + sfinv_buttons.register_button("doc", { + image = "doc_button_icon_lores.png", + tooltip = S("Collection of help texts"), + title = S("Documentation System"), + action = button_action, + }) +end + + + minetest.register_privilege("doc_reveal", { description = S("Allows you to reveal all hidden help entries with /doc_reveal"), give_to_singleplayer = false diff --git a/locale/de.txt b/locale/de.txt index 03864e3..2ad8ff2 100644 --- a/locale/de.txt +++ b/locale/de.txt @@ -38,3 +38,4 @@ This is the Documentation System, Version %s. = Dies ist das Dokumentationssyste You haven't chosen a category yet. Please choose one in the category list first. = Sie haben noch keine Kategorie gewählt. Bitte wählen Sie zuerst eine Kategorie in der Kategorienliste aus. You haven't chosen an entry yet. Please choose one in the entry list first. = Sie haben noch keinen Eintrag gewählt. Bitte wählen Sie zuerst einen Eintrag in der Eintragsliste aus. Nameless entry (%s) = Namenloser Eintrag (%s) +Collection of help texts = Sammlung von Hilfetexten diff --git a/locale/template.txt b/locale/template.txt index 415dfd3..a20f982 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -38,3 +38,4 @@ This category is empty. = This is the Documentation System, Version %s. = You haven't chosen a category yet. Please choose one in the category list first. = You haven't chosen an entry yet. Please choose one in the entry list first. = +Collection of help texts = |