apply code formatting

This commit is contained in:
2024-07-10 11:15:08 +02:00
parent e699a758f3
commit cb2cd8e32c
36 changed files with 1331 additions and 1580 deletions

View File

@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.ActivityContexts;
namespace Pilz.Dalamud.ActivityContexts
public class ActivityContext
{
public class ActivityContext
{
public ActivityType ActivityType { get; init; }
public ZoneType ZoneType { get; init; }
@@ -21,5 +15,4 @@ namespace Pilz.Dalamud.ActivityContexts
{
get => ZoneType != ZoneType.Overworld;
}
}
}

View File

@@ -1,16 +1,10 @@
using Dalamud.Logging;
using Lumina.Excel;
using Lumina.Excel;
using Lumina.Excel.GeneratedSheets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.ActivityContexts
namespace Pilz.Dalamud.ActivityContexts;
public class ActivityContextManager : IDisposable
{
public class ActivityContextManager : IDisposable
{
public delegate void ActivityContextChangedEventHandler(ActivityContextManager sender, ActivityContext activityContext);
public event ActivityContextChangedEventHandler ActivityContextChanged;
@@ -85,5 +79,4 @@ namespace Pilz.Dalamud.ActivityContexts
CurrentActivityContext = new(newActivityContext, newZoneType);
ActivityContextChanged?.Invoke(this, CurrentActivityContext);
}
}
}

View File

@@ -1,18 +1,12 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.ActivityContexts
namespace Pilz.Dalamud.ActivityContexts;
[JsonConverter(typeof(StringEnumConverter))]
public enum ActivityType
{
[JsonConverter(typeof(StringEnumConverter))]
public enum ActivityType
{
None = 0x0,
PveDuty = 0x1,
PvpDuty = 0x2
}
}

View File

@@ -1,16 +1,11 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.ActivityContexts
namespace Pilz.Dalamud.ActivityContexts;
[Flags, JsonConverter(typeof(StringEnumConverter))]
public enum ZoneType
{
[Flags, JsonConverter(typeof(StringEnumConverter))]
public enum ZoneType
{
Overworld = 1,
Doungen = 2,
Raid = 4,
@@ -18,5 +13,4 @@ namespace Pilz.Dalamud.ActivityContexts
Foray = 16,
Pvp = 32,
Everywhere = int.MaxValue
}
}

View File

@@ -1,14 +1,9 @@
using Dalamud.Game.Text.SeStringHandling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud
namespace Pilz.Dalamud;
public static class Extensions
{
public static class Extensions
{
/// <summary>
/// Removes a Payload from a given SeString.
/// Using <code>SeString.Payloads.Remove()</code> does not use the reference to compare for some reason. Tis is a workaround.
@@ -37,5 +32,4 @@ namespace Pilz.Dalamud
}
}
}
}
}

View File

@@ -1,16 +1,12 @@
using Dalamud.Game.Text.SeStringHandling;
using FFXIVClientStructs.FFXIV.Client.System.Memory;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud
namespace Pilz.Dalamud;
public static class GameInterfaceHelper
{
public static class GameInterfaceHelper
{
public static SeString ReadSeString(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
@@ -149,5 +145,4 @@ namespace Pilz.Dalamud
IMemorySpace.Free((void*)ptr, size);
ptr = IntPtr.Zero;
}
}
}

View File

@@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Icons;
namespace Pilz.Dalamud.Icons
public class JobIconSet
{
public class JobIconSet
{
private readonly int[] icons;
public float IconScale { get; init; }
@@ -23,5 +16,4 @@ namespace Pilz.Dalamud.Icons
{
return icons[jobID - 1];
}
}
}

View File

@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Icons;
namespace Pilz.Dalamud.Icons
public enum JobIconSetName
{
public enum JobIconSetName
{
Gold,
Framed,
Glowing,
@@ -20,5 +14,4 @@ namespace Pilz.Dalamud.Icons
Green,
Grey,
Role
}
}

View File

