Skip to content

Commit

Permalink
1.0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
paissaheavyindustries committed Jul 12, 2024
1 parent f0c0e08 commit ba4211a
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 4 deletions.
42 changes: 42 additions & 0 deletions Lemegeton/Content/Radar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,12 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 8653 },
// Agrippa the Mighty
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 2969 },
// Arch Aethereater
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 13406 },
// Armstrong
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 10619 },
// Atticus the Primogenitor
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 13156 },
// Bird of Paradise
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 4378 },
// Bone Crawler
Expand Down Expand Up @@ -831,6 +835,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 2966 },
// Narrow-rift
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 10622 },
// Neyoozoteel
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 12754 },
// Nunyunuwi
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 2960 },
// Okina
Expand All @@ -847,12 +853,16 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 2968 },
// Salt and Light
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 5989 },
// Sansheya
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 13399 },
// Senmurv
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 4375 },
// sphatika
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 10618 },
// Tarchia
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 8900 },
// The Forecaster
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 13437 },
// Thousand-cast Theda
new Entry() { Type = Entry.EntryTypeEnum.SRank, Kind = ObjectKind.BattleNpc, NameId = 2956 },
// Tyger
Expand Down Expand Up @@ -885,6 +895,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 4368 },
// Campacti
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 4372 },
// Cat's Eye
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 13436 },
// Cornu
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 2950 },
// Dalvag's Final Flame
Expand Down Expand Up @@ -913,10 +925,14 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 10631 },
// Hellsclaw
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 2947 },
// Heshuala
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 13157 },
// hulder
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 10624 },
// Huracan
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 8912 },
// Keheniheyamewi
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 13401 },
// Kurrea
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 2952 },
// Li'l Murderer
Expand Down Expand Up @@ -965,14 +981,20 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 10632 },
// Pylraster
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 4364 },
// Rrax Yity'a
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 12753 },
// Rusalka
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 8896 },
// Sabotender Bailarina
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 2941 },
// Sally the Sweeper
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 13435 },
// Sisiutl
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 4371 },
// Slipkinx Steeljoints
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 4366 },
// Starcrier
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 12692 },
// stench blossom
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 4373 },
// Stolas
Expand All @@ -989,10 +1011,14 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 8891 },
// Unktehi
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 2946 },
// Urna Variabilis
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 13158 },
// Vochstein
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 5992 },
// Vogaal Ja
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 2945 },
// Yehehetoaua'pyo
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 13400 },
// Yilan
new Entry() { Type = Entry.EntryTypeEnum.ARank, Kind = ObjectKind.BattleNpc, NameId = 10625 },
// Zanig'oh
Expand All @@ -1001,6 +1027,8 @@ public override void RenderEditor(string path)

private List<Entry> _defaultsBRanks = new List<Entry>()
{
// 13th Child
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13155 },
// Albin the Ashen
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2926 },
// Alteci
Expand All @@ -1027,6 +1055,10 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 4355 },
// Flame Sergeant Dalvag
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2927 },
// Gallowsbeak
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13152 },
// Gargant
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13153 },
// Gatling
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2925 },
// Gauki Strongblade
Expand All @@ -1051,6 +1083,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 10638 },
// Itzpapalotl
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 8909 },
// Jewel Bearer
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13154 },
// Kiwa
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 6013 },
// Kreutzet
Expand All @@ -1059,6 +1093,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 6006 },
// La Velue
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 8908 },
// Leafscourge Hadoll Ja
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13148 },
// Leech King
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2935 },
// level cheater
Expand All @@ -1075,6 +1111,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2932 },
// Naul
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2934 },
// Nopalitender Fabuloso
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13150 },
// Omni
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 4361 },
// Oskh Rhei
Expand Down Expand Up @@ -1109,6 +1147,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2920 },
// Thextera
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 4353 },
// Uktena
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13151 },
// Vajrakumara
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 10637 },
// Vulpangue
Expand All @@ -1121,6 +1161,8 @@ public override void RenderEditor(string path)
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 2919 },
// Worm of the Well
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 8903 },
// Xty'iinbek
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 13149 },
// Yumcax
new Entry() { Type = Entry.EntryTypeEnum.BRank, Kind = ObjectKind.BattleNpc, NameId = 10643 },
// ü-u-ü-u
Expand Down
1 change: 1 addition & 0 deletions Lemegeton/Core/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public enum TextAlignmentEnum
public string PlogonVersion { get; set; } = "1.0.0.0";
public bool Opened { get; set; } = true;
public bool ShowShortcut { get; set; } = true;
public int ShortcutScale { get; set; } = 100;
public bool FirstRun { get; set; } = true;
public bool AdvancedOptions { get; set; } = false;

Expand Down
8 changes: 8 additions & 0 deletions Lemegeton/Language/English.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ internal class English : Core.Language

