Skip to content

Commit 1876213

Browse files
authored
Merge pull request #36 from karst/consistency
Update folder naming consistency
2 parents b8f33be + d6e9ba6 commit 1876213

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

build.mjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env node
2-
import fs from 'fs';
3-
import path from 'path';
42
import { spawn } from 'child_process';
3+
import fs from 'fs';
54
import { platform } from 'os';
5+
import path from 'path';
66

77
const verbose = process.argv.indexOf('--verbose') != -1;
88

@@ -48,12 +48,14 @@ async function createAssetPack(filename) {
4848
for (let obj of root.objects) {
4949
for (let i = 0; i < obj.samples.length; i++) {
5050
const sample = obj.samples[i];
51-
const newFilename = `${sampleIndex}.ogg`;
52-
const srcPath = path.join(dir, sample);
53-
const dstPath = path.join(workDir, newFilename);
54-
await encodeMusicTrack(dstPath, srcPath);
55-
obj.samples[i] = newFilename;
56-
sampleIndex++;
51+
if (sample != "" && !sample.startsWith('$')) {
52+
const newFilename = `${sampleIndex}.ogg`;
53+
const srcPath = path.join(dir, sample);
54+
const dstPath = path.join(workDir, newFilename);
55+
await encodeMusicTrack(dstPath, srcPath);
56+
obj.samples[i] = newFilename;
57+
sampleIndex++;
58+
}
5759
}
5860
}
5961

File renamed without changes.
File renamed without changes.
File renamed without changes.

openrct2.music.cover.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
{
66
"id": "rct2.music.ragtime",
77
"samples": [
8-
"cover/ragtime/searchlight_rag.flac"
8+
"cover/rct2.music.ragtime/searchlight_rag.flac"
99
]
1010
},
1111
{
1212
"id": "rct2.music.fairground",
1313
"samples": [
14-
"cover/openrct2.music.fairground/das_alpenhorn.flac",
15-
"cover/openrct2.music.fairground/slavonic_dance.flac"
14+
"$[0..4]",
15+
"cover/rct2.music.fairground/slavonic_dance.flac",
16+
"$[0..0]",
17+
"cover/rct2.music.fairground/das_alpenhorn.flac",
18+
"$[0..4]"
1619
]
1720
}
1821
],

0 commit comments

Comments
 (0)