@@ -1,15 +1,8 @@
using Lumina.Excel.GeneratedSheets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Icons;
namespace Pilz.Dalamud.Icons
public class JobIconSets
{
public class JobIconSets
{
private readonly Dictionary<JobIconSetName, JobIconSet> iconSets = new();
private readonly Dictionary<JobIconSetName, JobIconSet> iconSets = [];
public JobIconSets()
{
@@ -124,5 +117,4 @@ namespace Pilz.Dalamud.Icons
{
return iconSets[set].IconScale;
}
}
}

View File

@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.EventArgs;
namespace Pilz.Dalamud.Nameplates.EventArgs
public class AddonNamePlate_SetPlayerNameEventArgs : HookWithResultBaseEventArgs<IntPtr>
{
public class AddonNamePlate_SetPlayerNameEventArgs : HookWithResultBaseEventArgs<IntPtr>
{
public IntPtr PlayerNameplateObjectPtr { get; set; }
public IntPtr TitlePtr { get; set; }
public IntPtr NamePtr { get; set; }
@@ -16,5 +10,4 @@ namespace Pilz.Dalamud.Nameplates.EventArgs
public bool IsTitleAboveName { get; set; }
public bool IsTitleVisible { get; set; }
public int IconID { get; set; }
}
}

View File

@@ -1,15 +1,10 @@
using Dalamud.Game.Text.SeStringHandling;
using Pilz.Dalamud.Nameplates.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.EventArgs
namespace Pilz.Dalamud.Nameplates.EventArgs;
public class AddonNamePlate_SetPlayerNameManagedEventArgs : HookWithResultManagedBaseEventArgs<IntPtr>
{
public class AddonNamePlate_SetPlayerNameManagedEventArgs : HookWithResultManagedBaseEventArgs<IntPtr>
{
public new AddonNamePlate_SetPlayerNameEventArgs OriginalEventArgs
{
get => base.OriginalEventArgs as AddonNamePlate_SetPlayerNameEventArgs;
@@ -39,5 +34,4 @@ namespace Pilz.Dalamud.Nameplates.EventArgs
get => OriginalEventArgs.IconID;
set => OriginalEventArgs.IconID = value;
}
}
}

View File

@@ -1,18 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.EventArgs;
namespace Pilz.Dalamud.Nameplates.EventArgs
public abstract class HookBaseEventArgs
{
public abstract class HookBaseEventArgs
{
internal event Action CallOriginal;
public void Original()
{
CallOriginal?.Invoke();
}
}
}

View File

@@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.EventArgs;
namespace Pilz.Dalamud.Nameplates.EventArgs
public abstract class HookManagedBaseEventArgs
{
public abstract class HookManagedBaseEventArgs
{
public HookBaseEventArgs OriginalEventArgs { get; internal set; }
}
}

View File

@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.EventArgs;
namespace Pilz.Dalamud.Nameplates.EventArgs
public abstract class HookWithResultBaseEventArgs<TResult>
{
public abstract class HookWithResultBaseEventArgs<TResult>
{
internal event Func<TResult> CallOriginal;
public TResult Result { get; set; }
@@ -17,5 +11,4 @@ namespace Pilz.Dalamud.Nameplates.EventArgs
{
return CallOriginal.Invoke();
}
}
}

View File

@@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.EventArgs;
namespace Pilz.Dalamud.Nameplates.EventArgs
public abstract class HookWithResultManagedBaseEventArgs<TResult>
{
public abstract class HookWithResultManagedBaseEventArgs<TResult>
{
public HookWithResultBaseEventArgs<TResult> OriginalEventArgs { get; internal set; }
}
}

View File

@@ -1,17 +1,10 @@
using Dalamud.Logging;
using Dalamud.Plugin;
using FFXIVClientStructs.FFXIV.Client.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using FFXIVClientStructs.FFXIV.Client.UI;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Model
namespace Pilz.Dalamud.Nameplates.Model;
public class SafeAddonNameplate
{
public class SafeAddonNameplate
{
private readonly DalamudPluginInterface Interface;
public IntPtr Pointer => PluginServices.GameGui.GetAddonByName("NamePlate", 1);
@@ -39,5 +32,4 @@ namespace Pilz.Dalamud.Nameplates.Model
return result;
}
}
}

View File

