mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
Un-whether-or-not the codebase
This commit is contained in:
parent
f4102db488
commit
731d7e0f6e
59 changed files with 249 additions and 249 deletions
|
|
@ -100,7 +100,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
|
|||
public PluginLoadReason Reason { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not auto-updates have already completed this session.
|
||||
/// Gets a value indicating whether auto-updates have already completed this session.
|
||||
/// </summary>
|
||||
public bool IsAutoUpdateComplete => Service<AutoUpdateManager>.Get().IsAutoUpdateComplete;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public interface IDalamudPluginInterface
|
|||
/// <param name="kind">What action caused this event to be fired.</param>
|
||||
/// <param name="affectedThisPlugin">If this plugin was affected by the change.</param>
|
||||
public delegate void ActivePluginsChangedDelegate(PluginListInvalidationKind kind, bool affectedThisPlugin);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event that gets fired when loc is changed
|
||||
/// </summary>
|
||||
|
|
@ -52,7 +52,7 @@ public interface IDalamudPluginInterface
|
|||
PluginLoadReason Reason { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not auto-updates have already completed this session.
|
||||
/// Gets a value indicating whether auto-updates have already completed this session.
|
||||
/// </summary>
|
||||
bool IsAutoUpdateComplete { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ public interface IExposedPlugin
|
|||
bool IsTesting { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this plugin is orphaned(belongs to a repo) or not.
|
||||
/// Gets a value indicating whether this plugin is orphaned(belongs to a repo) or not.
|
||||
/// </summary>
|
||||
bool IsOrphaned { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this plugin is serviced(repo still exists, but plugin no longer does).
|
||||
/// Gets a value indicating whether this plugin is serviced(repo still exists, but plugin no longer does).
|
||||
/// </summary>
|
||||
bool IsDecommissioned { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ internal class AutoUpdateManager : IServiceType
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not auto-updates have already completed this session.
|
||||
/// Gets a value indicating whether auto-updates have already completed this session.
|
||||
/// </summary>
|
||||
public bool IsAutoUpdateComplete { get; private set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ internal class PluginManager : IInternalDisposableService
|
|||
/// Check if a manifest even has an available testing version.
|
||||
/// </summary>
|
||||
/// <param name="manifest">The manifest to test.</param>
|
||||
/// <returns>Whether or not a testing version is available.</returns>
|
||||
/// <returns>Whether a testing version is available.</returns>
|
||||
public static bool HasTestingVersion(IPluginManifest manifest)
|
||||
{
|
||||
var av = manifest.AssemblyVersion;
|
||||
|
|
@ -1037,7 +1037,7 @@ internal class PluginManager : IInternalDisposableService
|
|||
/// </summary>
|
||||
/// <param name="metadata">The available plugin update.</param>
|
||||
/// <param name="notify">Whether to notify that installed plugins have changed afterwards.</param>
|
||||
/// <param name="dryRun">Whether or not to actually perform the update, or just indicate success.</param>
|
||||
/// <param name="dryRun">Whether to actually perform the update, or just indicate success.</param>
|
||||
/// <returns>The status of the update.</returns>
|
||||
public async Task<PluginUpdateStatus> UpdateSinglePluginAsync(AvailablePluginUpdate metadata, bool notify, bool dryRun)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ internal class Profile
|
|||
/// </summary>
|
||||
/// <param name="manager">The manager this profile belongs to.</param>
|
||||
/// <param name="model">The model this profile is tied to.</param>
|
||||
/// <param name="isDefaultProfile">Whether or not this profile is the default profile.</param>
|
||||
/// <param name="isBoot">Whether or not this profile was initialized during bootup.</param>
|
||||
/// <param name="isDefaultProfile">Whether this profile is the default profile.</param>
|
||||
/// <param name="isBoot">Whether this profile was initialized during bootup.</param>
|
||||
public Profile(ProfileManager manager, ProfileModel model, bool isDefaultProfile, bool isBoot)
|
||||
{
|
||||
this.manager = manager;
|
||||
|
|
@ -108,12 +108,12 @@ internal class Profile
|
|||
public Guid Guid => this.modelV1.Guid;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this profile is currently enabled.
|
||||
/// Gets a value indicating whether this profile is currently enabled.
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this profile is the default profile.
|
||||
/// Gets a value indicating whether this profile is the default profile.
|
||||
/// </summary>
|
||||
public bool IsDefaultProfile { get; }
|
||||
|
||||
|
|
@ -139,8 +139,8 @@ internal class Profile
|
|||
/// Set this profile's state. This cannot be called for the default profile.
|
||||
/// This will block until all states have been applied.
|
||||
/// </summary>
|
||||
/// <param name="enabled">Whether or not the profile is enabled.</param>
|
||||
/// <param name="apply">Whether or not the current state should immediately be applied.</param>
|
||||
/// <param name="enabled">Whether the profile is enabled.</param>
|
||||
/// <param name="apply">Whether the current state should immediately be applied.</param>
|
||||
/// <exception cref="InvalidOperationException">Thrown when an untoggleable profile is toggled.</exception>
|
||||
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
||||
public async Task SetStateAsync(bool enabled, bool apply = true)
|
||||
|
|
@ -178,8 +178,8 @@ internal class Profile
|
|||
/// </summary>
|
||||
/// <param name="workingPluginId">The ID of the plugin.</param>
|
||||
/// <param name="internalName">The internal name of the plugin, if available.</param>
|
||||
/// <param name="state">Whether or not the plugin should be enabled.</param>
|
||||
/// <param name="apply">Whether or not the current state should immediately be applied.</param>
|
||||
/// <param name="state">Whether the plugin should be enabled.</param>
|
||||
/// <param name="apply">Whether the current state should immediately be applied.</param>
|
||||
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
||||
public async Task AddOrUpdateAsync(Guid workingPluginId, string? internalName, bool state, bool apply = true)
|
||||
{
|
||||
|
|
@ -223,9 +223,9 @@ internal class Profile
|
|||
/// This will block until all states have been applied.
|
||||
/// </summary>
|
||||
/// <param name="workingPluginId">The ID of the plugin.</param>
|
||||
/// <param name="apply">Whether or not the current state should immediately be applied.</param>
|
||||
/// <param name="apply">Whether the current state should immediately be applied.</param>
|
||||
/// <param name="checkDefault">
|
||||
/// Whether or not to throw when a plugin is removed from the default profile, without being in another profile.
|
||||
/// Whether to throw when a plugin is removed from the default profile, without being in another profile.
|
||||
/// Used to prevent orphan plugins, but can be ignored when cleaning up old entries.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ internal class ProfileManager : IServiceType
|
|||
public IEnumerable<Profile> Profiles => this.profiles;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not the profile manager is busy enabling/disabling plugins.
|
||||
/// Gets a value indicating whether the profile manager is busy enabling/disabling plugins.
|
||||
/// </summary>
|
||||
public bool IsBusy => this.isBusy;
|
||||
|
||||
|
|
@ -71,8 +71,8 @@ internal class ProfileManager : IServiceType
|
|||
/// <param name="workingPluginId">The ID of the plugin.</param>
|
||||
/// <param name="internalName">The internal name of the plugin, if available.</param>
|
||||
/// <param name="defaultState">The state the plugin shall be in, if it needs to be added.</param>
|
||||
/// <param name="addIfNotDeclared">Whether or not the plugin should be added to the default preset, if it's not present in any preset.</param>
|
||||
/// <returns>Whether or not the plugin shall be enabled.</returns>
|
||||
/// <param name="addIfNotDeclared">Whether the plugin should be added to the default preset, if it's not present in any preset.</param>
|
||||
/// <returns>Whether the plugin shall be enabled.</returns>
|
||||
public async Task<bool> GetWantStateAsync(Guid workingPluginId, string? internalName, bool defaultState, bool addIfNotDeclared = true)
|
||||
{
|
||||
var want = false;
|
||||
|
|
@ -106,7 +106,7 @@ internal class ProfileManager : IServiceType
|
|||
/// Check whether a plugin is declared in any profile.
|
||||
/// </summary>
|
||||
/// <param name="workingPluginId">The ID of the plugin.</param>
|
||||
/// <returns>Whether or not the plugin is in any profile.</returns>
|
||||
/// <returns>Whether the plugin is in any profile.</returns>
|
||||
public bool IsInAnyProfile(Guid workingPluginId)
|
||||
{
|
||||
lock (this.profiles)
|
||||
|
|
@ -118,7 +118,7 @@ internal class ProfileManager : IServiceType
|
|||
/// A plugin can never be in the default profile if it is in any other profile.
|
||||
/// </summary>
|
||||
/// <param name="workingPluginId">The ID of the plugin.</param>
|
||||
/// <returns>Whether or not the plugin is in the default profile.</returns>
|
||||
/// <returns>Whether the plugin is in the default profile.</returns>
|
||||
public bool IsInDefaultProfile(Guid workingPluginId)
|
||||
=> this.DefaultProfile.WantsPlugin(workingPluginId) != null;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class ProfileModelV1 : ProfileModel
|
|||
public static string SerializedPrefix => "DP1";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not this profile should always be enabled at boot.
|
||||
/// Gets or sets a value indicating whether this profile should always be enabled at boot.
|
||||
/// </summary>
|
||||
[JsonProperty("b")]
|
||||
[Obsolete("Superseded by StartupPolicy")]
|
||||
|
|
@ -49,7 +49,7 @@ public class ProfileModelV1 : ProfileModel
|
|||
public ProfileStartupPolicy? StartupPolicy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not this profile is currently enabled.
|
||||
/// Gets or sets a value indicating whether this profile is currently enabled.
|
||||
/// </summary>
|
||||
[JsonProperty("e")]
|
||||
public bool IsEnabled { get; set; } = false;
|
||||
|
|
@ -81,7 +81,7 @@ public class ProfileModelV1 : ProfileModel
|
|||
public Guid WorkingPluginId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not this entry is enabled.
|
||||
/// Gets or sets a value indicating whether this entry is enabled.
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ internal class ProfilePluginEntry
|
|||
/// </summary>
|
||||
/// <param name="internalName">The internal name of the plugin.</param>
|
||||
/// <param name="workingPluginId">The ID of the plugin.</param>
|
||||
/// <param name="state">A value indicating whether or not this entry is enabled.</param>
|
||||
/// <param name="state">A value indicating whether this entry is enabled.</param>
|
||||
public ProfilePluginEntry(string internalName, Guid workingPluginId, bool state)
|
||||
{
|
||||
this.InternalName = internalName;
|
||||
|
|
@ -22,14 +22,14 @@ internal class ProfilePluginEntry
|
|||
/// Gets the internal name of the plugin.
|
||||
/// </summary>
|
||||
public string InternalName { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an ID uniquely identifying this specific instance of a plugin.
|
||||
/// </summary>
|
||||
public Guid WorkingPluginId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this entry is enabled.
|
||||
/// Gets a value indicating whether this entry is enabled.
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,13 +178,13 @@ internal class LocalPlugin : IAsyncDisposable
|
|||
public bool IsTesting => this.manifest.IsTestingExclusive || this.manifest.Testing;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this plugin is orphaned(belongs to a repo) or not.
|
||||
/// Gets a value indicating whether this plugin is orphaned(belongs to a repo) or not.
|
||||
/// </summary>
|
||||
public bool IsOrphaned => !this.IsDev &&
|
||||
this.GetSourceRepository() == null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not this plugin is serviced(repo still exists, but plugin no longer does).
|
||||
/// Gets a value indicating whether this plugin is serviced(repo still exists, but plugin no longer does).
|
||||
/// </summary>
|
||||
public bool IsDecommissioned => !this.IsDev &&
|
||||
this.GetSourceRepository()?.State == PluginRepositoryState.Success &&
|
||||
|
|
@ -499,7 +499,7 @@ internal class LocalPlugin : IAsyncDisposable
|
|||
/// <summary>
|
||||
/// Check if anything forbids this plugin from loading.
|
||||
/// </summary>
|
||||
/// <returns>Whether or not this plugin shouldn't load.</returns>
|
||||
/// <returns>Whether this plugin shouldn't load.</returns>
|
||||
public bool CheckPolicy()
|
||||
{
|
||||
var startInfo = Service<Dalamud>.Get().StartInfo;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ internal record PluginManifest : IPluginManifest
|
|||
public List<string>? CategoryTags { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not the plugin is hidden in the plugin installer.
|
||||
/// Gets or sets a value indicating whether the plugin is hidden in the plugin installer.
|
||||
/// This value comes from the plugin master and is in addition to the list of hidden names kept by Dalamud.
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public interface IClientState
|
|||
/// Gets the current Territory the player resides in.
|
||||
/// </summary>
|
||||
public ushort TerritoryType { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current Map the player resides in.
|
||||
/// </summary>
|
||||
|
|
@ -101,17 +101,17 @@ public interface IClientState
|
|||
public bool IsLoggedIn { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not the user is playing PvP.
|
||||
/// Gets a value indicating whether the user is playing PvP.
|
||||
/// </summary>
|
||||
public bool IsPvP { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.
|
||||
/// Gets a value indicating whether the user is playing PvP, excluding the Wolves' Den.
|
||||
/// </summary>
|
||||
public bool IsPvPExcludingDen { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the client is currently in Group Pose (GPose) mode.
|
||||
/// Gets a value indicating whether the client is currently in Group Pose (GPose) mode.
|
||||
/// </summary>
|
||||
public bool IsGPosing { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ namespace Dalamud.Game;
|
|||
public interface ISigScanner
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not the search on this module is performed on a copy.
|
||||
/// Gets a value indicating whether the search on this module is performed on a copy.
|
||||
/// </summary>
|
||||
public bool IsCopy { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not the ProcessModule is 32-bit.
|
||||
/// Gets a value indicating whether the ProcessModule is 32-bit.
|
||||
/// </summary>
|
||||
public bool Is32BitProcess { get; }
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ public interface ISigScanner
|
|||
/// <param name="offset">The offset from function start of the instruction using the data.</param>
|
||||
/// <returns>An IntPtr to the static memory location.</returns>
|
||||
public nint GetStaticAddressFromSig(string signature, int offset = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Try scanning for a .data address using a .text function.
|
||||
/// This is intended to be used with IDA sigs.
|
||||
|
|
@ -95,14 +95,14 @@ public interface ISigScanner
|
|||
/// <param name="offset">The offset from function start of the instruction using the data.</param>
|
||||
/// <returns>true if the signature was found.</returns>
|
||||
public bool TryGetStaticAddressFromSig(string signature, out nint result, int offset = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Scan for a byte signature in the .data section.
|
||||
/// </summary>
|
||||
/// <param name="signature">The signature.</param>
|
||||
/// <returns>The real offset of the found signature.</returns>
|
||||
public nint ScanData(string signature);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Try scanning for a byte signature in the .data section.
|
||||
/// </summary>
|
||||
|
|
@ -110,14 +110,14 @@ public interface ISigScanner
|
|||
/// <param name="result">The real offset of the signature, if found.</param>
|
||||
/// <returns>true if the signature was found.</returns>
|
||||
public bool TryScanData(string signature, out nint result);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Scan for a byte signature in the whole module search area.
|
||||
/// </summary>
|
||||
/// <param name="signature">The signature.</param>
|
||||
/// <returns>The real offset of the found signature.</returns>
|
||||
public nint ScanModule(string signature);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Try scanning for a byte signature in the whole module search area.
|
||||
/// </summary>
|
||||
|
|
@ -125,7 +125,7 @@ public interface ISigScanner
|
|||
/// <param name="result">The real offset of the signature, if found.</param>
|
||||
/// <returns>true if the signature was found.</returns>
|
||||
public bool TryScanModule(string signature, out nint result);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resolve a RVA address.
|
||||
/// </summary>
|
||||
|
|
@ -133,14 +133,14 @@ public interface ISigScanner
|
|||
/// <param name="relOffset">The relative offset.</param>
|
||||
/// <returns>The calculated offset.</returns>
|
||||
public nint ResolveRelativeAddress(nint nextInstAddr, int relOffset);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Scan for a byte signature in the .text section.
|
||||
/// </summary>
|
||||
/// <param name="signature">The signature.</param>
|
||||
/// <returns>The real offset of the found signature.</returns>
|
||||
public nint ScanText(string signature);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Try scanning for a byte signature in the .text section.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public interface ITextureProvider
|
|||
/// <para>Caching the returned object is not recommended. Performance benefit will be minimal.</para>
|
||||
/// </remarks>
|
||||
ISharedImmediateTexture GetFromGameIcon(in GameIconLookup lookup);
|
||||
|
||||
|
||||
/// <summary>Gets a shared texture corresponding to the given game resource icon specifier.</summary>
|
||||
/// <remarks>
|
||||
/// <para>This function does not throw exceptions.</para>
|
||||
|
|
@ -200,7 +200,7 @@ public interface ITextureProvider
|
|||
/// </remarks>
|
||||
/// <param name="lookup">A game icon specifier.</param>
|
||||
/// <param name="texture">The resulting <see cref="ISharedImmediateTexture"/>.</param>
|
||||
/// <returns>Whether or not the lookup succeeded.</returns>
|
||||
/// <returns>Whether the lookup succeeded.</returns>
|
||||
bool TryGetFromGameIcon(in GameIconLookup lookup, [NotNullWhen(true)] out ISharedImmediateTexture? texture);
|
||||
|
||||
/// <summary>Gets a shared texture corresponding to the given path to a game resource.</summary>
|
||||
|
|
@ -221,7 +221,7 @@ public interface ITextureProvider
|
|||
/// <para>Caching the returned object is not recommended. Performance benefit will be minimal.</para>
|
||||
/// </remarks>
|
||||
ISharedImmediateTexture GetFromFile(string path);
|
||||
|
||||
|
||||
/// <summary>Gets a shared texture corresponding to the given file on the filesystem.</summary>
|
||||
/// <param name="file">The file on the filesystem to load.</param>
|
||||
/// <returns>The shared texture that you may use to obtain the loaded texture wrap and load states.</returns>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue