catch lingering text files in assets folder

This commit is contained in:
2023-07-21 07:22:18 -06:00
parent 3428f7a38f
commit dc5819b102

View File

@@ -104,7 +104,10 @@
(newSong name song)))
(method newFlxVoiceTrack [name wavPath jsonPath]
(newVoiceTrack name (FlxG.sound.load wavPath) (openfl.utils.Assets.getText jsonPath)))
(try
(let [text (openfl.utils.Assets.getText jsonPath)]
(newVoiceTrack name (FlxG.sound.load wavPath) text))
(catch [e] (print "WARNING! no-op newFlxVoiceTrack with $jsonPath"))))
(method newFlxVoiceTracks [:Array<String> names :Array<String> wavJsonPaths]
(doFor name names