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

[DO NOT MERGE] conditionally filter schematic components to galaxy #72

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cbortz
Copy link
Collaborator

@cbortz cbortz commented Apr 13, 2024

⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️

⚠️ ⚠️ ⚠️ This PR is still under construction ⚠️ ⚠️ ⚠️

⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️


To Be Done

  • Update filter logic to account for NGE galaxies (i.e. galaxyID=-1)
  • Update schematic galaxy mismatch to account for NGE galaxies

Summary

  • if a galaxy is selected, and the schematic's is a base schematic, filter components for relevant base galaxies and the selected galaxy
    • base galaxy ID 0 is non-NGE, relevant IDs: 0, 1337
    • base galaxy ID -1 is NGE, relevant IDs: -1, 1337
    • base galaxy ID 1337 is Jedi (shared), relevant IDs: -1, 1337
  • if a galaxy is selected, and the schematic's is not a base schematic, filter components for relevant base galaxies and the schematic's galaxy
    • base galaxy is determined using the schematic's galaxy as the seed for dbShared.getBaseProfs/1
    • dbShared.getBaseProfs/1 was refactored to short-circuit returns when value is -1, 0, or 1337
  • (if a galaxy is not selected, no change)
  • add a notice when viewing a schematic for a different galaxy (unless base schematic, i.e. galaxy in (-1, 0, 1337))

Screen Shots

Base schematic with custom components on different servers

In this case, we have two different servers ("Other" and "Test Server"). "Other" has a custom component Super Custom Rifle Barrel. "Test Server" has a custom component Very Advanced Blaster Rifle Barrel. Previously, both custom components would always show. Now, they only show when their respective galaxies are selected.

Screenshot 2024-04-13 at 3 34 35 AM Screenshot 2024-04-13 at 3 34 48 AM

Viewing a custom schematic from a different server

When viewing a custom schematic for a different server than selected, we display a notice above the schematic details, informing the user that not all ingredients may be available on their server. In this case, we always filter components to the schematic's galaxy (as well as where galaxy=0).

Screenshot 2024-04-13 at 3 36 07 AM Screenshot 2024-04-13 at 4 03 17 AM

Copy link
Collaborator Author

@cbortz cbortz left a comment

Choose a reason for hiding this comment

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

Notes for later.

html/schematics.py Outdated Show resolved Hide resolved
html/templates/schematics.html Outdated Show resolved Hide resolved
@cbortz cbortz force-pushed the fix-ingredient-OR branch from 2b44043 to 5fa5ec0 Compare April 14, 2024 05:38
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.

1 participant