add connections in NAT playground

This commit is contained in:
2022-09-08 01:17:00 +00:00
parent d328bc8227
commit 8e5fde91fb
5 changed files with 32 additions and 6 deletions

View File

@@ -336,8 +336,11 @@
(archive.changePlaygrounds ->:Void [:DynamicAccess<Dynamic> p] (dictSet p "default" name))
(when playgroundSystem (playgroundSystem.switchPlaygroundKey name)))
(defCommand RemoveFromPlayground [entries (SelectedEntries 1 null)]
(defCommand AddConnections [entries (SelectedEntries 1 null) entriesToConnect (Entries 1 null)]
(for e entries
(when (hasComponent e Positions)
(withWritableComponents archive e [positions Positions]
(positions.remove (dictGet archive.playgrounds "default")))) e)))
(addConnections archive e entriesToConnect)))
(defCommand RemoveConnections [entries (SelectedEntries 1 null) entriesToRemove (Entries 1 null)]
(for e entries
(addConnections archive e entriesToRemove)))
)