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

@ -76,11 +76,15 @@ for c=1, #corals do
local doc_desc_block = S("Coral blocks live in the oceans and need a water source next to them to survive. Without water, they die off.")
local doc_desc_coral = S("Corals grow on top of coral blocks and need to be inside a water source to survive. Without water, it will die off, as well as the coral block below.")
local doc_desc_fan = S("Corals fans grow on top of coral blocks and need to be inside a water source to survive. Without water, it will die off, as well as the coral block below.")
local tt_block = S("Needs water to live")
local tt_coral_dead = S("Grows on coral block of same species")
local tt_coral = tt_coral_dead .. S("Needs water to live")
-- Coral Block
minetest.register_node("mcl_ocean:"..id.."_coral_block", {
description = corals[c][2],
_doc_items_longdesc = doc_desc_block,
_tt_help = tt_block,
tiles = { "mcl_ocean_"..id.."_coral_block.png" },
groups = { pickaxey = 1, building_block = 1, coral=1, coral_block=1, coral_species=c, },
sounds = mcl_sounds.node_sound_dirt_defaults(),
@ -102,6 +106,7 @@ for c=1, #corals do
minetest.register_node("mcl_ocean:"..id.."_coral", {
description = corals[c][4],
_doc_items_longdesc = doc_desc_coral,
_tt_help = tt_coral,
drawtype = "plantlike_rooted",
paramtype = "light",
paramtype2 = "meshoptions",
@ -134,6 +139,7 @@ for c=1, #corals do
minetest.register_node("mcl_ocean:dead_"..id.."_coral", {
description = corals[c][5],
_doc_items_create_entry = false,
_tt_help = tt_coral_dead,
drawtype = "plantlike_rooted",
paramtype = "light",
paramtype2 = "meshoptions",
@ -167,6 +173,7 @@ for c=1, #corals do
minetest.register_node("mcl_ocean:"..id.."_coral_fan", {
description = corals[c][6],
_doc_items_longdesc = doc_desc_fan,
_tt_help = tt_coral,
drawtype = "plantlike_rooted",
paramtype = "light",
paramtype2 = "meshoptions",
@ -199,6 +206,7 @@ for c=1, #corals do
minetest.register_node("mcl_ocean:dead_"..id.."_coral_fan", {
description = corals[c][7],
_doc_items_create_entry = false,
_tt_help = tt_coral_dead,
drawtype = "plantlike_rooted",
paramtype = "light",
paramtype2 = "meshoptions",

View file

@ -152,9 +152,10 @@ for s=1, #surfaces do
sounds.dig = leaf_sounds.dig
sounds.dug = leaf_sounds.dug
sounds.place = leaf_sounds.place
local doc_longdesc, doc_img, desc
local tt_help, doc_longdesc, doc_img, desc
if surfaces[s][1] == "dirt" then
doc_longdesc = S("Kelp grows inside water on top of dirt, sand or gravel.")
tt_help = S("Grows in water on dirt, sand, gravel")
desc = S("Kelp")
doc_create = true
doc_img = "mcl_ocean_kelp_item.png"
@ -162,6 +163,7 @@ for s=1, #surfaces do
doc_create = false
end
minetest.register_node("mcl_ocean:kelp_"..surfaces[s][1], {
_tt_help = tt_help,
_doc_items_entry_name = desc,
_doc_items_longdesc = doc_longdesc,
_doc_items_create_entry = doc_create,

View file

@ -67,11 +67,12 @@ local ontop = "dead_brain_coral_block"
local canonical = "mcl_ocean:sea_pickle_1_"..ontop
for s=1,4 do
local desc, doc_desc, doc_use, doc_create, nici, img, img_off, on_place
local desc, doc_desc, doc_use, doc_create, tt_help, nici, img, img_off, on_place
if s == 1 then
desc = S("Sea Pickle")
doc_desc = S("Sea pickles grow on dead brain coral blocks and provide light when underwater. They come in 4 sizes that vary in brightness.")
doc_use = S("It can only be placed on top of dead brain coral blocks. Placing a sea pickle on another sea pickle will make it grow and brighter.")
tt_help = S("Glows when underwater").."\n"..S("4 possible sizes").."\n"..S("Grows on dead brain coral block")
img = "mcl_ocean_sea_pickle_item.png"
on_place = sea_pickle_on_place
else
@ -88,6 +89,7 @@ for s=1,4 do
minetest.register_node("mcl_ocean:sea_pickle_"..s.."_"..ontop, {
description = desc,
_tt_help = tt_help,
_doc_items_create_entry = doc_create,
_doc_items_longdesc = doc_desc,
_doc_items_usagehelp = doc_use,

View file

@ -99,9 +99,10 @@ for s=1, #surfaces do
sounds.dig = leaf_sounds.dig
sounds.dug = leaf_sounds.dug
sounds.place = leaf_sounds.place
local doc_longdesc, doc_img, desc
local tt_help, doc_longdesc, doc_img, desc
if surfaces[s][1] == "dirt" then
doc_longdesc = S("Seagrass grows inside water on top of dirt, sand or gravel.")
tt_help = S("Grows in water on dirt, sand, gravel")
desc = S("Seagrass")
doc_create = true
doc_img = "mcl_ocean_seagrass.png"
@ -109,6 +110,7 @@ for s=1, #surfaces do
doc_create = false
end
minetest.register_node("mcl_ocean:seagrass_"..surfaces[s][1], {
_tt_help = tt_help,
_doc_items_entry_name = desc,
_doc_items_longdesc = doc_longdesc,
_doc_items_create_entry = doc_create,