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

Fix completion data generation function #85

Merged
merged 2 commits into from
Jan 21, 2023

Conversation

moonysolari
Copy link
Member

The new generateCompletionData function in #30 returns the parent location ID in the SubLocationId field in its return value, which is not correct. It causes 'UI_LOCATION_PARENT_XXX_TEXT' to appear in the mission end screen, among other places. This PR restores the behavior that the sublocation ID should be in that field for most if not all purposes other than mastery. It also prevents location progression data from appearing in the bottom right for the sniper levels and the ICA facility, which is the correct behavior on official servers.

@moonysolari moonysolari self-assigned this Jan 21, 2023
@LennardF1989
Copy link
Member

LennardF1989 commented Jan 21, 2023

Looks good, but I feel instead of adding exceptions in code, we should just provide proper mastery data in the JSON files. I'll make a draft for it before deciding :)

Added hidden mastery levels for FACILITY
Fixed Mastery-tab from showing when there aren't any drops
@LennardF1989
Copy link
Member

LennardF1989 commented Jan 21, 2023

Alright, here's what I did:

  • I added HideProgression as an optional boolean for the Mastery JSON
  • I added a Mastery JSON for Facility to set the MaxLevel to 4 and HideProgression to true
  • I changed the default CompletionData to be MaxLevel 1 and HideProgression true if a Mastery JSON is not found, since all levels that should actually already have a Mastery JSON anyway.
  • I respected the change you made to the masteryService by passing the subLocationId as we would have before the masteryService was a thing
  • I added a fix to hide the Mastery-tab in the game if there are no drops associated with the Mastery JSON

The result is exactly as you hard-coded it (eg. levels with no Mastery data should just be MaxLevel 1 AND hidden, eg. the sniper levels), but with a lot more control and less code :)

@LennardF1989 LennardF1989 merged commit d6cae91 into thepeacockproject:v6 Jan 21, 2023
@moonysolari moonysolari deleted the completion-data-fix branch January 21, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants