HaJaeKyung / KittyExtension

Fan add-on for https://www.cryptokitties.co
MIT License
232 stars 88 forks source link

Implementing virginity & cooldown index indicators #13

Open VesterDe opened 6 years ago

VesterDe commented 6 years ago

Virginity is a simple check (!data.children.length), same goes for cooldown index (data.status.cooldown_index), but I'm wondering how to implement it with caching in mind. It can't be permanently cached, because it can change rather quickly.

Perhaps a separate system for these two attributes, so that cattributes are loaded rapidly from localStorage and Virginity/CDI are calculated on the fly?

HaJaeKyung commented 6 years ago

I think the best that can be done is to look at the table and cooldown name to determine which can certainly not be virgin and only check the ones that could be maybe.