Add plugin to track enhancing#146
Conversation
This plugin will track enhancing activities while the player is online. It will track their successes, failures, consumed items, and highest level hit. It will reset when the item being enhanced changes, or if the player stops enhancing and then returns to a previous item. It won't reset otherwise.
There was a problem hiding this comment.
I want MooLite to be able to run on any game content, such that I need to change as little as possible on game updates. While not having to cast to an ActionHrid may seem nice, there is no guarantee this list is correct. Now our code is lying about not having to be casted, and code should never lie!
There was a problem hiding this comment.
I've reverted the change to ActionHrid, and have the code casting to ActionHrid instead
There was a problem hiding this comment.
Maybe a topic for another time, but since TypeScript only helps us write safer code and won't impact how MooLite runs when the game updates, it might be worth considering something like
- typing *Hrid as
stringinstead since we're getting no safety out of it right now - or treating *Hrid definitions as generatable (like gql tends to do https://www.apollographql.com/docs/apollo-server/workflow/generate-types/)
- or asking if we can get an endpoint on MWI that serves up client JSON that we can pull to avoid having to manually update
| const itemPostfix = split[split.length - 1]; | ||
| // TODO(@Isha): Research how these CDN resource urls are generated | ||
| return `/static/media/items_sprite.951ef1ec.svg#${itemPostfix}`; | ||
| return `/static/media/items_sprite.018a3c6e.svg#${itemPostfix}`; |
There was a problem hiding this comment.
Have you figured out how these work? :p
There was a problem hiding this comment.
No idea :D
It does get icons to render again for a while though
Overview
This plugin will track enhancing activities while the player is online. It will track their successes, failures, consumed items, and highest level hit. It will reset when the item being enhanced changes, or if the player stops enhancing and then returns to a previous item. It won't reset otherwise.
Also defined types for
ActionHridso I could search them without having to cast from string to ActionHrid (🤢). Could probably do with doing the same for ItemHrid etc. While dynamically loading the data is cool, it makes typing next to impossible, and it's a quick update to fix the hrids.Also also updated SVG path
Testing
Just start enhancing and watch the numbers go
Screenshots