mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
Revert obsolete as error again, fix warnings, Api14ToDo => Api15ToDo
Some checks are pending
Some checks are pending
This commit is contained in:
parent
19fca721e9
commit
c005bae265
8 changed files with 23 additions and 29 deletions
|
|
@ -11,7 +11,7 @@ namespace Dalamud.Configuration;
|
|||
/// <summary>
|
||||
/// Configuration to store settings for a dalamud plugin.
|
||||
/// </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
|
||||
{
|
||||
private readonly DirectoryInfo configDirectory;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ public class AddonRefreshArgs : AddonArgs
|
|||
AtkValuePtr ptr;
|
||||
unsafe
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i));
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
|
||||
yield return ptr;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ public class AddonSetupArgs : AddonArgs
|
|||
AtkValuePtr ptr;
|
||||
unsafe
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i));
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
|
||||
yield return ptr;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ internal sealed unsafe class DtrBarEntry : IDisposable, IDtrBarEntry
|
|||
}
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public abstract class Easing
|
|||
/// Gets the current value of the animation, following unclamped logic.
|
||||
/// </summary>
|
||||
[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;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -149,16 +149,27 @@ internal class CallGateChannel
|
|||
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)
|
||||
{
|
||||
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()
|
||||
{
|
||||
return this.ipcExecutionContext.IsValueCreated ? this.ipcExecutionContext.Value : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the context for this channel.
|
||||
/// </summary>
|
||||
internal void ClearInvocationContext()
|
||||
{
|
||||
this.ipcExecutionContext.Value = null;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using Dalamud.Game;
|
|||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Utility;
|
||||
|
||||
namespace Dalamud.Plugin.Services;
|
||||
|
||||
|
|
@ -109,13 +110,15 @@ public interface IClientState : IDalamudService
|
|||
/// <summary>
|
||||
/// Gets the local player character, if one is present.
|
||||
/// </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; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content ID of the local character.
|
||||
/// </summary>
|
||||
[Obsolete($"Use {nameof(IPlayerState)}.{nameof(IPlayerState.ContentId)}", true)]
|
||||
[Api15ToDo("Remove")]
|
||||
[Obsolete($"Use {nameof(IPlayerState)}.{nameof(IPlayerState.ContentId)}")]
|
||||
public ulong LocalContentId { get; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue