Skip to content

Add plugin to track enhancing#146

Open
seashairo wants to merge 7 commits into
Ishadijcks:developfrom
seashairo:feature/enhancing-tracker
Open

Add plugin to track enhancing#146
seashairo wants to merge 7 commits into
Ishadijcks:developfrom
seashairo:feature/enhancing-tracker

Conversation

@seashairo
Copy link
Copy Markdown
Contributor

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 ActionHrid so 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

image
image

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.
Comment thread src/MooLite/core/MooLite.ts
Comment thread src/MooLite/core/server/clientmessages/ClientMessageType.ts
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted the change to ActionHrid, and have the code casting to ActionHrid instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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}`;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you figured out how these work? :p

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea :D
It does get icons to render again for a while though

@seashairo seashairo requested a review from Ishadijcks February 11, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants