-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f8c2c3
commit 17bac94
Showing
9 changed files
with
122 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Core.State; | ||
|
||
namespace Core.Mods; | ||
|
||
public class ModUpdater | ||
{ | ||
private readonly IInstaller? installer; | ||
public ModInstallationState State { get; private set; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="installer">Installer, or null for uninstall.</param> | ||
/// <param name="state">Installation state, or null if not installed.</param> | ||
public ModUpdater(IInstaller? installer, ModInstallationState? currentState) | ||
{ | ||
this.installer = installer; | ||
State = currentState ?? ModInstallationState.Empty; | ||
} | ||
|
||
public bool Installed => State.Files.Count > 0; | ||
|
||
//// Do we just need accept callaback for whitelisting, etc.? | ||
//// Add CancellationToken to stop | ||
//public void Update() | ||
//{ | ||
// // Could move the driveline config in the state | ||
// // The other config should stay outside: even if we make it configurable per mod, | ||
// // it will have an impact on what is installed rather than what is configured! | ||
//} | ||
|
||
public void Install() => throw new NotImplementedException(); | ||
public void Uninstall() => throw new NotImplementedException(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.