File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2- import fs from 'fs' ;
3- import path from 'path' ;
42import { spawn } from 'child_process' ;
3+ import fs from 'fs' ;
54import { platform } from 'os' ;
5+ import path from 'path' ;
66
77const 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
You can’t perform that action at this time.
0 commit comments