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

Commit

Permalink
fix: action sequencer ui changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 2, 2023
1 parent e5e46c6 commit 38ea7d2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 18 deletions.
10 changes: 10 additions & 0 deletions Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
15813,
15824,
15832,
19288,
19306,
19315,
19324,
23367,
23383,
23629,
Expand All @@ -121,6 +125,7 @@
25936,
25946,
25950,
26435,
26437,
26450,
26451,
Expand All @@ -143,6 +148,11 @@
28854,
28904,
28905,
28996,
28998,
28999,
29002,
29003,
29046,
29210,
29211,
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/ActionSequencer/ConditionSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void Draw(ICustomRotation combo, bool isActionSequencer)
ImGui.SameLine();
ImGui.SetNextItemWidth(65);
int isAnd = IsAnd ? 1 : 0;
if (ImGui.Combo("##Rule" + GetHashCode().ToString(), ref isAnd, new string[]
if (ImGui.Combo($"##Rule" + GetHashCode().ToString(), ref isAnd, new string[]
{
"OR", "AND",
}, 2))
Expand Down
5 changes: 4 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@
"ActionSequencer_MustUseDesc": "Skip AOE and Buff.",
"ActionSequencer_Empty": "UseUp",
"ActionSequencer_EmptyDesc": "UseUp or Skip Combo",
"ActionSequencer_ActionSequencerDescription": "Add some condition to automatic use this action.",
"ActionSequencer_ActionSequencerDescription": "To customize when Rotation Solver uses specific actions automatically, click on an action's icon in the left list. Below, you may set the conditions for when that specific action is used. Each action can have a different set of conditions to override the default rotation behavior.",
"ActionSequencer_ForceConditionSet": "Conditions When Automatic Use of Action is Forced",
"ActionSequencer_DisableConditionSet": "Conditions When Automatic Use of Action is Disabled",
"ActionSequencer_ConditionsRequired": "Conditions Required",
"ActionSequencer_Can": "Can",
"ActionSequencer_Cannot": "Cannot",
"ActionSequencer_Is": "Is",
Expand Down
5 changes: 4 additions & 1 deletion RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ internal partial class Strings
public string ActionSequencer_MustUseDesc { get; set; } = "Skip AOE and Buff.";
public string ActionSequencer_Empty { get; set; } = "UseUp";
public string ActionSequencer_EmptyDesc { get; set; } = "UseUp or Skip Combo";
public string ActionSequencer_ActionSequencerDescription { get; set; } = "Add some condition to automatic use this action.";
public string ActionSequencer_ActionSequencerDescription { get; set; } = "To customize when Rotation Solver uses specific actions automatically, click on an action's icon in the left list. Below, you may set the conditions for when that specific action is used. Each action can have a different set of conditions to override the default rotation behavior.";

public string ActionSequencer_ForceConditionSet { get; set; } = "Conditions When Automatic Use of Action is Forced";
public string ActionSequencer_DisableConditionSet { get; set; } = "Conditions When Automatic Use of Action is Disabled";
public string ActionSequencer_Can { get; set; } = "Can";
public string ActionSequencer_Cannot { get; set; } = "Cannot";
public string ActionSequencer_Is { get; set; } = "Is";
Expand Down
24 changes: 14 additions & 10 deletions RotationSolver/UI/RotationConfigWindow_Action.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using RotationSolver.ActionSequencer;
using Dalamud.Interface.Colors;
using RotationSolver.ActionSequencer;
using RotationSolver.Localization;
using RotationSolver.Updaters;

Expand Down Expand Up @@ -61,22 +62,25 @@ private static void DrawActionSequencerCondition()
var set = ActionSequencerUpdater.RightSet;
if (set == null) return;

ConditionSet conditionSet;
if (ActionSequencerUpdater.IsDisableCondition)
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.DalamudYellow, ActiveAction.Name);

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.ActionSequencer_ForceConditionSet))
{
if (!set.DiableConditions.TryGetValue(ActiveAction.ID, out conditionSet))
if (!set.Conditions.TryGetValue(ActiveAction.ID, out var conditionSet))
{
conditionSet = set.DiableConditions[ActiveAction.ID] = new ConditionSet();
conditionSet = set.Conditions[ActiveAction.ID] = new ConditionSet();
}
conditionSet?.Draw(rotation, ActiveAction.IsActionSequencer);
}
else

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.ActionSequencer_DisableConditionSet))
{
if (!set.Conditions.TryGetValue(ActiveAction.ID, out conditionSet))
if (!set.DiableConditions.TryGetValue(ActiveAction.ID, out var disableConditionSet))
{
conditionSet = set.Conditions[ActiveAction.ID] = new ConditionSet();
disableConditionSet = set.DiableConditions[ActiveAction.ID] = new ConditionSet();
}
disableConditionSet?.Draw(rotation, true);
}

conditionSet?.Draw(rotation, ActionSequencerUpdater.IsDisableCondition || ActiveAction.IsActionSequencer);
}
}
1 change: 0 additions & 1 deletion RotationSolver/UI/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ private unsafe void DrawStatus()
ImGui.Text("Moving: " + DataCenter.IsMoving.ToString());
ImGui.Text("Stop Moving: " + DataCenter.StopMovingRaw.ToString());


ImGui.Text("TerritoryType: " + DataCenter.TerritoryContentType.ToString());
ImGui.Text("DPSTaken: " + DataCenter.DPSTaken.ToString());
ImGui.Text("TimeToNext: " + DataCenter.NextAbilityToNextGCD.ToString());
Expand Down
4 changes: 0 additions & 4 deletions RotationSolver/Updaters/ActionSequencerUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ internal class ActionSequencerUpdater

public static string[] ConditionSetsName => _conditionSet?.Select(s => s.Name).ToArray() ?? Array.Empty<string>();

public static bool IsDisableCondition = false;

public static void UpdateActionSequencerAction()
{
if (_conditionSet == null) return;
Expand Down Expand Up @@ -118,8 +116,6 @@ public static void DrawHeader()

ImGui.Combo("##MajorConditionCombo", ref Service.Config.ActionSequencerIndex, combos, combos.Length);

ImGui.Checkbox("Is Disabled Condition", ref IsDisableCondition);

if (hasSet)
{
ImGui.SameLine();
Expand Down

0 comments on commit 38ea7d2

Please sign in to comment.