NAT playground run systems when changes are made

This commit is contained in:
2021-09-30 16:35:17 -06:00
parent 0afdbac3f3
commit f48cf658ec
2 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
->[archive e]
?(and (tagsMatch archive e tagFilterString) (hasComponent e Images))
->[archive e]
{
(unless (sprites.exists e.id)
(when !(hasComponent e Positions)
(addComponent archive e Positions (new Map)))
(withWritableComponents archive e [positions Positions]
@@ -18,8 +18,7 @@
(dictSet positions positionKey (object x 0.0 y 0.0 z 0.0))))
(let [sprite (new EntrySprite positionKey archive e controller)]
(playState.entryGroup.add sprite)
(dictSet sprites e.id sprite))
})
(dictSet sprites e.id sprite))))
(set onRemoveEntry
->[archive e]

View File

@@ -169,7 +169,8 @@
(method handleChanges [:Archive archive :ChangeSet changeSet]
(doFor e changeSet
// TODO process the WikipediaImageSystem and run spriteSystem process on newly created entries that get one
// process the WikipediaImageSystem and run spriteSystem process on newly created entries that get one
(archive.processSystems)
// Entries whose data changed to remove them from the sprite pool will already have been removed
// by refreshEntry()