From 91131dbdf0ffee501e019a43bff10c05b9ce3ee3 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 11 Mar 2017 20:54:27 +0100 Subject: [PATCH] Add help for: TNT, fire, flint and steel --- mods/ITEMS/mcl_fire/flint_and_steel.lua | 2 ++ mods/ITEMS/mcl_fire/init.lua | 5 +++++ mods/ITEMS/mcl_tnt/init.lua | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_fire/flint_and_steel.lua b/mods/ITEMS/mcl_fire/flint_and_steel.lua index bda4e67ed..001f2b3bd 100644 --- a/mods/ITEMS/mcl_fire/flint_and_steel.lua +++ b/mods/ITEMS/mcl_fire/flint_and_steel.lua @@ -1,6 +1,8 @@ -- Flint and Steel minetest.register_tool("mcl_fire:flint_and_steel", { description = "Flint and Steel", + _doc_items_longdesc = "Flint and steel is a tool to start fires and ignite blocks.", + _doc_items_usagehelp = "Rightclick the surface of a block to attempt to light a fire in front of it. TNT will get ignited instead.", inventory_image = "mcl_fire_flint_and_steel.png", liquids_pointable = false, stack_max = 1, diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 046b0cd41..1c82dbccb 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -9,8 +9,12 @@ mcl_fire = {} -- Flame nodes +local fire_help = "Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it." +local eternal_fire_help = "Eternal fire is a damaging and destructive block. It will create fire around it when flammable blocks are nearby. Other than (normal) fire, an eternal fire will not go out by time alone. An eternal fire is still extinguished by punching it, by nearby water or by rain. Punching is is safe, but it hurts if you stand inside." + minetest.register_node("mcl_fire:fire", { description = "Fire", + _doc_items_longdesc = fire_help, drawtype = "firelike", tiles = { { @@ -51,6 +55,7 @@ minetest.register_node("mcl_fire:fire", { minetest.register_node("mcl_fire:eternal_fire", { description = "Eternal Fire", + _doc_items_longdesc = eternal_fire_help, drawtype = "firelike", tiles = { { diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index d6bcf419e..6ee6adcea 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -39,6 +39,7 @@ tnt.ignite = function(pos) core.check_for_falling(pos) end +local TNT_RANGE = 3 minetest.register_node("mcl_tnt:tnt", { tiles = {"default_tnt_top.png", "default_tnt_bottom.png", @@ -47,6 +48,8 @@ minetest.register_node("mcl_tnt:tnt", { is_ground_content = false, stack_max = 64, description = "TNT", + _doc_items_longdesc = string.format("An explosive device. When it explodes, it will hurt living beings, destroy blocks around it, throw blocks affected by gravity all over the place and light fires. A single TNT has an explosion radius of %d. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, igniter blocks and redstone signals.", TNT_RANGE), + _doc_items_usagehelp = "Place the TNT on the ground and ignite it with one of the methods above. Quickly get in safe distance quickly. The TNT will start to be affected by gravity and explodes in 4 seconds.", groups = { dig_immediate = 3, tnt = 1, }, mesecons = {effector = { action_on = tnt.ignite @@ -54,7 +57,6 @@ minetest.register_node("mcl_tnt:tnt", { sounds = mcl_sounds.node_sound_wood_defaults(), }) -local TNT_RANGE = 3 local TNT = { -- Static definition physical = true, -- Collides with things