Skip to content
Permalink
Browse files

Devtest: Extend tooltips of many items and tools (#10312)

Also show error message when using tools wrong
  • Loading branch information
Wuzzy2 committed Sep 4, 2020
1 parent b3ace8f commit 9faeca329039f33f7e2af99eb021cea5b18beceb
@@ -25,7 +25,7 @@ Basically, just create a world and start. A few important things to note:
* Check out the game settings and server commands for additional tests and features
* Creative Mode does nothing (apart from default engine behavior)

Confused by a certain node or item? Check out for inline code comments.
Confused by a certain node or item? Check out for inline code comments. The usages of most tools are explained in their tooltips.

### Example tests

@@ -124,7 +124,8 @@ minetest.register_node("basenodes:pine_needles", {
})

minetest.register_node("basenodes:water_source", {
description = "Water Source",
description = "Water Source".."\n"..
"Drowning damage: 1",
drawtype = "liquid",
tiles = {"default_water.png"},
special_tiles = {
@@ -148,7 +149,8 @@ minetest.register_node("basenodes:water_source", {
})

minetest.register_node("basenodes:water_flowing", {
description = "Flowing Water",
description = "Flowing Water".."\n"..
"Drowning damage: 1",
drawtype = "flowingliquid",
tiles = {"default_water_flowing.png"},
special_tiles = {
@@ -173,7 +175,8 @@ minetest.register_node("basenodes:water_flowing", {
})

minetest.register_node("basenodes:river_water_source", {
description = "River Water Source",
description = "River Water Source".."\n"..
"Drowning damage: 1",
drawtype = "liquid",
tiles = { "default_river_water.png" },
special_tiles = {
@@ -199,7 +202,8 @@ minetest.register_node("basenodes:river_water_source", {
})

minetest.register_node("basenodes:river_water_flowing", {
description = "Flowing River Water",
description = "Flowing River Water".."\n"..
"Drowning damage: 1",
drawtype = "flowingliquid",
tiles = {"default_river_water_flowing.png"},
special_tiles = {
@@ -226,7 +230,9 @@ minetest.register_node("basenodes:river_water_flowing", {
})

minetest.register_node("basenodes:lava_flowing", {
description = "Flowing Lava",
description = "Flowing Lava".."\n"..
"4 damage per second".."\n"..
"Drowning damage: 1",
drawtype = "flowingliquid",
tiles = {"default_lava_flowing.png"},
special_tiles = {
@@ -251,7 +257,9 @@ minetest.register_node("basenodes:lava_flowing", {
})

minetest.register_node("basenodes:lava_source", {
description = "Lava Source",
description = "Lava Source".."\n"..
"4 damage per second".."\n"..
"Drowning damage: 1",
drawtype = "liquid",
tiles = { "default_lava.png" },
special_tiles = {
@@ -290,7 +298,8 @@ minetest.register_node("basenodes:mossycobble", {
})

minetest.register_node("basenodes:apple", {
description = "Apple",
description = "Apple".."\n"..
"Food (+2)",
drawtype = "plantlike",
tiles ={"default_apple.png"},
inventory_image = "default_apple.png",
@@ -42,7 +42,8 @@ minetest.register_item(":", {

-- Mese Pickaxe: special tool that digs "everything" instantly
minetest.register_tool("basetools:pick_mese", {
description = "Mese Pickaxe",
description = "Mese Pickaxe".."\n"..
"Digs diggable nodes instantly",
inventory_image = "basetools_mesepick.png",
tool_capabilities = {
full_punch_interval = 1.0,
@@ -65,7 +66,9 @@ minetest.register_tool("basetools:pick_mese", {

-- This should break after only 1 use
minetest.register_tool("basetools:pick_dirt", {
description = "Dirt Pickaxe",
description = "Dirt Pickaxe".."\n"..
"Digs cracky=3".."\n"..
"1 use only",
inventory_image = "basetools_dirtpick.png",
tool_capabilities = {
max_drop_level=0,
@@ -76,7 +79,8 @@ minetest.register_tool("basetools:pick_dirt", {
})

minetest.register_tool("basetools:pick_wood", {
description = "Wooden Pickaxe",
description = "Wooden Pickaxe".."\n"..
"Digs cracky=3",
inventory_image = "basetools_woodpick.png",
tool_capabilities = {
max_drop_level=0,
@@ -86,7 +90,8 @@ minetest.register_tool("basetools:pick_wood", {
},
})
minetest.register_tool("basetools:pick_stone", {
description = "Stone Pickaxe",
description = "Stone Pickaxe".."\n"..
"Digs cracky=2..3",
inventory_image = "basetools_stonepick.png",
tool_capabilities = {
max_drop_level=0,
@@ -96,7 +101,8 @@ minetest.register_tool("basetools:pick_stone", {
},
})
minetest.register_tool("basetools:pick_steel", {
description = "Steel Pickaxe",
description = "Steel Pickaxe".."\n"..
"Digs cracky=1..3",
inventory_image = "basetools_steelpick.png",
tool_capabilities = {
max_drop_level=1,
@@ -106,7 +112,9 @@ minetest.register_tool("basetools:pick_steel", {
},
})
minetest.register_tool("basetools:pick_steel_l1", {
description = "Steel Pickaxe Level 1",
description = "Steel Pickaxe Level 1".."\n"..
"Digs cracky=1..3".."\n"..
"maxlevel=1",
inventory_image = "basetools_steelpick_l1.png",
tool_capabilities = {
max_drop_level=1,
@@ -116,7 +124,9 @@ minetest.register_tool("basetools:pick_steel_l1", {
},
})
minetest.register_tool("basetools:pick_steel_l2", {
description = "Steel Pickaxe Level 2",
description = "Steel Pickaxe Level 2".."\n"..
"Digs cracky=1..3".."\n"..
"maxlevel=2",
inventory_image = "basetools_steelpick_l2.png",
tool_capabilities = {
max_drop_level=1,
@@ -131,7 +141,8 @@ minetest.register_tool("basetools:pick_steel_l2", {
--

minetest.register_tool("basetools:shovel_wood", {
description = "Wooden Shovel",
description = "Wooden Shovel".."\n"..
"Digs crumbly=3",
inventory_image = "basetools_woodshovel.png",
tool_capabilities = {
max_drop_level=0,
@@ -141,7 +152,8 @@ minetest.register_tool("basetools:shovel_wood", {
},
})
minetest.register_tool("basetools:shovel_stone", {
description = "Stone Shovel",
description = "Stone Shovel".."\n"..
"Digs crumbly=2..3",
inventory_image = "basetools_stoneshovel.png",
tool_capabilities = {
max_drop_level=0,
@@ -151,7 +163,8 @@ minetest.register_tool("basetools:shovel_stone", {
},
})
minetest.register_tool("basetools:shovel_steel", {
description = "Steel Shovel",
description = "Steel Shovel".."\n"..
"Digs crumbly=1..3",
inventory_image = "basetools_steelshovel.png",
tool_capabilities = {
max_drop_level=1,
@@ -166,7 +179,8 @@ minetest.register_tool("basetools:shovel_steel", {
--

minetest.register_tool("basetools:axe_wood", {
description = "Wooden Axe",
description = "Wooden Axe".."\n"..
"Digs choppy=3",
inventory_image = "basetools_woodaxe.png",
tool_capabilities = {
max_drop_level=0,
@@ -176,7 +190,8 @@ minetest.register_tool("basetools:axe_wood", {
},
})
minetest.register_tool("basetools:axe_stone", {
description = "Stone Axe",
description = "Stone Axe".."\n"..
"Digs choppy=2..3",
inventory_image = "basetools_stoneaxe.png",
tool_capabilities = {
max_drop_level=0,
@@ -186,7 +201,8 @@ minetest.register_tool("basetools:axe_stone", {
},
})
minetest.register_tool("basetools:axe_steel", {
description = "Steel Axe",
description = "Steel Axe".."\n"..
"Digs choppy=1..3",
inventory_image = "basetools_steelaxe.png",
tool_capabilities = {
max_drop_level=1,
@@ -201,7 +217,8 @@ minetest.register_tool("basetools:axe_steel", {
--

minetest.register_tool("basetools:shears_wood", {
description = "Wooden Shears",
description = "Wooden Shears".."\n"..
"Digs snappy=3",
inventory_image = "basetools_woodshears.png",
tool_capabilities = {
max_drop_level=0,
@@ -211,7 +228,8 @@ minetest.register_tool("basetools:shears_wood", {
},
})
minetest.register_tool("basetools:shears_stone", {
description = "Stone Shears",
description = "Stone Shears".."\n"..
"Digs snappy=2..3",
inventory_image = "basetools_stoneshears.png",
tool_capabilities = {
max_drop_level=0,
@@ -221,7 +239,8 @@ minetest.register_tool("basetools:shears_stone", {
},
})
minetest.register_tool("basetools:shears_steel", {
description = "Steel Shears",
description = "Steel Shears".."\n"..
"Digs snappy=1..3",
inventory_image = "basetools_steelshears.png",
tool_capabilities = {
max_drop_level=1,
@@ -236,15 +255,17 @@ minetest.register_tool("basetools:shears_steel", {
--

minetest.register_tool("basetools:sword_wood", {
description = "Wooden Sword",
description = "Wooden Sword".."\n"..
"Damage: fleshy=2",
inventory_image = "basetools_woodsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
damage_groups = {fleshy=2},
}
})
minetest.register_tool("basetools:sword_stone", {
description = "Stone Sword",
description = "Stone Sword".."\n"..
"Damage: fleshy=4",
inventory_image = "basetools_stonesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
@@ -253,7 +274,8 @@ minetest.register_tool("basetools:sword_stone", {
}
})
minetest.register_tool("basetools:sword_steel", {
description = "Steel Sword",
description = "Steel Sword".."\n"..
"Damage: fleshy=6",
inventory_image = "basetools_steelsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
@@ -264,7 +286,8 @@ minetest.register_tool("basetools:sword_steel", {

-- Fire/Ice sword: Deal damage to non-fleshy damage groups
minetest.register_tool("basetools:sword_fire", {
description = "Fire Sword",
description = "Fire Sword".."\n"..
"Damage: icy=6",
inventory_image = "basetools_firesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
@@ -273,20 +296,23 @@ minetest.register_tool("basetools:sword_fire", {
}
})
minetest.register_tool("basetools:sword_ice", {
description = "Ice Sword",
description = "Ice Sword".."\n"..
"Damage: fiery=6",
inventory_image = "basetools_icesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
damage_groups = {firy=6},
damage_groups = {fiery=6},
}
})

--
-- Dagger: Low damage, fast punch interval
--
minetest.register_tool("basetools:dagger_steel", {
description = "Steel Dagger",
description = "Steel Dagger".."\n"..
"Damage: fleshy=2".."\n"..
"Full Punch Interval: 0.5s",
inventory_image = "basetools_steeldagger.png",
tool_capabilities = {
full_punch_interval = 0.5,
@@ -1,7 +1,8 @@
-- Bucket: Punch liquid source or flowing liquid to collect it

minetest.register_tool("bucket:bucket", {
description = "Bucket",
description = "Bucket".."\n"..
"Picks up liquid nodes",
inventory_image = "bucket.png",
stack_max = 1,
liquids_pointable = true,
@@ -1,5 +1,6 @@
minetest.register_node("chest:chest", {
description = "Chest",
description = "Chest" .. "\n" ..
"32 inventory slots",
tiles ={"chest_chest.png^[sheet:2x2:0,0", "chest_chest.png^[sheet:2x2:0,0",
"chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:1,0",
"chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:0,1"},
@@ -43,7 +43,8 @@ local function get_chest_formspec(page)
end

minetest.register_node("chest_of_everything:chest", {
description = "Chest of Everything",
description = "Chest of Everything" .. "\n" ..
"Grants access to all items",
tiles ={"chest_of_everything_chest.png^[sheet:2x2:0,0", "chest_of_everything_chest.png^[sheet:2x2:0,0",
"chest_of_everything_chest.png^[sheet:2x2:1,0", "chest_of_everything_chest.png^[sheet:2x2:1,0",
"chest_of_everything_chest.png^[sheet:2x2:1,0", "chest_of_everything_chest.png^[sheet:2x2:0,1"},
@@ -44,7 +44,8 @@ minetest.register_node("experimental:callback_node", {
})

minetest.register_tool("experimental:privatizer", {
description = "Node Meta Privatizer",
description = "Node Meta Privatizer".."\n"..
"Punch: Marks 'infotext' and 'formspec' meta fields of chest as private",
inventory_image = "experimental_tester_tool_1.png",
groups = { testtool = 1, disable_repair = 1 },
on_use = function(itemstack, user, pointed_thing)
@@ -67,7 +68,8 @@ minetest.register_tool("experimental:privatizer", {
})

minetest.register_tool("experimental:particle_spawner", {
description = "Particle Spawner",
description = "Particle Spawner".."\n"..
"Punch: Spawn random test particle",
inventory_image = "experimental_tester_tool_1.png^[invert:g",
groups = { testtool = 1, disable_repair = 1 },
on_use = function(itemstack, user, pointed_thing)
@@ -107,7 +107,8 @@ minetest.register_node("soundstuff:footstep_climbable", {


minetest.register_craftitem("soundstuff:eat", {
description = "Eat Sound Item",
description = "Eat Sound Item".."\n"..
"Makes a sound when 'eaten' (with punch key)",
inventory_image = "soundstuff_eat.png",
on_use = minetest.item_eat(0),
sound = {
@@ -116,7 +117,9 @@ minetest.register_craftitem("soundstuff:eat", {
})

minetest.register_tool("soundstuff:breaks", {
description = "Break Sound Tool",
description = "Break Sound Tool".."\n"..
"Digs cracky=3 and more".."\n"..
"Makes a sound when it breaks",
inventory_image = "soundstuff_node_dug.png",
sound = {
breaks = { name = "soundstuff_mono", gain = 1.0 },
@@ -3,7 +3,7 @@

local phasearmor = {
[0]={icy=100},
[1]={firy=100},
[1]={fiery=100},
[2]={fleshy=100},
[3]={immortal=1},
[4]={punch_operable=1},

0 comments on commit 9faeca3

Please sign in to comment.
You can’t perform that action at this time.