Add extended tooltips

This commit is contained in:
Wuzzy 2020-02-19 04:54:17 +01:00
parent 71cee9920a
commit ba74546d48
81 changed files with 647 additions and 22 deletions

View file

@ -2,6 +2,7 @@ local S = minetest.get_translator("mcl_farming")
minetest.register_craftitem("mcl_farming:beetroot_seeds", {
description = S("Beetroot Seeds"),
_tt_help = S("Can be sown on farmland"),
_doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."),
_doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."),
groups = { craftitem=1 },

View file

@ -82,6 +82,7 @@ minetest.register_node("mcl_farming:carrot", {
minetest.register_craftitem("mcl_farming:carrot_item", {
description = S("Carrot"),
_tt_help = S("Can be planted on farmland"),
_doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_carrot.png",

View file

@ -49,16 +49,26 @@ local hoe_on_place_function = function(wear_divisor)
end
end
local uses = {
wood = 60,
stone = 132,
iron = 251,
gold = 33,
diamond = 1562,
}
local hoe_tt = S("Turns block into farmland")
local hoe_longdesc = S("Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.")
local hoe_usagehelp = S("Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.")
minetest.register_tool("mcl_farming:hoe_wood", {
description = S("Wood Hoe"),
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.wood),
_doc_items_longdesc = hoe_longdesc,
_doc_items_usagehelp = hoe_usagehelp,
_doc_items_hidden = false,
inventory_image = "farming_tool_woodhoe.png",
on_place = hoe_on_place_function(60),
on_place = hoe_on_place_function(uses.wood),
groups = { tool=1, hoe=1 },
tool_capabilities = {
full_punch_interval = 1,
@ -91,10 +101,11 @@ minetest.register_craft({
minetest.register_tool("mcl_farming:hoe_stone", {
description = S("Stone Hoe"),
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.stone),
_doc_items_longdesc = hoe_longdesc,
_doc_items_usagehelp = hoe_usagehelp,
inventory_image = "farming_tool_stonehoe.png",
on_place = hoe_on_place_function(132),
on_place = hoe_on_place_function(uses.stone),
groups = { tool=1, hoe=1 },
tool_capabilities = {
full_punch_interval = 0.5,
@ -122,10 +133,11 @@ minetest.register_craft({
minetest.register_tool("mcl_farming:hoe_iron", {
description = S("Iron Hoe"),
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.iron),
_doc_items_longdesc = hoe_longdesc,
_doc_items_usagehelp = hoe_usagehelp,
inventory_image = "farming_tool_steelhoe.png",
on_place = hoe_on_place_function(251),
on_place = hoe_on_place_function(uses.iron),
groups = { tool=1, hoe=1 },
tool_capabilities = {
-- 1/3
@ -161,10 +173,11 @@ minetest.register_craft({
minetest.register_tool("mcl_farming:hoe_gold", {
description = S("Golden Hoe"),
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.gold),
_doc_items_longdesc = hoe_longdesc,
_doc_items_usagehelp = hoe_usagehelp,
inventory_image = "farming_tool_goldhoe.png",
on_place = hoe_on_place_function(33),
on_place = hoe_on_place_function(uses.gold),
groups = { tool=1, hoe=1 },
tool_capabilities = {
full_punch_interval = 1,
@ -201,10 +214,11 @@ minetest.register_craft({
minetest.register_tool("mcl_farming:hoe_diamond", {
description = S("Diamond Hoe"),
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.diamond),
_doc_items_longdesc = hoe_longdesc,
_doc_items_usagehelp = hoe_usagehelp,
inventory_image = "farming_tool_diamondhoe.png",
on_place = hoe_on_place_function(1562),
on_place = hoe_on_place_function(uses.diamond),
groups = { tool=1, hoe=1 },
tool_capabilities = {
full_punch_interval = 0.25,

View file

@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_farming")
-- Seeds
minetest.register_craftitem("mcl_farming:melon_seeds", {
description = S("Melon Seeds"),
_tt_help = S("Can be sown on farmland"),
_doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."),
_doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."),
stack_max = 64,

View file

@ -87,6 +87,7 @@ minetest.register_node("mcl_farming:potato", {
minetest.register_craftitem("mcl_farming:potato_item", {
description = S("Potato"),
_tt_help = S("Can be planted on farmland"),
_doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_potato.png",

View file

@ -9,6 +9,7 @@ end
-- Seeds
minetest.register_craftitem("mcl_farming:pumpkin_seeds", {
description = S("Pumpkin Seeds"),
_tt_help = S("Can be sown on farmland"),
_doc_items_longdesc = S("Grows into a pumpkin stem which in turn grows pumpkins. Chickens like pumpkin seeds."),
_doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."),
stack_max = 64,

View file

@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_farming")
minetest.register_node("mcl_farming:soil", {
tiles = {"mcl_farming_farmland_dry.png", "default_dirt.png"},
description = S("Farmland"),
_tt_help = S("Surface for farming plants").."\n"..S("Can become wet"),
_doc_items_longdesc = S("Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it."),
drop = "mcl_core:dirt",
drawtype = "nodebox",

View file

@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_farming")
minetest.register_craftitem("mcl_farming:wheat_seeds", {
-- Original Minecraft name: “Seeds”
description = S("Wheat Seeds"),
_tt_help = S("Can be sown on farmland"),
_doc_items_longdesc = S("Grows into a wheat plant. Chickens like wheat seeds."),
_doc_items_usagehelp = S("Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds."),
groups = { craftitem=1 },