From 987ad8eaf470a104565b7cb811f7ca7ae114dda5 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 17 Aug 2017 19:05:13 +0200 Subject: [PATCH] Add portal help texts, rewrite help of other items --- mods/ITEMS/mcl_fire/flint_and_steel.lua | 4 ++-- mods/ITEMS/mcl_portals/portal_end.lua | 8 ++++++-- mods/ITEMS/mcl_portals/portal_nether.lua | 7 ++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_fire/flint_and_steel.lua b/mods/ITEMS/mcl_fire/flint_and_steel.lua index 91e46861b8..9737c3adf3 100644 --- a/mods/ITEMS/mcl_fire/flint_and_steel.lua +++ b/mods/ITEMS/mcl_fire/flint_and_steel.lua @@ -1,8 +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, ignite blocks and open portals.", - _doc_items_usagehelp = "Rightclick the surface of a block to attempt to light a fire in front of it. On netherrack it will start an eternal fire. Using it on TNT will ignite it. To open a Nether portal, place an upright frame of obsidian with a length of 4 and a height of 5 blocks, leaving only air in the center. After placing this frame, use the flint and steel on inside of the frame.", + _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 or ignite the block. A few blocks have an unique reaction when ignited.", inventory_image = "mcl_fire_flint_and_steel.png", liquids_pointable = false, stack_max = 1, diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index 990bba30db..21f6be544b 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -396,15 +396,19 @@ minetest.register_abm({ --[[ ITEM OVERRIDES ]] +local portal_open_help = "To open an End portal, place an upright frame of quartz blocks with a length of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, use an eye of ender on the frame. The eye of ender is destroyed in the process." + -- Frame material minetest.override_item(portal_frame, { + _doc_items_longdesc = "A block of quartz can be used to create End portals.", + _doc_items_usagehelp = portal_open_help, on_destruct = destroy_portal, }) -- Portal opener minetest.override_item("mcl_end:ender_eye", { - _doc_items_longdesc = "An eye of ander can be used to open a portal to the End.", - _doc_items_usagehelp = "To open an End portal, place an upright frame of quartz blocks with a length of 4 and a height of 5 blocks, leaving only air in the center. After placing this frame, use the eye of ender on the frame.", + _doc_items_longdesc = "An eye of ender can be used to open End portals.", + _doc_items_usagehelp = portal_open_help, on_place = function(itemstack, user, pointed_thing) -- Use pointed node's on_rightclick function first, if present local node = minetest.get_node(pointed_thing.under) diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index 93e53c9da6..7789de4209 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -429,8 +429,13 @@ minetest.register_abm({ --[[ ITEM OVERRIDES ]] --- Frame material +local longdesc = minetest.registered_nodes["mcl_core:obsidian"]._doc_items_longdesc +longdesc = longdesc .. "\n" .. "Obsidian is also used as the frame of Nether portals." +local usagehelp = "To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, ignite the obsidian with an appropriate tool, such as flint of steel." + minetest.override_item("mcl_core:obsidian", { + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usagehelp, on_destruct = destroy_portal, _on_ignite = function(user, pointed_thing) local pos = pointed_thing.under