This commit is contained in:
Infi
2025-12-19 06:49:18 +01:00
parent 956e57a6bd
commit 4f9a6cd5be
12 changed files with 28 additions and 51 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net9.0-windows</TargetFrameworks> <TargetFrameworks>net10.0-windows</TargetFrameworks>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
+4 -5
View File
@@ -1,7 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/13.1.0"> <Project Sdk="Dalamud.NET.Sdk/14.0.1">
<PropertyGroup> <PropertyGroup>
<Version>1.32.0</Version> <Version>1.34.0</Version>
<TargetFramework>net9.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -39,7 +38,7 @@
<ItemGroup> <ItemGroup>
<Folder Include="images\" /> <Folder Include="images\" />
</ItemGroup> </ItemGroup>
<!--This doesn't work until Plogon is updated to include NodeJS--> <!--This doesn't work until Plogon is updated to include NodeJS-->
<!-- <Target Name="NodeJS Compile" BeforeTargets="BeforeCompile">--> <!-- <Target Name="NodeJS Compile" BeforeTargets="BeforeCompile">-->
<!-- <Exec Command="npm install" WorkingDirectory="Http\Frontend"/>--> <!-- <Exec Command="npm install" WorkingDirectory="Http\Frontend"/>-->
@@ -58,7 +57,7 @@
<Exec Command="npm install" WorkingDirectory="Http\Frontend"/> <Exec Command="npm install" WorkingDirectory="Http\Frontend"/>
<Exec Command="npm run build" WorkingDirectory="Http\Frontend"/> <Exec Command="npm run build" WorkingDirectory="Http\Frontend"/>
</Target> </Target>
<Target Name="UnzipBuild" AfterTargets="Build"> <Target Name="UnzipBuild" AfterTargets="Build">
<Unzip SourceFiles="websiteBuild.zip" DestinationFolder="$(TargetDir)\Frontend"/> <Unzip SourceFiles="websiteBuild.zip" DestinationFolder="$(TargetDir)\Frontend"/>
</Target> </Target>
+1
View File
@@ -368,6 +368,7 @@ internal sealed unsafe class Chat : IDisposable
{ {
RotateMode.Forward => 1, RotateMode.Forward => 1,
RotateMode.Reverse => -1, RotateMode.Reverse => -1,
_ => 1
}; };
// Iterate up to 8 times to find a valid linkshell. // Iterate up to 8 times to find a valid linkshell.
+1 -1
View File
@@ -74,7 +74,7 @@ public class Processing
{ {
if (chunk.Link is PlayerPayload playerPayload) if (chunk.Link is PlayerPayload playerPayload)
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId); userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
else if (Plugin.ClientState.LocalPlayer is { } player) else if (Plugin.ObjectTable.LocalPlayer is { } player)
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, player.Name.TextValue, player.HomeWorld.RowId); userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, player.Name.TextValue, player.HomeWorld.RowId);
} }
+2 -2
View File
@@ -42,7 +42,7 @@ internal class MessageManager : IAsyncDisposable
{ {
get get
{ {
var contentId = Plugin.ClientState.LocalContentId; var contentId = Plugin.PlayerState.ContentId;
return contentId == 0 ? LastContentId : contentId; return contentId == 0 ? LastContentId : contentId;
} }
} }
@@ -98,7 +98,7 @@ internal class MessageManager : IAsyncDisposable
private void OnFrameworkUpdate(IFramework framework) private void OnFrameworkUpdate(IFramework framework)
{ {
var contentId = Plugin.ClientState.LocalContentId; var contentId = Plugin.PlayerState.ContentId;
if (contentId != 0) if (contentId != 0)
LastContentId = contentId; LastContentId = contentId;
+3 -3
View File
@@ -572,8 +572,8 @@ public sealed class PayloadHandler
var world = player.World; var world = player.World;
if (chunk.Message?.Code.Type == ChatType.FreeCompanyLoginLogout) if (chunk.Message?.Code.Type == ChatType.FreeCompanyLoginLogout)
if (Plugin.ClientState.LocalPlayer?.HomeWorld.IsValid == true) if (Plugin.PlayerState.HomeWorld.IsValid)
world = Plugin.ClientState.LocalPlayer.HomeWorld; world = Plugin.PlayerState.HomeWorld;
var name = new List<Chunk> { new TextChunk(ChunkSource.None, null, player.PlayerName) }; var name = new List<Chunk> { new TextChunk(ChunkSource.None, null, player.PlayerName) };
if (world.Value.IsPublic) if (world.Value.IsPublic)
@@ -611,7 +611,7 @@ public sealed class PayloadHandler
{ {
var party = Plugin.PartyList; var party = Plugin.PartyList;
var leader = (ulong?) party[(int) party.PartyLeaderIndex]?.ContentId; var leader = (ulong?) party[(int) party.PartyLeaderIndex]?.ContentId;
var isLeader = party.Length == 0 || Plugin.ClientState.LocalContentId == leader; var isLeader = party.Length == 0 || Plugin.PlayerState.ContentId == leader;
var member = party.FirstOrDefault(member => member.Name.TextValue == player.PlayerName && member.World.RowId == world.RowId); var member = party.FirstOrDefault(member => member.Name.TextValue == player.PlayerName && member.World.RowId == world.RowId);
var isInParty = member != null; var isInParty = member != null;
var inInstance = GameFunctions.GameFunctions.IsInInstance(); var inInstance = GameFunctions.GameFunctions.IsInInstance();
+1
View File
@@ -39,6 +39,7 @@ public sealed class Plugin : IDalamudPlugin
[PluginService] internal static IGameConfig GameConfig { get; private set; } = null!; [PluginService] internal static IGameConfig GameConfig { get; private set; } = null!;
[PluginService] internal static INotificationManager Notification { get; private set; } = null!; [PluginService] internal static INotificationManager Notification { get; private set; } = null!;
[PluginService] internal static IAddonLifecycle AddonLifecycle { get; private set; } = null!; [PluginService] internal static IAddonLifecycle AddonLifecycle { get; private set; } = null!;
[PluginService] internal static IPlayerState PlayerState { get; private set; } = null!;
internal static Configuration Config = null!; internal static Configuration Config = null!;
+2 -2
View File
@@ -1772,8 +1772,8 @@ public sealed class ChatLogWindow : Window
{ {
if (chunk.Link is PlayerPayload playerPayload) if (chunk.Link is PlayerPayload playerPayload)
content = HidePlayerInString(content, playerPayload.PlayerName, playerPayload.World.RowId); content = HidePlayerInString(content, playerPayload.PlayerName, playerPayload.World.RowId);
else if (Plugin.ClientState.LocalPlayer is { } player) else if (Plugin.PlayerState.IsLoaded)
content = HidePlayerInString(content, player.Name.TextValue, player.HomeWorld.RowId); content = HidePlayerInString(content, Plugin.PlayerState.CharacterName, Plugin.PlayerState.HomeWorld.RowId);
} }
if (wrap) if (wrap)
+1 -1
View File
@@ -128,7 +128,7 @@ public class DbViewer : Window
{ {
try try
{ {
ulong? character = OnlyCurrentCharacter ? Plugin.ClientState.LocalContentId : null; ulong? character = OnlyCurrentCharacter ? Plugin.PlayerState.ContentId : null;
var channels = ChatCodes.Select(c => (uint) c.Key).ToArray(); var channels = ChatCodes.Select(c => (uint) c.Key).ToArray();
// We only want to fetch count if this is the first page // We only want to fetch count if this is the first page
+2 -2
View File
@@ -161,8 +161,8 @@ internal sealed class Database : ISettingsTab
// Generate // Generate
var stopwatch = Stopwatch.StartNew(); var stopwatch = Stopwatch.StartNew();
var playerName = Plugin.ClientState.LocalPlayer?.Name.ToString() ?? "Unknown Player"; var playerName = Plugin.PlayerState.CharacterName;
var worldId = Plugin.ClientState.LocalPlayer?.HomeWorld.RowId ?? 0; var worldId = Plugin.PlayerState.HomeWorld.ValueNullable?.RowId ?? 0;
var senderSource = new SeStringBuilder() var senderSource = new SeStringBuilder()
.AddText("<") .AddText("<")
.Add(new PlayerPayload(playerName, worldId)) .Add(new PlayerPayload(playerName, worldId))
+2 -12
View File
@@ -87,7 +87,7 @@ internal static class AutoTranslate
lookup = lookup.Replace(" ", ""); lookup = lookup.Replace(" ", "");
var (sheetName, selector) = parser.ParseOrThrow(lookup); var (sheetName, selector) = parser.ParseOrThrow(lookup);
var sheet = Plugin.DataManager.Excel.GetSheet<WorkingRawRow>(name: sheetName); var sheet = Plugin.DataManager.Excel.GetSheet<RawRow>(name: sheetName);
var columns = new List<int>(); var columns = new List<int>();
var rows = new List<Range>(); var rows = new List<Range>();
@@ -143,7 +143,7 @@ internal static class AutoTranslate
foreach (var col in columns) foreach (var col in columns)
{ {
var rawName = rowParser.RawRow.ReadStringColumn(col); var rawName = rowParser.ReadStringColumn(col);
var name = rawName.ToDalamudString(); var name = rawName.ToDalamudString();
var text = name.TextValue; var text = name.TextValue;
if (text.Length > 0) if (text.Length > 0)
@@ -253,16 +253,6 @@ internal static class AutoTranslate
} }
} }
[Sheet]
public readonly struct WorkingRawRow(RawRow row) : IExcelRow<WorkingRawRow>
{
public uint RowId => row.RowId;
public RawRow RawRow => row;
static WorkingRawRow IExcelRow<WorkingRawRow>.Create(ExcelPage page, uint offset, uint row) =>
new(new RawRow(page, offset, row));
}
internal interface ISelectorPart { } internal interface ISelectorPart { }
internal class SingleRow : ISelectorPart internal class SingleRow : ISelectorPart
+8 -22
View File
@@ -1,18 +1,18 @@
{ {
"version": 1, "version": 1,
"dependencies": { "dependencies": {
"net9.0-windows7.0": { "net10.0-windows7.0": {
"DalamudPackager": { "DalamudPackager": {
"type": "Direct", "type": "Direct",
"requested": "[13.1.0, )", "requested": "[14.0.1, )",
"resolved": "13.1.0", "resolved": "14.0.1",
"contentHash": "XdoNhJGyFby5M/sdcRhnc5xTop9PHy+H50PTWpzLhJugjB19EDBiHD/AsiDF66RETM+0qKUdJBZrNuebn7qswQ==" "contentHash": "y0WWyUE6dhpGdolK3iKgwys05/nZaVf4ZPtIjpLhJBZvHxkkiE23zYRo7K7uqAgoK/QvK5cqF6l3VG5AbgC6KA=="
}, },
"DotNet.ReproducibleBuilds": { "DotNet.ReproducibleBuilds": {
"type": "Direct", "type": "Direct",
"requested": "[1.2.25, )", "requested": "[1.2.39, )",
"resolved": "1.2.25", "resolved": "1.2.39",
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg==" "contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg=="
}, },
"MessagePack": { "MessagePack": {
"type": "Direct", "type": "Direct",
@@ -108,10 +108,7 @@
"SQLitePCLRaw.core": { "SQLitePCLRaw.core": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.1.10", "resolved": "2.1.10",
"contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw==", "contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw=="
"dependencies": {
"System.Memory": "4.5.3"
}
}, },
"SQLitePCLRaw.lib.e_sqlite3": { "SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive", "type": "Transitive",
@@ -126,16 +123,6 @@
"SQLitePCLRaw.core": "2.1.10" "SQLitePCLRaw.core": "2.1.10"
} }
}, },
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA=="
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "8.0.5",
"contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg=="
},
"Timestamps": { "Timestamps": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.0.11", "resolved": "1.0.11",
@@ -153,7 +140,6 @@
"dependencies": { "dependencies": {
"IpMatcher": "1.0.5", "IpMatcher": "1.0.5",
"RegexMatcher": "1.0.9", "RegexMatcher": "1.0.9",
"System.Text.Json": "8.0.5",
"Timestamps": "1.0.11", "Timestamps": "1.0.11",
"UrlMatcher": "3.0.1" "UrlMatcher": "3.0.1"
} }