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

The Witness: Make location order in the spoiler log deterministic #3895

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Sep 6, 2024

The Witness adds its locations to its regions in a non-deterministic order.
This is mostly fine, but it does mean the spoiler log is not fully deterministic (the only thing I'm aware of that cares about insertion order of locations)

This PR makes it so that the order of processing of entities is tracked when creating the entity list from WitnessLogic.txt, and then uses that to sort the locations before adding them to the regions.

This also looks quite nice:

Symmetry Island Lower Panel: Monastery Entry Right (Panel)
Symmetry Island Right 3 (Panel Hunt): +1 Panel Hunt
Symmetry Island Right 5: Power Surge
Symmetry Island Back 6: Treehouse Drawbridge (Panel)
Symmetry Island Left 7: Bunker Entry (Panel)

The Panel Hunt event "Symmetry Island Right 3 (Panel Hunt)" now shows up "in its proper place" ahead of the actual real location check "Symmetry Island Right 5"

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Sep 6, 2024
@NewSoupVi NewSoupVi added the is: refactor/cleanup Improvements to code/output readability or organizization. label Sep 6, 2024
Copy link
Contributor

@nicholassaylor nicholassaylor left a comment

Choose a reason for hiding this comment

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

Can confirm, makes them deterministic. LGTM

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
@NewSoupVi NewSoupVi merged commit 8dbecf3 into ArchipelagoMW:main Dec 29, 2024
16 checks passed
AustinSumigray pushed a commit to AustinSumigray/Archipelago that referenced this pull request Jan 4, 2025
…chipelagoMW#3895)

* Fix location order

* Update worlds/witness/data/static_logic.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: refactor/cleanup Improvements to code/output readability or organizization. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants