This commit is contained in:
Liza 2023-10-03 10:29:00 +02:00
parent c789a807e5
commit 0f46d143aa
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 14 additions and 21 deletions

9
.gitignore vendored
View File

@ -1,4 +1,5 @@
.vs/
obj/
dist/
*.user
/dist
/obj
/bin
/.idea
*.user

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<Authors></Authors>
<Company></Company>
<Version>6.1</Version>
<Version>7.0</Version>
<Description>Slice is Right.</Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/carvelli/Slice-Is-Right</PackageProjectUrl>
@ -32,7 +32,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.10" />
<PackageReference Include="DalamudPackager" Version="2.1.12" />
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
@ -49,10 +49,6 @@
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGuiScene">
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
<Private>false</Private>

View File

@ -1,9 +1,5 @@
using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.Gui;
using Dalamud.Interface;
using Dalamud.IoC;
using Dalamud.Plugin;
using ImGuiNET;
@ -11,6 +7,8 @@ using System;
using System.Collections.Generic;
using System.Numerics;
using System.Runtime.InteropServices;
using Dalamud.Interface.Utility;
using Dalamud.Plugin.Services;
namespace SliceIsRight;
@ -22,20 +20,18 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
private static readonly uint ColourGreen = ImGui.GetColorU32(ImGui.ColorConvertFloat4ToU32(new Vector4(0.0f, 1f, 0.0f, 0.15f)));
private static readonly uint ColourRed = ImGui.GetColorU32(ImGui.ColorConvertFloat4ToU32(new Vector4(1, 0, 0, 0.4f)));
public string Name => "Slice is Right";
[PluginService]
[RequiredVersion("1.0")]
private DalamudPluginInterface PluginInterface { get; set; } = null!;
[PluginService]
private ObjectTable ObjectTable { get; set; } = null!;
private IObjectTable ObjectTable { get; set; } = null!;
[PluginService]
private GameGui GameGui { get; set; } = null!;
private IGameGui GameGui { get; set; } = null!;
[PluginService]
private ClientState ClientState { get; set; } = null!;
private IClientState ClientState { get; set; } = null!;
private const ushort GoldSaucerTerritoryId = 144;
private bool IsInGoldSaucer { get; set; }
@ -54,7 +50,7 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
}
#pragma warning restore CS8618
private void TerritoryChanged(object? sender, ushort e)
private void TerritoryChanged(ushort e)
{
IsInGoldSaucer = e == GoldSaucerTerritoryId;
}