Skip to content

Commit 44bc1ee

Browse files
author
ozelot379
committed
WIP
1 parent 8258ffb commit 44bc1ee

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎src/converter/AtlasConverter.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AtlasConverter extends AbstractConverter {
1616
let image = null;
1717

1818
for (let i = 0; i <= count; i++) {
19-
const step = base + (i.toString().padStart(2, "0") + ".png");
19+
const step = base + `${i.toString().padStart(2, "0")}.png`;
2020

2121
if (!await this.output.exists(step)) {
2222
continue;

‎src/converter/BarConverter.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class BarConverter extends AbstractConverter {
2727
};
2828

2929
for (const [to, colorize] of tos) {
30-
const to_png = to + ".png";
30+
const to_png = `${to}.png`;
3131
this.log.log(`Convert bar ${to_png}`);
3232
await this.writeImage(to_png, image.clone().colorize(colorize));
3333

34-
await this.writeJson(to + ".json", metadata);
34+
await this.writeJson(`${to}.json`, metadata);
3535
}
3636
}
3737

‎src/converter/DialogConverter.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class DialogConverter extends AbstractConverter {
5454
base_size: [(to_image.getWidth() / factor), (to_image.getHeight() / factor)]
5555
};
5656

57-
const to_png = to + ".png";
57+
const to_png = `${to}.png`;
5858
this.log.log(`Convert dialog ${to_png} (Experimental)`);
5959
await this.writeImage(to_png, to_image);
6060

61-
await this.writeJson(to + ".json", metadata);
61+
await this.writeJson(`${to}.json`, metadata);
6262
}
6363
}
6464

‎src/converter/NineSliceConverter.mjs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class NineSliceConverter extends AbstractConverter {
3737
};
3838

3939
for (const to of tos) {
40-
const to_png = to + ".png";
40+
const to_png = `${to}.png`;
4141
this.log.log(`Convert button ${to_png} (Experimental)`);
4242
await this.writeImage(to_png, image);
4343

44-
await this.writeJson(to + ".json", metadata);
44+
await this.writeJson(`${to}.json`, metadata);
4545
}
4646
}
4747

@@ -51,11 +51,11 @@ class NineSliceConverter extends AbstractConverter {
5151
base_size: [1, 1]
5252
};
5353
for (const to of borders) {
54-
const to_png = to + ".png";
54+
const to_png = `${to}.png`;
5555
this.log.log(`Convert button ${to_png} (Experimental)`);
5656
await this.writeImage(to_png, transparent_image);
5757

58-
await this.writeJson(to + ".json", transparent_image_metadata);
58+
await this.writeJson(`${to}.json`, transparent_image_metadata);
5959
}
6060

6161
return [];

‎src/output/FileOutput.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class FileOutput extends BlobOutput {
1010
async generate() {
1111
const data = await super.generate();
1212

13-
const name = ((await this.input.getName()) + ".mcpack");
13+
const name = `${await this.input.getName()}.mcpack`;
1414

1515
if (typeof File !== "undefined") {
1616
this.log.log(`Generate ${File.name} zip`);

0 commit comments

Comments
 (0)