Coders-After-Dark / Reskillable

Other
7 stars 17 forks source link

Requirement caching #118

Closed pupnewfster closed 6 years ago

pupnewfster commented 6 years ago

Allows Requirements to be cached and for parts of the cache to be invalidated. All Requirements now require proper cache invalidation handling OR to be added as always getting invalidated using RequirementCache.registerRequirementType

The main benefits of this pull request are that Logic Requirements (especially nested ones) and other complex Requirements (CompatSkills ItemRequirements for example) will not have to recalculate their values (or partial values) unless something has changed. Mainly used for the tooltips as those usually get shown just after checking if the requirement is met so we already know if it is achieved when calculating the colors.

I still need to do more testing before this can be merged. Once [WIP] is removed from the title this pull will be good to go.