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

Allow games to set target path for Fomod installer #542

Merged
merged 12 commits into from
Aug 10, 2023
Merged

Conversation

Al12rs
Copy link
Contributor

@Al12rs Al12rs commented Aug 9, 2023

Fixes #431

Fomod installer now installs to GamePathType.Game by default unless games specify a different path using a capability.

To simplify making changes for all Bethesda games I also added ABethesdaGame, and made the two skyrim games inherit from it.

Also did a bit of cleanup of capabilities related code.

! Requires #540 to be merged first (this is already rebased on those changes).

@Al12rs Al12rs added the BLOCKED This ticket cannot be completed until another ticket is completed label Aug 9, 2023
@Al12rs Al12rs requested a review from a team August 9, 2023 16:20
@Al12rs Al12rs self-assigned this Aug 9, 2023
@@ -35,6 +35,7 @@ public CommandLineConfigurator(IEnumerable<RegisteredVerb> verbs, IServiceProvid
_provider = provider;
_verbs = verbs.ToArray();
_getOptionMethod = typeof(CommandLineConfigurator).GetMethod(nameof(GetOption), BindingFlags.Instance | BindingFlags.NonPublic)!;
selector.Renderer = _defaultConsoleRenderer;
Copy link
Member

Choose a reason for hiding this comment

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

From #540.

Comment on lines +53 to +58
else
{
var selector = host.Services.GetRequiredService<CliOptionSelector>();
var renderers = host.Services.GetServices<IRenderer>();
selector.Renderer = renderers.FirstOrDefault(r => r.Name == "console") ?? renderers.First();
}
Copy link
Member

Choose a reason for hiding this comment

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

From #540.

src/NexusMods.DataModel/Games/IGame.cs Outdated Show resolved Hide resolved
src/Games/NexusMods.Games.FOMOD/FomodXmlInstaller.cs Outdated Show resolved Hide resolved
@Al12rs
Copy link
Contributor Author

Al12rs commented Aug 10, 2023

Thanks for reviewing, that's great feedback!

@halgari halgari merged commit f159b3a into main Aug 10, 2023
2 of 4 checks passed
@halgari halgari deleted the fomod-install-target branch August 10, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKED This ticket cannot be completed until another ticket is completed
3 participants