Skip to content

Fix map list C-Side crash - #1185

Merged
microlith57 merged 2 commits into
EverestAPI:devfrom
SnipUndercover:fix-map-list-c-side-crash
Nov 10, 2026
Merged

microlith57 merged 2 commits into
EverestAPI:devfrom
SnipUndercover:fix-map-list-c-side-crash

Conversation

@SnipUndercover

@SnipUndercover SnipUndercover commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

AreaData.Interlude is relinked by MonoMod to AreaData.Interlude_Safe, which returns true if the selected level set (campaign) differs from the map's level set.

This causes the Map List menu's map buttons to always be enabled when filtering for C-Sides if the selected level set differs from the map's level set. Pressing them will crash the game.

This PR fixes this by using Interlude_Unsafe directly. Since UnlockedModes applies to a specific level set (because it's an instance property), it shouldn't be affected by whatever the currently selected level set is.

@SnipUndercover
SnipUndercover force-pushed the fix-map-list-c-side-crash branch from 57a0a49 to eac3dd3 Compare November 1, 2026 01:29
@SnipUndercover

Copy link
Copy Markdown
Member Author

Force pushed to fix the commit description, as I forgot to mention the "filter for C-Sides" part.

@SnipUndercover

Copy link
Copy Markdown
Member Author

/azp run

@SnipUndercover

Copy link
Copy Markdown
Member Author

Apparently mono isn't working so I can't get the pipeline to build, awesome

@maddie480-bot maddie480-bot added the 1: review needed This PR needs 2 approvals to be merged (bot-managed) label Nov 1, 2026
AreaData.Interlude is relinked by MonoMod to AreaData.Interlude_Safe,
which returns true if the selected level set (campaign) differs from
the map's level set.

This causes the Map List menu's map buttons to always be enabled
when filtering for C-Sides if the selected level set differs from
the map's level set. Pressing them will crash the game.

Preventing this usage of Interlude from being relinked by MonoMod here
is valid because UnlockedModes applies to a specific level set (because
it's an instance property), and shouldn't be affected by whatever the
currently selected level set is.
@SnipUndercover
SnipUndercover force-pushed the fix-map-list-c-side-crash branch from eac3dd3 to 02e6879 Compare November 1, 2026 02:38
@SnipUndercover

Copy link
Copy Markdown
Member Author

Force pushed again to rebase on dev with fixed CI.

@DashingCat DashingCat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and works as expected, the crash no longer occurs as the C-side can no longer be selected.

@microlith57 microlith57 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

approved pending removal of unused UnlockedModesUnsafe :3

oops i made a copy of this prop and completely forgot that it's there
:sob:
@SnipUndercover

Copy link
Copy Markdown
Member Author

oops, for testing i made a copy of UnlockedModes and named it UnlockedModesUnsafe, completely forgetting to remove it lmao, im so sorry
Just fixed that now, making the diff much easier to digest.

@maddie480-bot

Copy link
Copy Markdown
Member

The pull request was approved and entered the 3-day last-call window.
If no further reviews happen, it will end on Nov 10, 2026, 3:08 AM UTC, after which the pull request will be able to be merged.

@maddie480-bot maddie480-bot added 3: last call window This PR was approved, and is in the 5-day last-call window before getting merged (bot-managed) and removed 1: review needed This PR needs 2 approvals to be merged (bot-managed) labels Nov 7, 2026
@maddie480-bot

Copy link
Copy Markdown
Member

The last-call window for this pull request ended. It can now be merged if no blockers were brought up.

@maddie480-bot maddie480-bot added 4: ready to merge This PR was approved and the last-call window is over (bot-managed) and removed 3: last call window This PR was approved, and is in the 5-day last-call window before getting merged (bot-managed) labels Nov 10, 2026
@microlith57
microlith57 merged commit 87bad49 into EverestAPI:dev Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4: ready to merge This PR was approved and the last-call window is over (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants