fix killing nonexistent sprites

This commit is contained in:
2022-09-07 01:12:02 +00:00
parent f16c06b1c3
commit 9d16e26b88
2 changed files with 5 additions and 4 deletions

View File

@@ -19,9 +19,11 @@
(dictSet sprites e.id sprite)))
->[archive e &opt ui]
{
(.kill (dictGet sprites e.id))
(playState.entryGroup.remove (dictGet sprites e.id))
(sprites.remove e.id)
(whenLet [sprite (dictGet sprites e.id)]
(sprite.kill)
(playState.entryGroup.remove sprite)
(sprites.remove e.id))
// When an Entry is hidden, we can bet the user doesn't want it selected anymore
(controller.DeSelectEntry e)
}))

View File

@@ -19,7 +19,6 @@ import flixel.addons.plugin.FlxMouseControl;
import flixel.input.mouse.FlxMouseEventManager;
using StringTools;
using kiss_flixel.CameraTools;
import kiss_flixel.KeyShortcutWindow;
import kiss_tools.KeyShortcutHandler;
import kiss_tools.FlxKeyShortcutHandler;
import nat.systems.PlaygroundSystem;