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

Commit

Permalink
fix: removed prevent actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 22, 2023
1 parent 18013ce commit e9cc997
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 25 deletions.
4 changes: 0 additions & 4 deletions RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ public enum PluginConfigBool : byte
[Default(true)] AutoOffBetweenArea,
[Default(true)] AutoOffCutScene,
[Default(true)] AutoOffWhenDead,
[Default(false)] PreventActionsIfOutOfCombat,
[Default(false)] PreventActionsIfDutyRing,
[Default(true)] ChangeTargetForFate,
[Default(true)] MoveTowardsScreenCenter,
[Default(true)] SayOutStateChanged,
Expand Down Expand Up @@ -304,8 +302,6 @@ public enum PluginConfigBool : byte

[Default(true)] UseAOEAction,
[Default(false)] UseAOEWhenManual,
[Default(false)] PreventActions,
[Default(false)] PreventActionsDuty,
[Default(true)] AutoBurst,
[Default(true)] AutoHeal,
[Default(true)] UseAbility,
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Localization/ConfigTranslation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ internal static class ConfigTranslation
PluginConfigBool.UseAOEAction => LocalizationManager.RightLang.ConfigWindow_Param_UseAOEAction,
PluginConfigBool.UseAOEWhenManual => LocalizationManager.RightLang.ConfigWindow_Param_UseAOEWhenManual,
PluginConfigBool.NoNewHostiles => LocalizationManager.RightLang.ConfigWindow_Param_NoNewHostiles,
PluginConfigBool.PreventActions => LocalizationManager.RightLang.ConfigWindow_Param_PreventActionsIfOutOfCombat,
PluginConfigBool.PreventActionsDuty => LocalizationManager.RightLang.ConfigWindow_Param_PreventActionsIfDutyRing,
PluginConfigBool.AutoBurst => LocalizationManager.RightLang.ConfigWindow_Param_AutoBurst,
PluginConfigBool.AutoHeal => LocalizationManager.RightLang.ConfigWindow_Param_AutoHeal,
PluginConfigBool.UseTinctures => LocalizationManager.RightLang.ConfigWindow_Param_UseTinctures,
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ internal partial class Strings
public string ConfigWindow_Param_AutoOffCutScene { get; set; } = "Auto turn off during cut scene.";

public string ConfigWindow_Param_AutoOffWhenDead { get; set; } = "Auto turn off when dead.";
public string ConfigWindow_Param_PreventActionsIfOutOfCombat { get; set; } = "Prevent Actions if no hostiles in range.";
public string ConfigWindow_Param_PreventActionsIfDutyRing { get; set; } = "Also prevent if in duty until duty start.";

public string ConfigWindow_Param_UseWorkTask { get; set; } = "Use work task for acceleration.";
public string ConfigWindow_Param_ToggleManual { get; set; } = "Make Manual Command as toggle.";
Expand Down
5 changes: 0 additions & 5 deletions RotationSolver/UI/RotationConfigWindow_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ private static void DrawBasicAutoSwitch()

new DragFloatSearchPlugin(PluginConfigFloat.MistakeRatio, 0.002f),

new CheckBoxSearchPlugin(PluginConfigBool.PreventActions, new ISearchable[]
{
new CheckBoxSearchPlugin(PluginConfigBool.PreventActionsDuty),
}),

new DragFloatRangeSearchPlugin(PluginConfigFloat.NotInCombatDelayMin, PluginConfigFloat.NotInCombatDelayMax, 0.002f),
};

Expand Down
13 changes: 1 addition & 12 deletions RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ internal static class MajorUpdater
&& !Svc.Condition[ConditionFlag.BetweenAreas51]
&& Player.Available && !SocialUpdater.InPvp;

public static bool ShouldPreventActions => Service.Config.GetValue(PluginConfigBool.PreventActions)
&& (Service.Config.GetValue(PluginConfigBool.PreventActionsDuty)
&& Svc.Condition[ConditionFlag.BoundByDuty]
&& !Svc.DutyState.IsDutyStarted
|| !DataCenter.HasHostilesInMaxRange);

#if DEBUG
private static readonly Dictionary<int, bool> _values = new();
#endif
Expand Down Expand Up @@ -88,12 +82,7 @@ private unsafe static void FrameworkUpdate(Framework framework)
}
ActionUpdater.UpdateActionInfo();

var canDoAction = false;
if (!ShouldPreventActions)
{
canDoAction = ActionUpdater.CanDoAction();
}

var canDoAction = ActionUpdater.CanDoAction();
MovingUpdater.UpdateCanMove(canDoAction);
if (canDoAction)
{
Expand Down

0 comments on commit e9cc997

Please sign in to comment.