Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: changed with timeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 20, 2023
1 parent 7f28dd0 commit c2611e9
Show file tree
Hide file tree
Showing 34 changed files with 94 additions and 63 deletions.
5 changes: 0 additions & 5 deletions RotationSolver/Helpers/ConditionHelper.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
using ImGuiNET;
using RotationSolver.Actions.BaseAction;
using RotationSolver.Data;
using RotationSolver.Localization;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Rotations.Script.Conditions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace RotationSolver.Helpers
{
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver/Interfaces.cd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Interface Name="RotationSolver.Actions.IBaseAction">
<Position X="4.25" Y="9.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAogAAAAAAABYAAAIAIADAAAACABIAAAAABAAAAgMA=</HashCode>
<HashCode>CAAogAAAAAAABYQABIAIADAAAACABIAAAAABAAAAgMA=</HashCode>
<FileName>Actions\IBaseAction.cs</FileName>
</TypeIdentifier>
</Interface>
Expand All @@ -43,14 +43,14 @@
</TypeIdentifier>
</Interface>
<Interface Name="RotationSolver.Rotations.Basic.IBLUAction">
<Position X="3.25" Y="15.25" Width="1.5" />
<Position X="3.25" Y="15.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA=</HashCode>
<FileName>Rotations\Basic\BLU_Base.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="RotationSolver.Rotations.Basic.INinAction">
<Position X="5.25" Y="15.25" Width="1.5" />
<Position X="5.25" Y="15.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Rotations\Basic\NIN_Base.cs</FileName>
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Localization/EnumTranslations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using RotationSolver.Commands;
using RotationSolver.Data;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Rotations.Script.Conditions;
using RotationSolver.Timeline;

namespace RotationSolver.Localization;

Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/RotationSolver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Rotations\Script\" />
</ItemGroup>



Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Healer/AST/AST_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Healer.ASTCombos;
namespace RotationSolver.Rotations.Healer.AST;

internal sealed class AST_Default : AST_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Healer/SCH/SCH_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Healer.SCHCombos;
namespace RotationSolver.Rotations.Healer.SCH;

internal sealed class SCH_Default : SCH_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Healer/SGE/SGE_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Rotations.Basic;

namespace RotationSolver.Rotations.Healer.SGECombos;
namespace RotationSolver.Rotations.Healer.SGE;

internal sealed class SGE_Default : SGE_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Healer/WHM/WHM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Healer.WHMCombos;
namespace RotationSolver.Rotations.Healer.WHM;
internal sealed class WHM_Default : WHM_Base
{
public override string GameVersion => "6.28";
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Melee/DRG/DRG_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;

namespace RotationSolver.Rotations.Melee.DRGCombos;
namespace RotationSolver.Rotations.Melee.DRG;

internal sealed class DRG_Default : DRG_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Melee/MNK/MNK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Linq;

namespace RotationSolver.Rotations.Melee.MNKCombos;
namespace RotationSolver.Rotations.Melee.MNK;
internal sealed class MNK_Default : MNK_Base
{
public override string GameVersion => "6.0";
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Melee/NIN/NIN_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using RotationSolver.Updaters;
using System.Collections.Generic;

namespace RotationSolver.Rotations.Melee.NINCombos;
namespace RotationSolver.Rotations.Melee.NIN;

internal sealed class NIN_Default : NIN_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Melee/RPR/RPR_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Melee.RPRCombos;
namespace RotationSolver.Rotations.Melee.RPR;

internal sealed class RPR_Default : RPR_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Melee/SAM/SAM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;

namespace RotationSolver.Rotations.Melee.SAMCombos;
namespace RotationSolver.Rotations.Melee.SAM;

internal sealed class SAM_Default : SAM_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Linq;
using static RotationSolver.SigReplacers.Watcher;

namespace RotationSolver.Rotations.RangedMagicial.BLMCombos;
namespace RotationSolver.Rotations.RangedMagicial.BLM;
internal sealed partial class BLM_Default : BLM_Base
{
public override string GameVersion => "6.18";
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using RotationSolver.Configuration.RotationConfig;
using RotationSolver.Rotations.Basic;

namespace RotationSolver.Rotations.RangedMagicial.BLUCombos
namespace RotationSolver.Rotations.RangedMagicial.BLU
{
internal sealed class BLU_Default : BLU_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/RangedMagicial/RDM/RDM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;

namespace RotationSolver.Rotations.RangedMagicial.RDMCombos;
namespace RotationSolver.Rotations.RangedMagicial.RDM;

internal sealed class RDM_Default : RDM_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/RangedMagicial/SMN/SMN_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;

namespace RotationSolver.Rotations.RangedMagicial.SMNCombos;
namespace RotationSolver.Rotations.RangedMagicial.SMN;

internal sealed class SMN_Default : SMN_Base
{
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Rotations/RangedPhysicial/BRD/BRD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;
using static RotationSolver.Rotations.RangedPhysicial.BRDCombos.BRD_Default;
using static RotationSolver.Rotations.RangedPhysicial.BRD.BRD_Default;

namespace RotationSolver.Rotations.RangedPhysicial.BRDCombos;
namespace RotationSolver.Rotations.RangedPhysicial.BRD;

internal sealed class BRD_Default : BRD_Base
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Collections.Generic;
using System.Linq;

namespace RotationSolver.Rotations.RangedPhysicial.DNCCombos;
namespace RotationSolver.Rotations.RangedPhysicial.DNC;

internal sealed class DNC_Default : DNC_Base
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.RangedPhysicial.MCHCombos;
namespace RotationSolver.Rotations.RangedPhysicial.MCH;

internal sealed class MCH_Default : MCH_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Tank/DRK/DRK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Tank.DRKCombos;
namespace RotationSolver.Rotations.Tank.DRK;

internal sealed class DRK_Default : DRK_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Tank/GNB/GNB_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;

namespace RotationSolver.Rotations.Tank.GNBCombos;
namespace RotationSolver.Rotations.Tank.GNB;

internal sealed class GNB_Default : GNB_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Tank/PLD/PLD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RotationSolver.Rotations.CustomRotation;
using System.Collections.Generic;

namespace RotationSolver.Rotations.Tank.PLDCombos;
namespace RotationSolver.Rotations.Tank.PLD;

internal sealed class PLD_Default : PLD_Base
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Tank/WAR/WAR_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using RotationSolver.Rotations.Basic;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Tank.WARCombos;
namespace RotationSolver.Rotations.Tank.WAR;

internal sealed class WAR_Default : WAR_Base
{
Expand Down
5 changes: 0 additions & 5 deletions RotationSolver/SigReplacers/IconReplacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@
using Dalamud.Hooking;
using FFXIVClientStructs.FFXIV.Client.Game;
using Lumina.Excel.GeneratedSheets;
using Newtonsoft.Json;
using RotationSolver.Actions;
using RotationSolver.Data;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Rotations.Script;
using RotationSolver.Rotations.Script.Conditions;
using RotationSolver.Updaters;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;

namespace RotationSolver.SigReplacers;

internal sealed class IconReplacer : IDisposable
{

public record CustomRotationGroup(ClassJobID jobId, ClassJobID[] classJobIds, ICustomRotation[] rotations);

private delegate ulong IsIconReplaceableDelegate(uint actionID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
using RotationSolver.Data;
using RotationSolver.Windows;
using RotationSolver.Localization;
using RotationSolver.Rotations.Script;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Actions;
using Lumina.Data.Parsing;

namespace RotationSolver.Rotations.Script.Conditions;
namespace RotationSolver.Timeline;

internal class ActionCondition : ICondition
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
using RotationSolver.Helpers;
using RotationSolver.Localization;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Rotations.Script;
using RotationSolver.Windows;
using System;
using System.Collections.Generic;
using System.Linq;

namespace RotationSolver.Rotations.Script.Conditions;
namespace RotationSolver.Timeline;

internal class ConditionSet : ICondition
{
Expand Down
16 changes: 16 additions & 0 deletions RotationSolver/Timeline/ICondition.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RotationSolver.Rotations.CustomRotation;
using System;

namespace RotationSolver.Timeline;

internal interface ICondition
{
const float DefaultHeight = 33;
bool IsTrue(ICustomRotation rotation);
void Draw(ICustomRotation rotation);
float Height { get; }
}


Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RotationSolver.Rotations.CustomRotation;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotationSolver.Rotations.Script.Conditions;

internal interface ICondition
{
const float DefaultHeight = 33;
bool IsTrue(ICustomRotation rotation);
void Draw(ICustomRotation rotation);
float Height { get; }
}
namespace RotationSolver.Timeline;

internal class IConditionConverter : JsonCreationConverter<ICondition>
{
Expand Down
20 changes: 20 additions & 0 deletions RotationSolver/Timeline/MajorConditionSet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using RotationSolver.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotationSolver.Timeline;

internal class MajorConditionSet
{
public Dictionary<ActionID, ConditionSet> Conditions { get; } = new Dictionary<ActionID, ConditionSet>();

public string Name { get; set; }

public MajorConditionSet(string name)
{
Name = name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Script.Conditions;
namespace RotationSolver.Timeline;

internal class RotationCondition : ICondition
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using RotationSolver.Localization;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Script.Conditions;
namespace RotationSolver.Timeline;

internal class TargetCondition : ICondition
{
Expand Down Expand Up @@ -242,7 +242,7 @@ public void Draw(ICustomRotation combo)
break;

case TargetConditionType.Distance:
if(ConditionHelper.DrawDragFloat($"m##m{GetHashCode()}", ref DistanceOrTime))
if (ConditionHelper.DrawDragFloat($"m##m{GetHashCode()}", ref DistanceOrTime))
{
DistanceOrTime = Math.Max(0, DistanceOrTime);
}
Expand Down
Loading

0 comments on commit c2611e9

Please sign in to comment.