aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2024-09-06 23:28:42 -0700
committerPinapelz <yukais@pinapelz.com>2024-09-07 00:00:11 -0700
commit728d9ff38a19f0a8b72bcb004d56edabec138af8 (patch)
treee9ca217f591ccb4b4b7071e6f6ab25afdf5710c6
parent4ce9ff0b50ebc95078459ba3108c9390dfc7aa84 (diff)
add toast and chat notification override if default series level is reached
-rw-r--r--Malmstone/Addons/PvPMatchAddon.cs3
-rw-r--r--Malmstone/Configuration.cs2
-rw-r--r--Malmstone/Windows/ConfigWindow.cs56
3 files changed, 53 insertions, 8 deletions
diff --git a/Malmstone/Addons/PvPMatchAddon.cs b/Malmstone/Addons/PvPMatchAddon.cs
index 1785b29..78e0e38 100644
--- a/Malmstone/Addons/PvPMatchAddon.cs
+++ b/Malmstone/Addons/PvPMatchAddon.cs
@@ -95,6 +95,8 @@ namespace Malmstone.Addons
{
PvPSeriesInfo? seriesInfo = Plugin.PvPService.GetPvPSeriesInfo();
if (seriesInfo == null) return;
+ if (Plugin.Configuration.SkipProgressionToastAfterGoal && seriesInfo.CurrentSeriesRank >= Plugin.Configuration.DefaultTargetRankProperty) return;
+
switch (Plugin.Configuration.PostmatchProgressionToastType)
{
case 0:
@@ -119,6 +121,7 @@ namespace Malmstone.Addons
private void ShowSeriesProgressionMessage(PvPSeriesInfo seriesInfo, PvPContentType contentType)
{
+ if (Plugin.Configuration.SkipProgressionChatAfterGoal && seriesInfo.CurrentSeriesRank >= Plugin.Configuration.DefaultTargetRankProperty) return;
var seString = new SeString(new List<Payload>());
switch (contentType)
{
diff --git a/Malmstone/Configuration.cs b/Malmstone/Configuration.cs
index eac9c63..1d0ed84 100644
--- a/Malmstone/Configuration.cs
+++ b/Malmstone/Configuration.cs
@@ -16,6 +16,8 @@ public class Configuration : IPluginConfiguration
public bool ShowProgressionChatPostCC { get; set; } = true;
public bool ShowProgressionChatPostFL { get; set; } = true;
public bool ShowMainWindowOnPVPReward { get; set; } = true;
+ public bool SkipProgressionToastAfterGoal { get; set; } = false;
+ public bool SkipProgressionChatAfterGoal { get; set; } = false;
// the below exist just to make saving less cumbersome
public void Save()
diff --git a/Malmstone/Windows/ConfigWindow.cs b/Malmstone/Windows/ConfigWindow.cs
index 05e75a1..93af7b5 100644
--- a/Malmstone/Windows/ConfigWindow.cs
+++ b/Malmstone/Windows/ConfigWindow.cs
@@ -16,7 +16,7 @@ public class ConfigWindow : Window, IDisposable
Flags = ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse;
SizeConstraints = new WindowSizeConstraints
{
- MinimumSize = new Vector2(370, 330),
+ MinimumSize = new Vector2(540, 380),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
Configuration = Plugin.Configuration;
@@ -41,10 +41,49 @@ public class ConfigWindow : Window, IDisposable
Configuration.Save();
}
- ImGui.Separator();
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Calculator will auto-populate with this number after initializing" +
+ "\nAlso controls the notification override settings below");
+ ImGui.EndTooltip();
+ }
+
+ var skipProgressionToastAfterGoal = Configuration.SkipProgressionToastAfterGoal;
+ if(ImGui.Checkbox("###SkipProgressionToastAfterGoal", ref skipProgressionToastAfterGoal)){
+ Configuration.SkipProgressionToastAfterGoal = skipProgressionToastAfterGoal;
+ Configuration.Save();
+ }
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Automatically stops showing EXP progression notification after reaching the Default Target Series Level" +
+ "\nOverrides other EXP notification settings");
+ ImGui.EndTooltip();
+ }
+ ImGui.SameLine();
+ ImGui.Text("Skip EXP progression notifications after default level is achieved");
- ImGui.Text("Show EXP progression after PVP matches");
+
+
+ var skipProgressionChatAfterGoal = Configuration.SkipProgressionChatAfterGoal;
+ if(ImGui.Checkbox("###SkipProgressionChatAfterGoal", ref skipProgressionChatAfterGoal)){
+ Configuration.SkipProgressionChatAfterGoal = skipProgressionChatAfterGoal;
+ Configuration.Save();
+ }
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Automatically stops showing matches remaining chat messages after reaching the the Default Target Series Level" +
+ "\nOverrides other post-match chat notification settings");
+ ImGui.EndTooltip();
+ }
ImGui.SameLine();
+ ImGui.Text("Skip remaining matches chat notifications after default level is achieved");
+
+
+ ImGui.Separator();
+
var showProgressionToastPostMatch = Configuration.ShowProgressionToastPostMatch;
if (ImGui.Checkbox("##ShowProgressionToastPostMatch", ref showProgressionToastPostMatch))
{
@@ -55,13 +94,14 @@ public class ConfigWindow : Window, IDisposable
Plugin.PvPAddon.DisablePostMatchProgressionToast();
Configuration.Save();
}
-
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Shows a notification with current series level EXP progression after ALL PVP matches");
ImGui.EndTooltip();
}
+ ImGui.SameLine();
+ ImGui.Text("Show EXP progression after PVP matches");
ImGui.Text("Notification Type");
int selectedPostMatchToastType = Configuration.PostmatchProgressionToastType;
@@ -84,7 +124,7 @@ public class ConfigWindow : Window, IDisposable
}
ImGui.Separator();
- ImGui.Text("Show matches until next rank in chat after");
+ ImGui.Text("Show matches until next level in chat post-game");
var showCCMatchesRemainingPostGame = Configuration.ShowProgressionChatPostCC;
@@ -149,9 +189,7 @@ public class ConfigWindow : Window, IDisposable
ImGui.Separator();
ImGui.Spacing();
-
- ImGui.Text("Show calculations when viewing Series Malmstones");
- ImGui.SameLine();
+
var showMainWindowOnPVPReward = Configuration.ShowMainWindowOnPVPReward;
if(ImGui.Checkbox("##ShowMainWindowOnPVPReward", ref showMainWindowOnPVPReward)){
if(showMainWindowOnPVPReward)
@@ -167,6 +205,8 @@ public class ConfigWindow : Window, IDisposable
ImGui.Text("Automatically open the calculator window when viewing Series Malmstone rewards");
ImGui.EndTooltip();
}
+ ImGui.SameLine();
+ ImGui.Text("Show calculations when viewing Series Malmstones");
ImGui.Text("Changes saved automatically");
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage