@@ -7,17 +7,22 @@ import { Beco } from './beco';
7
7
8
8
let parseArgs = require ( 'minimist' ) ;
9
9
let argv = parseArgs ( process . argv ) ;
10
- if ( ! argv . e || ! argv . r ) {
11
- console . log ( "Error: Must specify paths to directories with " ) ;
10
+ const validRomfsArgs = ( argv . e && argv . r ) ;
11
+ const validFolderArgs = ( argv . e && argv . b && argv . d ) ;
12
+ if ( ! validRomfsArgs && ! validFolderArgs ) {
13
+ console . log ( "Error: Must specify paths to directories with -e and either -r or (-b and -d)" ) ;
14
+ console . log ( " -d Banc extracted YAML files" ) ;
15
+ console . log ( " -b field map area beco files" ) ;
12
16
console . log ( " -e Ecosystem json files" ) ;
13
17
console . log ( " -r Bare game romfs" ) ;
14
- console . log ( " e.g. % ts-node build.ts -r path/to/romfs -e tools" )
18
+ console . log ( " e.g. % ts-node build.ts -d path/to/Banc -b path/to/beco -e path/to/Ecosystem" )
19
+ console . log ( " or: % ts-node build.ts -r path/to/romfs -e path/to/Ecosystem" )
15
20
process . exit ( 1 ) ;
16
21
}
17
22
const ecoPath = argv . e ;
18
23
const romfsPath = argv . r ;
19
- const totkData = path . join ( romfsPath , 'Banc' ) ;
20
- const becoPath = path . join ( romfsPath , 'Ecosystem' , 'FieldMapArea' ) ;
24
+ const totkData = argv . d || path . join ( romfsPath , 'Banc' ) ;
25
+ const becoPath = argv . b || path . join ( romfsPath , 'Ecosystem' , 'FieldMapArea' ) ;
21
26
22
27
fs . rmSync ( 'map.db.tmp' , { force : true } ) ;
23
28
const db = sqlite3 ( 'map.db.tmp' ) ;
0 commit comments