Skip to content

Commit

Permalink
1.0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
paissaheavyindustries committed Jul 15, 2024
1 parent ba4211a commit d8ffa28
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 21 deletions.
50 changes: 33 additions & 17 deletions Lemegeton/Content/Radar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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:
Expand All @@ -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;
Expand Down
12 changes: 12 additions & 0 deletions Lemegeton/Language/Chinese.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions Lemegeton/Language/Danish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
6 changes: 5 additions & 1 deletion Lemegeton/Language/English.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions Lemegeton/Language/French.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions Lemegeton/Language/German.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions Lemegeton/Language/Japanese.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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", "ピクトマンサー");
Expand Down
12 changes: 12 additions & 0 deletions Lemegeton/Language/Korean.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
7 changes: 4 additions & 3 deletions Lemegeton/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -78,7 +78,8 @@ internal class ActionTypeItem

internal List<Tuple<Version, string>> ChangeLog = new List<Tuple<Version, string>>()
{
new Tuple<Version, string>(new System.Version("1.0.4.0"), "Changelog/1.0.4.0")
new Tuple<Version, string>(new System.Version("1.0.4.0"), "Changelog/1.0.4.0"),
new Tuple<Version, string>(new System.Version("1.0.4.1"), "Changelog/1.0.4.1")
};
internal List<Version> ChangeLogVersions = null;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d8ffa28

Please sign in to comment.