@@ -25,7 +25,9 @@ export class VideoCommand extends Command {
25
25
private readonly widthFlag = 'width' ;
26
26
private readonly heightFlag = 'height' ;
27
27
private readonly closeGameAfterRecordingFlag = 'close-game-after-recording' ;
28
+ private readonly noCloseGameAfterRecordingFlag = 'no-close-game-after-recording' ;
28
29
private readonly concatenateSequencesFlag = 'concatenate-sequences' ;
30
+ private readonly noConcatenateSequencesFlag = 'no-concatenate-sequences' ;
29
31
private readonly encoderSoftwareFlag = 'encoder-software' ;
30
32
private readonly recordingSystemFlag = 'recording-system' ;
31
33
private readonly recordingOutputFlag = 'recording-output' ;
@@ -37,8 +39,11 @@ export class VideoCommand extends Command {
37
39
private readonly ffmpegInputParametersFlag = 'ffmpeg-input-parameters' ;
38
40
private readonly ffmpegOutputParametersFlag = 'ffmpeg-output-parameters' ;
39
41
private readonly showXRayFlag = 'show-x-ray' ;
42
+ private readonly noShowXRayFlag = 'no-show-x-ray' ;
40
43
private readonly showOnlyDeathNoticesFlag = 'show-only-death-notices' ;
44
+ private readonly noShowOnlyDeathNoticesFlag = 'no-show-only-death-notices' ;
41
45
private readonly playerVoicesFlag = 'player-voices' ;
46
+ private readonly noPlayerVoicesFlag = 'no-player-voices' ;
42
47
private readonly deathNoticesDurationFlag = 'death-notices-duration' ;
43
48
private readonly cfgFlag = 'cfg' ;
44
49
private outputFolderPath : string | undefined ;
@@ -82,7 +87,9 @@ export class VideoCommand extends Command {
82
87
console . log ( ` --${ this . widthFlag } <number>` ) ;
83
88
console . log ( ` --${ this . heightFlag } <number>` ) ;
84
89
console . log ( ` --${ this . closeGameAfterRecordingFlag } ` ) ;
90
+ console . log ( ` --${ this . noCloseGameAfterRecordingFlag } ` ) ;
85
91
console . log ( ` --${ this . concatenateSequencesFlag } ` ) ;
92
+ console . log ( ` --${ this . noConcatenateSequencesFlag } ` ) ;
86
93
console . log ( ` --${ this . encoderSoftwareFlag } <string> (FFmpeg or VirtualDub)` ) ;
87
94
console . log ( ` --${ this . recordingSystemFlag } <string> (HLAE or CS)` ) ;
88
95
console . log ( ` --${ this . recordingOutputFlag } <string> (video, images, or images-and-video)` ) ;
@@ -94,8 +101,11 @@ export class VideoCommand extends Command {
94
101
console . log ( ` --${ this . ffmpegInputParametersFlag } <string>` ) ;
95
102
console . log ( ` --${ this . ffmpegOutputParametersFlag } <string>` ) ;
96
103
console . log ( ` --${ this . showXRayFlag } ` ) ;
104
+ console . log ( ` --${ this . noShowXRayFlag } ` ) ;
97
105
console . log ( ` --${ this . showOnlyDeathNoticesFlag } ` ) ;
106
+ console . log ( ` --${ this . noShowOnlyDeathNoticesFlag } ` ) ;
98
107
console . log ( ` --${ this . playerVoicesFlag } ` ) ;
108
+ console . log ( ` --${ this . noPlayerVoicesFlag } ` ) ;
99
109
console . log ( ` --${ this . deathNoticesDurationFlag } <number>` ) ;
100
110
console . log ( ` --${ this . cfgFlag } <string>` ) ;
101
111
}
@@ -189,7 +199,9 @@ export class VideoCommand extends Command {
189
199
[ this . widthFlag ] : { type : 'string' } ,
190
200
[ this . heightFlag ] : { type : 'string' } ,
191
201
[ this . closeGameAfterRecordingFlag ] : { type : 'boolean' } ,
202
+ [ this . noCloseGameAfterRecordingFlag ] : { type : 'boolean' } ,
192
203
[ this . concatenateSequencesFlag ] : { type : 'boolean' } ,
204
+ [ this . noConcatenateSequencesFlag ] : { type : 'boolean' } ,
193
205
[ this . encoderSoftwareFlag ] : { type : 'string' } ,
194
206
[ this . recordingSystemFlag ] : { type : 'string' } ,
195
207
[ this . recordingOutputFlag ] : { type : 'string' } ,
@@ -201,8 +213,11 @@ export class VideoCommand extends Command {
201
213
[ this . ffmpegInputParametersFlag ] : { type : 'string' } ,
202
214
[ this . ffmpegOutputParametersFlag ] : { type : 'string' } ,
203
215
[ this . showXRayFlag ] : { type : 'boolean' } ,
216
+ [ this . noShowXRayFlag ] : { type : 'boolean' } ,
204
217
[ this . showOnlyDeathNoticesFlag ] : { type : 'boolean' } ,
218
+ [ this . noShowOnlyDeathNoticesFlag ] : { type : 'boolean' } ,
205
219
[ this . playerVoicesFlag ] : { type : 'boolean' } ,
220
+ [ this . noPlayerVoicesFlag ] : { type : 'boolean' } ,
206
221
[ this . deathNoticesDurationFlag ] : { type : 'string' } ,
207
222
[ this . cfgFlag ] : { type : 'string' } ,
208
223
} ,
@@ -287,35 +302,43 @@ export class VideoCommand extends Command {
287
302
this . height = height ;
288
303
}
289
304
const closeGameAfterRecording = values [ this . closeGameAfterRecordingFlag ] ;
290
- if ( closeGameAfterRecording ) {
305
+ if ( closeGameAfterRecording !== undefined ) {
291
306
this . closeGameAfterRecording = true ;
292
307
}
308
+ const noCloseGameAfterRecording = values [ this . noCloseGameAfterRecordingFlag ] ;
309
+ if ( noCloseGameAfterRecording !== undefined ) {
310
+ this . closeGameAfterRecording = false ;
311
+ }
293
312
const concatenateSequences = values [ this . concatenateSequencesFlag ] ;
294
- if ( concatenateSequences ) {
313
+ if ( concatenateSequences !== undefined ) {
295
314
this . concatenateSequences = true ;
296
315
}
316
+ const noConcatenateSequences = values [ this . noConcatenateSequencesFlag ] ;
317
+ if ( noConcatenateSequences !== undefined ) {
318
+ this . concatenateSequences = false ;
319
+ }
297
320
const encoderSoftware = values [ this . encoderSoftwareFlag ] ;
298
- if ( encoderSoftware ) {
321
+ if ( encoderSoftware !== undefined ) {
299
322
if ( ! isValidEncoderSoftware ( encoderSoftware ) ) {
300
323
throw new InvalidArgument ( 'Invalid encoder software' ) ;
301
324
}
302
325
this . encoderSoftware = encoderSoftware ;
303
326
}
304
327
const recordingSystem = values [ this . recordingSystemFlag ] ;
305
- if ( recordingSystem ) {
328
+ if ( recordingSystem !== undefined ) {
306
329
if ( ! isValidRecordingSystem ( recordingSystem ) ) {
307
330
throw new InvalidArgument ( 'Invalid recording system' ) ;
308
331
}
309
332
this . recordingSystem = recordingSystem ;
310
333
}
311
334
const recordingOutput = values [ this . recordingOutputFlag ] ;
312
- if ( recordingOutput ) {
335
+ if ( recordingOutput !== undefined ) {
313
336
if ( ! isValidRecordingOutput ( recordingOutput ) ) {
314
337
throw new InvalidArgument ( 'Invalid recording output' ) ;
315
338
}
316
339
this . recordingOutput = recordingOutput ;
317
340
}
318
- if ( values [ this . ffmpegCrfFlag ] ) {
341
+ if ( values [ this . ffmpegCrfFlag ] !== undefined ) {
319
342
const ffmpegCrf = Number ( values [ this . ffmpegCrfFlag ] ) ;
320
343
if ( Number . isNaN ( ffmpegCrf ) ) {
321
344
throw new InvalidArgument ( 'FFmpeg CRF is not a number' ) ;
@@ -325,7 +348,7 @@ export class VideoCommand extends Command {
325
348
}
326
349
this . ffmpegCrf = ffmpegCrf ;
327
350
}
328
- if ( values [ this . ffmpegAudioBitrateFlag ] ) {
351
+ if ( values [ this . ffmpegAudioBitrateFlag ] !== undefined ) {
329
352
const ffmpegAudioBitrate = Number ( values [ this . ffmpegAudioBitrateFlag ] ) ;
330
353
if ( Number . isNaN ( ffmpegAudioBitrate ) ) {
331
354
throw new InvalidArgument ( 'FFmpeg audio bitrate is not a number' ) ;
@@ -335,34 +358,49 @@ export class VideoCommand extends Command {
335
358
}
336
359
this . ffmpegAudioBitrate = ffmpegAudioBitrate ;
337
360
}
338
- if ( values [ this . ffmpegVideoCodecFlag ] ) {
361
+ if ( values [ this . ffmpegVideoCodecFlag ] !== undefined ) {
339
362
this . ffmpegVideoCodec = values [ this . ffmpegVideoCodecFlag ] ;
340
363
}
341
364
if ( values [ this . ffmpegAudioCodecFlag ] ) {
342
365
this . ffmpegAudioCodec = values [ this . ffmpegAudioCodecFlag ] ;
343
366
}
344
367
const videoContainer = values [ this . ffmpegVideoContainerFlag ] ;
345
- if ( videoContainer ) {
368
+ if ( videoContainer !== undefined ) {
346
369
if ( ! isValidVideoContainer ( videoContainer ) ) {
347
370
throw new InvalidArgument ( 'Invalid video container' ) ;
348
371
}
349
372
this . ffmpegVideoContainer = videoContainer ;
350
373
}
351
- if ( values [ this . ffmpegInputParametersFlag ] ) {
374
+ if ( values [ this . ffmpegInputParametersFlag ] !== undefined ) {
352
375
this . ffmpegInputParameters = values [ this . ffmpegInputParametersFlag ] ;
353
376
}
354
377
if ( values [ this . ffmpegOutputParametersFlag ] ) {
355
378
this . ffmpegOutputParameters = values [ this . ffmpegOutputParametersFlag ] ;
356
379
}
357
- if ( values [ this . showXRayFlag ] ) {
380
+ const showXRay = values [ this . showXRayFlag ] ;
381
+ if ( showXRay !== undefined ) {
358
382
this . showXRay = true ;
359
383
}
360
- if ( values [ this . showOnlyDeathNoticesFlag ] ) {
384
+ const noShowXRay = values [ this . noShowXRayFlag ] ;
385
+ if ( noShowXRay !== undefined ) {
386
+ this . showXRay = false ;
387
+ }
388
+ const showOnlyDeathNotices = values [ this . showOnlyDeathNoticesFlag ] ;
389
+ if ( showOnlyDeathNotices !== undefined ) {
361
390
this . showOnlyDeathNotices = true ;
362
391
}
363
- if ( values [ this . playerVoicesFlag ] ) {
392
+ const noShowOnlyDeathNotices = values [ this . noShowOnlyDeathNoticesFlag ] ;
393
+ if ( noShowOnlyDeathNotices !== undefined ) {
394
+ this . showOnlyDeathNotices = false ;
395
+ }
396
+ const playerVoices = values [ this . playerVoicesFlag ] ;
397
+ if ( playerVoices !== undefined ) {
364
398
this . playerVoices = true ;
365
399
}
400
+ const noPlayerVoices = values [ this . noPlayerVoicesFlag ] ;
401
+ if ( noPlayerVoices !== undefined ) {
402
+ this . playerVoices = false ;
403
+ }
366
404
if ( values [ this . deathNoticesDurationFlag ] ) {
367
405
const deathNoticesDuration = Number ( values [ this . deathNoticesDurationFlag ] ) ;
368
406
if ( Number . isNaN ( deathNoticesDuration ) ) {
0 commit comments