fix crash when spaces are in puzzle pack name
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
using StringTools;
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
|
@@ -249,9 +249,14 @@
|
|||||||
FlxColor.GRAY
|
FlxColor.GRAY
|
||||||
])
|
])
|
||||||
|
|
||||||
|
(function nameForSave [:String name]
|
||||||
|
(doFor forbiddenChar (.split #"~%&\;:"',<>?# "# "")
|
||||||
|
(set name (name.replace forbiddenChar "")))
|
||||||
|
name)
|
||||||
|
|
||||||
(method makeRewardSprites [m p currentRewardFile]
|
(method makeRewardSprites [m p currentRewardFile]
|
||||||
(set save (new FlxSave))
|
(set save (new FlxSave))
|
||||||
(save.bind currentRewardFile.path)
|
(assert (save.bind (nameForSave currentRewardFile.path)) "failed to bind save data")
|
||||||
(unless save.data.storedPositions
|
(unless save.data.storedPositions
|
||||||
(set save.data.storedPositions (new Map<Int,FlxPoint>)))
|
(set save.data.storedPositions (new Map<Int,FlxPoint>)))
|
||||||
(unless save.data.storedAngles
|
(unless save.data.storedAngles
|
||||||
|
Reference in New Issue
Block a user