diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs index 298e3a80f..9f67c36af 100644 --- a/RotationSolver.Basic/DataCenter.cs +++ b/RotationSolver.Basic/DataCenter.cs @@ -436,5 +436,4 @@ internal static void AddDamageRec(float damageRatio) #endregion internal static SortedList AuthorHashes { get; set; } = []; - internal static string[] ContributorsHash { get; set; } = []; } diff --git a/RotationSolver/Commands/RSCommands_Actions.cs b/RotationSolver/Commands/RSCommands_Actions.cs index 80d911788..5b1a7bd9b 100644 --- a/RotationSolver/Commands/RSCommands_Actions.cs +++ b/RotationSolver/Commands/RSCommands_Actions.cs @@ -66,21 +66,6 @@ public static void DoAction() ControlWindow.DidTime = DateTime.Now; } - if (nextAction is BaseAction act1 && act1.Info.IsPvP && !act1.Setting.IsFriendly - && act1.TargetInfo.IsSingleTarget - && act1.Target.Target is PlayerCharacter p && p != Player.Object) - { - var hash = p.EncryptString(); - - //Don't attack authors and contributors!! - if ((DataCenter.AuthorHashes.ContainsKey(hash) - || DataCenter.ContributorsHash.Contains(hash))) - { - Svc.Chat.PrintError($"Please don't attack RS developers with RS by {act1}!"); - return; - } - } - #if DEBUG //if (nextAction is BaseAction acti) // Svc.Log.Debug($"Will Do {acti}"); diff --git a/RotationSolver/Helpers/DownloadHelper.cs b/RotationSolver/Helpers/DownloadHelper.cs index 3f8e48434..c269bb46a 100644 --- a/RotationSolver/Helpers/DownloadHelper.cs +++ b/RotationSolver/Helpers/DownloadHelper.cs @@ -5,23 +5,11 @@ namespace RotationSolver.Helpers; public static class DownloadHelper { - /// - /// HP and MP Boost ↑ (All Classes) - /// Maximum HP and MP are increased. - /// - public static string[] UsersHash { get; private set; } = []; - public static string[] Supporters { get; private set; } = []; public static IncompatiblePlugin[] IncompatiblePlugins { get; private set; } = []; public static async Task DownloadAsync() { IncompatiblePlugins = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/IncompatiblePlugins.json") ?? []; - - DataCenter.ContributorsHash = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/ContributorsHash.json") ?? []; - - UsersHash = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/UsersHash.json") ?? []; - - Supporters = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/Supporters.json") ?? []; } private static async Task DownloadOneAsync(string url) diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json index abee09630..4d4c5a88a 100644 --- a/RotationSolver/Localization/Localization.json +++ b/RotationSolver/Localization/Localization.json @@ -1,5 +1,5 @@ { - "RotationSolver.Data.UiString.ConfigWindowHeader": "Rotation Solver Settings v", + "RotationSolver.Data.UiString.ConfigWindowHeader": "Rotation Solver Reborn Settings v", "RotationSolver.Data.UiString.Commands_Rotation": "Open config window.", "RotationSolver.Basic.Data.StateCommandType.Manual": "Start the addon in Manual mode. You need to choose the target manually. This will bypass any engage settings that you have set up and will start attacking immediately once something is targeted.", "RotationSolver.Basic.Data.StateCommandType.Cancel": "Stop the addon. Always remember to turn it off when it is not in use!", @@ -25,14 +25,14 @@ "RotationSolver.Data.UiString.ActionFriendly": "Friendly", "RotationSolver.Data.UiString.ConfigWindow_About_Punchline": "Analyses PvE combat information in every frame and finds the best action.", "RotationSolver.Data.UiString.ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!", - "RotationSolver.Data.UiString.ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!", + "RotationSolver.Data.UiString.ConfigWindow_About_Clicking500k": "You're tiring RSR out, give it a break!", "RotationSolver.Data.UiString.ConfigWindow_Helper_GameVersion": "Game", "RotationSolver.Data.UiString.ConfigWindow_Helper_SwitchRotation": "Click to switch rotations", "RotationSolver.Data.UiString.ConfigWindow_ConditionSetDesc": "The condition set you chose, click to modify.", "RotationSolver.Data.UiString.ConfigWindow_Searching": "Search... ", "RotationSolver.Data.UiString.ConfigWindow_About_Description": "This means almost all the information available in one frame in combat, including the status of all players in the party, the status of any hostile targets, skill cooldowns, the MP and HP of characters, the location of characters, casting status of the hostile target, combo, combat duration, player level, etc.\n\nThen, it will highlight the best action on the hot bar, or help you to click on it.", "RotationSolver.Data.UiString.ConfigWindow_About_Warning": "It is designed for GENERAL COMBAT, not for savage or ultimate. Use it carefully.", - "RotationSolver.Data.UiString.ConfigWindow_About_ClickingCount": "Rotation Solver helped you by clicking actions {0:N0} times.", + "RotationSolver.Data.UiString.ConfigWindow_About_ClickingCount": "RSR helped you by clicking actions {0:N0} times.", "RotationSolver.Data.UiString.ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!", "RotationSolver.Data.UiString.ConfigWindow_About_Macros": "Macro", "RotationSolver.Data.UiString.ConfigWindow_About_Compatibility": "Compatibility", @@ -49,7 +49,7 @@ "RotationSolver.Data.UiString.SpecialCommandType_MoveForward": "Move Forward", "RotationSolver.Data.UiString.SpecialCommandType_Start": "Start ", "RotationSolver.Data.UiString.SpecialCommandType_Manual": "Manual Target", - "RotationSolver.Data.UiString.ConfigWindow_Extra_Description": "Rotation Solver focuses on the rotation itself. These are side features. If there are some other plugins can do that, these features will be deleted.", + "RotationSolver.Data.UiString.ConfigWindow_Extra_Description": "RSR focuses on the rotation itself. These are side features. If there are some other plugins can do that, these features will be deleted.", "RotationSolver.Data.UiString.ConfigWindow_EventItem": "Event", "RotationSolver.Data.UiString.ConfigWindow_Extra_Others": "Others", "RotationSolver.UI.RotationConfigWindowTab.Auto": "About some general actions usage and conditions.", @@ -57,7 +57,7 @@ "RotationSolver.UI.RotationConfigWindowTab.Basic": "Basic settings", "RotationSolver.UI.RotationConfigWindowTab.List": "Some things that have to be lists.", "RotationSolver.UI.RotationConfigWindowTab.Rotations": "All rotations that RS has loaded.", - "RotationSolver.Data.UiString.ConfigWindow_Rotations_Download": "Download Rotations", + "RotationSolver.Data.UiString.ConfigWindow_Rotations_Download": "Update Rotations", "RotationSolver.Data.UiString.ConfigWindow_Rotations_Links": "Links of the rotations online", "RotationSolver.Data.UiString.ConfigWindow_Rotations_Settings": "Settings", "RotationSolver.Data.UiString.ConfigWindow_Rotations_Loaded": "Loaded", @@ -215,7 +215,7 @@ "RotationSolver.Data.UiString.ConfigWindow_Events_ShareMacro": "Is Shared", "RotationSolver.Data.UiString.ConfigWindow_Events_DutyEnd": "Duty End: ", "PoslockCastingName": "Lock the movement when casting or when doing some actions.", - "UseStopCastingName": "Stops casting when the target is dead.", + "UseStopCastingName": "Stop casting if the target dies.", "AutoOpenChestName": "Auto Open the treasure chest", "PoslockCastingDescription": "LT is for gamepad player", "PoslockModifierName": "The modifier key to unlock the movement temporary", @@ -253,7 +253,7 @@ "RotationSolver.Data.UiString.SpecialCommandType_Raise": "Raise", "DownloadRotationsName": "Auto Download Rotations", "AutoLoadCustomRotationsName": "Auto load rotations", - "RotationSolver.Data.UiString.ConfigWindow_Rotations_Library": "The folder contains rotation libs or the download url about rotation lib.", + "RotationSolver.Data.UiString.ConfigWindow_Rotations_Library": "The folder contains the rotation library or the download url for the rotation library.", "RotationSolver.Data.UiString.SpecialCommandType_LimitBreak": "Limit Break", "UseOverlayWindowDescription": "This top window is used to display some extra information on your game window, such as target's positional, target and sub-target, etc.", "DrawingHeightName": "The height of the drawing things.", @@ -405,5 +405,24 @@ "HealWhenNothingTodoDelayName": "The delay of this type of healing.", "HealthDifferenceName": "HP for standard deviation for using AoE heal.", "AutoHealTimeToKillName": "Stop healing when time to kill is lower then...", - "RotationSolver.Data.UiString.ConfigWindow_DutyRotationDesc": "The duty rotation you chose, click to modify." + "RotationSolver.Data.UiString.ConfigWindow_DutyRotationDesc": "The duty rotation you chose, click to modify.", + "RotationSolver.Data.UiString.ConfigWindow_About_Warnings": "System Warnings", + "RotationSolver.Data.UiString.ConfigWindow_Rotations_Warning": "Custom rotations are just like plugins and have full access to the game and your computer", + "RotationSolver.Data.UiString.ConfigWindow_Rotations_Warning2": "Please only load rotations from sources that you trust", + "AutoLoadRotationsName": "Load rotations automatically at startup", + "DownloadCustomRotationsName": "Download custom rotations from the internet", + "AutoReloadRotationsName": "Monitor local rotations for changes (Developer Mode)", + "RotationSolver.Data.UiString.ConfigWindow_Rotations_Reset": "Reset To Defaults", + "RotationSolver.Data.UiString.ConfigWindow_Rotations_Sources": "Rotation Sources:", + "RotationSolver.Basic.Data.StateCommandType.Off": "Stop the addon. Always remember to turn it off when it is not in use!", + "RotationSolver.Basic.Data.TargetingType.LowHP": "Low HP", + "DefaultRotations.Ranged.MCH_zBeta.Name": "UseQueenWhenever", + "DefaultRotations.Ranged.MCH_zBeta.DisplayName": "Uses Rook Autoturret/Automaton Queen immediately whenever you get 50 battery", + "RotationSolver.Basic.Data.TargetHostileType.AllTargetsWhenSolo": "All targets when solo, or previously engaged.", + "RotationSolver.Data.UiString.ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.", + "RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Others": "Please don't relog without closing the game. Crashes may occur.", + "RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Description": "Literally, Rotation Solver helps you to choose the target and then click the action. So any plugin that changes these will affect its decision.\n\nHere is a list of known incompatible plugins:", + "RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Mislead": "Conflicts with RSR decision making", + "RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Mistake": "Can't properly execute the behavior that RSR wants to do.", + "RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Crash": "Causes the game to crash." } \ No newline at end of file diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 4f1e4031b..6043126d0 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -309,7 +309,11 @@ private static bool GetLocalImage(string name, out IDalamudTextureWrap texture) var file = dir + $"\\{name}.png"; - if (File.Exists(file)) + if (File.Exists(file) && File.GetLastWriteTime(file).AddDays(1) < DateTime.Now) + { + File.Delete(file); + } + else if (File.Exists(file)) { if (!_logosWrap.ContainsKey(file)) { @@ -361,8 +365,7 @@ private void DrawHeader(float wholeWidth) var frame = Environment.TickCount / 34 % FRAME_COUNT; if (frame <= 0) frame += FRAME_COUNT; - if (GetLocalImage(Service.Config.DrawIconAnimation - ? frame.ToString("D4") : "Logo", out var logo)) + if (GetLocalImage("Logo", out var logo)) { ImGui.SetCursorPos(cursor); ImGui.Image(logo.ImGuiHandle, Vector2.One * size); @@ -685,7 +688,6 @@ private static void DrawAbout() { { UiString.ConfigWindow_About_Macros.Local, DrawAboutMacros}, { UiString.ConfigWindow_About_Compatibility.Local, DrawAboutCompatibility}, - { UiString.ConfigWindow_About_Supporters.Local, DrawAboutSupporters}, { UiString.ConfigWindow_About_Links.Local, DrawAboutLinks}, { UiString.ConfigWindow_About_Warnings.Local, DrawAboutWarnings}, }); @@ -846,22 +848,6 @@ private static void DrawAboutCompatibility() } } } - private static void DrawAboutSupporters() - { - ImGui.TextWrapped(UiString.ConfigWindow_About_ThanksToSupporters.Local()); - - var width = ImGui.GetWindowWidth(); - using var font = ImRaii.PushFont(DrawingExtensions.GetFont(12)); - using var color = ImRaii.PushColor(ImGuiCol.Text, ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudYellow)); - - foreach (var name in DownloadHelper.Supporters) - { - ImGuiHelper.DrawItemMiddle(() => - { - ImGui.TextWrapped(name); - }, width, ImGui.CalcTextSize(name).X); - } - } private static void DrawAboutLinks() {