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

Commit

Permalink
fix: add an option to enable the auto downloading rotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 12, 2023
1 parent 1565569 commit 028eb85
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 3 additions & 4 deletions RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,15 @@ public class PluginConfiguration : IPluginConfiguration

public bool InDebug = false;
public bool AutoUpdateLibs = true;
public string[] OtherLibs = new string[]
{
"https://github.com/ArchiDog1998/RotationSolver/releases/latest/download/latest.zip",
};
public string[] OtherLibs = new string[0];

public List<TargetingType> TargetingTypes { get; set; } = new List<TargetingType>();
public int TargetingIndex { get; set; } = 0;
public MacroInfo DutyStart { get; set; } = new MacroInfo();
public MacroInfo DutyEnd { get; set; } = new MacroInfo();

public bool AutoDownloadRotations = true;

public bool ToggleManual = false;
public bool OnlyShowWithHostileOrInDuty = true;
public bool ShowControlWindow = false;
Expand Down
2 changes: 2 additions & 0 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ internal partial class Strings
public string ConfigWindow_Param_UseStopCasting { get; set; } = "Use stopping casting when target is dead.";
public string ConfigWindow_Param_ShowActionFlag { get; set; } = "Show action flag.";
public string ConfigWindow_Param_InDebug { get; set; } = "Debug Mode";
public string ConfigWindow_Param_AutoDownloadRotations { get; set; } = "Auto Download Rotaions.";

public string ConfigWindow_Param_ShowHealthRatio { get; set; } = "Show the health ratio for the check of Boss, Dying, Dot.";

public string ConfigWindow_Param_HealthRatioBoss { get; set; } = "If target's max health ratio is higher than this, regard it as Boss.";
Expand Down
5 changes: 5 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_RotationDev.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ private void DrawRotationDevTab()
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_InDebug,
ref Service.Config.InDebug, Service.Default.InDebug);

ImGui.SameLine();

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_AutoDownloadRotations,
ref Service.Config.AutoDownloadRotations, Service.Default.AutoDownloadRotations);

if (ImGui.BeginChild("Third-party Libs", new Vector2(0f, -1f), true))
{
if (ImGui.Button("AddOne"))
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Updaters/RotationUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static async void GetAllCustomRotations()
if (string.IsNullOrEmpty(fileName)) continue;
if (Path.GetExtension(fileName) != ".dll") continue;
var filePath = Path.Combine(relayFolder, fileName);
if(!Service.Config.AutoDownloadRotations && File.Exists(filePath)) continue;

//Download
using (HttpResponseMessage response = await client.GetAsync(url))
Expand Down

0 comments on commit 028eb85

Please sign in to comment.