rft: 移除FightTask不再使用的关卡设置

This commit is contained in:
status102
2026-05-22 14:52:54 +08:00
parent 294d1c52be
commit 3ba810d1d5

View File

@@ -122,58 +122,6 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel, FightSetting
StagePlan.Remove(plan);
}
/// <summary>
/// Gets or sets the stage1.
/// </summary>
public string? Stage
{
get => field;
set {
if (field == value)
{
return;
}
if (CustomStageCode)
{
// 从后往前删
if (field?.Length != 3 && value != null)
{
value = ToUpperAndCheckStage(value);
}
}
SetAndNotify(ref field, value);
SetFightParams();
Instances.TaskQueueViewModel.UpdateDatePrompt();
}
}
/// <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>