API 10
This commit is contained in:
parent
f357bdcf2a
commit
cb208758fd
@ -1,64 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>7.0</Version>
|
||||
<Description>Slice is Right.</Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/carvelli/Slice-Is-Right</PackageProjectUrl>
|
||||
<Configurations>Release</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<Platforms>x64</Platforms>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<Version>8.0</Version>
|
||||
<OutputPath>dist</OutputPath>
|
||||
<GenerateDependencyFile>false</GenerateDependencyFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.12" />
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="Dalamud">
|
||||
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImGui.NET">
|
||||
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lumina.Excel">
|
||||
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="SliceIsRight.yaml">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
@ -68,5 +13,4 @@
|
||||
<Target Name="RenameLatestZip" AfterTargets="PackagePlugin">
|
||||
<Exec Command="rename $(OutDir)$(AssemblyName)\latest.zip $(AssemblyName)-$(Version).zip" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
@ -21,8 +21,7 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
|
||||
private static readonly uint ColourRed = ImGui.GetColorU32(ImGui.ColorConvertFloat4ToU32(new Vector4(1, 0, 0, 0.4f)));
|
||||
|
||||
[PluginService]
|
||||
[RequiredVersion("1.0")]
|
||||
private DalamudPluginInterface PluginInterface { get; set; } = null!;
|
||||
private IDalamudPluginInterface PluginInterface { get; set; } = null!;
|
||||
|
||||
[PluginService]
|
||||
private IObjectTable ObjectTable { get; set; } = null!;
|
||||
@ -68,7 +67,7 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
|
||||
|
||||
for (int index = 0; index < ObjectTable.Length; ++index)
|
||||
{
|
||||
GameObject? obj = ObjectTable[index];
|
||||
IGameObject? obj = ObjectTable[index];
|
||||
if (obj == null || DistanceToPlayer(obj.Position) > MaxDistance)
|
||||
continue;
|
||||
|
||||
@ -77,7 +76,7 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
|
||||
{
|
||||
RenderObject(obj, model);
|
||||
}
|
||||
else if (ClientState.LocalPlayer?.ObjectId == obj.ObjectId)
|
||||
else if (ClientState.LocalPlayer?.EntityId == obj.EntityId)
|
||||
{
|
||||
// local player
|
||||
//RenderObject(index, obj, 2010779, 0.1f); // circle
|
||||
@ -91,18 +90,18 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
|
||||
_objectsToMatch.Clear();
|
||||
}
|
||||
|
||||
private void RenderObject(GameObject obj, int model, float? radius = null)
|
||||
private void RenderObject(IGameObject obj, int model, float? radius = null)
|
||||
{
|
||||
_objectsToMatch.Remove(obj.ObjectId);
|
||||
_objectsToMatch.Remove(obj.EntityId);
|
||||
|
||||
if (_objectsAndSpawnTime.TryGetValue(obj.ObjectId, out DateTime spawnTime))
|
||||
if (_objectsAndSpawnTime.TryGetValue(obj.EntityId, out DateTime spawnTime))
|
||||
{
|
||||
if (spawnTime.AddSeconds(5) > DateTime.Now)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
_objectsAndSpawnTime.Add(obj.ObjectId, DateTime.Now);
|
||||
_objectsAndSpawnTime.Add(obj.EntityId, DateTime.Now);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -143,7 +142,7 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
|
||||
ImGui.PopID();
|
||||
}
|
||||
|
||||
private void DrawFilledCircleWorld(GameObject obj, float radius, uint colour)
|
||||
private void DrawFilledCircleWorld(IGameObject obj, float radius, uint colour)
|
||||
{
|
||||
BeginRender(obj.Address.ToString());
|
||||
|
||||
@ -164,7 +163,7 @@ public sealed class SliceIsRightPlugin : IDalamudPlugin
|
||||
EndRender();
|
||||
}
|
||||
|
||||
private void DrawRectWorld(GameObject obj, float rotation, float length, float width, uint colour)
|
||||
private void DrawRectWorld(IGameObject obj, float rotation, float length, float width, uint colour)
|
||||
{
|
||||
BeginRender($"{obj.Address}{obj.Rotation}");
|
||||
|
||||
|
71
packages.lock.json
Normal file
71
packages.lock.json
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0-windows7.0": {
|
||||
"DalamudPackager": {
|
||||
"type": "Direct",
|
||||
"requested": "[2.1.13, )",
|
||||
"resolved": "2.1.13",
|
||||
"contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ=="
|
||||
},
|
||||
"DotNet.ReproducibleBuilds": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.1.1, )",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.SourceLink.AzureRepos.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Bitbucket.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.GitHub": "1.1.1",
|
||||
"Microsoft.SourceLink.GitLab": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.Build.Tasks.Git": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
|
||||
},
|
||||
"Microsoft.SourceLink.AzureRepos.Git": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==",
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.Bitbucket.Git": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.Common": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
|
||||
},
|
||||
"Microsoft.SourceLink.GitHub": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.GitLab": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.1",
|
||||
"contentHash": "tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==",
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user