mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
refactor: 迁移部分设置判断到SettingsViewModel
This commit is contained in:
@@ -1764,11 +1764,6 @@ namespace MaaWpfGui.Main
|
||||
["theme"] = theme,
|
||||
};
|
||||
|
||||
if (mode == 1 || mode == 4)
|
||||
{
|
||||
task_params["investment_enabled"] = true;
|
||||
}
|
||||
|
||||
if (squad.Length > 0)
|
||||
{
|
||||
task_params["squad"] = squad;
|
||||
@@ -1787,7 +1782,7 @@ namespace MaaWpfGui.Main
|
||||
task_params["start_with_elite_two"] = start_with_elite_two;
|
||||
task_params["use_support"] = use_support;
|
||||
task_params["use_nonfriend_support"] = enable_nonfriend_support;
|
||||
task_params["refresh_trader_with_dice"] = (theme == "Mizuki" ? refresh_trader_with_dice : false);
|
||||
task_params["refresh_trader_with_dice"] = refresh_trader_with_dice;
|
||||
|
||||
AsstTaskId id = AsstAppendTaskWithEncoding("Roguelike", task_params);
|
||||
_latestTaskId[TaskType.Roguelike] = id;
|
||||
|
||||
@@ -1766,7 +1766,10 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
/// </summary>
|
||||
public bool RoguelikeInvestmentEnabled
|
||||
{
|
||||
get => bool.Parse(_roguelikeInvestmentEnabled);
|
||||
get
|
||||
{
|
||||
return bool.Parse(_roguelikeInvestmentEnabled) || _roguelikeMode == "1";
|
||||
}
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _roguelikeInvestmentEnabled, value.ToString());
|
||||
@@ -1778,7 +1781,10 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
|
||||
public bool RoguelikeRefreshTraderWithDice
|
||||
{
|
||||
get => bool.Parse(_roguelikeRefreshTraderWithDice);
|
||||
get
|
||||
{
|
||||
return bool.Parse(_roguelikeRefreshTraderWithDice) && _roguelikeTheme == "Mizuki";
|
||||
}
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _roguelikeRefreshTraderWithDice, value.ToString());
|
||||
|
||||
Reference in New Issue
Block a user