forked from tModLoader/tModLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegenSourceTask.cs
33 lines (28 loc) · 918 Bytes
/
RegenSourceTask.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Windows.Forms;
using Terraria.ModLoader.Properties;
namespace Terraria.ModLoader.Setup
{
public class RegenSourceTask : CompositeTask
{
public RegenSourceTask(ITaskInterface taskInterface, params SetupOperation[] tasks) : base(taskInterface, tasks) { }
public override bool StartupWarning() {
if (Settings.Default.PatchMode == 2) {
if (MessageBox.Show(
"Patch mode will be reset from fuzzy to offset.\r\n",
"Strict Patch Mode", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) != DialogResult.OK)
return false;
}
return MessageBox.Show(
"Any changes in /src will be lost.\r\n",
"Ready for Setup", MessageBoxButtons.OKCancel, MessageBoxIcon.Information)
== DialogResult.OK;
}
public override void Run() {
if (Settings.Default.PatchMode == 2) {
Settings.Default.PatchMode = 1;
Settings.Default.Save();
}
base.Run();
}
}
}