Fix long doc strings

This commit is contained in:
Mikita Wiśniewski 2024-06-21 18:43:12 +07:00 committed by the-real-herowl
parent e771f0e3ff
commit d6d64d8837
3 changed files with 35 additions and 26 deletions

View File

@ -8,7 +8,10 @@ local chestusage = S("To access its inventory, rightclick it. When broken, the i
mcl_chests.register_chest("chest", mcl_chests.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 large chest"), S("27 inventory slots") .. "\n" .. S("Can be combined to a large chest"),
{ {
@ -28,7 +31,11 @@ local traptiles = {
mcl_chests.register_chest("trapped_chest", mcl_chests.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") .. S("27 inventory slots") ..
"\n" .. S("Can be combined to a large chest") .. "\n" .. S("Emits a redstone signal when opened"), "\n" .. S("Can be combined to a large chest") .. "\n" .. S("Emits a redstone signal when opened"),
@ -42,8 +49,9 @@ mcl_chests.register_chest("trapped_chest",
}, },
function(pos, node, clicker) function(pos, node, clicker)
minetest.swap_node(pos, { name = "mcl_chests:trapped_chest_on_small", param2 = node.param2 }) minetest.swap_node(pos, { name = "mcl_chests:trapped_chest_on_small", param2 = node.param2 })
mcl_chests.find_or_create_entity(pos, "mcl_chests:trapped_chest_on_small", { "mcl_chests_trapped.png" }, node.param2, false, mcl_chests.find_or_create_entity(pos, "mcl_chests:trapped_chest_on_small", { "mcl_chests_trapped.png" },
"default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_small") node.param2, false, "default_chest", "mcl_chests_chest", "chest")
:reinitialize("mcl_chests:trapped_chest_on_small")
mesecon.receptor_on(pos, trapped_chest_mesecons_rules) mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
end, end,
function(pos, node, clicker) function(pos, node, clicker)
@ -51,8 +59,9 @@ mcl_chests.register_chest("trapped_chest",
meta:set_int("players", 1) meta:set_int("players", 1)
minetest.swap_node(pos, { name = "mcl_chests:trapped_chest_on_left", param2 = node.param2 }) minetest.swap_node(pos, { name = "mcl_chests:trapped_chest_on_left", param2 = node.param2 })
mcl_chests.find_or_create_entity(pos, "mcl_chests:trapped_chest_on_left", mcl_chests.tiles.chest_trapped_double, node.param2, true, mcl_chests.find_or_create_entity(pos, "mcl_chests:trapped_chest_on_left",
"default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left") mcl_chests.tiles.chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest",
"chest"):reinitialize("mcl_chests:trapped_chest_on_left")
mesecon.receptor_on(pos, trapped_chest_mesecons_rules) mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left") local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left")
@ -66,9 +75,9 @@ mcl_chests.register_chest("trapped_chest",
mesecon.receptor_on(pos, trapped_chest_mesecons_rules) mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
minetest.swap_node(pos_other, { name = "mcl_chests:trapped_chest_on_left", param2 = node.param2 }) minetest.swap_node(pos_other, { name = "mcl_chests:trapped_chest_on_left", param2 = node.param2 })
mcl_chests.find_or_create_entity(pos_other, "mcl_chests:trapped_chest_on_left", mcl_chests.tiles.chest_trapped_double, node.param2, mcl_chests.find_or_create_entity(pos_other, "mcl_chests:trapped_chest_on_left",
true, mcl_chests.tiles.chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest",
"default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left") "chest"):reinitialize("mcl_chests:trapped_chest_on_left")
mesecon.receptor_on(pos_other, trapped_chest_mesecons_rules) mesecon.receptor_on(pos_other, trapped_chest_mesecons_rules)
end end
) )

View File

@ -2,12 +2,12 @@ local S = minetest.get_translator(minetest.get_current_modname())
local F = minetest.formspec_escape local F = minetest.formspec_escape
local C = minetest.colorize local C = minetest.colorize
local longdesc = S([[ local longdesc = S(
Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This "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 "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 "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. "not the items of other players."
]]) )
minetest.register_node("mcl_chests:ender_chest", { minetest.register_node("mcl_chests:ender_chest", {
description = S("Ender Chest"), description = S("Ender Chest"),

View File

@ -83,17 +83,17 @@ for color, desc in pairs(boxtypes) do
local longdesc, usagehelp, create_entry, entry_name local longdesc, usagehelp, create_entry, entry_name
if doc then if doc then
if is_canonical then if is_canonical then
longdesc = S([[ longdesc = S(
A shulker box is a portable container which provides 27 inventory slots for any item "A shulker box is a portable container which provides 27 inventory slots for any item " ..
except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes "except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes " ..
as well as their contents can be taken as a single item. Shulker boxes come in many "as well as their contents can be taken as a single item. Shulker boxes come in many " ..
different colors. "different colors."
]]) )
usagehelp = S([[ usagehelp = S(
To access the inventory of a shulker box, place and right-click it. To take a shulker "To access the inventory of a shulker box, place and right-click it. To take a shulker " ..
box and its contents with you, just break and collect it, the items will not fall out. "box and its contents with you, just break and collect it, the items will not fall out. " ..
Place the shulker box again to be able to retrieve its contents. "Place the shulker box again to be able to retrieve its contents."
]]) )
entry_name = S("Shulker Box") entry_name = S("Shulker Box")
else else
create_entry = false create_entry = false