0
0
Fork 0

Extra tooltips for mcl_chests

This commit is contained in:
Wuzzy 2020-03-08 08:50:21 +01:00
parent 2554c6d597
commit 4deb6eec20
1 changed files with 7 additions and 2 deletions

View File

@ -77,7 +77,7 @@ local player_chest_close = function(player)
end end
-- This is a helper function to register both chests and trapped chests. Trapped chests will make use of the additional parameters -- 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, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop, canonical_basename) local register_chest = function(basename, desc, longdesc, usagehelp, tt_help, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop, canonical_basename)
-- START OF register_chest FUNCTION BODY -- START OF register_chest FUNCTION BODY
if not drop then if not drop then
drop = "mcl_chests:"..basename drop = "mcl_chests:"..basename
@ -92,6 +92,7 @@ end
minetest.register_node("mcl_chests:"..basename, { minetest.register_node("mcl_chests:"..basename, {
description = desc, description = desc,
_tt_help = tt_help,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp, _doc_items_usagehelp = usagehelp,
_doc_items_hidden = hidden, _doc_items_hidden = hidden,
@ -492,6 +493,7 @@ register_chest("chest",
S("Chest"), S("Chest"),
S("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."), S("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."),
chestusage, chestusage,
S("27 inventory slots") .. "\n" .. S("Can be combined to a double chest"),
{ {
small = {"default_chest_top.png", "mcl_chests_chest_bottom.png", small = {"default_chest_top.png", "mcl_chests_chest_bottom.png",
"mcl_chests_chest_right.png", "mcl_chests_chest_left.png", "mcl_chests_chest_right.png", "mcl_chests_chest_left.png",
@ -522,6 +524,7 @@ register_chest("trapped_chest",
S("Trapped Chest"), S("Trapped Chest"),
S("A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other."), S("A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other."),
chestusage, chestusage,
S("27 inventory slots") .. "\n" .. S("Can be combined to a double chest") .. "\n" .. S("Emits a redstone signal when opened"),
traptiles, traptiles,
nil, nil,
{receptor = { {receptor = {
@ -560,7 +563,7 @@ register_chest("trapped_chest",
) )
register_chest("trapped_chest_on", register_chest("trapped_chest_on",
nil, nil, nil, traptiles, true, nil, nil, nil, nil, traptiles, true,
{receptor = { {receptor = {
state = mesecon.state.on, state = mesecon.state.on,
rules = trapped_chest_mesecons_rules, rules = trapped_chest_mesecons_rules,
@ -643,6 +646,7 @@ minetest.register_craft({
minetest.register_node("mcl_chests:ender_chest", { minetest.register_node("mcl_chests:ender_chest", {
description = S("Ender Chest"), description = S("Ender Chest"),
_tt_help = S("27 interdimensional inventory slots") .. "\n" .. S("Put items inside, retrieve them from any other ender chest"),
_doc_items_longdesc = S("Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players."), _doc_items_longdesc = S("Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players."),
_doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."), _doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."),
tiles = {"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png", tiles = {"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png",
@ -756,6 +760,7 @@ for color, desc in pairs(boxtypes) do
minetest.register_node("mcl_chests:"..color.."_shulker_box", { minetest.register_node("mcl_chests:"..color.."_shulker_box", {
description = desc, description = desc,
_tt_help = S("27 inventory slots") .. "\n" .. S("Can be carried around with its contents"),
_doc_items_create_entry = create_entry, _doc_items_create_entry = create_entry,
_doc_items_entry_name = entry_name, _doc_items_entry_name = entry_name,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,