some more work
This commit is contained in:
@@ -4,5 +4,7 @@ public interface IActionSetInfos
|
||||
{
|
||||
Version Version { get; set; }
|
||||
|
||||
public bool IsPublic { get; set; }
|
||||
|
||||
IEnumerable<InstallAction> Actions { get; }
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class InstallInfos : IActionSetInfos
|
||||
{
|
||||
[JsonConverter(typeof(VersionConverter))]
|
||||
[JsonConverter(typeof(Newtonsoft.Json.Converters.VersionConverter))]
|
||||
public Version Version { get; set; }
|
||||
|
||||
[DefaultValue(true)]
|
||||
public bool IsPublic { get; set; } = true;
|
||||
|
||||
public List<InstallAction> Actions { get; } = [];
|
||||
|
||||
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions;
|
||||
|
||||
12
ModpackUpdater/ModLoader.cs
Normal file
12
ModpackUpdater/ModLoader.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public enum ModLoader
|
||||
{
|
||||
Any,
|
||||
Forge,
|
||||
Cauldron,
|
||||
LiteLoader,
|
||||
Fabric,
|
||||
Quilt,
|
||||
NeoForge,
|
||||
}
|
||||
@@ -8,7 +8,7 @@ public class UpdateAction : InstallAction
|
||||
{
|
||||
[DefaultValue(UpdateActionType.Update)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public UpdateActionType Type { get; set; }
|
||||
public UpdateActionType Type { get; set; } = UpdateActionType.Update;
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SrcPath { get; set; }
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class UpdateInfo : IActionSetInfos
|
||||
{
|
||||
[JsonConverter(typeof(VersionConverter))]
|
||||
[JsonConverter(typeof(Newtonsoft.Json.Converters.VersionConverter))]
|
||||
public Version Version { get; set; }
|
||||
|
||||
[DefaultValue(true)]
|
||||
public bool IsPublic { get; set; } = true;
|
||||
|
||||
public List<UpdateAction> Actions { get; } = [];
|
||||
|
||||
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions.Cast<InstallAction>();
|
||||
|
||||
Reference in New Issue
Block a user