Revert obsolete as error again, fix warnings, Api14ToDo => Api15ToDo
Some checks are pending
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
Tag Build / Tag Build (push) Successful in 4s

This commit is contained in:
goaaats 2025-12-18 21:00:07 +01:00
parent 19fca721e9
commit c005bae265
8 changed files with 23 additions and 29 deletions

View file

@ -11,7 +11,7 @@ namespace Dalamud.Configuration;
/// <summary> /// <summary>
/// Configuration to store settings for a dalamud plugin. /// Configuration to store settings for a dalamud plugin.
/// </summary> /// </summary>
[Api14ToDo("Make this a service. We need to be able to dispose it reliably to write configs asynchronously. Maybe also let people write files with vfs.")] [Api15ToDo("Make this a service. We need to be able to dispose it reliably to write configs asynchronously. Maybe also let people write files with vfs.")]
public sealed class PluginConfigurations public sealed class PluginConfigurations
{ {
private readonly DirectoryInfo configDirectory; private readonly DirectoryInfo configDirectory;

View file

@ -55,7 +55,9 @@ public class AddonRefreshArgs : AddonArgs
AtkValuePtr ptr; AtkValuePtr ptr;
unsafe unsafe
{ {
#pragma warning disable CS0618 // Type or member is obsolete
ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i)); ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i));
#pragma warning restore CS0618 // Type or member is obsolete
} }
yield return ptr; yield return ptr;

View file

@ -55,7 +55,9 @@ public class AddonSetupArgs : AddonArgs
AtkValuePtr ptr; AtkValuePtr ptr;
unsafe unsafe
{ {
#pragma warning disable CS0618 // Type or member is obsolete
ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i)); ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i));
#pragma warning restore CS0618 // Type or member is obsolete
} }
yield return ptr; yield return ptr;

View file

@ -150,7 +150,7 @@ internal sealed unsafe class DtrBarEntry : IDisposable, IDtrBarEntry
} }
/// <inheritdoc/> /// <inheritdoc/>
[Api14ToDo("Maybe make this config scoped to internal name?")] [Api15ToDo("Maybe make this config scoped to internal name?")]
public bool UserHidden => this.configuration.DtrIgnore?.Contains(this.Title) ?? false; public bool UserHidden => this.configuration.DtrIgnore?.Contains(this.Title) ?? false;
/// <inheritdoc/> /// <inheritdoc/>

View file

@ -48,7 +48,7 @@ public abstract class Easing
/// Gets the current value of the animation, following unclamped logic. /// Gets the current value of the animation, following unclamped logic.
/// </summary> /// </summary>
[Obsolete($"This field has been deprecated. Use either {nameof(ValueClamped)} or {nameof(ValueUnclamped)} instead.", true)] [Obsolete($"This field has been deprecated. Use either {nameof(ValueClamped)} or {nameof(ValueUnclamped)} instead.", true)]
[Api14ToDo("Map this field to ValueClamped, probably.")] [Api15ToDo("Map this field to ValueClamped, probably.")]
public double Value => this.ValueUnclamped; public double Value => this.ValueUnclamped;
/// <summary> /// <summary>

View file

@ -149,16 +149,27 @@ internal class CallGateChannel
return (TRet)result; return (TRet)result;
} }
/// <summary>
/// Set the context for the invocations through this channel.
/// </summary>
/// <param name="ipcContext">The context to set.</param>
internal void SetInvocationContext(IpcContext ipcContext) internal void SetInvocationContext(IpcContext ipcContext)
{ {
this.ipcExecutionContext.Value = ipcContext; this.ipcExecutionContext.Value = ipcContext;
} }
/// <summary>
/// Get the context for invocations through this channel.
/// </summary>
/// <returns>The context, if one was set.</returns>
internal IpcContext? GetInvocationContext() internal IpcContext? GetInvocationContext()
{ {
return this.ipcExecutionContext.IsValueCreated ? this.ipcExecutionContext.Value : null; return this.ipcExecutionContext.IsValueCreated ? this.ipcExecutionContext.Value : null;
} }
/// <summary>
/// Clear the context for this channel.
/// </summary>
internal void ClearInvocationContext() internal void ClearInvocationContext()
{ {
this.ipcExecutionContext.Value = null; this.ipcExecutionContext.Value = null;

View file

@ -2,6 +2,7 @@ using Dalamud.Game;
using Dalamud.Game.ClientState; using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.ClientState.Objects.SubKinds;
using Dalamud.Utility;
namespace Dalamud.Plugin.Services; namespace Dalamud.Plugin.Services;
@ -109,13 +110,15 @@ public interface IClientState : IDalamudService
/// <summary> /// <summary>
/// Gets the local player character, if one is present. /// Gets the local player character, if one is present.
/// </summary> /// </summary>
[Obsolete($"Use {nameof(IPlayerState)} or {nameof(IObjectTable)}.{nameof(IObjectTable.LocalPlayer)} if necessary.", true)] [Api15ToDo("Remove")]
[Obsolete($"Use {nameof(IPlayerState)} or {nameof(IObjectTable)}.{nameof(IObjectTable.LocalPlayer)} if necessary.")]
public IPlayerCharacter? LocalPlayer { get; } public IPlayerCharacter? LocalPlayer { get; }
/// <summary> /// <summary>
/// Gets the content ID of the local character. /// Gets the content ID of the local character.
/// </summary> /// </summary>
[Obsolete($"Use {nameof(IPlayerState)}.{nameof(IPlayerState.ContentId)}", true)] [Api15ToDo("Remove")]
[Obsolete($"Use {nameof(IPlayerState)}.{nameof(IPlayerState.ContentId)}")]
public ulong LocalContentId { get; } public ulong LocalContentId { get; }
/// <summary> /// <summary>

View file

@ -1,24 +0,0 @@
namespace Dalamud.Utility;
/// <summary>
/// Utility class for marking something to be changed for API 13, for ease of lookup.
/// </summary>
[AttributeUsage(AttributeTargets.All, Inherited = false)]
internal sealed class Api14ToDoAttribute : Attribute
{
/// <summary>
/// Marks that this should be made internal.
/// </summary>
public const string MakeInternal = "Make internal.";
/// <summary>
/// Initializes a new instance of the <see cref="Api14ToDoAttribute"/> class.
/// </summary>
/// <param name="what">The explanation.</param>
/// <param name="what2">The explanation 2.</param>
public Api14ToDoAttribute(string what, string what2 = "")
{
_ = what;
_ = what2;
}
}