@@ -1,17 +1,11 @@
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Model
namespace Pilz.Dalamud.Nameplates.Model;
public class SafeNameplateInfo
{
public class SafeNameplateInfo
{
public readonly IntPtr Pointer;
public readonly RaptureAtkModule.NamePlateInfo Data;
@@ -53,5 +47,4 @@ namespace Pilz.Dalamud.Nameplates.Model
{
return Marshal.PtrToStringUTF8(stringPtr);
}
}
}

View File

@@ -1,17 +1,11 @@
using Dalamud.Logging;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Component.GUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Model
namespace Pilz.Dalamud.Nameplates.Model;
public class SafeNameplateObject
{
public class SafeNameplateObject
{
public IntPtr Pointer { get; }
public AddonNamePlate.NamePlateObject Data { get; }
@@ -124,5 +118,4 @@ namespace Pilz.Dalamud.Nameplates.Model
Marshal.WriteInt16(iconXAdjustPtr, x);
Marshal.WriteInt16(iconYAdjustPtr, y);
}
}
}

View File

@@ -1,16 +1,11 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Model
namespace Pilz.Dalamud.Nameplates.Model;
[JsonConverter(typeof(StringEnumConverter))]
public enum StatusIcons
{
[JsonConverter(typeof(StringEnumConverter))]
public enum StatusIcons
{
Disconnecting = 061503,
InDuty = 061506,
ViewingCutscene = 061508,
@@ -27,5 +22,4 @@ namespace Pilz.Dalamud.Nameplates.Model
MentorCrafting = 061543,
MentorPvP = 061544,
Returner = 061547,
}
}

View File

@@ -1,21 +1,12 @@
using Dalamud.Hooking;
using Pilz.Dalamud.Nameplates.EventArgs;
using Dalamud.Utility.Signatures;
using ImGuiNET;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Pilz.Dalamud.Nameplates.EventArgs;
using Pilz.Dalamud.Nameplates.Model;
using Lumina.Excel.GeneratedSheets;
using System.Xml.Linq;
using Dalamud.Plugin.Services;
namespace Pilz.Dalamud.Nameplates
namespace Pilz.Dalamud.Nameplates;
public class NameplateHooks : IDisposable
{
public class NameplateHooks : IDisposable
{
/// <summary>
/// Will be executed when the the Game wants to update the content of a nameplate with the details of the Player.
/// </summary>
@@ -224,7 +215,7 @@ namespace Pilz.Dalamud.Nameplates
if (freePrefix)
GameInterfaceHelper.PluginFree(eventArgs.PrefixPtr);
}
else if(!hasDefaultHookEvent)
else if (!hasDefaultHookEvent)
{
// Call original in case of nothing get called, just to get secure it will not break the game when not calling it.
callOriginal();
@@ -236,5 +227,4 @@ namespace Pilz.Dalamud.Nameplates
return result;
}
}
}

View File

@@ -1,15 +1,11 @@
using Dalamud.Hooking;
using Pilz.Dalamud.Nameplates.EventArgs;
using Dalamud.Utility.Signatures;
using FFXIVClientStructs.FFXIV.Client.UI;
using System.Runtime.InteropServices;
using Dalamud.Game.ClientState.Objects.Types;
using FFXIVClientStructs.FFXIV.Client.UI;
using Pilz.Dalamud.Nameplates.Model;
using System.Runtime.InteropServices;
namespace Pilz.Dalamud.Nameplates
namespace Pilz.Dalamud.Nameplates;
public class NameplateManager : IDisposable
{
public class NameplateManager : IDisposable
{
/// <summary>
/// Provides events that you can hook to.
/// </summary>
@@ -78,5 +74,4 @@ namespace Pilz.Dalamud.Nameplates
var objectId = namePlateInfo.ObjectID.ObjectID;
return PluginServices.ObjectTable.SearchById(objectId) as T;
}
}
}

View File

@@ -1,16 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Pilz.Dalamud.Nameplates.EventArgs;
using Pilz.Dalamud.Nameplates.EventArgs;
using Pilz.Dalamud.Tools.Strings;
namespace Pilz.Dalamud.Nameplates.Tools
namespace Pilz.Dalamud.Nameplates.Tools;
public class NameplateChanges
{
public class NameplateChanges
{
private readonly Dictionary<NameplateElements, StringChangesProps> changes = new();
private readonly Dictionary<NameplateElements, StringChangesProps> changes = [];
public NameplateChanges()
{
@@ -56,5 +51,4 @@ namespace Pilz.Dalamud.Nameplates.Tools
{
return GetChanges(element).GetChange(position);
}
}
}

View File

@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Tools;
namespace Pilz.Dalamud.Nameplates.Tools
public class NameplateChangesProps
{
public class NameplateChangesProps
{
/// <summary>
/// All the changes to the nameplate that should be made.
/// </summary>
@@ -21,5 +15,4 @@ namespace Pilz.Dalamud.Nameplates.Tools
{
Changes = changes;
}
}
}

View File

@@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Tools;
namespace Pilz.Dalamud.Nameplates.Tools
public enum NameplateElements
{
public enum NameplateElements
{
Name,
Title,
FreeCompany
}
}

View File

@@ -1,19 +1,13 @@
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Pilz.Dalamud.ActivityContexts;
using Pilz.Dalamud.Nameplates.Model;
using Pilz.Dalamud.Tools;
using Pilz.Dalamud.Tools.Strings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Tools
namespace Pilz.Dalamud.Nameplates.Tools;
public static class NameplateUpdateFactory
{
public static class NameplateUpdateFactory
{
public static void ApplyNameplateChanges(NameplateChangesProps props)
{
foreach (NameplateElements element in Enum.GetValues(typeof(NameplateElements)))
@@ -48,5 +42,4 @@ namespace Pilz.Dalamud.Nameplates.Tools
return isPrio.Value;
}
}
}

View File

@@ -1,16 +1,10 @@
using Lumina.Excel.GeneratedSheets;
using Pilz.Dalamud.ActivityContexts;
using Pilz.Dalamud.ActivityContexts;
using Pilz.Dalamud.Nameplates.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Tools
namespace Pilz.Dalamud.Nameplates.Tools;
public class StatusIconPriorizer
{
public class StatusIconPriorizer
{
private static StatusIconPriorizerSettings DefaultSettings { get; } = new();
public StatusIconPriorizerSettings Settings { get; init; }
@@ -63,5 +57,4 @@ namespace Pilz.Dalamud.Nameplates.Tools
return Settings.GetConditionSet(set).Select(n => (int)n);
}
}
}

View File

@@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Tools;
namespace Pilz.Dalamud.Nameplates.Tools
public enum StatusIconPriorizerConditionSets
{
public enum StatusIconPriorizerConditionSets
{
Overworld,
InDuty,
InForay
}
}

View File

@@ -1,18 +1,12 @@
using Newtonsoft.Json;
using Pilz.Dalamud.ActivityContexts;
using Pilz.Dalamud.Nameplates.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Nameplates.Tools
namespace Pilz.Dalamud.Nameplates.Tools;
public class StatusIconPriorizerSettings
{
public class StatusIconPriorizerSettings
{
[JsonProperty("IconConditionSets")]
private Dictionary<StatusIconPriorizerConditionSets, List<StatusIcons>> iconConditionSets = new();
private Dictionary<StatusIconPriorizerConditionSets, List<StatusIcons>> iconConditionSets = [];
public bool UsePriorizedIcons { get; set; } = true;
[JsonConstructor]
@@ -27,7 +21,7 @@ namespace Pilz.Dalamud.Nameplates.Tools
public StatusIconPriorizerSettings(bool fillWithDefaultSettings)
{
foreach (StatusIconPriorizerConditionSets set in Enum.GetValues(typeof(StatusIconPriorizerConditionSets)))
iconConditionSets.Add(set, new List<StatusIcons>());
iconConditionSets.Add(set, []);
if (fillWithDefaultSettings)
FillWithDefaultSettings();
@@ -106,5 +100,4 @@ namespace Pilz.Dalamud.Nameplates.Tools
StatusIcons.NewAdventurer,
});
}
}
}

View File

@@ -1,20 +1,11 @@
using Dalamud.Data;
using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.Gui;
using Dalamud.IoC;
using Dalamud.IoC;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud
namespace Pilz.Dalamud;
public class PluginServices
{
public class PluginServices
{
[PluginService] public static IDalamudPluginInterface PluginInterface { get; set; } = null;
[PluginService] public static IGameGui GameGui { get; set; } = null;
[PluginService] public static IClientState ClientState { get; set; } = null;
@@ -26,5 +17,4 @@ namespace Pilz.Dalamud
{
dalamudPluginInterface.Create<PluginServices>();
}
}
}

