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

Manager launch parameter modal #1195

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Conversation

anttimaki
Copy link
Collaborator

No description provided.

Doorstop target was initially set in the mod list getter so the value
would get set in a new profile when BepInEx was installed. While this
works, it slows down the getter, which is called whenever the mod list
is updated, which happens quite often as user interacts with the local
mod list.

Instead, set the doorstop target when the modal showing the target is
opened. As far as I can tell, the doorstop is used here purely for
display reasons. The methods called are getters without side-effects,
and the GameRunner will call one or another when the game is launched
(choosing one based on whether the game is ran as modded or as
vanilla).
Use GameInstruction to only set vanillaLaunchArgs, and to not touch the
doorstopTarget, which should be set by the GameRunningProvider. This
way the doorstopTarget value shown on modal will actually match the
values that are used when the game is launched either as vanilla or as
modded by the GameRunner instance.
@anttimaki
Copy link
Collaborator Author

Tested both thunderstore-io/r2modmanPlus's develop and this branch with the following cases. The results were identical with both versions:

  1. Create new empty profile, check "Set launch parameters" modal
    • Shows "These parameters will be available after installing a mod loader."
  2. Create new empty profile, launch vanilla
    • Launches the game
  3. Create new empty profile, launch modded
    • Shows error modal with "Error: Failed to find preloader dll"
  4. Create new empty profile, install BepInEx, check "Set launch parameters" modal
    • Shows "--doorstop-enabled true --doorstop-target-assembly ..."
  5. Create new empty profile, install BepInEx, launch vanilla
    • Launches the game
  6. Create new empty profile, install BepInEx, launch modded
    • Shows logging window and launches the game
  7. Open existing profile with BepInEx installed, check "Set launch parameters" modal
    • Shows "--doorstop-enabled true --doorstop-target-assembly ..."
  8. Open existing profile with BepInEx installed, launch vanilla
    • Launches the game
  9. Open existing profile with BepInEx installed, launch modded
    • Shows logging window and launches the game
  10. Open existing profile with BepInEx installed, uninstall BepInEx, check "Set launch parameters" modal
    • Shows "--doorstop-enabled true --doorstop-target-assembly ..."
  11. Open existing profile with BepInEx installed, uninstall BepInEx, launch vanilla
    • Launches the game
  12. Open existing profile with BepInEx installed, uninstall BepInEx, launch modded
    • Shows logging window and launches the game (should it?)

@MythicManiac MythicManiac merged commit dfcdb56 into develop Feb 1, 2024
4 checks passed
@MythicManiac MythicManiac deleted the manager-launch-parameter-modal branch February 1, 2024 18:34
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.

2 participants