chore: 重构部分预载

This commit is contained in:
status102
2025-07-17 08:05:02 +08:00
parent 210fb23e57
commit 08997048e0
3 changed files with 79 additions and 11 deletions

View File

@@ -12,7 +12,6 @@
// </copyright>
#nullable enable
using MaaWpfGui.ViewModels.UserControl.TaskQueue;
using static MaaWpfGui.Main.AsstProxy;
namespace MaaWpfGui.Configuration.Single.MaaTask;
@@ -25,5 +24,66 @@ public class InfrastTask : BaseTask
/// </summary>
public InfrastMode Mode { get; set; } = InfrastMode.Normal;
/// <summary>
/// Gets or sets 基建无人机用法
/// </summary>
public string UsesOfDrones { get; set; } = "Money";
/// <summary>
/// Gets or sets 基建心情阈值
/// </summary>
public int DormThreshold { get; set; } = 30;
/// <summary>
/// Gets or sets a value indicating whether 宿舍空位补信赖
/// </summary>
public bool DormTrustEnabled { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether 制造站搓玉是否补货
/// </summary>
public bool OriginiumShardAutoReplenishment { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether 不将已进驻干员放入宿舍
/// </summary>
public bool DormFilterNotStationed { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether 会客室板子领取信用
/// </summary>
public bool ReceptionMessageBoard { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether 继续专精
/// </summary>
public bool ContinueTraining { get; set; } = false;
/// <summary>
/// Gets or sets 自定义配置文件路径
/// </summary>
public string Filename { get; set; } = string.Empty;
/// <summary>
/// Gets or sets 自定义配置计划编号
/// </summary>
public int PlanIndex { get; set; }
}
public enum InfrastMode
{
/// <summary>
/// 普通
/// </summary>
Normal,
/// <summary>
/// 自定义
/// </summary>
Custom = 10000,
/// <summary>
/// 轮换
/// </summary>
Rotation = 20000,
}

View File

@@ -38,6 +38,11 @@ public class ReclamationTask : BaseTask
/// Gets or sets 单次最大制造轮数
/// </summary>
public int MaxCraftCountPerRound { get; set; } = 16;
/// <summary>
/// Gets or sets a value indicating whether 商店购物
/// </summary>
public bool ClearStore { get; set; } = true;
}
public enum ReclamationTheme

View File

@@ -12,19 +12,22 @@
// </copyright>
using System.Text.Json.Serialization;
using MaaWpfGui.Configuration.Single.MaaTask;
using ObservableCollections;
namespace MaaWpfGui.Configuration.Single
namespace MaaWpfGui.Configuration.Single;
public class SpecificConfig
{
public class SpecificConfig
{
[JsonInclude]
public ObservableDictionary<string, int> InfrastOrder { get; private set; } = new ObservableDictionary<string, int>();
[JsonInclude]
public ObservableDictionary<string, int> InfrastOrder { get; private set; } = [];
[JsonInclude]
public ObservableDictionary<string, int> TaskQueueOrder { get; private set; } = new ObservableDictionary<string, int>();
[JsonInclude]
public ObservableDictionary<string, int> TaskQueueOrder { get; private set; } = [];
[JsonInclude]
public ObservableDictionary<string, bool> DragItemIsChecked { get; private set; } = new ObservableDictionary<string, bool>();
}
[JsonInclude]
public ObservableList<BaseTask> TaskQueue { get; private set; } = [];
[JsonInclude]
public ObservableDictionary<string, bool> DragItemIsChecked { get; private set; } = [];
}