View File

@@ -1,15 +1,10 @@
using Dalamud.Game.Text.SeStringHandling;
using Pilz.Dalamud.Nameplates.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Tools
namespace Pilz.Dalamud.Tools;
public static class StatusIconFontConverter
{
public static class StatusIconFontConverter
{
public static StatusIcons? GetStatusIconFromBitmapFontIcon(BitmapFontIcon fontIcon)
{
return fontIcon switch
@@ -37,5 +32,4 @@ namespace Pilz.Dalamud.Tools
_ => null
};
}
}
}

View File

@@ -1,18 +1,13 @@
using Dalamud.Game.Text.SeStringHandling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Tools.Strings
namespace Pilz.Dalamud.Tools.Strings;
public class StringChange
{
public class StringChange
{
/// <summary>
/// The payloads to use for inserting/replacing.
/// </summary>
public List<Payload> Payloads { get; init; } = new();
public List<Payload> Payloads { get; init; } = [];
/// <summary>
/// Defines if only one anchor payload should be used, if using anchor payloads.
@@ -20,5 +15,4 @@ namespace Pilz.Dalamud.Tools.Strings
/// Not needed to be true for the most cases.
/// </summary>
public bool ForceUsingSingleAnchorPayload { get; set; } = false;
}
}

View File

@@ -1,15 +1,8 @@
using Dalamud.Game.Text.SeStringHandling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Tools.Strings;
namespace Pilz.Dalamud.Tools.Strings
public class StringChanges
{
public class StringChanges
{
private readonly Dictionary<StringPosition, StringChange> changes = new();
private readonly Dictionary<StringPosition, StringChange> changes = [];
public StringChanges()
{
@@ -36,5 +29,4 @@ namespace Pilz.Dalamud.Tools.Strings
{
return changes.Sum(n => n.Value.Payloads.Count) != 0;
}
}
}

View File

@@ -1,15 +1,9 @@
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.Text.SeStringHandling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dalamud.Game.Text.SeStringHandling;
namespace Pilz.Dalamud.Tools.Strings
namespace Pilz.Dalamud.Tools.Strings;
public class StringChangesProps
{
public class StringChangesProps
{
/// <summary>
/// The string where the changes should be applied.
/// </summary>
@@ -21,11 +15,10 @@ namespace Pilz.Dalamud.Tools.Strings
/// <summary>
/// Payloads to use as anchor where the changes should be applied to.
/// </summary>
public List<Payload> AnchorPayloads { get; set; } = new();
public List<Payload> AnchorPayloads { get; set; } = [];
/// <summary>
/// A single payload to use as anchor where the changes should be applied to.
/// This property will only be used if StringChange.ForceSingleAnchorPayload is true.
/// </summary>
public Payload AnchorPayload { get; set; }
}
}

View File

@@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Tools.Strings;
namespace Pilz.Dalamud.Tools.Strings
public enum StringPosition
{
public enum StringPosition
{
Before,
After,
Replace
}
}

View File

@@ -1,16 +1,10 @@
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Lumina.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Dalamud.Tools.Strings
namespace Pilz.Dalamud.Tools.Strings;
public static class StringUpdateFactory
{
public static class StringUpdateFactory
{
public static void ApplyStringChanges(StringChangesProps props)
{
if (props.StringChanges != null && props.StringChanges.Any())
@@ -128,5 +122,4 @@ namespace Pilz.Dalamud.Tools.Strings
return tagPositionsOrdered;
}
}
}

View File

@@ -1,15 +1,10 @@
using FFXIVClientStructs.FFXIV.Client.System.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Pilz.Dalamud.Nameplates.Model;
namespace Pilz.Dalamud
namespace Pilz.Dalamud;
public class XivApi
{
public class XivApi
{
private static IntPtr _RaptureAtkModulePtr = IntPtr.Zero;
public static IntPtr RaptureAtkModulePtr
@@ -35,5 +30,4 @@ namespace Pilz.Dalamud
{
return new(PluginServices.PluginInterface);
}
}
}