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

Pass game instance from cmdline to GUI/ConsoleUI #2449

Merged
merged 1 commit into from
May 19, 2018

Conversation

HebaruSan
Copy link
Member

Problem

If you have multiple game instances, you can choose between them with these command line options:

  --ksp                   KSP install to use

  --kspdir                KSP dir to use

However, these currently don't work for GUI or ConsoleUI. Instead, they will use the default instance if one is defined, or ask the user to choose an instance.

For GUI, these options are allowed and parsed (to the extent of raising an error if an invalid instance is specified), but not used to drive the UI.

For ConsoleUI, these options are not considered valid.

Changes

Now the --ksp and --kspdir flags work for both GUI and ConsoleUI.

The knowledge of which instance to use is stored into CmdLine's KSPManager object by InstanceSpecificOptions.Handle. To make GUI and ConsoleUI obey this, we pass this same manager object to them via new parameters.

Fixes https://forum.kerbalspaceprogram.com/index.php?/topic/154922-ckan-the-comprehensive-kerbal-archive-network-v1251-broglio/&do=findComment&comment=3380669

@HebaruSan HebaruSan added Bug GUI Issues affecting the interactive GUI Cmdline Issues affecting the command line Pull request labels May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Cmdline Issues affecting the command line GUI Issues affecting the interactive GUI Pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants