Comparing version 2.2.1 to 2.2.2
{ | ||
"name": "demrec", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Demo Recorder Renderer", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -47,13 +47,21 @@ let fs = require('fs') | ||
let cfgs = this.cfg.General.game_cfgs | ||
if (cfgs) { | ||
args.push(`-insert_search_path "${ph.join(DATA, this.game.id + '.vpk')}"`) | ||
cfgs.split(' ').filter(x => x).forEach(x => args.push(`+exec cfgs/${x}`)) | ||
} | ||
let insert = [ph.join(DATA, this.game.id + '.vpk')] | ||
if (cfgs) cfgs.split(' ').filter(x => x).forEach(x => args.push(`+exec cfgs/${x}`)) | ||
let custom = this.cfg.General.game_custom | ||
if (custom) { | ||
let paths = custom.split(',').map(x => ph.resolve(x)).join(',') | ||
args.push(`-insert_search_path "${paths}"`) | ||
let paths = custom.split(',').map(x => ph.resolve(x)) | ||
for (let path of paths) { | ||
if (fs.existsSync(path)) { | ||
if (!fs.statSync(path).isDirectory()) insert.push(path) | ||
else { | ||
let files = fs.readdirSync(path) | ||
files.forEach(file => insert.push(ph.join(path, file))) | ||
} | ||
} | ||
} | ||
} | ||
args.push(`-insert_search_path "${insert.join(',')}"`) | ||
if (opts) args.push(opts) | ||
@@ -60,0 +68,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21522
413