weatherfactory / cultistsimulator-visible

Read-only preview builds of Cultist Simulator for the convenience of modders and the curious.
https://weatherfactory.biz/cultist-simulator/
37 stars 5 forks source link

Reactivating aspect caching #171

Closed alexiskennedy closed 2 years ago

alexiskennedy commented 2 years ago

[Chelnpoque] I suggest changing the method again so there are two dictionaries - "cachedAspects" and "operableAspects"; the first one is properly cached, but is never returned; instead, we apply its contents to operableAspects each time, and add "self-aspects" when includeSelf = true, and multiply by quantity when includeQuantity = true This way creation of a new dictionary each time can be avoided, with a downside that if two GetAspects() with different params are called in a single execution block, they'll be mixed up (edited)

Chelnoque commented 2 years ago

Complete in Galanthus.