Change planned API to use interfaces.

This commit is contained in:
Ottermandias 2022-06-17 16:30:02 +02:00
parent 61680f0afb
commit f579933dd7
2 changed files with 6 additions and 6 deletions

View file

@ -104,12 +104,12 @@ public interface IPenumbraApi : IPenumbraApiBase
// Obtain the potential settings of a mod specified by its directory name first or mod name second.
// Returns null if the mod could not be found.
public Dictionary< string, (string[], SelectType) >? GetAvailableModSettings( string modDirectory, string modName );
public IDictionary< string, (IList<string>, SelectType) >? GetAvailableModSettings( string modDirectory, string modName );
// Obtain the enabled state, the priority, the settings of a mod specified by its directory name first or mod name second,
// and whether these settings are inherited, or null if the collection does not set them at all.
// If allowInheritance is false, only the collection itself will be checked.
public (PenumbraApiEc, (bool, int, Dictionary< string, string[] >, bool)?) GetCurrentModSettings( string collectionName,
public (PenumbraApiEc, (bool, int, IDictionary< string, IList<string> >, bool)?) GetCurrentModSettings( string collectionName,
string modDirectory, string modName, bool allowInheritance );
// Try to set the inheritance state in the given collection of a mod specified by its directory name first or mod name second.
@ -131,7 +131,7 @@ public interface IPenumbraApi : IPenumbraApiBase
public PenumbraApiEc TrySetModSetting( string collectionName, string modDirectory, string modName, string optionGroupName, string option );
public PenumbraApiEc TrySetModSetting( string collectionName, string modDirectory, string modName, string optionGroupName,
string[] options );
IReadOnlyList<string> options );
// Create a temporary collection without actual settings but with a cache.

View file

@ -210,10 +210,10 @@ public class PenumbraApi : IDisposable, IPenumbraApi
return Penumbra.ModManager.Select( m => ( m.ModPath.Name, m.Name.Text ) ).ToArray();
}
public Dictionary< string, (string[], SelectType) >? GetAvailableModSettings( string modDirectory, string modName )
public IDictionary< string, (IList<string>, SelectType) >? GetAvailableModSettings( string modDirectory, string modName )
=> throw new NotImplementedException();
public (PenumbraApiEc, (bool, int, Dictionary< string, string[] >, bool)?) GetCurrentModSettings( string collectionName, string modDirectory, string modName,
public (PenumbraApiEc, (bool, int, IDictionary< string, IList<string> >, bool)?) GetCurrentModSettings( string collectionName, string modDirectory, string modName,
bool allowInheritance )
=> throw new NotImplementedException();
@ -229,7 +229,7 @@ public class PenumbraApi : IDisposable, IPenumbraApi
public PenumbraApiEc TrySetModSetting( string collectionName, string modDirectory, string modName, string optionGroupName, string option )
=> throw new NotImplementedException();
public PenumbraApiEc TrySetModSetting( string collectionName, string modDirectory, string modName, string optionGroupName, string[] options )
public PenumbraApiEc TrySetModSetting( string collectionName, string modDirectory, string modName, string optionGroupName, IReadOnlyList<string> options )
=> throw new NotImplementedException();
public PenumbraApiEc CreateTemporaryCollection( string collectionName, string? character, bool forceOverwriteCharacter )