better (but still broken) removal from playgrounds

This commit is contained in:
2022-07-05 14:55:49 +00:00
parent 4a379e00ba
commit 81ae02a58d
4 changed files with 17 additions and 14 deletions

View File

@@ -328,4 +328,10 @@
(defCommand SwitchPlayground [name (Text null)]
(archive.changePlaygrounds ->:Void [:DynamicAccess<Dynamic> p] (dictSet p "default" name))
(when playgroundSystem (playgroundSystem.switchPlaygroundKey name))))
(when playgroundSystem (playgroundSystem.switchPlaygroundKey name)))
(defCommand RemoveFromPlayground [entries (SelectedEntries 1 null)]
(for e entries
(when (hasComponent e Positions)
(withWritableComponents archive e [positions Positions]
(positions.remove (dictGet archive.playgrounds "default")))) e)))