mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 13:36:15 -04:00
wip
This commit is contained in:
parent
9716235531
commit
0a1d9dfe2f
18 changed files with 2391 additions and 1981 deletions
|
@ -165,10 +165,7 @@ export async function editRawLevelList(nth: number, color = "W") {
|
|||
text: t("editor.editing.copy"),
|
||||
value: "copy",
|
||||
help: t("editor.editing.copy_help"),
|
||||
disabled:
|
||||
!level.name ||
|
||||
!level.credit ||
|
||||
bricks.filter((b) => b !== "_").length < 6,
|
||||
|
||||
},
|
||||
{
|
||||
text: t("editor.editing.bigger"),
|
||||
|
@ -253,14 +250,14 @@ export async function editRawLevelList(nth: number, color = "W") {
|
|||
return;
|
||||
}
|
||||
if (action === "copy") {
|
||||
let text = "```\n[" + level.name?.replace(/\[|\]/gi, " ") + "]";
|
||||
let text = "```\n[" + (level.name||'unnamed level')?.replace(/\[|\]/gi, " ") + "]";
|
||||
bricks.forEach((b, bi) => {
|
||||
if (!(bi % level.size)) text += "\n";
|
||||
text += b;
|
||||
});
|
||||
text +=
|
||||
"\n[" +
|
||||
(level.credit?.replace(/\[|\]/gi, " ") || "Missing credits!") +
|
||||
(level.credit?.replace(/\[|\]/gi, " ") || "Missing credits") +
|
||||
"]\n```";
|
||||
navigator.clipboard.writeText(text);
|
||||
// return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue