From 712f295edc644691349515f2445222758049fce8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 20 Mar 2017 16:38:16 +0100 Subject: [PATCH] Reveal a few basic help entries by default --- mods/HUD/mcl_inventory/init.lua | 1 + mods/ITEMS/mcl_chests/init.lua | 7 +++++-- mods/ITEMS/mcl_core/craftitems.lua | 4 ++++ mods/ITEMS/mcl_core/nodes.lua | 16 ++++++++++++++++ mods/ITEMS/mcl_farming/hoes.lua | 1 + mods/ITEMS/mcl_flowers/init.lua | 1 + mods/ITEMS/mcl_furnaces/init.lua | 1 + mods/ITEMS/mcl_tools/init.lua | 4 ++++ mods/ITEMS/mcl_torches/init.lua | 3 ++- 9 files changed, 35 insertions(+), 3 deletions(-) diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index a737c13fb..1a93226ef 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -188,6 +188,7 @@ minetest.register_node("mcl_inventory:workbench", { description = "Crafting Table", _doc_items_longdesc = "A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.", _doc_items_usagehelp = "Rightclick the crafting table to access the 3×3 crafting grid.", + _doc_items_hidden = false, is_ground_content = false, tiles = {"crafting_workbench_top.png", "default_wood.png", "crafting_workbench_side.png", "crafting_workbench_side.png", "crafting_workbench_front.png", "crafting_workbench_front.png"}, diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 8796fe333..f79076b57 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -23,7 +23,7 @@ local function get_chest_neighborpos(pos, param2, side) end -- This is a helper function to register both chests and trapped chests. Trapped chests will make use of the additional parameters -local register_chest = function(basename, desc, longdesc, usagehelp, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop) +local register_chest = function(basename, desc, longdesc, usagehelp, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop) if not drop then drop = "mcl_chests:"..basename @@ -35,6 +35,7 @@ minetest.register_node("mcl_chests:"..basename, { description = desc, _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, + _doc_items_hidden = hidden, tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, paramtype2 = "facedir", @@ -258,7 +259,8 @@ end register_chest("chest", "Chest", "Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.", - "To acccess the inventory of a chest or large chest, rightclick it. When broken, the items of the chest will drop out." + "To acccess the inventory of a chest or large chest, rightclick it. When broken, the items of the chest will drop out.", + false ) local trapped_chest_mesecons_rules = { @@ -273,6 +275,7 @@ register_chest("trapped_chest", "Trapped Chest", "A trapped chest is a container which provides 27 inventory slots. It looks identical to a regular chest, but when it is opened, it sends a redstone signal to its adjacent blocks. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.", "To acccess the inventory of a trapped chest or a large trapped chest, rightclick it. When broken, the items will drop out.", + nil, {receptor = { state = mesecon.state.off, rules = trapped_chest_mesecons_rules, diff --git a/mods/ITEMS/mcl_core/craftitems.lua b/mods/ITEMS/mcl_core/craftitems.lua index 0d430bfd8..a71b002ad 100644 --- a/mods/ITEMS/mcl_core/craftitems.lua +++ b/mods/ITEMS/mcl_core/craftitems.lua @@ -7,6 +7,7 @@ minetest.register_craftitem("mcl_core:stick", { description = "Stick", _doc_items_longdesc = "Sticks are a very versatile crafting material; used in countless crafting recipes.", + _doc_items_hidden = false, inventory_image = "default_stick.png", stack_max = 64, groups = { craftitem=1, stick=1 }, @@ -23,6 +24,7 @@ minetest.register_craftitem("mcl_core:paper", { minetest.register_craftitem("mcl_core:coal_lump", { description = "Coal", _doc_items_longdesc = "“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things.", + _doc_items_hidden = false, groups = { coal=1 }, inventory_image = "default_coal_lump.png", stack_max = 64, @@ -32,6 +34,7 @@ minetest.register_craftitem("mcl_core:coal_lump", { minetest.register_craftitem("mcl_core:charcoal_lump", { description = "Charcoal", _doc_items_longdesc = "Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks.", + _doc_items_hidden = false, groups = { coal=1 }, inventory_image = "default_charcoal_lump.png", stack_max = 64, @@ -65,6 +68,7 @@ minetest.register_craftitem("mcl_core:diamond", { minetest.register_craftitem("mcl_core:clay_lump", { description = "Clay", _doc_items_longdesc = "Clay is a raw material.", + _doc_items_hidden = false, inventory_image = "default_clay_lump.png", stack_max = 64, groups = { craftitem=1 }, diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index 234ec2294..ee845a319 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -67,6 +67,7 @@ minetest.register_node("mcl_core:void", { minetest.register_node("mcl_core:stone", { description = "Stone", _doc_items_longdesc = "One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.", + _doc_items_hidden = false, tiles = {"default_stone.png"}, is_ground_content = true, stack_max = 64, @@ -80,6 +81,7 @@ minetest.register_node("mcl_core:stone", { minetest.register_node("mcl_core:stone_with_coal", { description = "Coal Ore", _doc_items_longdesc = "Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height.", + _doc_items_hidden = false, tiles = {"default_stone.png^default_mineral_coal.png"}, is_ground_content = true, stack_max = 64, @@ -360,6 +362,7 @@ minetest.register_node("mcl_core:diorite_smooth", { minetest.register_node("mcl_core:dirt_with_grass", { description = "Grass Block", _doc_items_longdesc = "A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel.", + _doc_items_hidden = false, tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, is_ground_content = true, stack_max = 64, @@ -427,6 +430,7 @@ minetest.register_node("mcl_core:podzol", { minetest.register_node("mcl_core:dirt", { description = "Dirt", _doc_items_longdesc = "Dirt acts as a soil for a few plants. When in light, it will turn into a grass block eventually.", + _doc_items_hidden = false, tiles = {"default_dirt.png"}, is_ground_content = true, stack_max = 64, @@ -473,6 +477,7 @@ minetest.register_node("mcl_core:gravel", { minetest.register_node("mcl_core:sand", { description = "Sand", _doc_items_longdesc = "Sand is found in large quantities at beaches and deserts.", + _doc_items_hidden = false, tiles = {"default_sand.png"}, is_ground_content = true, stack_max = 64, @@ -484,6 +489,7 @@ minetest.register_node("mcl_core:sand", { minetest.register_node("mcl_core:sandstone", { description = "Sandstone", + _doc_items_hidden = false, _doc_items_longdesc = "Sandstone is compressed sand and is a rather soft kind of stone.", tiles = {"default_sandstone_top.png", "default_sandstone_bottom.png", "default_sandstone_normal.png"}, is_ground_content = true, @@ -574,6 +580,7 @@ minetest.register_node("mcl_core:clay", { -- Original name: Clay description = "Block of Clay", _doc_items_longdesc = "A block of clay is a versatile kind of earth commonly found at beaches underwater.", + _doc_items_hidden = false, tiles = {"default_clay.png"}, is_ground_content = true, stack_max = 64, @@ -619,6 +626,7 @@ minetest.register_node("mcl_core:bone_block", { minetest.register_node("mcl_core:tree", { description = "Oak Wood", _doc_items_longdesc = "The trunk of an oak tree.", + _doc_items_hidden = false, tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, @@ -632,6 +640,7 @@ minetest.register_node("mcl_core:tree", { minetest.register_node("mcl_core:sapling", { description = "Oak Sapling", _doc_items_longdesc = "When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak tree after some time. If the tree can't grow it it is too dark, the sapling will uproot.", + _doc_items_hidden = false, drawtype = "plantlike", visual_scale = 1.0, tiles = {"default_sapling.png"}, @@ -657,6 +666,7 @@ minetest.register_node("mcl_core:sapling", { minetest.register_node("mcl_core:leaves", { description = "Oak Leaves", _doc_items_longdesc = "Oak leaves are grown from oak trees.", + _doc_items_hidden = false, drawtype = "allfaces_optional", place_param2 = 1, -- Prevent leafdecay for placed nodes visual_scale = 1.3, @@ -687,6 +697,7 @@ minetest.register_node("mcl_core:leaves", { minetest.register_node("mcl_core:wood", { description = "Oak Wood Planks", _doc_items_longdesc = doc.sub.items.temp.build, + _doc_items_hidden = false, tiles = {"default_wood.png"}, stack_max = 64, is_ground_content = false, @@ -1440,6 +1451,7 @@ minetest.register_node("mcl_core:water_source", { description = "Still Water", _doc_items_entry_name = "Water", _doc_items_longdesc = "Water is abundant in oceans and may also appear in small quantities in underground water pockets. You can swim easily in water, but you need to catch your breath from time to time. Water will turn nearby lava into obsidian or stone.", + _doc_items_hidden = false, inventory_image = minetest.inventorycube("default_water.png"), drawtype = "liquid", tiles = { @@ -1564,6 +1576,7 @@ minetest.register_node("mcl_core:lava_source", { minetest.register_node("mcl_core:cobble", { description = "Cobblestone", _doc_items_longdesc = doc.sub.items.temp.build, + _doc_items_hidden = false, tiles = {"default_cobble.png"}, is_ground_content = false, stack_max = 64, @@ -1672,6 +1685,7 @@ minetest.register_node("mcl_core:obsidian", { minetest.register_node("mcl_core:deadbush", { description = "Dead Bush", _doc_items_longdesc = "Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks.", + _doc_items_hidden = false, drawtype = "plantlike", visual_scale = 1.0, tiles = {"default_dry_shrub.png"}, @@ -1801,6 +1815,7 @@ end minetest.register_node("mcl_core:snow", { description = "Top Snow", _doc_items_longdesc = "Top snow is a thin layer of snow.", + _doc_items_hidden = false, tiles = {"default_snow.png"}, wield_image = "default_snow.png", wield_scale = { x=1, y=1, z=1 }, @@ -1827,6 +1842,7 @@ minetest.register_node("mcl_core:snow", { minetest.register_node("mcl_core:snowblock", { description = "Snow", _doc_items_longdesc = "This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.", + _doc_items_hidden = false, tiles = {"default_snow.png"}, is_ground_content = true, stack_max = 64, diff --git a/mods/ITEMS/mcl_farming/hoes.lua b/mods/ITEMS/mcl_farming/hoes.lua index 4f3ab3e87..608583ba0 100644 --- a/mods/ITEMS/mcl_farming/hoes.lua +++ b/mods/ITEMS/mcl_farming/hoes.lua @@ -30,6 +30,7 @@ minetest.register_tool("mcl_farming:hoe_wood", { description = "Wood Hoe", _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, + _doc_items_hidden = false, inventory_image = "farming_tool_woodhoe.png", on_place = function(itemstack, user, pointed_thing) -- Call on_rightclick if the pointed node defines it diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 548c30371..cd72d8809 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -56,6 +56,7 @@ local wheat_seed_drop = { minetest.register_node("mcl_flowers:tallgrass", { description = "Tall Grass", _doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.", + _doc_items_hidden = false, drawtype = "plantlike", tiles = {"mcl_flowers_tallgrass.png"}, inventory_image = "mcl_flowers_tallgrass.png", diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index dfed01ec7..27782922e 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -272,6 +272,7 @@ minetest.register_node("mcl_furnaces:furnace", { description = "Furnace", _doc_items_longdesc = "Furnaces cook or smelt several items, using a furnace fuel, into something else.", _doc_items_usagehelp = "Right-click the furnace to view it. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.", + _doc_items_hidden = false, tiles = { "default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png", "default_furnace_side.png", diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index b27940a2b..0697baf09 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -60,6 +60,7 @@ local shears_use = "To shear a sheep and obtain its wool, rightclick it while ho minetest.register_tool("mcl_tools:pick_wood", { description = "Wooden Pickaxe", _doc_items_longdesc = pickaxe_longdesc, + _doc_items_hidden = false, inventory_image = "default_tool_woodpick.png", groups = { tool=1 }, tool_capabilities = { @@ -192,6 +193,7 @@ minetest.register_tool("mcl_tools:shovel_wood", { description = "Wooden Shovel", _doc_items_longdesc = shovel_longdesc, _doc_items_usagehelp = shovel_use, + _doc_items_hidden = false, inventory_image = "default_tool_woodshovel.png", wield_image = "default_tool_woodshovel.png^[transformR90", groups = { tool=1 }, @@ -283,6 +285,7 @@ minetest.register_tool("mcl_tools:shovel_diamond", { minetest.register_tool("mcl_tools:axe_wood", { description = "Wooden Axe", _doc_items_longdesc = axe_longdesc, + _doc_items_hidden = false, inventory_image = "default_tool_woodaxe.png", groups = { tool=1 }, tool_capabilities = { @@ -361,6 +364,7 @@ minetest.register_tool("mcl_tools:axe_diamond", { minetest.register_tool("mcl_tools:sword_wood", { description = "Wooden Sword", _doc_items_longdesc = sword_longdesc, + _doc_items_hidden = false, inventory_image = "default_tool_woodsword.png", groups = { weapon=1 }, tool_capabilities = { diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index ec1fcd23a..030ced39d 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -173,7 +173,8 @@ mcl_torches.register_torch("torch", }}, 14, {dig_immediate=3, torch=1, dig_by_water=1, deco_block=1}, - mcl_sounds.node_sound_wood_defaults()) + mcl_sounds.node_sound_wood_defaults(), + {_doc_items_hidden = false}) minetest.register_craft({