Repository navigation
Fix map list C-Side crash - #1185
Conversation
57a0a49 to
eac3dd3
Compare
|
Force pushed to fix the commit description, as I forgot to mention the "filter for C-Sides" part. |
|
/azp run |
|
Apparently mono isn't working so I can't get the pipeline to build, awesome |
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.
eac3dd3 to
02e6879
Compare
|
Force pushed again to rebase on dev with fixed CI. |
DashingCat
left a comment
There was a problem hiding this comment.
Tested and works as expected, the crash no longer occurs as the C-side can no longer be selected.
microlith57
left a comment
There was a problem hiding this comment.
approved pending removal of unused UnlockedModesUnsafe :3
oops i made a copy of this prop and completely forgot that it's there :sob:
|
oops, for testing i made a copy of UnlockedModes and named it UnlockedModesUnsafe, completely forgetting to remove it lmao, im so sorry |
|
The pull request was approved and entered the 3-day last-call window. |
|
The last-call window for this pull request ended. It can now be merged if no blockers were brought up. |
AreaData.Interludeis relinked by MonoMod toAreaData.Interlude_Safe, which returnstrueif 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_Unsafedirectly. SinceUnlockedModesapplies to a specific level set (because it's an instance property), it shouldn't be affected by whatever the currently selected level set is.