version bump, added cutscene detection and check on psc for version id
This commit is contained in:
parent
f174c87dd4
commit
e1f4f4406e
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="Dalamud.Plugin.Bootstrap.targets"/>
|
<Import Project="Dalamud.Plugin.Bootstrap.targets"/>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>0.0.0.2</Version>
|
<Version>0.0.0.4</Version>
|
||||||
<Description>A shockingly powerful experience.</Description>
|
<Description>A shockingly powerful experience.</Description>
|
||||||
<PackageProjectUrl>https://git.mercurio.moe/Mercury/DalamudShock</PackageProjectUrl>
|
<PackageProjectUrl>https://git.mercurio.moe/Mercury/DalamudShock</PackageProjectUrl>
|
||||||
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
|
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
|
||||||
|
|
10
DalamudShock/GlobalSuppressions.cs
Normal file
10
DalamudShock/GlobalSuppressions.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
// This file is used by Code Analysis to maintain SuppressMessage
|
||||||
|
// attributes that are applied to this project.
|
||||||
|
// Project-level suppressions either have no target or are given
|
||||||
|
// a specific target and scoped to a namespace, type, member, etc.
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
[assembly: SuppressMessage("Style", "IDE0037:Use inferred member name", Justification = "<Pending>", Scope = "member", Target = "~M:DalamudShock.Plugin.SendOscApiRequest")]
|
||||||
|
[assembly: SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "<Pending>", Scope = "member")]
|
||||||
|
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>", Scope = "member")]
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Game.Command;
|
using Dalamud.Game.Command;
|
||||||
using Dalamud.IoC;
|
using Dalamud.IoC;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using System;
|
using System;
|
||||||
|
@ -8,7 +8,7 @@ using Newtonsoft.Json;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using DalamudShock.Windows;
|
using DalamudShock.Windows;
|
||||||
// ReSharper disable RedundantAnonymousTypePropertyName
|
using Dalamud.Game.ClientState.Conditions;
|
||||||
|
|
||||||
|
|
||||||
namespace DalamudShock
|
namespace DalamudShock
|
||||||
|
@ -20,7 +20,7 @@ namespace DalamudShock
|
||||||
[PluginService] internal static IFramework Framework { get; private set; } = null!;
|
[PluginService] internal static IFramework Framework { get; private set; } = null!;
|
||||||
[PluginService] internal static ICommandManager CommandManager { get; private set; } = null!;
|
[PluginService] internal static ICommandManager CommandManager { get; private set; } = null!;
|
||||||
[PluginService] internal static IPluginLog PluginLog { get; private set; } = null!;
|
[PluginService] internal static IPluginLog PluginLog { get; private set; } = null!;
|
||||||
|
[PluginService] internal static ICondition Condition { get; private set; } = null!; // Add the Condition service
|
||||||
|
|
||||||
private const string CommandName = "/zap";
|
private const string CommandName = "/zap";
|
||||||
public Configuration Configuration { get; init; }
|
public Configuration Configuration { get; init; }
|
||||||
|
@ -75,10 +75,18 @@ namespace DalamudShock
|
||||||
{
|
{
|
||||||
var player = ClientState.LocalPlayer;
|
var player = ClientState.LocalPlayer;
|
||||||
|
|
||||||
if (player == null) return;
|
if (player == null || Condition[ConditionFlag.WatchingCutscene] == true ||
|
||||||
|
Condition[ConditionFlag.BetweenAreas] == true ||
|
||||||
|
Condition[ConditionFlag.WatchingCutscene78] == true) return;
|
||||||
|
|
||||||
var currentHealth = player.CurrentHp;
|
var currentHealth = player.CurrentHp;
|
||||||
|
|
||||||
if (currentHealth == lastHealth) return;
|
if (currentHealth >= lastHealth)
|
||||||
|
{
|
||||||
|
lastHealth = currentHealth;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lastHealth = currentHealth;
|
lastHealth = currentHealth;
|
||||||
|
|
||||||
if (Configuration.ZapOnDamage)
|
if (Configuration.ZapOnDamage)
|
||||||
|
@ -119,6 +127,7 @@ namespace DalamudShock
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async void SendOscApiRequest()
|
private async void SendOscApiRequest()
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(Configuration.openshockApiKey) || string.IsNullOrEmpty(Configuration.OpenshockShockerID))
|
if (string.IsNullOrEmpty(Configuration.openshockApiKey) || string.IsNullOrEmpty(Configuration.OpenshockShockerID))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
|
@ -23,8 +23,15 @@ namespace DalamudShock.Windows
|
||||||
};
|
};
|
||||||
|
|
||||||
Plugin = plugin;
|
Plugin = plugin;
|
||||||
|
if (Plugin.Configuration.UsePishock != false)
|
||||||
|
{
|
||||||
|
openShockVersion = "using pishock. unable to fetch version";
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
FetchOpenShockVersion();
|
FetchOpenShockVersion();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose() { }
|
public void Dispose() { }
|
||||||
|
|
||||||
|
@ -38,9 +45,10 @@ namespace DalamudShock.Windows
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.Text("We aren't beating the bottom allegations with this one");
|
ImGui.Text("We aren't beating the bottom allegations with this one");
|
||||||
|
|
||||||
// Display the OpenShock version
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.Text($"OpenShock Version: #{openShockVersion}");
|
ImGui.Text($"OpenShock Version: #{openShockVersion}");
|
||||||
|
ImGui.Text("If you see a version tag above this, you have properly configurated your API key");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue