Implement manual pin awarding and pin tests - #918
Merged
Conversation
jvyden
self-requested a review
August 3, 2025 20:05
jvyden
reviewed
Aug 3, 2025
Comment on lines
+16
to
+20
| FrozenSet<long> specialTreatmentPins = | ||
| [ | ||
| (long)ManuallyAwardedPins.TopXOfAnyStoryLevelWithOver50Scores, | ||
| (long)ManuallyAwardedPins.TopXOfAnyCommunityLevelWithOver50Scores, | ||
| ]; |
Member
There was a problem hiding this comment.
As far as I know it's a bit slow to freeze a list. This should be done statically at the class level.
For naming I think progressDescPins, or to be verbose, pinsWithDescendingProgress
Contributor
Author
There was a problem hiding this comment.
descendingProgressPins maybe? Is verbose but a little shorter.
Comment on lines
+112
to
+113
| database.IncrementUserPinProgress((long)ManuallyAwardedPins.SignIntoWebsite, 1, user, false); | ||
| database.IncrementUserPinProgress((long)ManuallyAwardedPins.SignIntoWebsite, 1, user, true); |
Member
There was a problem hiding this comment.
Bleh, this sucks. Maybe that last param should be nullable, where null means update for both beta, not-beta?
| /// <summary> | ||
| /// The progress types of pins which have to be awarded manually by the server. | ||
| /// </summary> | ||
| public enum ManuallyAwardedPins : long |
Contributor
Author
There was a problem hiding this comment.
I think that might make it sound like these are our own custom pins or something, but other than that I like that name.
Member
There was a problem hiding this comment.
If you keep the XMLDoc, should be fine
jvyden
approved these changes
Aug 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
PinProgressRelations to users, aswell asManuallyAwardedPins, which is an enum tracking the progressTypes of all pins (right now not all pins) which the game does not unlock itself and instead expects the server to award manuallyManuallyAwardedPinsto users if they complete their objectives, as an example for the aboveThis would've closed both #395 and #690, however the pin awarded for hearting a user on the website is not implemented yet since there is no way to heart users using the API yet, and the rating pins are not implemented yet either because I didn't really want this PR to become too large.
Also my naming skills aren't very great.