forked from VoxeLibre/VoxeLibre
Squash help entries of beds
This commit is contained in:
parent
8636b94c74
commit
423d5f8ab8
|
@ -66,6 +66,8 @@ function mcl_beds.register_bed(name, def)
|
||||||
description = def.description,
|
description = def.description,
|
||||||
_doc_items_longdesc = def._doc_items_longdesc or beddesc,
|
_doc_items_longdesc = def._doc_items_longdesc or beddesc,
|
||||||
_doc_items_usagehelp = def._doc_items_usagehelp or beduse,
|
_doc_items_usagehelp = def._doc_items_usagehelp or beduse,
|
||||||
|
_doc_items_create_entry = def._doc_items_create_entry,
|
||||||
|
_doc_items_entry_name = def._doc_items_entry_name,
|
||||||
inventory_image = def.inventory_image,
|
inventory_image = def.inventory_image,
|
||||||
wield_image = def.wield_image,
|
wield_image = def.wield_image,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
local S = minetest.get_translator("mcl_beds")
|
local S = minetest.get_translator("mcl_beds")
|
||||||
|
local mod_doc = minetest.get_modpath("doc")
|
||||||
|
|
||||||
local nodebox = {
|
local nodebox = {
|
||||||
bottom = {
|
bottom = {
|
||||||
|
@ -32,9 +33,11 @@ local colors = {
|
||||||
{ "light_blue", S("Light Blue Bed"), "mcl_wool:light_blue", "mcl_dye:lightblue" },
|
{ "light_blue", S("Light Blue Bed"), "mcl_wool:light_blue", "mcl_dye:lightblue" },
|
||||||
{ "white", S("White Bed"), "mcl_wool:white", "mcl_dye:white" },
|
{ "white", S("White Bed"), "mcl_wool:white", "mcl_dye:white" },
|
||||||
}
|
}
|
||||||
|
local canonical_color = "red"
|
||||||
|
|
||||||
for c=1, #colors do
|
for c=1, #colors do
|
||||||
local colorid = colors[c][1]
|
local colorid = colors[c][1]
|
||||||
|
local is_canonical = colorid == canonical_color
|
||||||
|
|
||||||
-- Recoloring recipe for white bed
|
-- Recoloring recipe for white bed
|
||||||
if minetest.get_modpath("mcl_dye") then
|
if minetest.get_modpath("mcl_dye") then
|
||||||
|
@ -54,9 +57,19 @@ for c=1, #colors do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local entry_name, create_entry
|
||||||
|
if mod_doc then
|
||||||
|
if is_canonical then
|
||||||
|
entry_name = S("Bed")
|
||||||
|
else
|
||||||
|
create_entry = false
|
||||||
|
end
|
||||||
|
end
|
||||||
-- Register bed
|
-- Register bed
|
||||||
mcl_beds.register_bed("mcl_beds:bed_"..colorid, {
|
mcl_beds.register_bed("mcl_beds:bed_"..colorid, {
|
||||||
description = colors[c][2],
|
description = colors[c][2],
|
||||||
|
_doc_items_entry_name = entry_name,
|
||||||
|
_doc_items_create_entry = create_entry,
|
||||||
inventory_image = "mcl_beds_bed_"..colorid..".png",
|
inventory_image = "mcl_beds_bed_"..colorid..".png",
|
||||||
wield_image = "mcl_beds_bed_"..colorid..".png",
|
wield_image = "mcl_beds_bed_"..colorid..".png",
|
||||||
tiles = {
|
tiles = {
|
||||||
|
@ -89,6 +102,10 @@ for c=1, #colors do
|
||||||
},
|
},
|
||||||
recipe = main_recipe,
|
recipe = main_recipe,
|
||||||
})
|
})
|
||||||
|
if mod_doc and not is_canonical then
|
||||||
|
doc.add_entry_alias("nodes", "mcl_beds:bed_"..canonical_color.."_bottom", "nodes", "mcl_beds:bed_"..colorid.."_bottom")
|
||||||
|
doc.add_entry_alias("nodes", "mcl_beds:bed_"..canonical_color.."_bottom", "nodes", "mcl_beds:bed_"..colorid.."_top")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,3 +6,4 @@ mcl_dye?
|
||||||
mcl_tnt?
|
mcl_tnt?
|
||||||
mcl_weather?
|
mcl_weather?
|
||||||
mcl_spawn?
|
mcl_spawn?
|
||||||
|
doc?
|
||||||
|
|
|
@ -5,6 +5,7 @@ You have heard of other worlds in which a bed would set the start point for your
|
||||||
By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=Indem Sie ein Bett benutzen, setzen Sie den Startpunkt Ihres nächsten Lebens. Wenn Sie sterben, werden Sie Ihr nächstes Leben auf diesem Bett beginnen, es sei denn, es ist blockiert oder zerstört.
|
By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=Indem Sie ein Bett benutzen, setzen Sie den Startpunkt Ihres nächsten Lebens. Wenn Sie sterben, werden Sie Ihr nächstes Leben auf diesem Bett beginnen, es sei denn, es ist blockiert oder zerstört.
|
||||||
In this world, going to bed won't skip the night, but it will skip thunderstorms.=In dieser Welt können mit dem Bett Nächte nicht übersprungen werden, nur Gewitterstürme.
|
In this world, going to bed won't skip the night, but it will skip thunderstorms.=In dieser Welt können mit dem Bett Nächte nicht übersprungen werden, nur Gewitterstürme.
|
||||||
Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=Mit Schlaf können Sie die Nacht überspringen. Die Nacht wird übersprungen, wenn alle Spieler in dieser Welt sich schlafen gelegt haben. Die Nacht wird dann nach ein paar Sekunden übersprungen. Gewitterstürme werden auf die gleiche Weise übersprungen.
|
Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=Mit Schlaf können Sie die Nacht überspringen. Die Nacht wird übersprungen, wenn alle Spieler in dieser Welt sich schlafen gelegt haben. Die Nacht wird dann nach ein paar Sekunden übersprungen. Gewitterstürme werden auf die gleiche Weise übersprungen.
|
||||||
|
Bed=Bett
|
||||||
Red Bed=Rotes Bett
|
Red Bed=Rotes Bett
|
||||||
Blue Bed=Blaues Bett
|
Blue Bed=Blaues Bett
|
||||||
Cyan Bed=Türkises Bett
|
Cyan Bed=Türkises Bett
|
||||||
|
|
|
@ -5,6 +5,7 @@ You have heard of other worlds in which a bed would set the start point for your
|
||||||
By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=
|
By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=
|
||||||
In this world, going to bed won't skip the night, but it will skip thunderstorms.=
|
In this world, going to bed won't skip the night, but it will skip thunderstorms.=
|
||||||
Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=
|
Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=
|
||||||
|
Bed=
|
||||||
Red Bed=
|
Red Bed=
|
||||||
Blue Bed=
|
Blue Bed=
|
||||||
Cyan Bed=
|
Cyan Bed=
|
||||||
|
|
Loading…
Reference in New Issue