mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 删多了
This commit is contained in:
@@ -122,6 +122,31 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel, FightSetting
|
||||
StagePlan.Remove(plan);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to use custom stage code.
|
||||
/// </summary>
|
||||
public bool CustomStageCode
|
||||
{
|
||||
get => GetTaskConfig<FightTask>().IsStageManually;
|
||||
set {
|
||||
bool ret = SetTaskConfig<FightTask>(t => t.IsStageManually == value, t => t.IsStageManually = value);
|
||||
if (ret && !value)
|
||||
{
|
||||
var stagePlan = GetTaskConfig<FightTask>().StagePlan;
|
||||
for (int i = 0; i < stagePlan.Count; i++)
|
||||
{
|
||||
var stage = stagePlan[i];
|
||||
if (!Instances.StageManager.GetStageList().Any(p => p.Value == stage))
|
||||
{
|
||||
stagePlan[i] = string.Empty;
|
||||
}
|
||||
}
|
||||
SetTaskConfig<FightTask>(t => t.StagePlan.SequenceEqual(stagePlan), t => t.StagePlan = stagePlan);
|
||||
RefreshCurrentStagePlan();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset unsaved battle parameters.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user