diff --git a/docs/1.1-详细介绍.md b/docs/1.1-详细介绍.md
index 68a9750005..8bc23a8b90 100644
--- a/docs/1.1-详细介绍.md
+++ b/docs/1.1-详细介绍.md
@@ -109,6 +109,7 @@
- 支持演习模式,不用一直浪费理智测试的
- 欢迎使用作业分享站 www.抄作业.com, www.prts.plus 分享自己的作业!
- 推荐在作业描述里填上你自己的名字(作者名)、参考的攻略视频 url, 其他想说的等等
+- 欢迎与我们一起讨论作业制作等问题 作业企鹅群 [1169188429](https://jq.qq.com/?_wv=1027&k=QZcGcJ9G)
### 一键长草:获取信用及购物
diff --git a/resource/global/YoStarEN/resource/tasks.json b/resource/global/YoStarEN/resource/tasks.json
index 39ed5f808f..3ad396d8a4 100644
--- a/resource/global/YoStarEN/resource/tasks.json
+++ b/resource/global/YoStarEN/resource/tasks.json
@@ -1451,6 +1451,27 @@
"Operator"
]
},
+ "InfrastEnterOperList": {
+ "text": [
+ "Morale",
+ "Resting",
+ "Working",
+ "Assign"
+ ]
+ },
+ "Award": {
+ "roi": [
+ 700,
+ 530,
+ 200,
+ 130
+ ]
+ },
+ "GoLastBattle": {
+ "text": [
+ "To the most recent stage"
+ ]
+ },
"BattleStageName": {
"Doc": "该任务的 ocrReplace 被所有涉及Rouge-like的English识别任务复用",
"ocrReplace": [
diff --git a/resource/global/YoStarJP/resource/tasks.json b/resource/global/YoStarJP/resource/tasks.json
index 9504ac23a8..2b9b3f3b30 100644
--- a/resource/global/YoStarJP/resource/tasks.json
+++ b/resource/global/YoStarJP/resource/tasks.json
@@ -1481,35 +1481,35 @@
"远程位"
],
[
- "前衛タイ.*",
+ "前衛.*イ.*",
"近卫干员"
],
[
- "医療タイ.*",
+ "医療.*イ.*",
"医疗干员"
],
[
- "先鋒タイ.*",
+ "先鋒.*イ.*",
"先锋干员"
],
[
- "術師タイ.*",
+ "術師.*イ.*",
"术师干员"
],
[
- "狙撃タイ.*",
+ "狙撃.*イ.*",
"狙击干员"
],
[
- "重装タイ.*",
+ "重装.*イ.*",
"重装干员"
],
[
- "補助タイ.*",
+ "補助.*イ.*",
"辅助干员"
],
[
- "特殊タイ.*",
+ "特殊.*イ.*",
"特种干员"
],
[
diff --git a/resource/global/txwy/resource/tasks.json b/resource/global/txwy/resource/tasks.json
index 3aa2bd412b..e9083fcdd5 100644
--- a/resource/global/txwy/resource/tasks.json
+++ b/resource/global/txwy/resource/tasks.json
@@ -721,6 +721,10 @@
[
"“弦驚”",
"“弦惊”"
+ ],
+ [
+ "澄閃",
+ "澄闪"
]
]
},
diff --git a/resource/global/txwy/resource/template/AddOperatorMfgAggressive.png b/resource/global/txwy/resource/template/AddOperatorMfgAggressive.png
new file mode 100644
index 0000000000..bebfca72f5
Binary files /dev/null and b/resource/global/txwy/resource/template/AddOperatorMfgAggressive.png differ
diff --git a/resource/global/txwy/resource/template/AddOperatorTradeAggressive.png b/resource/global/txwy/resource/template/AddOperatorTradeAggressive.png
new file mode 100644
index 0000000000..4711484ea1
Binary files /dev/null and b/resource/global/txwy/resource/template/AddOperatorTradeAggressive.png differ
diff --git a/src/MaaWpfGui/Helper/Utils.cs b/src/MaaWpfGui/Helper/Utils.cs
index b95ba5a92d..f7a29922ab 100644
--- a/src/MaaWpfGui/Helper/Utils.cs
+++ b/src/MaaWpfGui/Helper/Utils.cs
@@ -32,7 +32,7 @@ namespace MaaWpfGui
/// yj历时间的字符串表示形式
public static string GetYJTimeNowString()
{
- return GetYJTimeNow().ToString();
+ return GetYJTimeNow().ToString("yyyy/MM/dd HH:mm:ss");
}
///
@@ -50,7 +50,7 @@ namespace MaaWpfGui
/// yj历日期的字符串表示形式
public static string GetYJTimeDateString()
{
- return GetYJTimeDate().ToString();
+ return GetYJTimeDate().ToString("yyyy/MM/dd HH:mm:ss");
}
///
diff --git a/src/MaaWpfGui/MaaWpfGui.csproj b/src/MaaWpfGui/MaaWpfGui.csproj
index 1508a6ac98..5eb73cc54d 100644
--- a/src/MaaWpfGui/MaaWpfGui.csproj
+++ b/src/MaaWpfGui/MaaWpfGui.csproj
@@ -495,6 +495,17 @@
+
+
+ {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}
+ 1
+ 0
+ 0
+ tlbimp
+ False
+ True
+
+
xcopy /e /y /i /c "$(ProjectDir)..\..\3rdparty\tools" "$(TargetDir)"
diff --git a/src/MaaWpfGui/Main/SettingsViewModel.cs b/src/MaaWpfGui/Main/SettingsViewModel.cs
index 262c353223..967c1247df 100644
--- a/src/MaaWpfGui/Main/SettingsViewModel.cs
+++ b/src/MaaWpfGui/Main/SettingsViewModel.cs
@@ -15,14 +15,15 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using IWshRuntimeLibrary;
using MaaWpfGui.MaaHotKeys;
-using Newtonsoft.Json.Linq;
using Stylet;
using StyletIoC;
@@ -402,46 +403,74 @@ namespace MaaWpfGui
public void TryToStartEmulator(bool manual = false)
{
if ((EmulatorPath.Length == 0
- || !File.Exists(EmulatorPath))
+ || !System.IO.File.Exists(EmulatorPath))
|| !(StartEmulator
|| manual))
{
return;
}
- ProcessStartInfo startInfo;
- if (EmulatorAddCommand.Length != 0)
- {
- startInfo = new ProcessStartInfo(EmulatorPath, EmulatorAddCommand);
- }
- else
- {
- startInfo = new ProcessStartInfo(EmulatorPath);
- }
-
- startInfo.UseShellExecute = false;
- Process process = new Process
- {
- StartInfo = startInfo,
- };
-
- process.Start();
- process.WaitForInputIdle();
- if (MinimizingStartup)
- {
- for (int i = 0; !IsIconic(process.MainWindowHandle) && i < 5000; ++i)
- {
- ShowWindow(process.MainWindowHandle, SWMINIMIZE);
- Thread.Sleep(1);
- }
- }
-
if (!int.TryParse(EmulatorWaitSeconds, out int delay))
{
delay = 60;
}
- Thread.Sleep(delay * 1000);
+ try
+ {
+ string fileName;
+ string arguments;
+ ProcessStartInfo startInfo;
+
+ if (Path.GetExtension(EmulatorPath).ToLower() == ".lnk")
+ {
+ WshShell shell = new WshShell();
+ WshShortcut shortcut = (WshShortcut)shell.CreateShortcut(EmulatorPath);
+ fileName = shortcut.TargetPath;
+ arguments = shortcut.Arguments;
+ }
+ else
+ {
+ fileName = EmulatorPath;
+ arguments = EmulatorAddCommand;
+ }
+
+ if (arguments.Length != 0)
+ {
+ startInfo = new ProcessStartInfo(fileName, arguments);
+ }
+ else
+ {
+ startInfo = new ProcessStartInfo(fileName);
+ }
+
+ startInfo.UseShellExecute = false;
+ Process process = new Process
+ {
+ StartInfo = startInfo,
+ };
+ process.Start();
+ process.WaitForInputIdle();
+ if (MinimizingStartup)
+ {
+ for (int i = 0; !IsIconic(process.MainWindowHandle) && i < delay * 1000; ++i)
+ {
+ ShowWindow(process.MainWindowHandle, SWMINIMIZE);
+ Thread.Sleep(1);
+ }
+ }
+ }
+ catch (Exception)
+ {
+ if (EmulatorAddCommand.Length != 0)
+ {
+ Process.Start(EmulatorPath);
+ }
+ else
+ {
+ Process.Start(EmulatorPath, EmulatorAddCommand);
+ Thread.Sleep(delay * 1000);
+ }
+ }
}
///
@@ -1070,7 +1099,7 @@ namespace MaaWpfGui
}
/* 访问好友设置 */
- private string _lastCreditFightTaskTime = ViewStatusStorage.Get("Visit.LastCreditFightTaskTime", Utils.GetYJTimeDate().AddDays(-1).ToString());
+ private string _lastCreditFightTaskTime = ViewStatusStorage.Get("Visit.LastCreditFightTaskTime", Utils.GetYJTimeDate().AddDays(-1).ToString("yyyy/MM/dd HH:mm:ss"));
public string LastCreditFightTaskTime
{
@@ -1091,14 +1120,14 @@ namespace MaaWpfGui
{
get
{
- if (DateTime.TryParse(LastCreditFightTaskTime, out DateTime lastCreditFightTaskTime))
+ try
{
- if (Utils.GetYJTimeDate() > lastCreditFightTaskTime.Date)
+ if (Utils.GetYJTimeDate() > DateTime.ParseExact(_lastCreditFightTaskTime, "yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture))
{
return _creditFightTaskEnabled;
}
}
- else
+ catch
{
return _creditFightTaskEnabled;
}
@@ -1934,13 +1963,13 @@ namespace MaaWpfGui
return;
}
- if (!File.Exists(_bluestacksConfig))
+ if (!System.IO.File.Exists(_bluestacksConfig))
{
ViewStatusStorage.Set("Bluestacks.Config.Error", "File not exists");
return;
}
- var all_lines = File.ReadAllLines(_bluestacksConfig);
+ var all_lines = System.IO.File.ReadAllLines(_bluestacksConfig);
foreach (var line in all_lines)
{
if (line.StartsWith(_bluestacksKeyWord))
@@ -1981,7 +2010,7 @@ namespace MaaWpfGui
public async void ReplaceADB()
{
- if (!File.Exists(AdbPath))
+ if (!System.IO.File.Exists(AdbPath))
{
Execute.OnUIThread(() =>
{
@@ -1993,7 +2022,7 @@ namespace MaaWpfGui
return;
}
- if (!File.Exists(GoogleAdbFilename))
+ if (!System.IO.File.Exists(GoogleAdbFilename))
{
var downloadTask = Task.Run(() =>
{
@@ -2022,7 +2051,7 @@ namespace MaaWpfGui
process.Kill();
}
- File.Copy(AdbPath, AdbPath + ".bak", true);
+ System.IO.File.Copy(AdbPath, AdbPath + ".bak", true);
const string UnzipDir = "adb_unzip";
if (Directory.Exists(UnzipDir))
@@ -2031,7 +2060,7 @@ namespace MaaWpfGui
}
System.IO.Compression.ZipFile.ExtractToDirectory(GoogleAdbFilename, UnzipDir);
- File.Copy(UnzipDir + "/platform-tools/adb.exe", AdbPath, true);
+ System.IO.File.Copy(UnzipDir + "/platform-tools/adb.exe", AdbPath, true);
Directory.Delete(UnzipDir, true);
});
await procTask;