From afb6b853278f280ed26614ebc48726ef79e3a78e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com>
Date: Wed, 5 Apr 2023 09:57:39 +0800
Subject: [PATCH] fix: remove old project.
---
.../Magical/SMN_Old.cs | 2 +-
.../Melee/MNK_Old.cs | 2 +-
.../Melee/NIN_Old.cs | 2 +-
.../Ranged/MCH_Old.cs | 2 +-
.../Tank/WAR_Old.cs | 2 +-
RotationSolver.Old/RotationSolver.Old.csproj | 14 --------------
RotationSolver.sln | 6 ------
RotationSolver/RotationHelper.cs | 7 +++++--
RotationSolver/RotationSolver.csproj | 1 -
9 files changed, 10 insertions(+), 28 deletions(-)
rename {RotationSolver.Old => RotationSolver.Default}/Magical/SMN_Old.cs (99%)
rename {RotationSolver.Old => RotationSolver.Default}/Melee/MNK_Old.cs (98%)
rename {RotationSolver.Old => RotationSolver.Default}/Melee/NIN_Old.cs (99%)
rename {RotationSolver.Old => RotationSolver.Default}/Ranged/MCH_Old.cs (99%)
rename {RotationSolver.Old => RotationSolver.Default}/Tank/WAR_Old.cs (98%)
delete mode 100644 RotationSolver.Old/RotationSolver.Old.csproj
diff --git a/RotationSolver.Old/Magical/SMN_Old.cs b/RotationSolver.Default/Magical/SMN_Old.cs
similarity index 99%
rename from RotationSolver.Old/Magical/SMN_Old.cs
rename to RotationSolver.Default/Magical/SMN_Old.cs
index 5f761b514..3c96e2fc7 100644
--- a/RotationSolver.Old/Magical/SMN_Old.cs
+++ b/RotationSolver.Default/Magical/SMN_Old.cs
@@ -1,7 +1,7 @@
namespace RotationSolver.Default.Magical;
[RotationDesc(ActionID.SearingLight)]
-[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Old/Magical/SMN_Old.cs")]
+[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Default/Magical/SMN_Old.cs")]
public sealed class SMN_Old : SMN_Base
{
diff --git a/RotationSolver.Old/Melee/MNK_Old.cs b/RotationSolver.Default/Melee/MNK_Old.cs
similarity index 98%
rename from RotationSolver.Old/Melee/MNK_Old.cs
rename to RotationSolver.Default/Melee/MNK_Old.cs
index 1cfd5ba39..a4bd90daf 100644
--- a/RotationSolver.Old/Melee/MNK_Old.cs
+++ b/RotationSolver.Default/Melee/MNK_Old.cs
@@ -1,7 +1,7 @@
namespace RotationSolver.Old.Melee;
[RotationDesc(ActionID.RiddleOfFire)]
-[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Old/Melee/MNK_Old.cs")]
+[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Default/Melee/MNK_Old.cs")]
public sealed class MNK_Old : MNK_Base
{
public override string GameVersion => "6.0";
diff --git a/RotationSolver.Old/Melee/NIN_Old.cs b/RotationSolver.Default/Melee/NIN_Old.cs
similarity index 99%
rename from RotationSolver.Old/Melee/NIN_Old.cs
rename to RotationSolver.Default/Melee/NIN_Old.cs
index 41a2c5199..89268800f 100644
--- a/RotationSolver.Old/Melee/NIN_Old.cs
+++ b/RotationSolver.Default/Melee/NIN_Old.cs
@@ -1,7 +1,7 @@
namespace RotationSolver.Old.Melee;
[RotationDesc(ActionID.Mug)]
-[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Old/Melee/NIN_Old.cs")]
+[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Default/Melee/NIN_Old.cs")]
public sealed class NIN_Old : NIN_Base
{
public override string GameVersion => "6.0";
diff --git a/RotationSolver.Old/Ranged/MCH_Old.cs b/RotationSolver.Default/Ranged/MCH_Old.cs
similarity index 99%
rename from RotationSolver.Old/Ranged/MCH_Old.cs
rename to RotationSolver.Default/Ranged/MCH_Old.cs
index 9b1d2505b..07f21da1c 100644
--- a/RotationSolver.Old/Ranged/MCH_Old.cs
+++ b/RotationSolver.Default/Ranged/MCH_Old.cs
@@ -1,6 +1,6 @@
namespace RotationSolver.Old.Ranged;
-[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Old/Ranged/MCH_Old.cs")]
+[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Default/Ranged/MCH_Old.cs")]
public sealed class MCH_Old : MCH_Base
{
public override string GameVersion => "6.28";
diff --git a/RotationSolver.Old/Tank/WAR_Old.cs b/RotationSolver.Default/Tank/WAR_Old.cs
similarity index 98%
rename from RotationSolver.Old/Tank/WAR_Old.cs
rename to RotationSolver.Default/Tank/WAR_Old.cs
index 83e77a20a..81ece9d63 100644
--- a/RotationSolver.Old/Tank/WAR_Old.cs
+++ b/RotationSolver.Default/Tank/WAR_Old.cs
@@ -1,6 +1,6 @@
namespace RotationSolver.Old.Tank;
-[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Old/Tank/WAR_Old.cs")]
+[SourceCode("https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver.Default/Tank/WAR_Old.cs")]
public sealed class WAR_Old : WAR_Base
{
public override string GameVersion => "6.0";
diff --git a/RotationSolver.Old/RotationSolver.Old.csproj b/RotationSolver.Old/RotationSolver.Old.csproj
deleted file mode 100644
index 86bb5c2d4..000000000
--- a/RotationSolver.Old/RotationSolver.Old.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- x64
- AnyCPU
-
-
-
-
-
-
-
-
-
diff --git a/RotationSolver.sln b/RotationSolver.sln
index cbf9226bf..f415e0fe0 100644
--- a/RotationSolver.sln
+++ b/RotationSolver.sln
@@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotationSolver.Basic", "Rot
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotationSolver", "RotationSolver\RotationSolver.csproj", "{99EA3D95-33DC-424F-A9E6-FE6064F11592}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotationSolver.Old", "RotationSolver.Old\RotationSolver.Old.csproj", "{0F07FDE9-7189-43E9-8651-F1963D829DDA}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotationSolver.Extra", "RotationSolver.Extra\RotationSolver.Extra.csproj", "{09783AAB-C25E-4DF7-9693-0D47DC6108F2}"
EndProject
Global
@@ -37,10 +35,6 @@ Global
{99EA3D95-33DC-424F-A9E6-FE6064F11592}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99EA3D95-33DC-424F-A9E6-FE6064F11592}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99EA3D95-33DC-424F-A9E6-FE6064F11592}.Release|Any CPU.Build.0 = Release|Any CPU
- {0F07FDE9-7189-43E9-8651-F1963D829DDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0F07FDE9-7189-43E9-8651-F1963D829DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0F07FDE9-7189-43E9-8651-F1963D829DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0F07FDE9-7189-43E9-8651-F1963D829DDA}.Release|Any CPU.Build.0 = Release|Any CPU
{09783AAB-C25E-4DF7-9693-0D47DC6108F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09783AAB-C25E-4DF7-9693-0D47DC6108F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09783AAB-C25E-4DF7-9693-0D47DC6108F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/RotationSolver/RotationHelper.cs b/RotationSolver/RotationHelper.cs
index e2e1b3f00..3d123cf4d 100644
--- a/RotationSolver/RotationHelper.cs
+++ b/RotationSolver/RotationHelper.cs
@@ -9,12 +9,15 @@ internal static class RotationHelper
static readonly string[] _allowedAssembly = new string[]
{
DefaultAssembly,
- "RotationSolver.Old",
//"RotationSolver.Extra",
};
public static bool IsDefault(this ICustomRotation rotation)
- => DefaultAssembly == rotation.GetType().Assembly.GetName().Name;
+ {
+ var type = rotation.GetType();
+ if (DefaultAssembly != type.Assembly.GetName().Name) return false;
+ return type.Name.Contains("Default", StringComparison.OrdinalIgnoreCase);
+ }
public static bool IsAllowed(this ICustomRotation rotation, out string name)
{
diff --git a/RotationSolver/RotationSolver.csproj b/RotationSolver/RotationSolver.csproj
index 8419b8aee..a97271f42 100644
--- a/RotationSolver/RotationSolver.csproj
+++ b/RotationSolver/RotationSolver.csproj
@@ -12,7 +12,6 @@
-