From b447f0af756669cbc497b1791695ad2d5c6e3718 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 22 Nov 2016 05:01:55 +0100 Subject: [PATCH] Add doc_items help texts --- depends.txt | 1 + locale/de.txt | 7 ++++++- locale/template.txt | 5 +++++ mummy.lua | 3 +++ nodes.lua | 8 ++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/depends.txt b/depends.txt index 101f73a..864ae82 100644 --- a/depends.txt +++ b/depends.txt @@ -2,3 +2,4 @@ default farming? treasurer? intllib? +doc_items? diff --git a/locale/de.txt b/locale/de.txt index ab5cbf7..8fe2aec 100644 --- a/locale/de.txt +++ b/locale/de.txt @@ -1,7 +1,12 @@ Cracked sandstone brick = Rissiger Sandsteinziegel -Fallen cracked sandstone brick = Gefallene rissiger Sandsteinziegel +Fallen cracked sandstone brick = Gefallener rissiger Sandsteinziegel Mummy spawn-egg = Mumienerzeugerei Mummy spawner = Mumienerzeuger Sandstone with eye engraving = Sandstein mit Augengravur Sandstone with man engraving = Sandstein mit Manngravur Sandstone with sun engraving = Sandstein mit Sonnengravur +A mummy spawner causes hostile mummies to appear its vicinity as long it exists. = Ein Mumienerzeuger lässt feindliche Mumien in seiner näheren Umgebung auftauchen, solange er existiert. +Can be used to create a hostile mummy. = Kann benutzt werden, um eine feindliche Mumie zu erzeugen. +Place the egg to create a mummy on this spot. Careful, it will probably attack immediately! = Platzieren Sie das Ei, um dort eine Mumie zu erzeugen. Vorsicht, sie wird wahrscheinlich sofort angreifen! +This brick is old, porous and unstable and is barely able to hold itself. One should be careful not to disturb it. = Dieser Ziegel ist alt, porös und instabil und kann sich so gerade noch selbst stützen. Man sollte vorsichtig sein, ihn nicht zu belasten. +This old and porous brick fell to the ground. It does not hold itself anymore. = Dieser alte und poröse Ziegel fiel zu Boden und wird durch nichts mehr gestützt. diff --git a/locale/template.txt b/locale/template.txt index 1424ced..37f113f 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -5,3 +5,8 @@ Mummy spawner = Sandstone with eye engraving = Sandstone with man engraving = Sandstone with sun engraving = +A mummy spawner causes hostile mummies to appear its vicinity as long it exists. = +Can be used to create a hostile mummy. = +Place the egg to create a mummy on this spot. Careful, it will probably attack immediately! = +This brick is old, porous and unstable and is barely able to hold itself. One should be careful not to disturb it. = +This old and porous brick fell to the ground. It does not hold itself anymore. = diff --git a/mummy.lua b/mummy.lua index 851c4f4..818c207 100644 --- a/mummy.lua +++ b/mummy.lua @@ -312,6 +312,8 @@ minetest.register_entity("tsm_pyramids:mummy_spawner", spawner_DEF) minetest.register_craftitem("tsm_pyramids:spawn_egg", { description = S("Mummy spawn-egg"), + _doc_items_longdesc = S("Can be used to create a hostile mummy."), + _doc_items_usagehelp = S("Place the egg to create a mummy on this spot. Careful, it will probably attack immediately!"), inventory_image = "tsm_pyramids_mummy_egg.png", liquids_pointable = false, stack_max = 99, @@ -340,6 +342,7 @@ end minetest.register_node("tsm_pyramids:spawner_mummy", { description = S("Mummy spawner"), + _doc_items_longdesc = S("A mummy spawner causes hostile mummies to appear its vicinity as long it exists."), paramtype = "light", tiles = {"tsm_pyramids_spawner.png"}, is_ground_content = false, diff --git a/nodes.lua b/nodes.lua index e52309e..619e2ef 100644 --- a/nodes.lua +++ b/nodes.lua @@ -9,9 +9,15 @@ end local desc = {S("Sandstone with eye engraving"), S("Sandstone with man engraving"), S("Sandstone with sun engraving")} local img = {"eye", "men", "sun"} +local decodesc = "" +if minetest.get_modpath("doc_items") then + decodesc = doc.sub.items.temp.deco +end + for i=1,3 do minetest.register_node("tsm_pyramids:deco_stone"..i, { description = desc[i], + _doc_items_longdesc = decodesc, tiles = {"default_sandstone.png", "default_sandstone.png", "default_sandstone.png^tsm_pyramids_"..img[i]..".png"}, is_ground_content = false, groups = minetest.registered_nodes["default:sandstone"].groups, @@ -37,6 +43,7 @@ end minetest.register_node("tsm_pyramids:trap", { description = S("Cracked sandstone brick"), + _doc_items_longdesc = S("This brick is old, porous and unstable and is barely able to hold itself. One should be careful not to disturb it."), tiles = {"default_sandstone_brick.png^tsm_pyramids_crack.png"}, is_ground_content = false, groups = {crumbly=3,cracky=3}, @@ -51,6 +58,7 @@ minetest.register_node("tsm_pyramids:trap", { minetest.register_node("tsm_pyramids:trap_2", { description = S("Fallen cracked sandstone brick"), + _doc_items_longdesc = S("This old and porous brick fell to the ground. It does not hold itself anymore."), tiles = {"default_sandstone_brick.png^tsm_pyramids_crack.png^[transformR90"}, is_ground_content = false, groups = {crumbly=3,cracky=3,falling_node=1,not_in_creative_inventory=1},