public English(State st) : base(st)
{
#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
63 changes: 59 additions & 4 deletions Lemegeton/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
using Dalamud.Interface.Internal;
using Dalamud.Interface.Textures;
using Dalamud.Interface.Textures.TextureWraps;
using System.Threading.Channels;

namespace Lemegeton
{
Expand All @@ -55,7 +56,7 @@ public sealed class Plugin : IDalamudPlugin
#else
public string Name => "Lemegeton";
#endif
public string Version = "1.0.3.9";
public string Version = "1.0.4.0";

internal class Downloadable
{
Expand All @@ -75,6 +76,12 @@ 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")
};
internal List<Version> ChangeLogVersions = null;

internal delegate void DownloadableCompletionDelegate(Downloadable d);
private List<Tuple<Core.Language, string>> _fontBuilderQueue = new List<Tuple<Core.Language, string>>();
private List<Notification> Notifications = new List<Notification>();
Expand Down Expand Up @@ -345,12 +352,17 @@ private void ApplyVersionChanges()
{
Log(LogLevelEnum.Info, "Plugin version changed from {0} to {1}", _state.cfg.PlogonVersion, Version);
BackupConfig();
if (new Version(_state.cfg.PlogonVersion) < new Version("1.0.1.0"))
Version oldv = new Version(_state.cfg.PlogonVersion);
Version thisv = new Version(Version);
if (oldv < new Version("1.0.1.0"))
{
// 1.0.1.0 - change tasks to always queue on framework thread
Log(LogLevelEnum.Info, "Applying config fixes for version 1.0.1.0");
_state.cfg.QueueFramework = true;
}
ChangeLogVersions = new List<Version>();
ChangeLogVersions.AddRange(from vx in ChangeLog where vx.Item1 > oldv && vx.Item1 <= thisv orderby vx.Item1 descending select vx.Item1);
Log(LogLevelEnum.Info, "Changelog has {0} items", ChangeLogVersions.Count);
_state.cfg.PlogonVersion = Version;
}
}
Expand Down Expand Up @@ -4009,16 +4021,19 @@ private void DrawLemmyShortcut()
_lemmyShortcutPopped = now.AddSeconds(2);
_lemmyShortcutJustPopped = false;
}
float scale = _state.cfg.ShortcutScale / 100.0f;
IDalamudTextureWrap tw = _ui.GetMiscIcon(UserInterface.MiscIconEnum.Lemegeton).GetWrapOrEmpty();
winSize = new Vector2(tw.Width + 10, tw.Height + 10);
int scw = (int)Math.Ceiling(tw.Width * scale);
int sch = (int)Math.Ceiling(tw.Height * scale);
winSize = new Vector2(scw + 10, sch + 10);
ImGui.SetWindowSize(winSize);
ImGui.SetCursorPos(new Vector2(5, 5));
if (now < _lemmyShortcutPopped)
{
float time = (float)(_lemmyShortcutPopped - now).TotalMilliseconds / 200.0f;
_lemmyShortcutOpacity = (float)Math.Abs(Math.Cos(time));
}
ImGui.Image(tw.ImGuiHandle, new Vector2(tw.Width, tw.Height), new Vector2(0.0f, 0.0f), new Vector2(1.0f, 1.0f), new Vector4(1.0f, 1.0f, 1.0f, _lemmyShortcutOpacity));
ImGui.Image(tw.ImGuiHandle, new Vector2(scw, sch), new Vector2(0.0f, 0.0f), new Vector2(1.0f, 1.0f), new Vector4(1.0f, 1.0f, 1.0f, _lemmyShortcutOpacity));
if (ImGui.IsItemHovered() == true)
{
if (ImGui.IsItemClicked(ImGuiMouseButton.Left) == true)
Expand Down Expand Up @@ -4125,6 +4140,13 @@ private void RenderSettingsTab()
{
_state.cfg.ShowShortcut = shortcut;
}
int shortsc = _state.cfg.ShortcutScale;
ImGui.Text(Environment.NewLine + I18n.Translate("Notifications/Settings/ShortcutScale"));
if (ImGui.SliderInt("##ShortcutScale", ref shortsc, 50, 300, "%d %%") == true)
{
_state.cfg.ShortcutScale = shortsc;
}
ImGui.Text("");
bool streamNag = _state.cfg.NagAboutStreaming;
if (ImGui.Checkbox(I18n.Translate("MainMenu/Settings/NagAboutStreaming"), ref streamNag) == true)
{
Expand Down Expand Up @@ -4759,6 +4781,17 @@ private void DrawMainWindow()
}
ImGui.BeginChild("LemmyFrame", fsz);
ImGui.BeginTabBar("Lemmytabs");
// changelog
if (ChangeLogVersions != null)
{
if (ImGui.BeginTabItem(I18n.Translate("MainMenu/Changelog")) == true)
{
ImGui.BeginChild("MainMenu/Changelog");
RenderChangeLog();
ImGui.EndChild();
ImGui.EndTabItem();
}
}
// status
if (ImGui.BeginTabItem(I18n.Translate("MainMenu/Status")) == true)
{
Expand Down Expand Up @@ -5223,6 +5256,28 @@ private void RenderMethodCall(Delegate del)
}
}

private void RenderChangeLog()
{
ImGui.BeginDisabled();
ImGui.CollapsingHeader(" " + I18n.Translate("Changelog/SinceYourLastUpdate"), ImGuiTreeNodeFlags.Leaf);
ImGui.EndDisabled();
if (ImGui.BeginTable("TableChangelog", 2, ImGuiTableFlags.SizingFixedFit) == true)
{
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.TableSetColumnIndex(0);
ImGui.TextColored(col, v.ToString());
ImGui.TableSetColumnIndex(1);
ImGui.TextWrapped(I18n.Translate("Changelog/" + v.ToString()));
}
ImGui.EndTable();
}
}

private void RenderStatusTab()
{
IDalamudTextureWrap tw;
Expand Down

0 comments on commit ba4211a

Please sign in to comment.