This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed loading and translation bugs.
- Loading branch information
1 parent
008550d
commit 8e0db8f
Showing
26 changed files
with
291 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"3": 0.6, | ||
"5": 2.1, | ||
"9": 0.6, | ||
"15": 0.6, | ||
"16": 0.6, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"ClickingCount": 60431, | ||
"ClickingCount": 60443, | ||
"SayingHelloCount": 13, | ||
"SaidUsers": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[ | ||
"ArchiDog1998|FFXIVRotations|DefaultRotations", | ||
"IncognitoWater|IncognitoWaterRotations|IcWaRotations", | ||
"thunderebolt|BoltsRotations|BoltsRotations", | ||
"BrakusTapus|KirboRotations|KirboRotations" | ||
"ArchiDog1998|FFXIVRotations|DefaultRotations" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace RotationSolver.Basic.Attributes; | ||
namespace RotationSolver.Basic.Attributes; | ||
|
||
[AttributeUsage(AttributeTargets.Class)] | ||
public class RotationAttribute(string name) : Attribute | ||
public class RotationAttribute(string name, CombatType type) : Attribute | ||
{ | ||
public string Name => name; | ||
public CombatType Type => type; | ||
|
||
public string? Description { get; set; } | ||
public CombatType Type { get; set; } = CombatType.None; | ||
|
||
public string? GameVersion { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 66 additions & 66 deletions
132
RotationSolver.Basic/Configuration/Conditions/IConditionConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,77 @@ | ||
//using Newtonsoft.Json.Linq; | ||
using Newtonsoft.Json.Linq; | ||
|
||
//namespace RotationSolver.Basic.Configuration.Conditions; | ||
namespace RotationSolver.Basic.Configuration.Conditions; | ||
|
||
//internal class IConditionConverter : JsonCreationConverter<ICondition> | ||
//{ | ||
// protected override ICondition Create(JObject jObject) | ||
// { | ||
// if (FieldExists(nameof(ConditionSet.Conditions), jObject)) | ||
// { | ||
// return new ConditionSet(); | ||
// } | ||
// else if (FieldExists(nameof(ActionCondition.ActionConditionType), jObject)) | ||
// { | ||
// return new ActionCondition(); | ||
// } | ||
// else if (FieldExists(nameof(TargetCondition.TargetConditionType), jObject)) | ||
// { | ||
// return new TargetCondition(); | ||
// } | ||
// else if (FieldExists(nameof(RotationCondition.ComboConditionType), jObject)) | ||
// { | ||
// return new RotationCondition(); | ||
// } | ||
// else if (FieldExists(nameof(TraitCondition.TraitID), jObject)) | ||
// { | ||
// return new TraitCondition(); | ||
// } | ||
// else if (FieldExists(nameof(NamedCondition.ConditionName), jObject)) | ||
// { | ||
// return new NamedCondition(); | ||
// } | ||
// else if (FieldExists(nameof(TerritoryCondition.TerritoryConditionType), jObject)) | ||
// { | ||
// return new TerritoryCondition(); | ||
// } | ||
// else | ||
// { | ||
// return null; | ||
// } | ||
// } | ||
internal class IConditionConverter : JsonCreationConverter<ICondition> | ||
{ | ||
protected override ICondition Create(JObject jObject) | ||
{ | ||
if (FieldExists(nameof(ConditionSet.Conditions), jObject)) | ||
{ | ||
return new ConditionSet(); | ||
} | ||
else if (FieldExists(nameof(ActionCondition.ActionConditionType), jObject)) | ||
{ | ||
return new ActionCondition(); | ||
} | ||
else if (FieldExists(nameof(TargetCondition.TargetConditionType), jObject)) | ||
{ | ||
return new TargetCondition(); | ||
} | ||
else if (FieldExists(nameof(RotationCondition.ComboConditionType), jObject)) | ||
{ | ||
return new RotationCondition(); | ||
} | ||
else if (FieldExists(nameof(TraitCondition.TraitID), jObject)) | ||
{ | ||
return new TraitCondition(); | ||
} | ||
else if (FieldExists(nameof(NamedCondition.ConditionName), jObject)) | ||
{ | ||
return new NamedCondition(); | ||
} | ||
else if (FieldExists(nameof(TerritoryCondition.TerritoryConditionType), jObject)) | ||
{ | ||
return new TerritoryCondition(); | ||
} | ||
else | ||
{ | ||
return null; | ||
} | ||
} | ||
|
||
// private static bool FieldExists(string fieldName, JObject jObject) | ||
// { | ||
// return jObject[fieldName] != null; | ||
// } | ||
//} | ||
private static bool FieldExists(string fieldName, JObject jObject) | ||
{ | ||
return jObject[fieldName] != null; | ||
} | ||
} | ||
|
||
//internal abstract class JsonCreationConverter<T> : JsonConverter | ||
//{ | ||
// protected abstract T Create(JObject jObject); | ||
internal abstract class JsonCreationConverter<T> : JsonConverter | ||
{ | ||
protected abstract T Create(JObject jObject); | ||
|
||
// public override bool CanConvert(Type objectType) | ||
// { | ||
// return typeof(T).IsAssignableFrom(objectType); | ||
// } | ||
public override bool CanConvert(Type objectType) | ||
{ | ||
return typeof(T).IsAssignableFrom(objectType); | ||
} | ||
|
||
// public override bool CanWrite => false; | ||
public override bool CanWrite => false; | ||
|
||
// public sealed override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
// { | ||
// } | ||
public sealed override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
} | ||
|
||
// public sealed override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) | ||
// { | ||
// // Load JObject from stream | ||
// JObject jObject = JObject.Load(reader); | ||
public sealed override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
// Load JObject from stream | ||
JObject jObject = JObject.Load(reader); | ||
|
||
// // Create target object based on JObject | ||
// T target = Create(jObject); | ||
// Create target object based on JObject | ||
T target = Create(jObject); | ||
|
||
// // Populate the object properties | ||
// serializer.Populate(jObject.CreateReader(), target); | ||
// Populate the object properties | ||
serializer.Populate(jObject.CreateReader(), target); | ||
|
||
// return target; | ||
// } | ||
//} | ||
return target; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.