mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 10:00:44 +08:00
perf: 基建信息板收取信用增加开关 (#12050)
* perf: 基建信息板收取开关 * feat(core): 基建任务会客室领取留言板信用 * i18n: wpf * fix: 补回遗漏传参,简化调用 * chore: Auto update by pre-commit hooks [skip changelog] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,8 @@ using System.Linq;
|
||||
using MaaWpfGui.Constants;
|
||||
using MaaWpfGui.Helper;
|
||||
using MaaWpfGui.Models;
|
||||
using MaaWpfGui.Models.AsstTasks;
|
||||
using MaaWpfGui.Services;
|
||||
using MaaWpfGui.Utilities.ValueType;
|
||||
using Microsoft.Win32;
|
||||
using Newtonsoft.Json;
|
||||
@@ -221,6 +223,18 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private bool _receptionMessageBoardReceive = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.InfrastReceptionMessageBoardReceive, bool.TrueString));
|
||||
|
||||
public bool ReceptionMessageBoardReceive
|
||||
{
|
||||
get => _receptionMessageBoardReceive;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _receptionMessageBoardReceive, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.InfrastReceptionMessageBoardReceive, value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private bool _continueTraining = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.ContinueTraining, bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
@@ -620,4 +634,22 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
|
||||
++CustomInfrastPlanIndex;
|
||||
}
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
return new AsstInfrastTask
|
||||
{
|
||||
Facilitys = GetInfrastOrderList(),
|
||||
UsesOfDrones = UsesOfDrones,
|
||||
ContinueTraining = ContinueTraining,
|
||||
DormThreshold = DormThreshold / 100.0,
|
||||
DormFilterNotStationedEnabled = DormFilterNotStationedEnabled,
|
||||
DormDormTrustEnabled = DormTrustEnabled,
|
||||
OriginiumShardAutoReplenishment = OriginiumShardAutoReplenishment,
|
||||
IsCustom = CustomInfrastEnabled,
|
||||
ReceptionMessageBoard = ReceptionMessageBoardReceive,
|
||||
Filename = CustomInfrastFile,
|
||||
PlanIndex = CustomInfrastPlanIndex,
|
||||
}.Serialize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user