Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract common functionality from Features #64

Merged

Conversation

magicus
Copy link
Member

@magicus magicus commented May 17, 2022

I've looked through all Features (except ItemStatInfoFeature which deserves separate treatment), and extracted functionality that is not super tightly tied to that Feature into common Util classes. I've not tried too hard at this point to generalize the functionality, or to put it in the right spot, but just to increase visibility for the functionality.

Two such methods were similar enough that I decided to merge them. But this was a bit tricky and I decided to leave out any further such generalizations from this PR.

The guiding star for this change has once again been that the features should read like natural language, describing what they do in terms of wynncraft and minecraft "DSL" APIs. I think this has mostly succeeded, in that the Features contain more or less the exact amount of knowledge. What is still missing is shaping up these APIs. They are quite ad-hoc right now, a bunch of util methods roughly grouped per area.

I've also rewritten the emerald pouch search logic in EmeraldPouchHotkeyFeature, and refactored a bit wrt McUtil.

@magicus magicus merged commit 851da43 into Wynntils:main May 18, 2022
@magicus magicus deleted the extract-general-functionality-from-features branch May 18, 2022 10:40
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.

4 participants