-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
5 changed files
with
76 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using RandoSettingsManager; | ||
using RandoSettingsManager.SettingsManagement; | ||
using RandoSettingsManager.SettingsManagement.Versioning; | ||
|
||
namespace LostArtifacts.Rando | ||
{ | ||
internal static class RSMInterop | ||
{ | ||
public static void Hook() | ||
{ | ||
RandoSettingsManagerMod.Instance.RegisterConnection(new ArtifactRandoSettings()); | ||
} | ||
} | ||
|
||
internal class ArtifactRandoSettings : RandoSettingsProxy<RandoSettings, string> | ||
{ | ||
public override string ModKey => LostArtifacts.Instance.GetName(); | ||
|
||
public override VersioningPolicy<string> VersioningPolicy { get; } | ||
= new EqualityVersioningPolicy<string>(LostArtifacts.Instance.GetVersion()); | ||
|
||
public override void ReceiveSettings(RandoSettings settings) | ||
{ | ||
if(settings != null) | ||
{ | ||
RandoMenu.Apply(settings); | ||
} | ||
else | ||
{ | ||
RandoMenu.Disable(); | ||
} | ||
} | ||
|
||
public override bool TryProvideSettings(out RandoSettings settings) | ||
{ | ||
settings = LostArtifacts.RandoSettings; | ||
return settings.EnableArtifacts; | ||
} | ||
} | ||
} |
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