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

Dynamically update a loot filter #1036

Merged
merged 8 commits into from
Aug 17, 2019

Conversation

thailyn
Copy link
Contributor

@thailyn thailyn commented Jun 16, 2019

This PR adds limited support for updating loot filters after recreating the list of recipes. There are two types of loot filters that can be added: items that are missing for partially-completed same-base-type recipes (that is, having a Normal, Magic, and Rare item of the same base type), with a variant for near-20% quality bases; and items that are chancing bases for builds in the current league.

The configuration for updating the item filters is managed by a Protocol Buffer .proto file. Support has been added for Visual Studio to automatically compile the .proto file into C# classes that are virtually immediately recognized by Visual Studio's error-checking- and intelligence-generating systems. Procurement reads and writes the actual configuration from and to a json file.

Closes #821.

thailyn added 8 commits June 16, 2019 00:12
This class adds filters to a Neversink loot filter file.
The Grpc and Grpc.Tools packages provide the ability for Visual Studio
to automatically compile specified .proto files into C# classes, and the
resulting classes are understood by Visual Studio.
This probably won't be necessary after we can update the config from the
UI, but it is a good guide for while it must be updated manually.
@Stickymaddness
Copy link
Member

Thanks for spending time on this, I'm curious what's the reason behind adding protobuf, I assume the main driver is the autogeneration and error checking?

@thailyn
Copy link
Contributor Author

thailyn commented Jul 21, 2019

Protobufs provide a strongly-typed and easy to understand data structure for storing user data, which can also be written to/read from JSON, with, indeed, automatic parsing and error checking. The generated classes provide typical functions for handling the data. (Personally, I would strongly prefer to use Proto2 syntax instead of Proto3, but that is not supported by the official protobuf C# library, though it is, in my opinion, superior in several aspects.)

@Stickymaddness Stickymaddness merged commit 42111ce into Procurement-PoE:master Aug 17, 2019
@thailyn thailyn deleted the loot-filter branch October 5, 2019 17:57
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.

Recipe-specific dynamic loot-filter customizations
3 participants