Remove unnecessary save from PlaygroundSystem

This commit is contained in:
2023-04-12 07:25:01 -06:00
parent ba096e6a60
commit bcad4984bd

View File

@@ -44,9 +44,10 @@
(when (catsMatch e .catsMatch (dictGet archive.playgrounds _playgroundKey))
(when !(hasComponent e Positions)
(addComponent archive e Positions (new Map)))
(withWritableComponents archive e [positions Positions]
(let [positions (readComponent e Positions)]
(when !(positions.exists _playgroundKey)
(dictSet positions _playgroundKey (defaultPosition e))))
(withWritableComponents archive e [positions Positions]
(dictSet positions _playgroundKey (defaultPosition e)))))
(let [pos (dictGet (readComponent e Positions) _playgroundKey)]
(processor archive e pos ui)))))
(set this.onRemoveEntry