From b1b45274e46338e37ca8269d1c00dc5bb02c0f45 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 20 Mar 2017 18:12:05 +0100 Subject: [PATCH] Add Help entry aliases for many core items --- mods/ITEMS/mcl_cake/depends.txt | 1 + mods/ITEMS/mcl_cake/init.lua | 4 ++++ mods/ITEMS/mcl_cauldrons/depends.txt | 1 + mods/ITEMS/mcl_cauldrons/init.lua | 5 +++++ mods/ITEMS/mcl_chests/depends.txt | 1 + mods/ITEMS/mcl_chests/init.lua | 6 ++++++ mods/ITEMS/mcl_clock/depends.txt | 1 + mods/ITEMS/mcl_clock/init.lua | 23 +++++++++++++++-------- mods/ITEMS/mcl_cocoas/depends.txt | 1 + mods/ITEMS/mcl_cocoas/init.lua | 5 +++++ mods/ITEMS/mcl_compass/depends.txt | 1 + mods/ITEMS/mcl_compass/init.lua | 18 +++++++++++++----- mods/ITEMS/mcl_core/depends.txt | 1 + mods/ITEMS/mcl_core/nodes.lua | 11 ++++++++--- mods/ITEMS/mcl_doors/depends.txt | 1 + mods/ITEMS/mcl_doors/init.lua | 11 +++++++++++ mods/ITEMS/mcl_fences/depends.txt | 1 + mods/ITEMS/mcl_fences/init.lua | 4 ++++ mods/ITEMS/mcl_flowerpots/depends.txt | 1 + mods/ITEMS/mcl_flowerpots/nodes.lua | 11 +++++++++++ mods/ITEMS/mcl_flowers/depends.txt | 1 + mods/ITEMS/mcl_flowers/init.lua | 5 +++++ mods/ITEMS/mcl_furnaces/depends.txt | 1 + mods/ITEMS/mcl_furnaces/init.lua | 6 ++++++ mods/ITEMS/mcl_hoppers/depends.txt | 1 + mods/ITEMS/mcl_hoppers/init.lua | 5 +++++ mods/ITEMS/mcl_mushrooms/depends.txt | 1 + mods/ITEMS/mcl_mushrooms/huge.lua | 10 ++++++++++ mods/ITEMS/mcl_throwing/depends.txt | 1 + mods/ITEMS/mcl_throwing/init.lua | 9 +++++++++ mods/ITEMS/mcl_torches/depends.txt | 1 + mods/ITEMS/mcl_torches/init.lua | 7 +++++++ mods/ITEMS/mcl_walls/depends.txt | 1 + mods/ITEMS/mcl_walls/init.lua | 13 +++++++++++++ mods/ITEMS/mcstair/depends.txt | 1 + mods/ITEMS/mcstair/init.lua | 5 +++++ mods/ITEMS/signs/depends.txt | 1 + mods/ITEMS/signs/init.lua | 3 +++ mods/ITEMS/xpanes/depends.txt | 1 + mods/ITEMS/xpanes/init.lua | 4 ++++ 40 files changed, 169 insertions(+), 16 deletions(-) diff --git a/mods/ITEMS/mcl_cake/depends.txt b/mods/ITEMS/mcl_cake/depends.txt index 2d7ed44c5..91d2c3820 100644 --- a/mods/ITEMS/mcl_cake/depends.txt +++ b/mods/ITEMS/mcl_cake/depends.txt @@ -3,3 +3,4 @@ mcl_sounds bucket mcl_farming mcl_mobitems +doc? diff --git a/mods/ITEMS/mcl_cake/init.lua b/mods/ITEMS/mcl_cake/init.lua index c3cb9b4fd..7f81e8ef3 100644 --- a/mods/ITEMS/mcl_cake/init.lua +++ b/mods/ITEMS/mcl_cake/init.lua @@ -99,6 +99,10 @@ local register_slice = function(level, nodebox, desc) _mcl_blast_resistance = 2.5, _mcl_hardness = 5, }) + + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_cake:cake", "nodes", "mcl_cake:cake_"..level) + end end register_slice(6, slice_6, "Cake (6 Slices Left") diff --git a/mods/ITEMS/mcl_cauldrons/depends.txt b/mods/ITEMS/mcl_cauldrons/depends.txt index 3d96266de..9699080ad 100644 --- a/mods/ITEMS/mcl_cauldrons/depends.txt +++ b/mods/ITEMS/mcl_cauldrons/depends.txt @@ -1 +1,2 @@ mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_cauldrons/init.lua b/mods/ITEMS/mcl_cauldrons/init.lua index 47cd8a44a..9cc27fa8b 100644 --- a/mods/ITEMS/mcl_cauldrons/init.lua +++ b/mods/ITEMS/mcl_cauldrons/init.lua @@ -87,6 +87,11 @@ local register_filled_cauldron = function(water_level, description) _mcl_hardness = 2, _mcl_blast_resistance = 10, }) + + -- Add entry aliases for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_cauldrons:cauldron", "nodes", "mcl_cauldrons:cauldron_"..water_level) + end end -- Filled crauldrons (3 levels) diff --git a/mods/ITEMS/mcl_chests/depends.txt b/mods/ITEMS/mcl_chests/depends.txt index 924c331da..0d2cf3970 100644 --- a/mods/ITEMS/mcl_chests/depends.txt +++ b/mods/ITEMS/mcl_chests/depends.txt @@ -3,3 +3,4 @@ mcl_core mcl_sounds mcl_end mesecons +doc? diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index f79076b57..185ba4f2c 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -254,6 +254,12 @@ minetest.register_node("mcl_chests:"..basename.."_right", { end, mesecons = mesecons, }) + +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_chests:"..basename, "nodes", "mcl_chests:"..basename.."_left") + doc.add_entry_alias("nodes", "mcl_chests:"..basename, "nodes", "mcl_chests:"..basename.."_right") +end + end register_chest("chest", diff --git a/mods/ITEMS/mcl_clock/depends.txt b/mods/ITEMS/mcl_clock/depends.txt index a683d475a..0430af2c8 100644 --- a/mods/ITEMS/mcl_clock/depends.txt +++ b/mods/ITEMS/mcl_clock/depends.txt @@ -1,2 +1,3 @@ mcl_core mesecons +doc? diff --git a/mods/ITEMS/mcl_clock/init.lua b/mods/ITEMS/mcl_clock/init.lua index 74dd348be..0622dc957 100644 --- a/mods/ITEMS/mcl_clock/init.lua +++ b/mods/ITEMS/mcl_clock/init.lua @@ -6,6 +6,9 @@ mcl_clock = {} +-- This is the itemstring of the default clock item. It is used for the default inventory image, help entries, and the like +mcl_clock.stereotype = "mcl_clock:clock" + local watch = {} watch.old_time = -1 @@ -26,21 +29,26 @@ function watch.get_clock_frame() return tostring(t) end +local doc_mod = minetest.get_modpath("doc") ~= nil + -- Register items function watch.register_item(name, image, creative) local g = 1 if creative then g = 0 end - local doc = name == "mcl_clock:clock" + local use_doc = name == mcl_clock.stereotype + if doc_mod and not use_doc then + doc.add_entry_alias("craftitems", mcl_clock.stereotype, "craftitems", name) + end local longdesc, usagehelp - if doc then + if use_doc then longdesc = "Clocks are tools which shows the current time of day in the Overworld." usagehelp = "The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol." end minetest.register_craftitem(name, { description = "Clock", - _doc_items_create_entry = doc, + _doc_items_create_entry = use_doc, _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, inventory_image = image, @@ -69,7 +77,7 @@ minetest.register_globalstep(function(dtime) for p, player in ipairs(players) do for s, stack in ipairs(player:get_inventory():get_list("main")) do local count = stack:get_count() - if stack:get_name() == "mcl_clock:clock" then + if stack:get_name() == mcl_clock.stereotype then player:get_inventory():set_stack("main", s, "mcl_clock:clock_"..now.." "..count) elseif string.sub(stack:get_name(), 1, 16) == "mcl_clock:clock_" then player:get_inventory():set_stack("main", s, "mcl_clock:clock_"..now.." "..count) @@ -80,14 +88,14 @@ end) -- Immediately set correct clock time after crafting minetest.register_on_craft(function(itemstack) - if itemstack:get_name() == "mcl_clock:clock" then + if itemstack:get_name() == mcl_clock.stereotype then itemstack:set_name("mcl_clock:clock_"..watch.get_clock_frame()) end end) -- Clock recipe minetest.register_craft({ - output = 'mcl_clock:clock', + output = mcl_clock.stereotype, recipe = { {'', 'mcl_core:gold_ingot', ''}, {'mcl_core:gold_ingot', 'mesecons:redstone', 'mcl_core:gold_ingot'}, @@ -96,7 +104,7 @@ minetest.register_craft({ }) -- Clock tool -watch.register_item("mcl_clock:clock", watch.images[1], true) +watch.register_item(mcl_clock.stereotype, watch.images[1], true) -- Faces for a=0,63,1 do @@ -109,4 +117,3 @@ for a=0,63,1 do watch.register_item("mcl_clock:clock_"..tostring(a), watch.images[b+1], false) end -mcl_clock.stereotype = "mcl_clock:clock" diff --git a/mods/ITEMS/mcl_cocoas/depends.txt b/mods/ITEMS/mcl_cocoas/depends.txt index 115fd3340..812afabce 100644 --- a/mods/ITEMS/mcl_cocoas/depends.txt +++ b/mods/ITEMS/mcl_cocoas/depends.txt @@ -1,2 +1,3 @@ mcl_sounds mcl_core +doc? diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index 61d91e9a2..4c07b0f9d 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -241,3 +241,8 @@ minetest.register_abm({ end } ) +-- Add entry aliases for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_cocoas:cocoa_1", "nodes", "mcl_cocoas:cocoa_2") +end + diff --git a/mods/ITEMS/mcl_compass/depends.txt b/mods/ITEMS/mcl_compass/depends.txt index a683d475a..0430af2c8 100644 --- a/mods/ITEMS/mcl_compass/depends.txt +++ b/mods/ITEMS/mcl_compass/depends.txt @@ -1,2 +1,3 @@ mcl_core mesecons +doc? diff --git a/mods/ITEMS/mcl_compass/init.lua b/mods/ITEMS/mcl_compass/init.lua index 569f06d5f..87dd4368d 100644 --- a/mods/ITEMS/mcl_compass/init.lua +++ b/mods/ITEMS/mcl_compass/init.lua @@ -49,20 +49,23 @@ for frame=0,31 do table.insert(images, "mcl_compass_compass.png^[verticalframe:32:"..frame) end +local doc_mod = minetest.get_modpath("doc") ~= nil + local stereotype_frame = 18 for i,img in ipairs(images) do local inv = 1 if i == stereotype_frame then inv = 0 end - local doc, longdesc, usagehelp - doc = i == stereotype_frame - if doc then + local use_doc, longdesc, usagehelp + use_doc = i == stereotype_frame + if use_doc then longdesc = "Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld." end - minetest.register_craftitem("mcl_compass:"..(i-1), { + local itemstring = "mcl_compass:"..(i-1) + minetest.register_craftitem(itemstring, { description = "Compass", - _doc_items_create_entry = doc, + _doc_items_create_entry = use_doc, _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, inventory_image = img, @@ -70,6 +73,11 @@ for i,img in ipairs(images) do stack_max = 64, groups = {not_in_creative_inventory=inv, compass=i, tool=1} }) + + -- Help aliases. Makes sure the lookup tool works correctly + if not use_doc and doc_mod then + doc.add_entry_alias("craftitems", "mcl_compass:"..(stereotype_frame-1), "craftitems", itemstring) + end end minetest.register_craft({ diff --git a/mods/ITEMS/mcl_core/depends.txt b/mods/ITEMS/mcl_core/depends.txt index 7419775c8..41997d067 100644 --- a/mods/ITEMS/mcl_core/depends.txt +++ b/mods/ITEMS/mcl_core/depends.txt @@ -2,3 +2,4 @@ mcl_init mcl_sounds mcl_util doc_items +doc? diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index ee845a319..24d7d1fe6 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -1772,14 +1772,14 @@ for i=0,3 do end end end - local doc = i == 0 + local use_doc = i == 0 local longdesc - if doc then + if use_doc then longdesc = "Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds." end minetest.register_node("mcl_core:frosted_ice_"..i, { description = "Frosted Ice", - _doc_items_create_entry = doc, + _doc_items_create_entry = use_doc, _doc_items_longdesc = longdesc, drawtype = "glasslike", tiles = {"default_frosted_ice_"..i..".png"}, @@ -1810,6 +1810,11 @@ for i=0,3 do _mcl_blast_resistance = 2.5, _mcl_hardness = 0.5, }) + + -- Add entry aliases for the Help + if minetest.get_modpath("doc") and i > 0 then + doc.add_entry_alias("nodes", "mcl_core:frosted_ice_0", "nodes", "mcl_core:frosted_ice_"..i) + end end minetest.register_node("mcl_core:snow", { diff --git a/mods/ITEMS/mcl_doors/depends.txt b/mods/ITEMS/mcl_doors/depends.txt index b66611689..d66b23e8e 100644 --- a/mods/ITEMS/mcl_doors/depends.txt +++ b/mods/ITEMS/mcl_doors/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_doors/init.lua b/mods/ITEMS/mcl_doors/init.lua index 1ea1fecba..cb7c65fcd 100644 --- a/mods/ITEMS/mcl_doors/init.lua +++ b/mods/ITEMS/mcl_doors/init.lua @@ -364,6 +364,14 @@ function mcl_doors:register_door(name, def) can_dig = check_player_priv, }) + -- Add entry aliases for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("craftitems", name, "nodes", name.."_b_1") + doc.add_entry_alias("craftitems", name, "nodes", name.."_b_2") + doc.add_entry_alias("craftitems", name, "nodes", name.."_t_1") + doc.add_entry_alias("craftitems", name, "nodes", name.."_t_2") + end + end local wood_longdesc = "Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal." @@ -671,6 +679,9 @@ function mcl_doors:register_trapdoor(name, def) }}, }) + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", name, "nodes", name.."_open") + end end diff --git a/mods/ITEMS/mcl_fences/depends.txt b/mods/ITEMS/mcl_fences/depends.txt index 97bf51069..cbc0405cc 100644 --- a/mods/ITEMS/mcl_fences/depends.txt +++ b/mods/ITEMS/mcl_fences/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index 327fa6754..6e11d51fa 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -223,6 +223,10 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, _mcl_hardness = hardness, }) + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", gate_id, "nodes", open_gate_id) + end + return gate_id, open_gate_id end diff --git a/mods/ITEMS/mcl_flowerpots/depends.txt b/mods/ITEMS/mcl_flowerpots/depends.txt index f8a6e9bfd..bc1609be2 100644 --- a/mods/ITEMS/mcl_flowerpots/depends.txt +++ b/mods/ITEMS/mcl_flowerpots/depends.txt @@ -2,3 +2,4 @@ mcl_core mcl_sounds mcl_farming mcl_flowers +doc? diff --git a/mods/ITEMS/mcl_flowerpots/nodes.lua b/mods/ITEMS/mcl_flowerpots/nodes.lua index 888d61f70..e31d566b2 100644 --- a/mods/ITEMS/mcl_flowerpots/nodes.lua +++ b/mods/ITEMS/mcl_flowerpots/nodes.lua @@ -122,6 +122,10 @@ minetest.register_node("mcl_flowerpots:flower_pot_"..flower, { } }, }) +-- Add entry alias for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_flowerpots:flower_pot", "nodes", "mcl_flowerpots:flower_pot_"..flower) +end end for _, row in ipairs(cubes) do @@ -159,5 +163,12 @@ minetest.register_node("mcl_flowerpots:flower_pot_"..flower, { { items = { "mcl_flowerpots:flower_pot", flower_node } } } }, + + }) + +-- Add entry alias for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_flowerpots:flower_pot", "nodes", "mcl_flowerpots:flower_pot_"..flower) +end end diff --git a/mods/ITEMS/mcl_flowers/depends.txt b/mods/ITEMS/mcl_flowers/depends.txt index 97bf51069..cbc0405cc 100644 --- a/mods/ITEMS/mcl_flowers/depends.txt +++ b/mods/ITEMS/mcl_flowers/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index cd72d8809..b7ed791da 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -183,6 +183,11 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im groups = {dig_immediate=3,flammable=2,flower=1, dig_by_water=1, not_in_creative_inventory = 1, double_plant=2}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) + + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_flowers:"..name, "nodes", "mcl_flowers:"..name.."_top") + end + end add_large_plant("peony", "Peony", "A peony is a large plant which occupies two blocks. It is mainly used in dye protection.", "mcl_flowers_double_plant_paeonia_bottom.png", "mcl_flowers_double_plant_paeonia_top.png") diff --git a/mods/ITEMS/mcl_furnaces/depends.txt b/mods/ITEMS/mcl_furnaces/depends.txt index ac2cde5ca..ccdc96050 100644 --- a/mods/ITEMS/mcl_furnaces/depends.txt +++ b/mods/ITEMS/mcl_furnaces/depends.txt @@ -3,3 +3,4 @@ mcl_core mcl_sounds mcl_craftguide mcl_achievements +doc? diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index 27782922e..6f1edca35 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -374,3 +374,9 @@ minetest.register_craft({ { "mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble" }, } }) + +-- Add entry alias for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_furnaces:furnace", "nodes", "mcl_furnaces:furnace_active") +end + diff --git a/mods/ITEMS/mcl_hoppers/depends.txt b/mods/ITEMS/mcl_hoppers/depends.txt index 97bf51069..cbc0405cc 100644 --- a/mods/ITEMS/mcl_hoppers/depends.txt +++ b/mods/ITEMS/mcl_hoppers/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index 2ec589137..de3cac86f 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -357,5 +357,10 @@ minetest.register_craft({ } }) +-- Add entry aliases for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_hoppers:hopper", "nodes", "mcl_hoppers:hopper_side") +end + -- Legacy minetest.register_alias("mcl_hoppers:hopper_item", "mcl_hoppers:hopper") diff --git a/mods/ITEMS/mcl_mushrooms/depends.txt b/mods/ITEMS/mcl_mushrooms/depends.txt index 3d96266de..9699080ad 100644 --- a/mods/ITEMS/mcl_mushrooms/depends.txt +++ b/mods/ITEMS/mcl_mushrooms/depends.txt @@ -1 +1,2 @@ mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_mushrooms/huge.lua b/mods/ITEMS/mcl_mushrooms/huge.lua index 960dfdfe2..e3d6c880c 100644 --- a/mods/ITEMS/mcl_mushrooms/huge.lua +++ b/mods/ITEMS/mcl_mushrooms/huge.lua @@ -76,6 +76,16 @@ local register_mushroom = function(color, template, d_cap_top, d_cap_side, d_cap cap_side.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" } minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_side", cap_side) + -- Add entry aliases for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_mushrooms:"..color.."_mushroom_block_pores_full", "nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_full") + doc.add_entry_alias("nodes", "mcl_mushrooms:"..color.."_mushroom_block_stem_full", "nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_full") + doc.add_entry_alias("nodes", "mcl_mushrooms:"..color.."_mushroom_block_stem", "nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_full") + doc.add_entry_alias("nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_corner", "nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_full") + doc.add_entry_alias("nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_top", "nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_full") + doc.add_entry_alias("nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_side", "nodes", "mcl_mushrooms:"..color.."_mushroom_block_cap_full") + end + end local longdesc_red = "Huge red mushroom blocks are the plant parts of huge red mushrooms. This includes caps, pores and stems of huge red mushrooms; and these blocks come in some variants." diff --git a/mods/ITEMS/mcl_throwing/depends.txt b/mods/ITEMS/mcl_throwing/depends.txt index 567d5229e..47e619f19 100644 --- a/mods/ITEMS/mcl_throwing/depends.txt +++ b/mods/ITEMS/mcl_throwing/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_achievements +doc? diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index 1aaf5a2f3..7cec9e491 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -197,3 +197,12 @@ minetest.register_craft({ recipe = "mcl_throwing:bow", burntime = 15, }) + +-- Add entry aliases for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("tools", "mcl_throwing:bow", "tools", "mcl_throwing:bow_0") + doc.add_entry_alias("tools", "mcl_throwing:bow", "tools", "mcl_throwing:bow_1") + doc.add_entry_alias("tools", "mcl_throwing:bow", "tools", "mcl_throwing:bow_2") +end + + diff --git a/mods/ITEMS/mcl_torches/depends.txt b/mods/ITEMS/mcl_torches/depends.txt index 97bf51069..cbc0405cc 100644 --- a/mods/ITEMS/mcl_torches/depends.txt +++ b/mods/ITEMS/mcl_torches/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index 030ced39d..9d9f33fe4 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -156,6 +156,13 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc end end minetest.register_node(itemstring_wall, walldef) + + + -- Add entry alias for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", itemstring, "nodes", itemstring_wall) + end + end mcl_torches.register_torch("torch", diff --git a/mods/ITEMS/mcl_walls/depends.txt b/mods/ITEMS/mcl_walls/depends.txt index 97bf51069..cbc0405cc 100644 --- a/mods/ITEMS/mcl_walls/depends.txt +++ b/mods/ITEMS/mcl_walls/depends.txt @@ -1,2 +1,3 @@ mcl_core mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index 633db36e0..fbd07230d 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -156,6 +156,11 @@ function mcl_walls.register_wall(nodename, description, craft_material, tiles, i _mcl_blast_resistance = 30, _mcl_hardness = 2, }) + + -- Add entry alias for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", nodename, "nodes", nodename.."_"..i) + end end minetest.register_node(nodename.."_16", { @@ -177,6 +182,10 @@ function mcl_walls.register_wall(nodename, description, craft_material, tiles, i _mcl_blast_resistance = 30, _mcl_hardness = 2, }) + -- Add entry alias for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", nodename, "nodes", nodename.."_16") + end minetest.register_node(nodename.."_21", { drawtype = "nodebox", @@ -197,6 +206,10 @@ function mcl_walls.register_wall(nodename, description, craft_material, tiles, i _mcl_blast_resistance = 30, _mcl_hardness = 2, }) + -- Add entry alias for the Help + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", nodename, "nodes", nodename.."_21") + end -- Inventory item minetest.register_node(nodename, { diff --git a/mods/ITEMS/mcstair/depends.txt b/mods/ITEMS/mcstair/depends.txt index 74014a78f..129dfad78 100644 --- a/mods/ITEMS/mcstair/depends.txt +++ b/mods/ITEMS/mcstair/depends.txt @@ -1,2 +1,3 @@ mcl_core stairs +doc? diff --git a/mods/ITEMS/mcstair/init.lua b/mods/ITEMS/mcstair/init.lua index 3d9f941ee..59bb24395 100644 --- a/mods/ITEMS/mcstair/init.lua +++ b/mods/ITEMS/mcstair/init.lua @@ -642,6 +642,11 @@ function mcstair.add(name, stairtiles) after_dig_node = function(pos, oldnode) after_dig_node(pos, oldnode) end, _mcl_hardness = node_def._mcl_hardness, }) + + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", name, "nodes", name.."_inner") + doc.add_entry_alias("nodes", name, "nodes", name.."_outer") + end end for _,v in ipairs({ diff --git a/mods/ITEMS/signs/depends.txt b/mods/ITEMS/signs/depends.txt index 115fd3340..812afabce 100644 --- a/mods/ITEMS/signs/depends.txt +++ b/mods/ITEMS/signs/depends.txt @@ -1,2 +1,3 @@ mcl_sounds mcl_core +doc? diff --git a/mods/ITEMS/signs/init.lua b/mods/ITEMS/signs/init.lua index 3996e5aec..f4d81e4d0 100644 --- a/mods/ITEMS/signs/init.lua +++ b/mods/ITEMS/signs/init.lua @@ -345,3 +345,6 @@ minetest.register_craft({ } }) +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "signs:sign_wall", "nodes", "signs:sign_yard") +end diff --git a/mods/ITEMS/xpanes/depends.txt b/mods/ITEMS/xpanes/depends.txt index 115fd3340..812afabce 100644 --- a/mods/ITEMS/xpanes/depends.txt +++ b/mods/ITEMS/xpanes/depends.txt @@ -1,2 +1,3 @@ mcl_sounds mcl_core +doc? diff --git a/mods/ITEMS/xpanes/init.lua b/mods/ITEMS/xpanes/init.lua index 004bbbb4c..8c5f366aa 100644 --- a/mods/ITEMS/xpanes/init.lua +++ b/mods/ITEMS/xpanes/init.lua @@ -160,6 +160,10 @@ function xpanes.register_pane(name, def) output = "xpanes:" .. name .. "_flat 16", recipe = def.recipe }) + + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "xpanes:" .. name .. "_flat", "nodes", "xpanes:" .. name) + end end local pane = function(description, node, append)