mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
Improved mod interface; Basic mod install process
This commit is contained in:
+18
-4
@@ -29,15 +29,29 @@ namespace ZuneModCore
|
||||
|
||||
public virtual Task Init() => Task.CompletedTask;
|
||||
|
||||
public abstract Task<bool> Apply();
|
||||
public abstract Task<string?> Apply();
|
||||
|
||||
public abstract Task<bool> Reset();
|
||||
public abstract Task<string?> Reset();
|
||||
|
||||
public abstract AbstractUIElementGroup? OptionsUI { get; }
|
||||
|
||||
public string StorageDirectory => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
"ZuneModCore", Id);
|
||||
public string StorageDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
string dir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ZuneModCore", Id);
|
||||
// Create the directory just in case the consumer assumes the folder exists already
|
||||
Directory.CreateDirectory(dir);
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract IReadOnlyList<Type>? DependentMods { get; }
|
||||
|
||||
internal FileStream OpenFileInStorageDirectory(string filename)
|
||||
{
|
||||
FileInfo info = new(Path.Combine(StorageDirectory, filename));
|
||||
return File.Create(info.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user