SHA256
Add Preset System
This commit is contained in:
7 files changed
+931
-151
No files matched your search
@@ -6,20 +6,28 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace ADOFAIRenderer.Core.Data;
|
||||
|
||||
public class GlobalConfig
|
||||
internal class GlobalConfig
|
||||
{
|
||||
public string? OutputDirectory { get; set; }
|
||||
public string? LastPresetName { get; set; }
|
||||
public bool DefaultPresetsInitialized { get; set; }
|
||||
}
|
||||
|
||||
public static class GlobalSettings
|
||||
internal static class GlobalSettings
|
||||
{
|
||||
private static string SettingsFilePath =>
|
||||
Path.Combine(MelonEnvironment.GameRootDirectory, "UserData", "ADOFAIRenderer", "global_settings.json");
|
||||
private static string GetGameRootDir()
|
||||
{
|
||||
var root = MelonEnvironment.GameRootDirectory;
|
||||
return string.IsNullOrEmpty(root) ? AppDomain.CurrentDomain.BaseDirectory : root;
|
||||
}
|
||||
|
||||
public static GlobalConfig Current { get; set; } = new();
|
||||
private static string SettingsFilePath =>
|
||||
Path.Combine(GetGameRootDir(), "UserData", "ADOFAIRenderer", "global_settings.json");
|
||||
|
||||
public static GlobalConfig Current { get; private set; } = new();
|
||||
|
||||
public static string DefaultOutputDirectory =>
|
||||
Path.Combine(MelonEnvironment.GameRootDirectory, "Render");
|
||||
Path.Combine(GetGameRootDir(), "Render");
|
||||
|
||||
public static string EffectiveOutputDirectory
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user