From d8ffa282acbf0bd0e5eb8c3ceb8992d243d9b990 Mon Sep 17 00:00:00 2001 From: Paissa Heavy Industries <50399685+paissaheavyindustries@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:44:09 +0300 Subject: [PATCH] 1.0.4.1 --- Lemegeton/Content/Radar.cs | 50 ++++++++++++++++++++++------------ Lemegeton/Language/Chinese.cs | 12 ++++++++ Lemegeton/Language/Danish.cs | 12 ++++++++ Lemegeton/Language/English.cs | 6 +++- Lemegeton/Language/French.cs | 12 ++++++++ Lemegeton/Language/German.cs | 12 ++++++++ Lemegeton/Language/Japanese.cs | 12 ++++++++ Lemegeton/Language/Korean.cs | 12 ++++++++ Lemegeton/Plugin.cs | 7 +++-- 9 files changed, 114 insertions(+), 21 deletions(-) diff --git a/Lemegeton/Content/Radar.cs b/Lemegeton/Content/Radar.cs index abdf63a..f556360 100644 --- a/Lemegeton/Content/Radar.cs +++ b/Lemegeton/Content/Radar.cs @@ -3,6 +3,7 @@ using Dalamud.Interface.Internal; using Dalamud.Interface.Textures; using Dalamud.Interface.Textures.TextureWraps; +using FFXIVClientStructs.FFXIV.Client.Game.Character; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI.Agent; using ImGuiNET; @@ -702,6 +703,8 @@ public override void RenderEditor(string path) [AttributeOrderNumber(5001)] public bool IncludeDistance { get; set; } = true; [AttributeOrderNumber(5002)] + public bool IncludeHP { get; set; } = true; + [AttributeOrderNumber(5003)] public Vector4 TextColor { get; set; } = new Vector4(1.0f, 1.0f, 1.0f, 1.0f); [AttributeOrderNumber(6000)] @@ -1208,23 +1211,7 @@ private void SawEntry(GameObject go, Entry e, DateTime run) Vector2 pt = new Vector2(); Vector3 temp = _state.plug._ui.TranslateToScreen(go.Position.X, go.Position.Y, go.Position.Z); double dist = Vector3.Distance(_state.cs.LocalPlayer.Position, go.Position); - string name = IncludeDistance == true ? String.Format("{0} ({1:0})", go.Name.ToString(), dist) : String.Format("{0}", go.Name.ToString()); - Vector2 sz = ImGui.CalcTextSize(name); - float defSize = ImGui.GetFontSize(); - float mul = 20.0f / defSize; - sz.X *= mul; - sz.Y *= mul; - pt.X = temp.X - (sz.X / 2.0f); - pt.Y = temp.Y + 10.0f; - Vector3 tf = _state.cs.LocalPlayer.Position; - Vector3 tt = go.Position; - float distance = Vector3.Distance(tf, tt); - double anglexz = Math.Atan2(tf.Z - tt.Z, tf.X - tt.X); - distance = Math.Max(distance, 5.0f); - Vector4 col; - DateTime now = DateTime.Now; - float ang = 1.0f; - Vector4 mycol = ObjectColor; + Vector4 mycol = ObjectColor; switch (e.Type) { case Entry.EntryTypeEnum.Custom: @@ -1243,6 +1230,35 @@ private void SawEntry(GameObject go, Entry e, DateTime run) mycol = RareAnimalColor; break; } + string name = String.Format("{0}", go.Name.ToString()); + if (IncludeHP == true) + { + if (go is ICharacter) + { + ICharacter c = (ICharacter)go; + float hp = (float)c.CurrentHp / (float)c.MaxHp * 100.0f; + name += string.Format(" {0:0}%", (int)Math.Ceiling(hp)); + } + } + if (IncludeDistance == true) + { + name += string.Format(" ({0:0})", dist); + } + Vector2 sz = ImGui.CalcTextSize(name); + float defSize = ImGui.GetFontSize(); + float mul = 20.0f / defSize; + sz.X *= mul; + sz.Y *= mul; + pt.X = temp.X - (sz.X / 2.0f); + pt.Y = temp.Y + 10.0f; + Vector3 tf = _state.cs.LocalPlayer.Position; + Vector3 tt = go.Position; + float distance = Vector3.Distance(tf, tt); + double anglexz = Math.Atan2(tf.Z - tt.Z, tf.X - tt.X); + distance = Math.Max(distance, 5.0f); + Vector4 col; + DateTime now = DateTime.Now; + float ang = 1.0f; if (now < _firstSeen[go.Address]) { float time = (float)(now - _firstSeen[go.Address]).TotalMilliseconds / 200.0f; diff --git a/Lemegeton/Language/Chinese.cs b/Lemegeton/Language/Chinese.cs index c8cf3e1..6bd6e56 100644 --- a/Lemegeton/Language/Chinese.cs +++ b/Lemegeton/Language/Chinese.cs @@ -14,6 +14,18 @@ internal class Chinese : Core.Language public Chinese(State st) : base(st) { + #region 1.0.4.1 + //AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + //AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion + #region 1.0.4.0 + //AddEntry("MainMenu/Changelog", "Updates"); + //AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); + //AddEntry("Changelog/SinceYourLastUpdate", "Updates since your last version"); + //AddEntry("Changelog/Version", "Version"); + //AddEntry("Changelog/Description", "Description"); + //AddEntry("Changelog/1.0.4.0", " added all new Dawntrail hunts (S, A, B ranks) to Radar\n added an option to resize shortcut icon\n added a change log"); + #endregion #region 1.0.3.6 //AddEntry("Job/VPR", "Viper"); //AddEntry("Job/PCT", "Pictomancer"); diff --git a/Lemegeton/Language/Danish.cs b/Lemegeton/Language/Danish.cs index c7dcbb7..ae6b6ea 100644 --- a/Lemegeton/Language/Danish.cs +++ b/Lemegeton/Language/Danish.cs @@ -14,6 +14,18 @@ internal class Danish : Core.Language public Danish(State st) : base(st) { + #region 1.0.4.1 + //AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + //AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion + #region 1.0.4.0 + //AddEntry("MainMenu/Changelog", "Updates"); + //AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); + //AddEntry("Changelog/SinceYourLastUpdate", "Updates since your last version"); + //AddEntry("Changelog/Version", "Version"); + //AddEntry("Changelog/Description", "Description"); + //AddEntry("Changelog/1.0.4.0", " added all new Dawntrail hunts (S, A, B ranks) to Radar\n added an option to resize shortcut icon\n added a change log"); + #endregion #region 1.0.3.6 AddEntry("Job/VPR", "Viper"); AddEntry("Job/PCT", "Pictomancer"); diff --git a/Lemegeton/Language/English.cs b/Lemegeton/Language/English.cs index 45e688d..4d00825 100644 --- a/Lemegeton/Language/English.cs +++ b/Lemegeton/Language/English.cs @@ -14,6 +14,10 @@ internal class English : Core.Language public English(State st) : base(st) { + #region 1.0.4.1 + AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion #region 1.0.4.0 AddEntry("MainMenu/Changelog", "Updates"); AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); @@ -852,7 +856,7 @@ public English(State st) : base(st) AddEntry("Content/Miscellaneous/Radar/AlertFinder/ARankColor", "A-rank highlight color"); AddEntry("Content/Miscellaneous/Radar/AlertFinder/BRankColor", "B-rank highlight color"); AddEntry("Content/Miscellaneous/Radar/AlertFinder/RareAnimalColor", "Rare animal highlight color"); - AddEntry("Content/Miscellaneous/Radar/AlertFinder/ShowNames", "Show name tags"); + AddEntry("Content/Miscellaneous/Radar/AlertFinder/ShowNames", "Show name tags"); AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeDistance", "Include distance on the name tag"); AddEntry("Content/Miscellaneous/Radar/AlertFinder/TextColor", "Name tag text color"); AddEntry("Content/Miscellaneous/Radar/AlertFinder/ShowNameBg", "Show name tag background"); diff --git a/Lemegeton/Language/French.cs b/Lemegeton/Language/French.cs index ff77f1d..6c9206a 100644 --- a/Lemegeton/Language/French.cs +++ b/Lemegeton/Language/French.cs @@ -14,6 +14,18 @@ internal class French : Core.Language public French(State st) : base(st) { + #region 1.0.4.1 + //AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + //AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion + #region 1.0.4.0 + //AddEntry("MainMenu/Changelog", "Updates"); + //AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); + //AddEntry("Changelog/SinceYourLastUpdate", "Updates since your last version"); + //AddEntry("Changelog/Version", "Version"); + //AddEntry("Changelog/Description", "Description"); + //AddEntry("Changelog/1.0.4.0", " added all new Dawntrail hunts (S, A, B ranks) to Radar\n added an option to resize shortcut icon\n added a change log"); + #endregion #region 1.0.3.6 AddEntry("Job/VPR", "Rôdeur vipère"); AddEntry("Job/PCT", "Pictomancien"); diff --git a/Lemegeton/Language/German.cs b/Lemegeton/Language/German.cs index 73b5b3c..76a7e59 100644 --- a/Lemegeton/Language/German.cs +++ b/Lemegeton/Language/German.cs @@ -14,6 +14,18 @@ internal class German : Core.Language public German(State st) : base(st) { + #region 1.0.4.1 + //AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + //AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion + #region 1.0.4.0 + //AddEntry("MainMenu/Changelog", "Updates"); + //AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); + //AddEntry("Changelog/SinceYourLastUpdate", "Updates since your last version"); + //AddEntry("Changelog/Version", "Version"); + //AddEntry("Changelog/Description", "Description"); + //AddEntry("Changelog/1.0.4.0", " added all new Dawntrail hunts (S, A, B ranks) to Radar\n added an option to resize shortcut icon\n added a change log"); + #endregion #region 1.0.3.6 AddEntry("Job/VPR", "Viper"); AddEntry("Job/PCT", "Piktomant"); diff --git a/Lemegeton/Language/Japanese.cs b/Lemegeton/Language/Japanese.cs index 243bc94..f823c8b 100644 --- a/Lemegeton/Language/Japanese.cs +++ b/Lemegeton/Language/Japanese.cs @@ -14,6 +14,18 @@ internal class Japanese : Core.Language public Japanese(State st) : base(st) { + #region 1.0.4.1 + //AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + //AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion + #region 1.0.4.0 + //AddEntry("MainMenu/Changelog", "Updates"); + //AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); + //AddEntry("Changelog/SinceYourLastUpdate", "Updates since your last version"); + //AddEntry("Changelog/Version", "Version"); + //AddEntry("Changelog/Description", "Description"); + //AddEntry("Changelog/1.0.4.0", " added all new Dawntrail hunts (S, A, B ranks) to Radar\n added an option to resize shortcut icon\n added a change log"); + #endregion #region 1.0.3.6 AddEntry("Job/VPR", "ヴァイパー"); AddEntry("Job/PCT", "ピクトマンサー"); diff --git a/Lemegeton/Language/Korean.cs b/Lemegeton/Language/Korean.cs index 8ef1340..805f7e8 100644 --- a/Lemegeton/Language/Korean.cs +++ b/Lemegeton/Language/Korean.cs @@ -14,6 +14,18 @@ internal class Korean : Core.Language public Korean(State st) : base(st) { + #region 1.0.4.1 + //AddEntry("Content/Miscellaneous/Radar/AlertFinder/IncludeHP", "Include HP % on the name tag"); + //AddEntry("Changelog/1.0.4.1", " added an option to show HP & on the name tag of Radar/Finder"); + #endregion + #region 1.0.4.0 + //AddEntry("MainMenu/Changelog", "Updates"); + //AddEntry("Notifications/Settings/ShortcutScale", "Shortcut icon scale"); + //AddEntry("Changelog/SinceYourLastUpdate", "Updates since your last version"); + //AddEntry("Changelog/Version", "Version"); + //AddEntry("Changelog/Description", "Description"); + //AddEntry("Changelog/1.0.4.0", " added all new Dawntrail hunts (S, A, B ranks) to Radar\n added an option to resize shortcut icon\n added a change log"); + #endregion #region 1.0.3.6 //AddEntry("Job/VPR", "Viper"); //AddEntry("Job/PCT", "Pictomancer"); diff --git a/Lemegeton/Plugin.cs b/Lemegeton/Plugin.cs index ab9edb0..8c55743 100644 --- a/Lemegeton/Plugin.cs +++ b/Lemegeton/Plugin.cs @@ -56,7 +56,7 @@ public sealed class Plugin : IDalamudPlugin #else public string Name => "Lemegeton"; #endif - public string Version = "1.0.4.0"; + public string Version = "1.0.4.1"; internal class Downloadable { @@ -78,7 +78,8 @@ internal class ActionTypeItem internal List> ChangeLog = new List>() { - new Tuple(new System.Version("1.0.4.0"), "Changelog/1.0.4.0") + new Tuple(new System.Version("1.0.4.0"), "Changelog/1.0.4.0"), + new Tuple(new System.Version("1.0.4.1"), "Changelog/1.0.4.1") }; internal List ChangeLogVersions = null; @@ -5265,10 +5266,10 @@ private void RenderChangeLog() { ImGui.TableSetupColumn(I18n.Translate("Changelog/Version"), ImGuiTableColumnFlags.WidthFixed); ImGui.TableSetupColumn(I18n.Translate("Changelog/Description"), ImGuiTableColumnFlags.WidthStretch); - ImGui.TableNextRow(); Vector4 col = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); foreach (Version v in ChangeLogVersions) { + ImGui.TableNextRow(); ImGui.TableSetColumnIndex(0); ImGui.TextColored(col, v.ToString()); ImGui.TableSetColumnIndex(1);