diff --git a/Nasal/crash-and-stress-custom.nas b/Nasal/crash-and-stress-custom.nas new file mode 100644 index 00000000..daba3f88 --- /dev/null +++ b/Nasal/crash-and-stress-custom.nas @@ -0,0 +1,22 @@ +# use: +var crashCode = nil; +var crash_start = func { + removelistener(lsnr); + crashCode = CrashAndStress.new([0,1,2]); + crashCode.start(); +} + +var lsnr = setlistener("sim/signals/fdm-initialized", crash_start); + +# test: +var repair = func { + crashCode.repair(); +}; + +var exp = func { + crashCode.abandon(); +}; + +var eject = func { + crashCode.eject(); +}; \ No newline at end of file diff --git a/Nasal/crash-and-stress.nas b/Nasal/crash-and-stress.nas index 45b324e3..28008a4e 100644 --- a/Nasal/crash-and-stress.nas +++ b/Nasal/crash-and-stress.nas @@ -576,25 +576,3 @@ var yaSimProp = { # Remember to add sounds and to add the sound properties as custom signals to the replay recorder. -# use: -var crashCode = nil; -var crash_start = func { - removelistener(lsnr); - crashCode = CrashAndStress.new([0,1,2]); - crashCode.start(); -} - -var lsnr = setlistener("sim/signals/fdm-initialized", crash_start); - -# test: -var repair = func { - crashCode.repair(); -}; - -var exp = func { - crashCode.abandon(); -}; - -var eject = func { - crashCode.eject(); -}; \ No newline at end of file diff --git a/f16-base.xml b/f16-base.xml index 617d9858..d2a69e5a 100644 --- a/f16-base.xml +++ b/f16-base.xml @@ -1630,6 +1630,7 @@ Aircraft/f16/Nasal/crash-and-stress.nas + Aircraft/f16/Nasal/crash-and-stress-custom.nas Aircraft/f16/Nasal/mig28.nas diff --git a/oprf-versions.json b/oprf-versions.json index 802aaafa..025fd730 100644 --- a/oprf-versions.json +++ b/oprf-versions.json @@ -46,5 +46,9 @@ "hack-canvas": { "version": null, "path": "Nasal/hackCanvas.nas" + }, + "crash-and-stress": { + "version": null, + "path": "Nasal/crash-and-stress.nas" } } \ No newline at end of file