muffin v7.4

This commit is contained in:
alydev 2025-12-18 00:49:57 +10:00
parent 8a7847ff37
commit a4175abacd
54 changed files with 95984 additions and 123967 deletions

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>GatheringPaths</AssemblyName> <AssemblyName>GatheringPaths</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>netcoreapp9.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<LangVersion>12.0</LangVersion> <LangVersion>12.0</LangVersion>

View file

@ -207,7 +207,7 @@ public sealed class GearStatsCalculator
num2--; num2--;
continue; continue;
} }
if (i == 0 && !CanHaveOffhand.Contains(rowOrDefault.Value.ItemUICategory.RowId)) if (i == 0 && !((ReadOnlySpan<uint>)CanHaveOffhand).Contains(rowOrDefault.Value.ItemUICategory.RowId))
{ {
num += rowOrDefault.Value.LevelItem.RowId; num += rowOrDefault.Value.LevelItem.RowId;
i++; i++;

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>LLib</AssemblyName> <AssemblyName>LLib</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>netcoreapp9.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>QuestPaths</AssemblyName> <AssemblyName>QuestPaths</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>netcoreapp9.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<LangVersion>12.0</LangVersion> <LangVersion>12.0</LangVersion>

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
@ -11,20 +12,26 @@ public sealed class StringListOrValueConverter : JsonConverter<List<string>>
{ {
if (reader.TokenType == JsonTokenType.String) if (reader.TokenType == JsonTokenType.String)
{ {
return new List<string>(1) { reader.GetString() }; int num = 1;
List<string> list = new List<string>(num);
CollectionsMarshal.SetCount(list, num);
Span<string> span = CollectionsMarshal.AsSpan(list);
int index = 0;
span[index] = reader.GetString();
return list;
} }
if (reader.TokenType != JsonTokenType.StartArray) if (reader.TokenType != JsonTokenType.StartArray)
{ {
throw new JsonException(); throw new JsonException();
} }
reader.Read(); reader.Read();
List<string> list = new List<string>(); List<string> list2 = new List<string>();
while (reader.TokenType != JsonTokenType.EndArray) while (reader.TokenType != JsonTokenType.EndArray)
{ {
list.Add(reader.GetString()); list2.Add(reader.GetString());
reader.Read(); reader.Read();
} }
return list; return list2;
} }
public override void Write(Utf8JsonWriter writer, List<string>? value, JsonSerializerOptions options) public override void Write(Utf8JsonWriter writer, List<string>? value, JsonSerializerOptions options)

View file

@ -95,7 +95,7 @@ public abstract class ElementId : IComparable<ElementId>, IEquatable<ElementId>
if (value.StartsWith("A")) if (value.StartsWith("A"))
{ {
value = value.Substring(1); value = value.Substring(1);
string[] array = value.Split(new char[1] { 'x' }); string[] array = value.Split('x');
if (array.Length == 2) if (array.Length == 2)
{ {
return new AlliedSocietyDailyId(byte.Parse(array[0], CultureInfo.InvariantCulture), byte.Parse(array[1], CultureInfo.InvariantCulture)); return new AlliedSocietyDailyId(byte.Parse(array[0], CultureInfo.InvariantCulture), byte.Parse(array[1], CultureInfo.InvariantCulture));

View file

@ -16,10 +16,10 @@ public sealed class QuestRoot
public string? Comment { get; set; } public string? Comment { get; set; }
[JsonIgnore(/*Could not decode attribute arguments.*/)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? IsSeasonalQuest { get; set; } public bool? IsSeasonalQuest { get; set; }
[JsonIgnore(/*Could not decode attribute arguments.*/)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? SeasonalQuestExpiry { get; set; } public DateTime? SeasonalQuestExpiry { get; set; }
public List<QuestSequence> QuestSequence { get; set; } = new List<QuestSequence>(); public List<QuestSequence> QuestSequence { get; set; } = new List<QuestSequence>();

View file

@ -22,7 +22,7 @@ public sealed class QuestStep
public ushort TerritoryId { get; set; } public ushort TerritoryId { get; set; }
[JsonIgnore(/*Could not decode attribute arguments.*/)] [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public EInteractionType InteractionType { get; set; } public EInteractionType InteractionType { get; set; }
public float? NpcWaitDistance { get; set; } public float? NpcWaitDistance { get; set; }

View file

@ -21,15 +21,15 @@ public sealed class QuestWorkValue(byte? high, byte? low, EQuestWorkMode mode)
{ {
if (High.HasValue && Low.HasValue) if (High.HasValue && Low.HasValue)
{ {
return ((byte)(High << 4).Value + Low).ToString(); return ((byte)((High.Value << 4) + Low.Value)).ToString();
} }
if (High.HasValue) if (High.HasValue)
{ {
return High + "H"; return High.Value + "H";
} }
if (Low.HasValue) if (Low.HasValue)
{ {
return Low + "L"; return Low.Value + "L";
} }
return "-"; return "-";
} }

View file

@ -61,6 +61,6 @@ public sealed class SkipStepConditions
public override string ToString() public override string ToString()
{ {
return string.Format("{0}: {1}, {2}: {3}, {4}: {5}, {6}: {7}, {8}: {9}, {10}: {11}, {12}: {13}, {14}: {15}, {16}: {17}, {18}: {19}, {20}: {21}, {22}: {23}, {24}: {25}, {26}: {27}", "Never", Never, "CompletionQuestVariablesFlags", CompletionQuestVariablesFlags, "Flying", Flying, "Chocobo", Chocobo, "Diving", Diving, "NotTargetable", NotTargetable, "InTerritory", string.Join(" ", InTerritory), "NotInTerritory", string.Join(" ", NotInTerritory), "Item", Item, "QuestsAccepted", string.Join(" ", QuestsAccepted), "QuestsCompleted", string.Join(" ", QuestsCompleted), "NotNamePlateIconId", string.Join(" ", NotNamePlateIconId), "NearPosition", NearPosition, "ExtraCondition", ExtraCondition); return $"{"Never"}: {Never}, {"CompletionQuestVariablesFlags"}: {CompletionQuestVariablesFlags}, {"Flying"}: {Flying}, {"Chocobo"}: {Chocobo}, {"Diving"}: {Diving}, {"NotTargetable"}: {NotTargetable}, {"InTerritory"}: {string.Join(" ", InTerritory)}, {"NotInTerritory"}: {string.Join(" ", NotInTerritory)}, {"Item"}: {Item}, {"QuestsAccepted"}: {string.Join(" ", QuestsAccepted)}, {"QuestsCompleted"}: {string.Join(" ", QuestsCompleted)}, {"NotNamePlateIconId"}: {string.Join(" ", NotNamePlateIconId)}, {"NearPosition"}: {NearPosition}, {"ExtraCondition"}: {ExtraCondition}";
} }
} }

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>Questionable.Model</AssemblyName> <AssemblyName>Questionable.Model</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<LangVersion>12.0</LangVersion> <LangVersion>12.0</LangVersion>
@ -26,12 +26,5 @@
<EmbeddedResource Include="Questionable.Model.CommonRequiredVariables" LogicalName="Questionable.Model.CommonRequiredVariables" /> <EmbeddedResource Include="Questionable.Model.CommonRequiredVariables" LogicalName="Questionable.Model.CommonRequiredVariables" />
<EmbeddedResource Include="Questionable.Model.CommonVector3" LogicalName="Questionable.Model.CommonVector3" /> <EmbeddedResource Include="Questionable.Model.CommonVector3" LogicalName="Questionable.Model.CommonVector3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<Reference Include="System.Numerics.Vectors">
<HintPath>C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.32\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json">
<HintPath>C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.32\System.Text.Json.dll</HintPath>
</Reference>
</ItemGroup>
</Project> </Project>

View file

@ -0,0 +1,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Auto)]
[InlineArray(7)]
internal struct _003C_003Ey__InlineArray7<T>
{
}

View file

@ -138,7 +138,7 @@ internal sealed class CraftworksSupplyController : IDisposable
address->Close(fireCallback: true); address->Close(fireCallback: true);
if (addonById->NameString == "BankaCraftworksSupply") if (addonById->NameString == "BankaCraftworksSupply")
{ {
_framework.RunOnTick((Action)InteractWithBankaCraftworksSupply, TimeSpan.FromMilliseconds(50L, 0L), 0, default(CancellationToken)); _framework.RunOnTick((Action)InteractWithBankaCraftworksSupply, TimeSpan.FromMilliseconds(50L), 0, default(CancellationToken));
} }
} }
else else

View file

@ -44,7 +44,7 @@ internal sealed class CreditsController : IDisposable
private static DateTime _lastHandledAt = DateTime.MinValue; private static DateTime _lastHandledAt = DateTime.MinValue;
private static readonly TimeSpan _reentrancySuppress = TimeSpan.FromMilliseconds(500L, 0L); private static readonly TimeSpan _reentrancySuppress = TimeSpan.FromMilliseconds(500L);
private static long _lastHandledAddr; private static long _lastHandledAddr;

View file

@ -686,7 +686,6 @@ internal sealed class InteractionUiController : IDisposable
if (aetheryte.HasValue) if (aetheryte.HasValue)
{ {
EAetheryteLocation valueOrDefault = aetheryte.GetValueOrDefault(); EAetheryteLocation valueOrDefault = aetheryte.GetValueOrDefault();
Span<DialogueChoice> span2;
Span<DialogueChoice> span; Span<DialogueChoice> span;
switch (_aetheryteFunctions.CanRegisterFreeOrFavoriteAetheryte(valueOrDefault)) switch (_aetheryteFunctions.CanRegisterFreeOrFavoriteAetheryte(valueOrDefault))
{ {
@ -696,12 +695,12 @@ internal sealed class InteractionUiController : IDisposable
int num2 = 1 + list.Count; int num2 = 1 + list.Count;
List<DialogueChoice> list3 = new List<DialogueChoice>(num2); List<DialogueChoice> list3 = new List<DialogueChoice>(num2);
CollectionsMarshal.SetCount(list3, num2); CollectionsMarshal.SetCount(list3, num2);
span2 = CollectionsMarshal.AsSpan(list3); Span<DialogueChoice> span3 = CollectionsMarshal.AsSpan(list3);
int num = 0; int num = 0;
span = CollectionsMarshal.AsSpan(list); span = CollectionsMarshal.AsSpan(list);
span.CopyTo(span2.Slice(num, span.Length)); span.CopyTo(span3.Slice(num, span.Length));
num += span.Length; num += span.Length;
span2[num] = new DialogueChoice span3[num] = new DialogueChoice
{ {
Type = EDialogChoiceType.YesNo, Type = EDialogChoiceType.YesNo,
ExcelSheet = "Addon", ExcelSheet = "Addon",
@ -719,7 +718,7 @@ internal sealed class InteractionUiController : IDisposable
CollectionsMarshal.SetCount(list2, num); CollectionsMarshal.SetCount(list2, num);
span = CollectionsMarshal.AsSpan(list2); span = CollectionsMarshal.AsSpan(list2);
int num2 = 0; int num2 = 0;
span2 = CollectionsMarshal.AsSpan(list); Span<DialogueChoice> span2 = CollectionsMarshal.AsSpan(list);
span2.CopyTo(span.Slice(num2, span2.Length)); span2.CopyTo(span.Slice(num2, span2.Length));
num2 += span2.Length; num2 += span2.Length;
span[num2] = new DialogueChoice span[num2] = new DialogueChoice

View file

@ -59,7 +59,7 @@ internal static class SendNotification
} }
} }
internal sealed class Executor(NotificationMasterIpc notificationMasterIpc, IChatGui chatGui, Configuration configuration) : TaskExecutor<Task>() internal sealed class Executor(IChatGui chatGui, Configuration configuration) : TaskExecutor<Task>()
{ {
protected override bool Start() protected override bool Start()
{ {
@ -142,7 +142,6 @@ internal static class SendNotification
XivChatEntry chat = xivChatEntry; XivChatEntry chat = xivChatEntry;
chatGui.Print(chat); chatGui.Print(chat);
} }
notificationMasterIpc.Notify(text2);
return true; return true;
} }

View file

@ -161,7 +161,6 @@ internal static class EquipItem
{ {
return new List<ushort>(); return new List<ushort>();
} }
Span<ushort> span;
switch (item.Value.EquipSlotCategory.RowId) switch (item.Value.EquipSlotCategory.RowId)
{ {
case 1u: case 1u:
@ -179,9 +178,9 @@ internal static class EquipItem
int index = 1; int index = 1;
List<ushort> list4 = new List<ushort>(index); List<ushort> list4 = new List<ushort>(index);
CollectionsMarshal.SetCount(list4, index); CollectionsMarshal.SetCount(list4, index);
span = CollectionsMarshal.AsSpan(list4); Span<ushort> span4 = CollectionsMarshal.AsSpan(list4);
int num = 0; int num = 0;
span[num] = (ushort)(item.Value.EquipSlotCategory.RowId - 1); span4[num] = (ushort)(item.Value.EquipSlotCategory.RowId - 1);
return list4; return list4;
} }
case 12u: case 12u:
@ -189,11 +188,11 @@ internal static class EquipItem
int num = 2; int num = 2;
List<ushort> list3 = new List<ushort>(num); List<ushort> list3 = new List<ushort>(num);
CollectionsMarshal.SetCount(list3, num); CollectionsMarshal.SetCount(list3, num);
span = CollectionsMarshal.AsSpan(list3); Span<ushort> span3 = CollectionsMarshal.AsSpan(list3);
int index = 0; int index = 0;
span[index] = 11; span3[index] = 11;
index++; index++;
span[index] = 12; span3[index] = 12;
return list3; return list3;
} }
case 13u: case 13u:
@ -201,9 +200,9 @@ internal static class EquipItem
int index = 1; int index = 1;
List<ushort> list2 = new List<ushort>(index); List<ushort> list2 = new List<ushort>(index);
CollectionsMarshal.SetCount(list2, index); CollectionsMarshal.SetCount(list2, index);
span = CollectionsMarshal.AsSpan(list2); Span<ushort> span2 = CollectionsMarshal.AsSpan(list2);
int num = 0; int num = 0;
span[num] = 0; span2[num] = 0;
return list2; return list2;
} }
case 17u: case 17u:
@ -211,7 +210,7 @@ internal static class EquipItem
int num = 1; int num = 1;
List<ushort> list = new List<ushort>(num); List<ushort> list = new List<ushort>(num);
CollectionsMarshal.SetCount(list, num); CollectionsMarshal.SetCount(list, num);
span = CollectionsMarshal.AsSpan(list); Span<ushort> span = CollectionsMarshal.AsSpan(list);
int index = 0; int index = 0;
span[index] = 13; span[index] = 13;
return list; return list;

View file

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
@ -52,7 +53,11 @@ internal static class SkipCondition
SkipStepConditions skipConditions = base.Task.SkipConditions; SkipStepConditions skipConditions = base.Task.SkipConditions;
QuestStep step = base.Task.Step; QuestStep step = base.Task.Step;
ElementId elementId = base.Task.ElementId; ElementId elementId = base.Task.ElementId;
logger.LogInformation("Checking skip conditions; {ConfiguredConditions}", string.Join(",", skipConditions)); ILogger<CheckSkip> logger = logger;
object[] array = new object[1];
object reference = skipConditions;
array[0] = string.Join(",", new ReadOnlySpan<object>(in reference));
logger.LogInformation("Checking skip conditions; {ConfiguredConditions}", array);
if (CheckFlyingCondition(step, skipConditions)) if (CheckFlyingCondition(step, skipConditions))
{ {
return true; return true;

View file

@ -53,9 +53,9 @@ internal sealed class TaskCreator
int index = 1; int index = 1;
List<ITask> list3 = new List<ITask>(index); List<ITask> list3 = new List<ITask>(index);
CollectionsMarshal.SetCount(list3, index); CollectionsMarshal.SetCount(list3, index);
Span<ITask> span = CollectionsMarshal.AsSpan(list3); Span<ITask> span2 = CollectionsMarshal.AsSpan(list3);
int num = 0; int num = 0;
span[num] = new WaitAtEnd.WaitNextStepOrSequence(); span2[num] = new WaitAtEnd.WaitNextStepOrSequence();
list2 = list3; list2 = list3;
} }
else else

View file

@ -61,10 +61,19 @@ internal sealed class CommandHandler : IDisposable
_configuration = configuration; _configuration = configuration;
_changelogWindow = changelogWindow; _changelogWindow = changelogWindow;
_clientState.Logout += OnLogout; _clientState.Logout += OnLogout;
_commandManager.AddHandler("/qst", new CommandInfo(ProcessCommand) ICommandManager commandManager2 = _commandManager;
{ CommandInfo commandInfo = new CommandInfo(ProcessCommand);
HelpMessage = string.Join(Environment.NewLine + "\t", "Opens the Questing window", "/qst help - displays simplified commands", "/qst help-all - displays all available commands", "/qst config - opens the configuration window", "/qst changelog - opens the changelog window", "/qst start - starts doing quests", "/qst stop - stops doing quests") string separator = Environment.NewLine + "\t";
}); _003C_003Ey__InlineArray7<string> buffer = default(_003C_003Ey__InlineArray7<string>);
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 0) = "Opens the Questing window";
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 1) = "/qst help - displays simplified commands";
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 2) = "/qst help-all - displays all available commands";
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 3) = "/qst config - opens the configuration window";
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 4) = "/qst changelog - opens the changelog window";
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 5) = "/qst start - starts doing quests";
global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<_003C_003Ey__InlineArray7<string>, string>(ref buffer, 6) = "/qst stop - stops doing quests";
commandInfo.HelpMessage = string.Join(separator, global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<_003C_003Ey__InlineArray7<string>, string>(in buffer, 7));
commandManager2.AddHandler("/qst", commandInfo);
} }
private void ProcessCommand(string command, string arguments) private void ProcessCommand(string command, string arguments)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -149,7 +149,7 @@ internal sealed class TerritoryData
{ {
return name; return name;
} }
return string.Concat(name[0].ToString().ToUpper(CultureInfo.InvariantCulture), name.AsSpan(1)); return string.Concat(name[0].ToString().ToUpper(CultureInfo.InvariantCulture).AsSpan(), name.AsSpan(1));
} }
private static IEnumerable<(ElementId QuestId, byte Index, uint QuestBattleId)> GetQuestBattles(Quest quest) private static IEnumerable<(ElementId QuestId, byte Index, uint QuestBattleId)> GetQuestBattles(Quest quest)

View file

@ -43,6 +43,26 @@ internal sealed class NavmeshIpc
private readonly ICallGateSubscriber<bool> _navRebuild; private readonly ICallGateSubscriber<bool> _navRebuild;
public bool IsNavmeshAvailable
{
get
{
try
{
_isNavReady.InvokeFunc();
return true;
}
catch (IpcNotReadyError)
{
return false;
}
catch (IpcError)
{
return true;
}
}
}
public bool IsReady public bool IsReady
{ {
get get
@ -125,6 +145,10 @@ internal sealed class NavmeshIpc
public void Stop() public void Stop()
{ {
if (!IsNavmeshAvailable)
{
return;
}
try try
{ {
_pathStop.InvokeAction(); _pathStop.InvokeAction();
@ -137,6 +161,10 @@ internal sealed class NavmeshIpc
public void Reload() public void Reload()
{ {
if (!IsNavmeshAvailable)
{
return;
}
try try
{ {
_navReload.InvokeFunc(); _navReload.InvokeFunc();
@ -149,6 +177,10 @@ internal sealed class NavmeshIpc
public void Rebuild() public void Rebuild()
{ {
if (!IsNavmeshAvailable)
{
return;
}
try try
{ {
_navRebuild.InvokeFunc(); _navRebuild.InvokeFunc();
@ -161,6 +193,10 @@ internal sealed class NavmeshIpc
public Task<List<Vector3>> Pathfind(Vector3 localPlayerPosition, Vector3 targetPosition, bool fly, CancellationToken cancellationToken) public Task<List<Vector3>> Pathfind(Vector3 localPlayerPosition, Vector3 targetPosition, bool fly, CancellationToken cancellationToken)
{ {
if (!IsNavmeshAvailable)
{
return Task.FromResult(new List<Vector3>());
}
try try
{ {
_pathSetTolerance.InvokeAction(0.25f); _pathSetTolerance.InvokeAction(0.25f);
@ -175,10 +211,14 @@ internal sealed class NavmeshIpc
public Task<List<Vector3>> PathfindWithTolerance(Vector3 localPlayerPosition, Vector3 targetPosition, bool fly, float tolerance, CancellationToken cancellationToken) public Task<List<Vector3>> PathfindWithTolerance(Vector3 localPlayerPosition, Vector3 targetPosition, bool fly, float tolerance, CancellationToken cancellationToken)
{ {
if (!IsNavmeshAvailable)
{
return Task.FromResult(new List<Vector3>());
}
try try
{ {
_pathSetTolerance.InvokeAction(tolerance); _pathSetTolerance.InvokeAction(tolerance);
return _pluginInterface.GetIpcSubscriber<Vector3, Vector3, bool, float, Task<List<Vector3>>>("vnavmesh.Nav.PathfindWithTolerance").InvokeFunc(localPlayerPosition, targetPosition, fly, tolerance); return _pluginInterface.GetIpcSubscriber<Vector3, Vector3, bool, float, CancellationToken, Task<List<Vector3>>>("vnavmesh.Nav.PathfindWithToleranceCancelable").InvokeFunc(localPlayerPosition, targetPosition, fly, tolerance, cancellationToken);
} }
catch (IpcError exception) catch (IpcError exception)
{ {
@ -189,6 +229,10 @@ internal sealed class NavmeshIpc
public void MoveTo(List<Vector3> position, bool fly) public void MoveTo(List<Vector3> position, bool fly)
{ {
if (!IsNavmeshAvailable)
{
return;
}
Stop(); Stop();
try try
{ {

View file

@ -680,9 +680,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list15 = new List<ElementId>(num); List<ElementId> list15 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list15, num); CollectionsMarshal.SetCount(list15, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list15); Span<ElementId> span15 = CollectionsMarshal.AsSpan(list15);
int index = 0; int index = 0;
span[index] = new AethernetId(1); span15[index] = new AethernetId(1);
source = list15; source = list15;
break; break;
} }
@ -691,9 +691,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list14 = new List<ElementId>(index); List<ElementId> list14 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list14, index); CollectionsMarshal.SetCount(list14, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list14); Span<ElementId> span14 = CollectionsMarshal.AsSpan(list14);
int num = 0; int num = 0;
span[num] = new AethernetId(2); span14[num] = new AethernetId(2);
source = list14; source = list14;
break; break;
} }
@ -702,9 +702,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list13 = new List<ElementId>(num); List<ElementId> list13 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list13, num); CollectionsMarshal.SetCount(list13, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list13); Span<ElementId> span13 = CollectionsMarshal.AsSpan(list13);
int index = 0; int index = 0;
span[index] = new AethernetId(3); span13[index] = new AethernetId(3);
source = list13; source = list13;
break; break;
} }
@ -713,9 +713,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list12 = new List<ElementId>(index); List<ElementId> list12 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list12, index); CollectionsMarshal.SetCount(list12, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list12); Span<ElementId> span12 = CollectionsMarshal.AsSpan(list12);
int num = 0; int num = 0;
span[num] = new AethernetId(4); span12[num] = new AethernetId(4);
source = list12; source = list12;
break; break;
} }
@ -724,9 +724,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list11 = new List<ElementId>(num); List<ElementId> list11 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list11, num); CollectionsMarshal.SetCount(list11, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list11); Span<ElementId> span11 = CollectionsMarshal.AsSpan(list11);
int index = 0; int index = 0;
span[index] = new AethernetId(5); span11[index] = new AethernetId(5);
source = list11; source = list11;
break; break;
} }
@ -735,9 +735,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list10 = new List<ElementId>(index); List<ElementId> list10 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list10, index); CollectionsMarshal.SetCount(list10, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list10); Span<ElementId> span10 = CollectionsMarshal.AsSpan(list10);
int num = 0; int num = 0;
span[num] = new AethernetId(6); span10[num] = new AethernetId(6);
source = list10; source = list10;
break; break;
} }
@ -746,9 +746,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list9 = new List<ElementId>(num); List<ElementId> list9 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list9, num); CollectionsMarshal.SetCount(list9, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list9); Span<ElementId> span9 = CollectionsMarshal.AsSpan(list9);
int index = 0; int index = 0;
span[index] = new AethernetId(7); span9[index] = new AethernetId(7);
source = list9; source = list9;
break; break;
} }
@ -757,9 +757,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list8 = new List<ElementId>(index); List<ElementId> list8 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list8, index); CollectionsMarshal.SetCount(list8, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list8); Span<ElementId> span8 = CollectionsMarshal.AsSpan(list8);
int num = 0; int num = 0;
span[num] = new AethernetId(8); span8[num] = new AethernetId(8);
source = list8; source = list8;
break; break;
} }
@ -768,9 +768,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list7 = new List<ElementId>(num); List<ElementId> list7 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list7, num); CollectionsMarshal.SetCount(list7, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list7); Span<ElementId> span7 = CollectionsMarshal.AsSpan(list7);
int index = 0; int index = 0;
span[index] = new AethernetId(9); span7[index] = new AethernetId(9);
source = list7; source = list7;
break; break;
} }
@ -779,9 +779,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list6 = new List<ElementId>(index); List<ElementId> list6 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list6, index); CollectionsMarshal.SetCount(list6, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list6); Span<ElementId> span6 = CollectionsMarshal.AsSpan(list6);
int num = 0; int num = 0;
span[num] = new AethernetId(10); span6[num] = new AethernetId(10);
source = list6; source = list6;
break; break;
} }
@ -790,9 +790,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list5 = new List<ElementId>(num); List<ElementId> list5 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list5, num); CollectionsMarshal.SetCount(list5, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list5); Span<ElementId> span5 = CollectionsMarshal.AsSpan(list5);
int index = 0; int index = 0;
span[index] = new AethernetId(11); span5[index] = new AethernetId(11);
source = list5; source = list5;
break; break;
} }
@ -801,9 +801,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list4 = new List<ElementId>(index); List<ElementId> list4 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list4, index); CollectionsMarshal.SetCount(list4, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list4); Span<ElementId> span4 = CollectionsMarshal.AsSpan(list4);
int num = 0; int num = 0;
span[num] = new AethernetId(12); span4[num] = new AethernetId(12);
source = list4; source = list4;
break; break;
} }
@ -812,9 +812,9 @@ internal sealed class QuestionableIpc : IDisposable
int num = 1; int num = 1;
List<ElementId> list3 = new List<ElementId>(num); List<ElementId> list3 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list3, num); CollectionsMarshal.SetCount(list3, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list3); Span<ElementId> span3 = CollectionsMarshal.AsSpan(list3);
int index = 0; int index = 0;
span[index] = new AethernetId(13); span3[index] = new AethernetId(13);
source = list3; source = list3;
break; break;
} }
@ -823,9 +823,9 @@ internal sealed class QuestionableIpc : IDisposable
int index = 1; int index = 1;
List<ElementId> list2 = new List<ElementId>(index); List<ElementId> list2 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list2, index); CollectionsMarshal.SetCount(list2, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list2); Span<ElementId> span2 = CollectionsMarshal.AsSpan(list2);
int num = 0; int num = 0;
span[num] = new AethernetId(14); span2[num] = new AethernetId(14);
source = list2; source = list2;
break; break;
} }
@ -878,7 +878,7 @@ internal sealed class QuestionableIpc : IDisposable
EExpansionVersion.Dawntrail => new uint[6] { 1187u, 1188u, 1189u, 1190u, 1191u, 1192u }, EExpansionVersion.Dawntrail => new uint[6] { 1187u, 1188u, 1189u, 1190u, 1191u, 1192u },
_ => Array.Empty<uint>(), _ => Array.Empty<uint>(),
}; };
return QuestData.AetherCurrentQuestsByTerritory.Where<KeyValuePair<uint, ImmutableList<QuestId>>>((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => territoryRanges.Contains(kvp.Key)).SelectMany((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => kvp.Value).Cast<ElementId>() return QuestData.AetherCurrentQuestsByTerritory.Where<KeyValuePair<uint, ImmutableList<QuestId>>>((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => ((ReadOnlySpan<uint>)territoryRanges).Contains(kvp.Key)).SelectMany((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => kvp.Value).Cast<ElementId>()
.ToList(); .ToList();
} }

View file

@ -517,7 +517,7 @@ internal sealed class QuestFunctions
if (dataId.HasValue) if (dataId.HasValue)
{ {
uint valueOrDefault = dataId.GetValueOrDefault(); uint valueOrDefault = dataId.GetValueOrDefault();
return dataIds.Contains(valueOrDefault); return ((ReadOnlySpan<uint>)dataIds).Contains(valueOrDefault);
} }
} }
return false; return false;
@ -567,11 +567,10 @@ internal sealed class QuestFunctions
{ {
return new PriorityQuestInfo(x, "Can't teleport to start"); return new PriorityQuestInfo(x, "Can't teleport to start");
} }
DefaultInterpolatedStringHandler handler;
if (gil < EstimateTeleportCosts(quest)) if (gil < EstimateTeleportCosts(quest))
{ {
IFormatProvider invariantCulture = CultureInfo.InvariantCulture; IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
handler = new DefaultInterpolatedStringHandler(32, 2, invariantCulture); DefaultInterpolatedStringHandler handler = new DefaultInterpolatedStringHandler(32, 2, invariantCulture);
handler.AppendLiteral("Not enough gil, estimated cost: "); handler.AppendLiteral("Not enough gil, estimated cost: ");
handler.AppendFormatted(EstimateTeleportCosts(quest), "N0"); handler.AppendFormatted(EstimateTeleportCosts(quest), "N0");
handler.AppendFormatted(SeIconChar.Gil.ToIconString()); handler.AppendFormatted(SeIconChar.Gil.ToIconString());
@ -606,14 +605,7 @@ internal sealed class QuestFunctions
} }
return (EAetheryteLocation?)null; return (EAetheryteLocation?)null;
}).FirstOrDefault((EAetheryteLocation? y) => y.HasValue); }).FirstOrDefault((EAetheryteLocation? y) => y.HasValue);
if (value.HasValue) return value.HasValue ? new PriorityQuestInfo(x, $"Aetheryte locked: {value}") : new PriorityQuestInfo(x);
{
handler = new DefaultInterpolatedStringHandler(18, 1);
handler.AppendLiteral("Aetheryte locked: ");
handler.AppendFormatted(value);
return new PriorityQuestInfo(x, handler.ToStringAndClear());
}
return new PriorityQuestInfo(x);
}).ToList(); }).ToList();
} }
@ -654,7 +646,7 @@ internal sealed class QuestFunctions
QuestInfo questInfo = info as QuestInfo; QuestInfo questInfo = info as QuestInfo;
if (questInfo != null) if (questInfo != null)
{ {
if (shadowbringersRoleQuestChapters.Contains(questInfo.NewGamePlusChapter)) if (((ReadOnlySpan<uint>)shadowbringersRoleQuestChapters).Contains(questInfo.NewGamePlusChapter))
{ {
return !QuestData.FinalShadowbringersRoleQuests.Any(IsQuestComplete); return !QuestData.FinalShadowbringersRoleQuests.Any(IsQuestComplete);
} }

View file

@ -110,7 +110,7 @@ internal sealed class DutyConfigComponent : ConfigComponent
ImGui.SameLine(); ImGui.SameLine();
int currentItem = (int)base.Configuration.Duties.DefaultDutyMode; int currentItem = (int)base.Configuration.Duties.DefaultDutyMode;
ImGui.SetNextItemWidth(200f); ImGui.SetNextItemWidth(200f);
if (ImGui.Combo("##DefaultDutyMode", ref currentItem, in DutyModeLabels, DutyModeLabels.Length)) if (ImGui.Combo((ImU8String)"##DefaultDutyMode", ref currentItem, (ReadOnlySpan<string>)DutyModeLabels, DutyModeLabels.Length))
{ {
base.Configuration.Duties.DefaultDutyMode = (EDutyMode)currentItem; base.Configuration.Duties.DefaultDutyMode = (EDutyMode)currentItem;
Save(); Save();
@ -201,11 +201,11 @@ internal sealed class DutyConfigComponent : ConfigComponent
DutyOptions dutyOptions; DutyOptions dutyOptions;
bool flag = _questRegistry.TryGetDutyByContentFinderConditionId(num, out dutyOptions); bool flag = _questRegistry.TryGetDutyByContentFinderConditionId(num, out dutyOptions);
ImGui.TableNextRow(); ImGui.TableNextRow();
string[] items; string[] array;
int currentItem; int currentItem;
if (flag) if (flag)
{ {
items = (dutyOptions.Enabled ? SupportedCfcOptions : UnsupportedCfcOptions); array = (dutyOptions.Enabled ? SupportedCfcOptions : UnsupportedCfcOptions);
currentItem = 0; currentItem = 0;
if (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num)) if (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num))
{ {
@ -218,7 +218,7 @@ internal sealed class DutyConfigComponent : ConfigComponent
} }
else else
{ {
items = new string[2] { "Disabled", "Enabled" }; array = new string[2] { "Disabled", "Enabled" };
currentItem = (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num) ? 1 : 0); currentItem = (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num) ? 1 : 0);
} }
if (ImGui.TableNextColumn()) if (ImGui.TableNextColumn())
@ -232,14 +232,14 @@ internal sealed class DutyConfigComponent : ConfigComponent
{ {
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text);
ImGui.Separator(); ImGui.Separator();
table = new ImU8String(13, 1); ImU8String text2 = new ImU8String(13, 1);
table.AppendLiteral("TerritoryId: "); text2.AppendLiteral("TerritoryId: ");
table.AppendFormatted(value2); text2.AppendFormatted(value2);
ImGui.BulletText(table); ImGui.BulletText(text2);
table = new ImU8String(26, 1); ImU8String text3 = new ImU8String(26, 1);
table.AppendLiteral("ContentFinderConditionId: "); text3.AppendLiteral("ContentFinderConditionId: ");
table.AppendFormatted(num); text3.AppendFormatted(num);
ImGui.BulletText(table); ImGui.BulletText(text3);
if (flag) if (flag)
{ {
ImGui.BulletText("Duty Support: Available"); ImGui.BulletText("Duty Support: Available");
@ -257,13 +257,13 @@ internal sealed class DutyConfigComponent : ConfigComponent
} }
if (ImGui.TableNextColumn()) if (ImGui.TableNextColumn())
{ {
table = new ImU8String(16, 1); ImU8String id = new ImU8String(16, 1);
table.AppendLiteral("##DungeonEnabled"); id.AppendLiteral("##DungeonEnabled");
table.AppendFormatted(num); id.AppendFormatted(num);
using (ImRaii.PushId(table)) using (ImRaii.PushId(id))
{ {
ImGui.SetNextItemWidth(200f); ImGui.SetNextItemWidth(200f);
if (ImGui.Combo(string.Empty, ref currentItem, in items, items.Length)) if (ImGui.Combo((ImU8String)string.Empty, ref currentItem, (ReadOnlySpan<string>)array, array.Length))
{ {
base.Configuration.Duties.WhitelistedDutyCfcIds.Remove(num); base.Configuration.Duties.WhitelistedDutyCfcIds.Remove(num);
base.Configuration.Duties.BlacklistedDutyCfcIds.Remove(num); base.Configuration.Duties.BlacklistedDutyCfcIds.Remove(num);
@ -291,10 +291,10 @@ internal sealed class DutyConfigComponent : ConfigComponent
{ {
continue; continue;
} }
table = new ImU8String(13, 1); ImU8String id2 = new ImU8String(13, 1);
table.AppendLiteral("##DungeonMode"); id2.AppendLiteral("##DungeonMode");
table.AppendFormatted(num); id2.AppendFormatted(num);
using (ImRaii.PushId(table)) using (ImRaii.PushId(id2))
{ {
EDutyMode value3; EDutyMode value3;
bool flag2 = base.Configuration.Duties.DutyModeOverrides.TryGetValue(num, out value3); bool flag2 = base.Configuration.Duties.DutyModeOverrides.TryGetValue(num, out value3);
@ -302,16 +302,16 @@ internal sealed class DutyConfigComponent : ConfigComponent
Name = "Use Default"; Name = "Use Default";
string[] dutyModeLabels = DutyModeLabels; string[] dutyModeLabels = DutyModeLabels;
int num3 = 0; int num3 = 0;
string[] array = new string[1 + dutyModeLabels.Length]; string[] array2 = new string[1 + dutyModeLabels.Length];
array[num3] = Name; array2[num3] = Name;
num3++; num3++;
ReadOnlySpan<string> readOnlySpan = new ReadOnlySpan<string>(dutyModeLabels); ReadOnlySpan<string> readOnlySpan = new ReadOnlySpan<string>(dutyModeLabels);
readOnlySpan.CopyTo(new Span<string>(array).Slice(num3, readOnlySpan.Length)); readOnlySpan.CopyTo(new Span<string>(array2).Slice(num3, readOnlySpan.Length));
num3 += readOnlySpan.Length; num3 += readOnlySpan.Length;
string[] items2 = array; string[] array3 = array2;
int currentItem2 = (int)(num2 + 1); int currentItem2 = (int)(num2 + 1);
ImGui.SetNextItemWidth(150f); ImGui.SetNextItemWidth(150f);
if (ImGui.Combo(string.Empty, ref currentItem2, in items2, items2.Length)) if (ImGui.Combo((ImU8String)string.Empty, ref currentItem2, (ReadOnlySpan<string>)array3, array3.Length))
{ {
if (currentItem2 == 0) if (currentItem2 == 0)
{ {

View file

@ -95,7 +95,7 @@ internal sealed class GeneralConfigComponent : ConfigComponent
return; return;
} }
int currentItem = (int)base.Configuration.General.CombatModule; int currentItem = (int)base.Configuration.General.CombatModule;
if (ImGui.Combo("Preferred Combat Module", ref currentItem, in _combatModuleNames, _combatModuleNames.Length)) if (ImGui.Combo((ImU8String)"Preferred Combat Module", ref currentItem, (ReadOnlySpan<string>)_combatModuleNames, _combatModuleNames.Length))
{ {
base.Configuration.General.CombatModule = (Configuration.ECombatModule)currentItem; base.Configuration.General.CombatModule = (Configuration.ECombatModule)currentItem;
Save(); Save();
@ -150,7 +150,7 @@ internal sealed class GeneralConfigComponent : ConfigComponent
_mountComboJustOpened = false; _mountComboJustOpened = false;
} }
int currentItem2 = (int)base.Configuration.General.GrandCompany; int currentItem2 = (int)base.Configuration.General.GrandCompany;
if (ImGui.Combo("Preferred Grand Company", ref currentItem2, in _grandCompanyNames, _grandCompanyNames.Length)) if (ImGui.Combo((ImU8String)"Preferred Grand Company", ref currentItem2, (ReadOnlySpan<string>)_grandCompanyNames, _grandCompanyNames.Length))
{ {
base.Configuration.General.GrandCompany = (FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany)currentItem2; base.Configuration.General.GrandCompany = (FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany)currentItem2;
Save(); Save();
@ -162,7 +162,7 @@ internal sealed class GeneralConfigComponent : ConfigComponent
Save(); Save();
currentItem3 = 0; currentItem3 = 0;
} }
if (ImGui.Combo("Preferred Combat Job", ref currentItem3, in _classJobNames, _classJobNames.Length)) if (ImGui.Combo((ImU8String)"Preferred Combat Job", ref currentItem3, (ReadOnlySpan<string>)_classJobNames, _classJobNames.Length))
{ {
base.Configuration.General.CombatJob = _classJobIds[currentItem3]; base.Configuration.General.CombatJob = _classJobIds[currentItem3];
Save(); Save();
@ -279,11 +279,11 @@ internal sealed class GeneralConfigComponent : ConfigComponent
Save(); Save();
} }
Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f); Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f);
ImU8String text2 = new ImU8String(77, 1); ImU8String text3 = new ImU8String(77, 1);
text2.AppendLiteral("Quest steps will refresh automatically after "); text3.AppendLiteral("Quest steps will refresh automatically after ");
text2.AppendFormatted(v10); text3.AppendFormatted(v10);
text2.AppendLiteral(" seconds if no progress is made."); text3.AppendLiteral(" seconds if no progress is made.");
ImGui.TextColored(in col, text2); ImGui.TextColored(in col, text3);
ImGui.Unindent(); ImGui.Unindent();
} }
ImGui.Spacing(); ImGui.Spacing();

View file

@ -2,22 +2,17 @@ using System;
using System.Linq; using System.Linq;
using Dalamud.Bindings.ImGui; using Dalamud.Bindings.ImGui;
using Dalamud.Game.Text; using Dalamud.Game.Text;
using Dalamud.Interface.Components;
using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Utility.Raii;
using Dalamud.Plugin; using Dalamud.Plugin;
using Dalamud.Utility; using Dalamud.Utility;
using Questionable.External;
namespace Questionable.Windows.ConfigComponents; namespace Questionable.Windows.ConfigComponents;
internal sealed class NotificationConfigComponent : ConfigComponent internal sealed class NotificationConfigComponent : ConfigComponent
{ {
private readonly NotificationMasterIpc _notificationMasterIpc; public NotificationConfigComponent(IDalamudPluginInterface pluginInterface, Configuration configuration)
public NotificationConfigComponent(IDalamudPluginInterface pluginInterface, Configuration configuration, NotificationMasterIpc notificationMasterIpc)
: base(pluginInterface, configuration) : base(pluginInterface, configuration)
{ {
_notificationMasterIpc = notificationMasterIpc;
} }
public override void DrawTab() public override void DrawTab()
@ -41,31 +36,12 @@ internal sealed class NotificationConfigComponent : ConfigComponent
where x != XivChatType.StandardEmote where x != XivChatType.StandardEmote
select x).ToArray(); select x).ToArray();
int currentItem = Array.IndexOf(array, base.Configuration.Notifications.ChatType); int currentItem = Array.IndexOf(array, base.Configuration.Notifications.ChatType);
string[] items = array.Select((XivChatType t) => t.GetAttribute<XivChatTypeInfoAttribute>()?.FancyName ?? t.ToString()).ToArray(); string[] array2 = array.Select((XivChatType t) => t.GetAttribute<XivChatTypeInfoAttribute>()?.FancyName ?? t.ToString()).ToArray();
if (ImGui.Combo("Chat channel", ref currentItem, in items, items.Length)) if (ImGui.Combo((ImU8String)"Chat channel", ref currentItem, (ReadOnlySpan<string>)array2, array2.Length))
{ {
base.Configuration.Notifications.ChatType = array[currentItem]; base.Configuration.Notifications.ChatType = array[currentItem];
Save(); Save();
} }
ImGui.Separator();
ImGui.Text("NotificationMaster settings");
ImGui.SameLine();
ImGuiComponents.HelpMarker("Requires the plugin 'NotificationMaster' to be installed.");
using (ImRaii.Disabled(!_notificationMasterIpc.Enabled))
{
bool v2 = base.Configuration.Notifications.ShowTrayMessage;
if (ImGui.Checkbox("Show tray notification", ref v2))
{
base.Configuration.Notifications.ShowTrayMessage = v2;
Save();
}
bool v3 = base.Configuration.Notifications.FlashTaskbar;
if (ImGui.Checkbox("Flash taskbar icon", ref v3))
{
base.Configuration.Notifications.FlashTaskbar = v3;
Save();
}
}
} }
} }
} }

View file

@ -66,13 +66,12 @@ internal sealed class PluginConfigComponent : ConfigComponent
_pluginInterface = pluginInterface; _pluginInterface = pluginInterface;
_uiUtils = uiUtils; _uiUtils = uiUtils;
_commandManager = commandManager; _commandManager = commandManager;
PluginInfo[] obj = new PluginInfo[6] PluginInfo[] obj = new PluginInfo[5]
{ {
new PluginInfo("Artisan", "Artisan", "Handles automatic crafting for quests that require\ncrafted items.", new Uri("https://github.com/PunishXIV/Artisan"), new Uri("https://puni.sh/api/plugins")), new PluginInfo("Artisan", "Artisan", "Handles automatic crafting for quests that require\ncrafted items.", new Uri("https://github.com/PunishXIV/Artisan"), new Uri("https://puni.sh/api/plugins")),
new PluginInfo("AutoDuty", "AutoDuty", "Automatically handles dungeon and trial completion during\nMain Scenario Quest progression.", new Uri("https://github.com/erdelf/AutoDuty"), new Uri("https://puni.sh/api/repository/erdelf")), new PluginInfo("AutoDuty", "AutoDuty", "Automatically handles dungeon and trial completion during\nMain Scenario Quest progression.", new Uri("https://github.com/erdelf/AutoDuty"), new Uri("https://puni.sh/api/repository/erdelf")),
null, null,
null, null,
null,
null null
}; };
Uri websiteUri = new Uri("https://github.com/Jaksuhn/Automaton"); Uri websiteUri = new Uri("https://github.com/Jaksuhn/Automaton");
@ -84,17 +83,16 @@ internal sealed class PluginConfigComponent : ConfigComponent
int index = 0; int index = 0;
span[index] = new PluginDetailInfo("'Sniper no sniping' enabled", "Automatically completes sniping tasks introduced in Stormblood", () => automatonIpc.IsAutoSnipeEnabled); span[index] = new PluginDetailInfo("'Sniper no sniping' enabled", "Automatically completes sniping tasks introduced in Stormblood", () => automatonIpc.IsAutoSnipeEnabled);
obj[2] = new PluginInfo("CBT (formerly known as Automaton)", "Automaton", "Automaton is a collection of automation-related tweaks.", websiteUri, dalamudRepositoryUri, "/cbt", list); obj[2] = new PluginInfo("CBT (formerly known as Automaton)", "Automaton", "Automaton is a collection of automation-related tweaks.", websiteUri, dalamudRepositoryUri, "/cbt", list);
obj[3] = new PluginInfo("NotificationMaster", "NotificationMaster", "Sends a configurable out-of-game notification if a quest\nrequires manual actions.", new Uri("https://github.com/NightmareXIV/NotificationMaster"), null);
Uri websiteUri2 = new Uri("https://github.com/PunishXIV/PandorasBox"); Uri websiteUri2 = new Uri("https://github.com/PunishXIV/PandorasBox");
Uri dalamudRepositoryUri2 = new Uri("https://puni.sh/api/plugins"); Uri dalamudRepositoryUri2 = new Uri("https://puni.sh/api/plugins");
index = 1; index = 1;
List<PluginDetailInfo> list2 = new List<PluginDetailInfo>(index); List<PluginDetailInfo> list2 = new List<PluginDetailInfo>(index);
CollectionsMarshal.SetCount(list2, index); CollectionsMarshal.SetCount(list2, index);
span = CollectionsMarshal.AsSpan(list2); Span<PluginDetailInfo> span2 = CollectionsMarshal.AsSpan(list2);
num = 0; num = 0;
span[num] = new PluginDetailInfo("'Auto Active Time Maneuver' enabled", "Automatically completes active time maneuvers in\nsingle player instances, trials and raids\"", () => pandorasBoxIpc.IsAutoActiveTimeManeuverEnabled); span2[num] = new PluginDetailInfo("'Auto Active Time Maneuver' enabled", "Automatically completes active time maneuvers in\nsingle player instances, trials and raids\"", () => pandorasBoxIpc.IsAutoActiveTimeManeuverEnabled);
obj[4] = new PluginInfo("Pandora's Box", "PandorasBox", "Pandora's Box is a collection of tweaks.", websiteUri2, dalamudRepositoryUri2, "/pandora", list2); obj[3] = new PluginInfo("Pandora's Box", "PandorasBox", "Pandora's Box is a collection of tweaks.", websiteUri2, dalamudRepositoryUri2, "/pandora", list2);
obj[5] = new PluginInfo("QuestMap", "QuestMap", "Displays quest objectives and markers on the map for\nbetter navigation and tracking.", new Uri("https://github.com/rreminy/QuestMap"), null); obj[4] = new PluginInfo("QuestMap", "QuestMap", "Displays quest objectives and markers on the map for\nbetter navigation and tracking.", new Uri("https://github.com/rreminy/QuestMap"), null);
_recommendedPlugins = new global::_003C_003Ez__ReadOnlyArray<PluginInfo>(obj); _recommendedPlugins = new global::_003C_003Ez__ReadOnlyArray<PluginInfo>(obj);
} }

View file

@ -641,7 +641,7 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent
foreach (SinglePlayerDutyInfo dutyInfo in dutyInfos) foreach (SinglePlayerDutyInfo dutyInfo in dutyInfos)
{ {
ImGui.TableNextRow(); ImGui.TableNextRow();
string[] items = (dutyInfo.EnabledByDefault ? SupportedCfcOptions : UnsupportedCfcOptions); string[] array = (dutyInfo.EnabledByDefault ? SupportedCfcOptions : UnsupportedCfcOptions);
int currentItem = 0; int currentItem = 0;
if (base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Contains(dutyInfo.ContentFinderConditionId)) if (base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Contains(dutyInfo.ContentFinderConditionId))
{ {
@ -651,7 +651,6 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent
{ {
currentItem = 2; currentItem = 2;
} }
ImU8String text;
if (ImGui.TableNextColumn()) if (ImGui.TableNextColumn())
{ {
ImGui.AlignTextToFramePadding(); ImGui.AlignTextToFramePadding();
@ -663,14 +662,14 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent
{ {
ImGui.TextUnformatted(dutyInfo.Name); ImGui.TextUnformatted(dutyInfo.Name);
ImGui.Separator(); ImGui.Separator();
text = new ImU8String(13, 1); ImU8String text = new ImU8String(13, 1);
text.AppendLiteral("TerritoryId: "); text.AppendLiteral("TerritoryId: ");
text.AppendFormatted(dutyInfo.TerritoryId); text.AppendFormatted(dutyInfo.TerritoryId);
ImGui.BulletText(text); ImGui.BulletText(text);
text = new ImU8String(26, 1); ImU8String text2 = new ImU8String(26, 1);
text.AppendLiteral("ContentFinderConditionId: "); text2.AppendLiteral("ContentFinderConditionId: ");
text.AppendFormatted(dutyInfo.ContentFinderConditionId); text2.AppendFormatted(dutyInfo.ContentFinderConditionId);
ImGui.BulletText(text); ImGui.BulletText(text2);
} }
} }
if (!dutyInfo.Enabled) if (!dutyInfo.Enabled)
@ -686,15 +685,15 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent
{ {
continue; continue;
} }
text = new ImU8String(6, 1); ImU8String id = new ImU8String(6, 1);
text.AppendLiteral("##Duty"); id.AppendLiteral("##Duty");
text.AppendFormatted(dutyInfo.ContentFinderConditionId); id.AppendFormatted(dutyInfo.ContentFinderConditionId);
using (ImRaii.PushId(text)) using (ImRaii.PushId(id))
{ {
using (ImRaii.Disabled(!dutyInfo.Enabled)) using (ImRaii.Disabled(!dutyInfo.Enabled))
{ {
ImGui.SetNextItemWidth(200f); ImGui.SetNextItemWidth(200f);
if (ImGui.Combo(string.Empty, ref currentItem, in items, items.Length)) if (ImGui.Combo((ImU8String)string.Empty, ref currentItem, (ReadOnlySpan<string>)array, array.Length))
{ {
base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId); base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId);
base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId); base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId);

View file

@ -124,11 +124,11 @@ internal sealed class StopConditionComponent : ConfigComponent
{ {
int sequence = currentQuest.Sequence; int sequence = currentQuest.Sequence;
ImGui.SameLine(); ImGui.SameLine();
ImU8String text = new ImU8String(11, 1); ImU8String text2 = new ImU8String(11, 1);
text.AppendLiteral("(Current: "); text2.AppendLiteral("(Current: ");
text.AppendFormatted(sequence); text2.AppendFormatted(sequence);
text.AppendLiteral(")"); text2.AppendLiteral(")");
ImGui.TextDisabled(text); ImGui.TextDisabled(text2);
} }
ImGui.TextWrapped("Note: Individual quest sequences below override this global setting."); ImGui.TextWrapped("Note: Individual quest sequences below override this global setting.");
} }
@ -165,10 +165,10 @@ internal sealed class StopConditionComponent : ConfigComponent
{ {
continue; continue;
} }
ImU8String text = new ImU8String(5, 1); ImU8String id = new ImU8String(5, 1);
text.AppendLiteral("Quest"); id.AppendLiteral("Quest");
text.AppendFormatted(elementId); id.AppendFormatted(elementId);
using (ImRaii.PushId(text)) using (ImRaii.PushId(id))
{ {
(Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(elementId); (Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(elementId);
bool flag; bool flag;
@ -187,21 +187,21 @@ internal sealed class StopConditionComponent : ConfigComponent
_questTooltipComponent.Draw(quest2.Info); _questTooltipComponent.Draw(quest2.Info);
} }
ImGui.SameLine(); ImGui.SameLine();
string text2 = elementId.ToString(); string text3 = elementId.ToString();
base.Configuration.Stop.QuestSequences.TryGetValue(text2, out var value); base.Configuration.Stop.QuestSequences.TryGetValue(text3, out var value);
bool v4 = value.HasValue; bool v4 = value.HasValue;
text = new ImU8String(8, 1); ImU8String label = new ImU8String(8, 1);
text.AppendLiteral("##UseSeq"); label.AppendLiteral("##UseSeq");
text.AppendFormatted(text2); label.AppendFormatted(text3);
if (ImGui.Checkbox(text, ref v4)) if (ImGui.Checkbox(label, ref v4))
{ {
if (v4) if (v4)
{ {
base.Configuration.Stop.QuestSequences[text2] = 1; base.Configuration.Stop.QuestSequences[text3] = 1;
} }
else else
{ {
base.Configuration.Stop.QuestSequences.Remove(text2); base.Configuration.Stop.QuestSequences.Remove(text3);
} }
Save(); Save();
} }
@ -216,12 +216,12 @@ internal sealed class StopConditionComponent : ConfigComponent
ImGui.SameLine(); ImGui.SameLine();
ImGui.SetNextItemWidth(85f); ImGui.SetNextItemWidth(85f);
int data3 = value ?? 1; int data3 = value ?? 1;
text = new ImU8String(10, 1); ImU8String label2 = new ImU8String(10, 1);
text.AppendLiteral("##SeqValue"); label2.AppendLiteral("##SeqValue");
text.AppendFormatted(text2); label2.AppendFormatted(text3);
if (ImGui.InputInt(text, ref data3, 1, 1) && v4) if (ImGui.InputInt(label2, ref data3, 1, 1) && v4)
{ {
base.Configuration.Stop.QuestSequences[text2] = Math.Max(0, Math.Min(255, data3)); base.Configuration.Stop.QuestSequences[text3] = Math.Max(0, Math.Min(255, data3));
Save(); Save();
} }
} }

View file

@ -107,32 +107,32 @@ internal sealed class AlliedSocietyJournalComponent
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text);
ImGui.SameLine(); ImGui.SameLine();
col = ImGuiColors.DalamudGrey3; col = ImGuiColors.DalamudGrey3;
text = new ImU8String(13, 1); ImU8String text2 = new ImU8String(13, 1);
text.AppendLiteral("(Resets in: "); text2.AppendLiteral("(Resets in: ");
text.AppendFormatted(value2); text2.AppendFormatted(value2);
text.AppendLiteral(")"); text2.AppendLiteral(")");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text2);
if (ImGui.IsItemHovered()) if (ImGui.IsItemHovered())
{ {
ImGui.BeginTooltip(); ImGui.BeginTooltip();
ImGui.TextUnformatted("Shared across all allied societies"); ImGui.TextUnformatted("Shared across all allied societies");
text = new ImU8String(12, 1); ImU8String text3 = new ImU8String(12, 1);
text.AppendLiteral("Used today: "); text3.AppendLiteral("Used today: ");
text.AppendFormatted(value); text3.AppendFormatted(value);
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text3);
ImGui.Spacing(); ImGui.Spacing();
ImGui.Separator(); ImGui.Separator();
ImGui.Spacing(); ImGui.Spacing();
col = ImGuiColors.DalamudGrey3; col = ImGuiColors.DalamudGrey3;
text = new ImU8String(12, 1); ImU8String text4 = new ImU8String(12, 1);
text.AppendLiteral("Next reset: "); text4.AppendLiteral("Next reset: ");
text.AppendFormatted(item, "g"); text4.AppendFormatted(item, "g");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text4);
col = ImGuiColors.DalamudGrey3; col = ImGuiColors.DalamudGrey3;
text = new ImU8String(18, 1); ImU8String text5 = new ImU8String(18, 1);
text.AppendLiteral("Time until reset: "); text5.AppendLiteral("Time until reset: ");
text.AppendFormatted(value2); text5.AppendFormatted(value2);
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text5);
ImGui.EndTooltip(); ImGui.EndTooltip();
} }
ImGui.Spacing(); ImGui.Spacing();
@ -317,130 +317,125 @@ internal sealed class AlliedSocietyJournalComponent
ImGui.BeginTooltip(); ImGui.BeginTooltip();
if (remainingAllowances == 0) if (remainingAllowances == 0)
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
{ {
text = new ImU8String(0, 1); ImU8String text = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.Cross.ToIconString()); text.AppendFormatted(SeIconChar.Cross.ToIconString());
ImGui.Text(text); ImGui.Text(text);
ImGui.SameLine(); ImGui.SameLine();
ImGui.TextUnformatted("No daily allowances remaining"); ImGui.TextUnformatted("No daily allowances remaining");
} }
Vector4 col = ImGuiColors.DalamudGrey3; Vector4 col = ImGuiColors.DalamudGrey3;
text = new ImU8String(44, 1); ImU8String text2 = new ImU8String(44, 1);
text.AppendLiteral("You've used all "); text2.AppendLiteral("You've used all ");
text.AppendFormatted(12); text2.AppendFormatted(12);
text.AppendLiteral(" shared allowances for today"); text2.AppendLiteral(" shared allowances for today");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text2);
} }
else if (questsToAddCount == remainingAllowances && questsToAddCount < availableCount) else if (questsToAddCount == remainingAllowances && questsToAddCount < availableCount)
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{ {
text = new ImU8String(0, 1); ImU8String text3 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.QuestSync.ToIconString()); text3.AppendFormatted(SeIconChar.QuestSync.ToIconString());
ImGui.Text(text); ImGui.Text(text3);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(5, 2); ImU8String text4 = new ImU8String(5, 2);
text.AppendLiteral("Add "); text4.AppendLiteral("Add ");
text.AppendFormatted(questsToAddCount); text4.AppendFormatted(questsToAddCount);
text.AppendLiteral(" "); text4.AppendLiteral(" ");
text.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests"); text4.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text4);
} }
Vector4 col = ImGuiColors.DalamudGrey3; Vector4 col = ImGuiColors.DalamudGrey3;
text = new ImU8String(44, 2); ImU8String text5 = new ImU8String(44, 2);
text.AppendLiteral("You can complete "); text5.AppendLiteral("You can complete ");
text.AppendFormatted(remainingAllowances); text5.AppendFormatted(remainingAllowances);
text.AppendLiteral(" more allied society "); text5.AppendLiteral(" more allied society ");
text.AppendFormatted((remainingAllowances == 1) ? "quest" : "quests"); text5.AppendFormatted((remainingAllowances == 1) ? "quest" : "quests");
text.AppendLiteral(" today"); text5.AppendLiteral(" today");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text5);
ImGui.Spacing(); ImGui.Spacing();
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
} }
else if (questsToAddCount == dailyLimit) else if (questsToAddCount == dailyLimit)
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{ {
text = new ImU8String(0, 1); ImU8String text6 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.QuestSync.ToIconString()); text6.AppendFormatted(SeIconChar.QuestSync.ToIconString());
ImGui.Text(text); ImGui.Text(text6);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(11, 1); ImU8String text7 = new ImU8String(11, 1);
text.AppendLiteral("Add "); text7.AppendLiteral("Add ");
text.AppendFormatted(dailyLimit); text7.AppendFormatted(dailyLimit);
text.AppendLiteral(" quests"); text7.AppendLiteral(" quests");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text7);
} }
Vector4 col = ImGuiColors.DalamudGrey3; Vector4 col = ImGuiColors.DalamudGrey3;
text = new ImU8String(51, 2); ImU8String text8 = new ImU8String(51, 2);
text.AppendLiteral("This will use "); text8.AppendLiteral("This will use ");
text.AppendFormatted(dailyLimit); text8.AppendFormatted(dailyLimit);
text.AppendLiteral(" of your "); text8.AppendLiteral(" of your ");
text.AppendFormatted(remainingAllowances); text8.AppendFormatted(remainingAllowances);
text.AppendLiteral(" remaining shared allowances"); text8.AppendLiteral(" remaining shared allowances");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text8);
ImGui.Spacing(); ImGui.Spacing();
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
} }
else if (questsToAddCount == availableCount) else if (questsToAddCount == availableCount)
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{ {
text = new ImU8String(0, 1); ImU8String text9 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.QuestSync.ToIconString()); text9.AppendFormatted(SeIconChar.QuestSync.ToIconString());
ImGui.Text(text); ImGui.Text(text9);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(20, 3); ImU8String text10 = new ImU8String(20, 3);
text.AppendLiteral("Add all "); text10.AppendLiteral("Add all ");
text.AppendFormatted(questsToAddCount); text10.AppendFormatted(questsToAddCount);
text.AppendLiteral(" available "); text10.AppendLiteral(" available ");
text.AppendFormatted(alliedSociety); text10.AppendFormatted(alliedSociety);
text.AppendLiteral(" "); text10.AppendLiteral(" ");
text.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests"); text10.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text10);
} }
Vector4 col = ImGuiColors.DalamudGrey3; Vector4 col = ImGuiColors.DalamudGrey3;
text = new ImU8String(37, 2); ImU8String text11 = new ImU8String(37, 2);
text.AppendLiteral("Uses "); text11.AppendLiteral("Uses ");
text.AppendFormatted(questsToAddCount); text11.AppendFormatted(questsToAddCount);
text.AppendLiteral(" of "); text11.AppendLiteral(" of ");
text.AppendFormatted(remainingAllowances); text11.AppendFormatted(remainingAllowances);
text.AppendLiteral(" shared allowances remaining"); text11.AppendLiteral(" shared allowances remaining");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text11);
ImGui.Spacing(); ImGui.Spacing();
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
} }
else else
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
{ {
text = new ImU8String(0, 1); ImU8String text12 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.BoxedLetterQ.ToIconString()); text12.AppendFormatted(SeIconChar.BoxedLetterQ.ToIconString());
ImGui.Text(text); ImGui.Text(text12);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(6, 3); ImU8String text13 = new ImU8String(6, 3);
text.AppendLiteral("Add "); text13.AppendLiteral("Add ");
text.AppendFormatted(questsToAddCount); text13.AppendFormatted(questsToAddCount);
text.AppendLiteral(" "); text13.AppendLiteral(" ");
text.AppendFormatted(alliedSociety); text13.AppendFormatted(alliedSociety);
text.AppendLiteral(" "); text13.AppendLiteral(" ");
text.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests"); text13.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text13);
} }
Vector4 col = ImGuiColors.DalamudGrey3; Vector4 col = ImGuiColors.DalamudGrey3;
text = new ImU8String(55, 2); ImU8String text14 = new ImU8String(55, 2);
text.AppendLiteral("Limited by available quests ("); text14.AppendLiteral("Limited by available quests (");
text.AppendFormatted(availableCount); text14.AppendFormatted(availableCount);
text.AppendLiteral(") and shared allowances ("); text14.AppendLiteral(") and shared allowances (");
text.AppendFormatted(remainingAllowances); text14.AppendFormatted(remainingAllowances);
text.AppendLiteral(")"); text14.AppendLiteral(")");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text14);
ImGui.Spacing(); ImGui.Spacing();
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
} }
@ -452,89 +447,86 @@ internal sealed class AlliedSocietyJournalComponent
ImGui.BeginTooltip(); ImGui.BeginTooltip();
if (availableCount > remainingAllowances) if (availableCount > remainingAllowances)
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
{ {
text = new ImU8String(0, 1); ImU8String text = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.Cross.ToIconString()); text.AppendFormatted(SeIconChar.Cross.ToIconString());
ImGui.Text(text); ImGui.Text(text);
ImGui.SameLine(); ImGui.SameLine();
ImGui.TextUnformatted("Warning: Exceeds remaining allowances"); ImGui.TextUnformatted("Warning: Exceeds remaining allowances");
} }
ImGui.Spacing(); ImGui.Spacing();
text = new ImU8String(54, 1); ImU8String text2 = new ImU8String(54, 1);
text.AppendLiteral("This adds all "); text2.AppendLiteral("This adds all ");
text.AppendFormatted(availableCount); text2.AppendFormatted(availableCount);
text.AppendLiteral(" available quests to your priority list,"); text2.AppendLiteral(" available quests to your priority list,");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text2);
text = new ImU8String(37, 2); ImU8String text3 = new ImU8String(37, 2);
text.AppendLiteral("but you only have "); text3.AppendLiteral("but you only have ");
text.AppendFormatted(remainingAllowances); text3.AppendFormatted(remainingAllowances);
text.AppendLiteral(" shared "); text3.AppendLiteral(" shared ");
text.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances"); text3.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances");
text.AppendLiteral(" remaining."); text3.AppendLiteral(" remaining.");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text3);
ImGui.Spacing(); ImGui.Spacing();
ImGui.TextColored(ImGuiColors.DalamudGrey3, "The excess quests won't be completable until tomorrow."); ImGui.TextColored(ImGuiColors.DalamudGrey3, "The excess quests won't be completable until tomorrow.");
} }
else if (availableCount > dailyLimit) else if (availableCount > dailyLimit)
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
{ {
text = new ImU8String(0, 1); ImU8String text4 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.Cross.ToIconString()); text4.AppendFormatted(SeIconChar.Cross.ToIconString());
ImGui.Text(text); ImGui.Text(text4);
ImGui.SameLine(); ImGui.SameLine();
ImGui.TextUnformatted("Warning: Exceeds daily optimal amount"); ImGui.TextUnformatted("Warning: Exceeds daily optimal amount");
} }
ImGui.Spacing(); ImGui.Spacing();
text = new ImU8String(32, 1); ImU8String text5 = new ImU8String(32, 1);
text.AppendLiteral("This adds all "); text5.AppendLiteral("This adds all ");
text.AppendFormatted(availableCount); text5.AppendFormatted(availableCount);
text.AppendLiteral(" available quests,"); text5.AppendLiteral(" available quests,");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text5);
text = new ImU8String(48, 1); ImU8String text6 = new ImU8String(48, 1);
text.AppendLiteral("using more than the typical "); text6.AppendLiteral("using more than the typical ");
text.AppendFormatted(3); text6.AppendFormatted(3);
text.AppendLiteral(" quests per society."); text6.AppendLiteral(" quests per society.");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text6);
ImGui.Spacing(); ImGui.Spacing();
Vector4 col = ImGuiColors.ParsedGreen; Vector4 col = ImGuiColors.ParsedGreen;
text = new ImU8String(37, 1); ImU8String text7 = new ImU8String(37, 1);
text.AppendLiteral("You have "); text7.AppendLiteral("You have ");
text.AppendFormatted(remainingAllowances); text7.AppendFormatted(remainingAllowances);
text.AppendLiteral(" shared allowances remaining"); text7.AppendLiteral(" shared allowances remaining");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text7);
ImGui.TextColored(ImGuiColors.DalamudGrey3, "You may want to save allowances for other societies."); ImGui.TextColored(ImGuiColors.DalamudGrey3, "You may want to save allowances for other societies.");
} }
else else
{ {
ImU8String text;
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{ {
text = new ImU8String(0, 1); ImU8String text8 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.QuestSync.ToIconString()); text8.AppendFormatted(SeIconChar.QuestSync.ToIconString());
ImGui.Text(text); ImGui.Text(text8);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(20, 3); ImU8String text9 = new ImU8String(20, 3);
text.AppendLiteral("Add all "); text9.AppendLiteral("Add all ");
text.AppendFormatted(availableCount); text9.AppendFormatted(availableCount);
text.AppendLiteral(" available "); text9.AppendLiteral(" available ");
text.AppendFormatted(alliedSociety); text9.AppendFormatted(alliedSociety);
text.AppendLiteral(" "); text9.AppendLiteral(" ");
text.AppendFormatted((availableCount == 1) ? "quest" : "quests"); text9.AppendFormatted((availableCount == 1) ? "quest" : "quests");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text9);
} }
ImGui.Spacing(); ImGui.Spacing();
Vector4 col = ImGuiColors.DalamudGrey3; Vector4 col = ImGuiColors.DalamudGrey3;
text = new ImU8String(27, 2); ImU8String text10 = new ImU8String(27, 2);
text.AppendLiteral("Uses "); text10.AppendLiteral("Uses ");
text.AppendFormatted(availableCount); text10.AppendFormatted(availableCount);
text.AppendLiteral(" of "); text10.AppendLiteral(" of ");
text.AppendFormatted(remainingAllowances); text10.AppendFormatted(remainingAllowances);
text.AppendLiteral(" shared allowances"); text10.AppendLiteral(" shared allowances");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text10);
ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today");
} }
ImGui.EndTooltip(); ImGui.EndTooltip();
@ -571,18 +563,18 @@ internal sealed class AlliedSocietyJournalComponent
{ {
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{ {
text = new ImU8String(0, 1); ImU8String text2 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.QuestSync.ToIconString()); text2.AppendFormatted(SeIconChar.QuestSync.ToIconString());
ImGui.Text(text); ImGui.Text(text2);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(17, 3); ImU8String text3 = new ImU8String(17, 3);
text.AppendLiteral("Uses "); text3.AppendLiteral("Uses ");
text.AppendFormatted(availableQuests.Count); text3.AppendFormatted(availableQuests.Count);
text.AppendLiteral(" of "); text3.AppendLiteral(" of ");
text.AppendFormatted(remainingAllowances); text3.AppendFormatted(remainingAllowances);
text.AppendLiteral(" shared "); text3.AppendLiteral(" shared ");
text.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances"); text3.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text3);
} }
ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today");
} }
@ -590,15 +582,15 @@ internal sealed class AlliedSocietyJournalComponent
{ {
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
{ {
text = new ImU8String(0, 1); ImU8String text4 = new ImU8String(0, 1);
text.AppendFormatted(SeIconChar.Cross.ToIconString()); text4.AppendFormatted(SeIconChar.Cross.ToIconString());
ImGui.Text(text); ImGui.Text(text4);
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(31, 1); ImU8String text5 = new ImU8String(31, 1);
text.AppendLiteral("Exceeds remaining allowances ("); text5.AppendLiteral("Exceeds remaining allowances (");
text.AppendFormatted(remainingAllowances); text5.AppendFormatted(remainingAllowances);
text.AppendLiteral(")"); text5.AppendLiteral(")");
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text5);
} }
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Some quests won't be completable until tomorrow"); ImGui.TextColored(ImGuiColors.DalamudGrey3, "Some quests won't be completable until tomorrow");
} }

View file

@ -44,18 +44,17 @@ internal sealed class QuestJournalUtils
public void ShowContextMenu(IQuestInfo questInfo, Quest? quest, string label) public void ShowContextMenu(IQuestInfo questInfo, Quest? quest, string label)
{ {
ImU8String strId;
if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
{ {
strId = new ImU8String(12, 1); ImU8String strId = new ImU8String(12, 1);
strId.AppendLiteral("##QuestPopup"); strId.AppendLiteral("##QuestPopup");
strId.AppendFormatted(questInfo.QuestId); strId.AppendFormatted(questInfo.QuestId);
ImGui.OpenPopup(strId); ImGui.OpenPopup(strId);
} }
strId = new ImU8String(12, 1); ImU8String id = new ImU8String(12, 1);
strId.AppendLiteral("##QuestPopup"); id.AppendLiteral("##QuestPopup");
strId.AppendFormatted(questInfo.QuestId); id.AppendFormatted(questInfo.QuestId);
using ImRaii.IEndObject endObject = ImRaii.Popup(strId); using ImRaii.IEndObject endObject = ImRaii.Popup(id);
if (!endObject) if (!endObject)
{ {
return; return;

View file

@ -85,10 +85,10 @@ internal sealed class QuestRewardComponent
using ImRaii.IEndObject endObject = ImRaii.Tooltip(); using ImRaii.IEndObject endObject = ImRaii.Tooltip();
if (!(!endObject)) if (!(!endObject))
{ {
label2 = new ImU8String(15, 1); ImU8String text2 = new ImU8String(15, 1);
label2.AppendLiteral("Obtained from: "); text2.AppendLiteral("Obtained from: ");
label2.AppendFormatted(questInfo.Name); text2.AppendFormatted(questInfo.Name);
ImGui.Text(label2); ImGui.Text(text2);
using (ImRaii.PushIndent()) using (ImRaii.PushIndent())
{ {
_questTooltipComponent.DrawInner(questInfo, showItemRewards: false); _questTooltipComponent.DrawInner(questInfo, showItemRewards: false);

View file

@ -54,7 +54,7 @@ internal sealed class ActiveQuestComponent
public event EventHandler? Reload; public event EventHandler? Reload;
[GeneratedRegex("\\s\\s+", RegexOptions.IgnoreCase, "en-US")] [GeneratedRegex("\\s\\s+", RegexOptions.IgnoreCase, "en-US")]
[GeneratedCode("System.Text.RegularExpressions.Generator", "9.0.13.1716")] [GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
private static Regex MultipleWhitespaceRegex() private static Regex MultipleWhitespaceRegex()
{ {
return _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0.Instance; return _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0.Instance;
@ -195,16 +195,16 @@ internal sealed class ActiveQuestComponent
{ {
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold))
{ {
ImU8String text = new ImU8String(20, 4); ImU8String text2 = new ImU8String(20, 4);
text.AppendLiteral("Gathering: "); text2.AppendLiteral("Gathering: ");
text.AppendFormatted(Shorten(currentQuest.Quest.Info.Name)); text2.AppendFormatted(Shorten(currentQuest.Quest.Info.Name));
text.AppendLiteral(" ("); text2.AppendLiteral(" (");
text.AppendFormatted(currentQuest.Quest.Id); text2.AppendFormatted(currentQuest.Quest.Id);
text.AppendLiteral(") / "); text2.AppendLiteral(") / ");
text.AppendFormatted(currentQuest.Sequence); text2.AppendFormatted(currentQuest.Sequence);
text.AppendLiteral(" / "); text2.AppendLiteral(" / ");
text.AppendFormatted(currentQuest.Step); text2.AppendFormatted(currentQuest.Step);
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text2);
return; return;
} }
} }
@ -222,16 +222,16 @@ internal sealed class ActiveQuestComponent
ImGui.SetTooltip("This quest is loaded from your 'pluginConfigs\\Questionable\\Quests' directory.\nThis gets loaded even if Questionable ships with a newer/different version of the quest."); ImGui.SetTooltip("This quest is loaded from your 'pluginConfigs\\Questionable\\Quests' directory.\nThis gets loaded even if Questionable ships with a newer/different version of the quest.");
} }
} }
ImU8String text = new ImU8String(16, 4); ImU8String text3 = new ImU8String(16, 4);
text.AppendLiteral("Quest: "); text3.AppendLiteral("Quest: ");
text.AppendFormatted(Shorten(startedQuest.Quest.Info.Name)); text3.AppendFormatted(Shorten(startedQuest.Quest.Info.Name));
text.AppendLiteral(" ("); text3.AppendLiteral(" (");
text.AppendFormatted(startedQuest.Quest.Id); text3.AppendFormatted(startedQuest.Quest.Id);
text.AppendLiteral(") / "); text3.AppendLiteral(") / ");
text.AppendFormatted(startedQuest.Sequence); text3.AppendFormatted(startedQuest.Sequence);
text.AppendLiteral(" / "); text3.AppendLiteral(" / ");
text.AppendFormatted(startedQuest.Step); text3.AppendFormatted(startedQuest.Step);
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text3);
if (startedQuest.Quest.Root.Disabled) if (startedQuest.Quest.Root.Disabled)
{ {
ImGui.SameLine(); ImGui.SameLine();
@ -271,30 +271,30 @@ internal sealed class ActiveQuestComponent
if (flag) if (flag)
{ {
int num2 = _objectTable.LocalPlayer?.Level ?? 0; int num2 = _objectTable.LocalPlayer?.Level ?? 0;
text = new ImU8String(14, 1); ImU8String text4 = new ImU8String(14, 1);
text.AppendLiteral("Stop at level "); text4.AppendLiteral("Stop at level ");
text.AppendFormatted(_configuration.Stop.TargetLevel); text4.AppendFormatted(_configuration.Stop.TargetLevel);
ImGui.BulletText(text); ImGui.BulletText(text4);
if (num2 > 0) if (num2 > 0)
{ {
ImGui.SameLine(); ImGui.SameLine();
if (num2 >= _configuration.Stop.TargetLevel) if (num2 >= _configuration.Stop.TargetLevel)
{ {
Vector4 col2 = ImGuiColors.ParsedGreen; Vector4 col2 = ImGuiColors.ParsedGreen;
text = new ImU8String(22, 1); ImU8String text5 = new ImU8String(22, 1);
text.AppendLiteral("(Current: "); text5.AppendLiteral("(Current: ");
text.AppendFormatted(num2); text5.AppendFormatted(num2);
text.AppendLiteral(" - Reached!)"); text5.AppendLiteral(" - Reached!)");
ImGui.TextColored(in col2, text); ImGui.TextColored(in col2, text5);
} }
else else
{ {
Vector4 col2 = ImGuiColors.ParsedBlue; Vector4 col2 = ImGuiColors.ParsedBlue;
text = new ImU8String(11, 1); ImU8String text6 = new ImU8String(11, 1);
text.AppendLiteral("(Current: "); text6.AppendLiteral("(Current: ");
text.AppendFormatted(num2); text6.AppendFormatted(num2);
text.AppendLiteral(")"); text6.AppendLiteral(")");
ImGui.TextColored(in col2, text); ImGui.TextColored(in col2, text6);
} }
} }
} }
@ -305,28 +305,28 @@ internal sealed class ActiveQuestComponent
ImGui.Spacing(); ImGui.Spacing();
} }
int sequence = startedQuest.Sequence; int sequence = startedQuest.Sequence;
text = new ImU8String(23, 1); ImU8String text7 = new ImU8String(23, 1);
text.AppendLiteral("Stop at quest sequence "); text7.AppendLiteral("Stop at quest sequence ");
text.AppendFormatted(_configuration.Stop.TargetSequence); text7.AppendFormatted(_configuration.Stop.TargetSequence);
ImGui.BulletText(text); ImGui.BulletText(text7);
ImGui.SameLine(); ImGui.SameLine();
if (sequence >= _configuration.Stop.TargetSequence) if (sequence >= _configuration.Stop.TargetSequence)
{ {
Vector4 col2 = ImGuiColors.ParsedGreen; Vector4 col2 = ImGuiColors.ParsedGreen;
text = new ImU8String(22, 1); ImU8String text8 = new ImU8String(22, 1);
text.AppendLiteral("(Current: "); text8.AppendLiteral("(Current: ");
text.AppendFormatted(sequence); text8.AppendFormatted(sequence);
text.AppendLiteral(" - Reached!)"); text8.AppendLiteral(" - Reached!)");
ImGui.TextColored(in col2, text); ImGui.TextColored(in col2, text8);
} }
else else
{ {
Vector4 col2 = ImGuiColors.ParsedBlue; Vector4 col2 = ImGuiColors.ParsedBlue;
text = new ImU8String(11, 1); ImU8String text9 = new ImU8String(11, 1);
text.AppendLiteral("(Current: "); text9.AppendLiteral("(Current: ");
text.AppendFormatted(sequence); text9.AppendFormatted(sequence);
text.AppendLiteral(")"); text9.AppendLiteral(")");
ImGui.TextColored(in col2, text); ImGui.TextColored(in col2, text9);
} }
} }
if (flag2) if (flag2)
@ -373,12 +373,12 @@ internal sealed class ActiveQuestComponent
{ {
if (_questRegistry.TryGetQuest(item2, out Quest quest2)) if (_questRegistry.TryGetQuest(item2, out Quest quest2))
{ {
text = new ImU8String(3, 2); ImU8String text10 = new ImU8String(3, 2);
text.AppendFormatted(quest2.Info.Name); text10.AppendFormatted(quest2.Info.Name);
text.AppendLiteral(" ("); text10.AppendLiteral(" (");
text.AppendFormatted(item2); text10.AppendFormatted(item2);
text.AppendLiteral(")"); text10.AppendLiteral(")");
ImGui.BulletText(text); ImGui.BulletText(text10);
} }
} }
} }
@ -396,13 +396,13 @@ internal sealed class ActiveQuestComponent
{ {
if (_questRegistry.TryGetQuest(elementId2, out Quest quest3)) if (_questRegistry.TryGetQuest(elementId2, out Quest quest3))
{ {
text = new ImU8String(6, 3); ImU8String text12 = new ImU8String(6, 3);
text.AppendFormatted(quest3.Info.Name); text12.AppendFormatted(quest3.Info.Name);
text.AppendLiteral(" ("); text12.AppendLiteral(" (");
text.AppendFormatted(elementId2); text12.AppendFormatted(elementId2);
text.AppendLiteral(") - "); text12.AppendLiteral(") - ");
text.AppendFormatted(value); text12.AppendFormatted(value);
ImGui.BulletText(text); ImGui.BulletText(text12);
} }
} }
} }
@ -416,16 +416,16 @@ internal sealed class ActiveQuestComponent
{ {
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
{ {
ImU8String text = new ImU8String(21, 4); ImU8String text13 = new ImU8String(21, 4);
text.AppendLiteral("Next Quest: "); text13.AppendLiteral("Next Quest: ");
text.AppendFormatted(Shorten(nextQuest.Quest.Info.Name)); text13.AppendFormatted(Shorten(nextQuest.Quest.Info.Name));
text.AppendLiteral(" ("); text13.AppendLiteral(" (");
text.AppendFormatted(nextQuest.Quest.Id); text13.AppendFormatted(nextQuest.Quest.Id);
text.AppendLiteral(") / "); text13.AppendLiteral(") / ");
text.AppendFormatted(nextQuest.Sequence); text13.AppendFormatted(nextQuest.Sequence);
text.AppendLiteral(" / "); text13.AppendLiteral(" / ");
text.AppendFormatted(nextQuest.Step); text13.AppendFormatted(nextQuest.Step);
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text13);
} }
} }
} }
@ -462,10 +462,10 @@ internal sealed class ActiveQuestComponent
if (currentQuest.Quest.Info.AlliedSociety != EAlliedSociety.None) if (currentQuest.Quest.Info.AlliedSociety != EAlliedSociety.None)
{ {
ImGui.SameLine(); ImGui.SameLine();
text = new ImU8String(2, 1); ImU8String text3 = new ImU8String(2, 1);
text.AppendLiteral("/ "); text3.AppendLiteral("/ ");
text.AppendFormatted(questProgressInfo.ClassJob); text3.AppendFormatted(questProgressInfo.ClassJob);
ImGui.Text(text); ImGui.Text(text3);
} }
} }
} }
@ -600,12 +600,12 @@ internal sealed class ActiveQuestComponent
} }
using (ImRaii.PushId("SimulatedStep")) using (ImRaii.PushId("SimulatedStep"))
{ {
text = new ImU8String(9, 2); ImU8String text2 = new ImU8String(9, 2);
text.AppendLiteral("Step: "); text2.AppendLiteral("Step: ");
text.AppendFormatted(simulatedQuest.Step); text2.AppendFormatted(simulatedQuest.Step);
text.AppendLiteral(" / "); text2.AppendLiteral(" / ");
text.AppendFormatted(questSequence.Steps.Count - 1); text2.AppendFormatted(questSequence.Steps.Count - 1);
ImGui.Text(text); ImGui.Text(text2);
ImGui.BeginDisabled(simulatedQuest.Step == 0); ImGui.BeginDisabled(simulatedQuest.Step == 0);
if (ImGuiComponents.IconButton(FontAwesomeIcon.Minus)) if (ImGuiComponents.IconButton(FontAwesomeIcon.Minus))
{ {
@ -641,7 +641,7 @@ internal sealed class ActiveQuestComponent
{ {
if (text.Length > 35) if (text.Length > 35)
{ {
return string.Concat(text.AsSpan(0, 30).Trim(), ((SeIconChar)57434).ToIconString()); return string.Concat(text.AsSpan(0, 30).Trim(), ((SeIconChar)57434).ToIconString().AsSpan());
} }
return text; return text;
} }

View file

@ -101,28 +101,24 @@ internal sealed class CreationUtilsComponent
if (hoveredItem != 0L) if (hoveredItem != 0L)
{ {
ImGui.Separator(); ImGui.Separator();
ImU8String text = new ImU8String(14, 1); ImU8String text2 = new ImU8String(14, 1);
text.AppendLiteral("Hovered Item: "); text2.AppendLiteral("Hovered Item: ");
text.AppendFormatted(hoveredItem); text2.AppendFormatted(hoveredItem);
ImGui.Text(text); ImGui.Text(text2);
} }
} }
private unsafe void DrawTargetDetails(IGameObject target) private unsafe void DrawTargetDetails(IGameObject target)
{ {
string value = string.Empty; string value = string.Empty;
DefaultInterpolatedStringHandler handler;
if (target is ICharacter { NameId: not 0u } character) if (target is ICharacter { NameId: not 0u } character)
{ {
handler = new DefaultInterpolatedStringHandler(4, 1); value = $"; n={character.NameId}";
handler.AppendLiteral("; n=");
handler.AppendFormatted(character.NameId);
value = handler.ToStringAndClear();
} }
ImGui.Separator(); ImGui.Separator();
IFormatProvider invariantCulture = CultureInfo.InvariantCulture; IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
IFormatProvider provider = invariantCulture; IFormatProvider provider = invariantCulture;
handler = new DefaultInterpolatedStringHandler(14, 4, invariantCulture); DefaultInterpolatedStringHandler handler = new DefaultInterpolatedStringHandler(14, 4, invariantCulture);
handler.AppendLiteral("Target: "); handler.AppendLiteral("Target: ");
handler.AppendFormatted(target.Name); handler.AppendFormatted(target.Name);
handler.AppendLiteral(" ("); handler.AppendLiteral(" (");
@ -136,18 +132,18 @@ internal sealed class CreationUtilsComponent
{ {
invariantCulture = CultureInfo.InvariantCulture; invariantCulture = CultureInfo.InvariantCulture;
IFormatProvider provider2 = invariantCulture; IFormatProvider provider2 = invariantCulture;
handler = new DefaultInterpolatedStringHandler(10, 1, invariantCulture); DefaultInterpolatedStringHandler handler2 = new DefaultInterpolatedStringHandler(10, 1, invariantCulture);
handler.AppendLiteral("Distance: "); handler2.AppendLiteral("Distance: ");
handler.AppendFormatted((target.Position - _objectTable.LocalPlayer.Position).Length(), "F2"); handler2.AppendFormatted((target.Position - _objectTable.LocalPlayer.Position).Length(), "F2");
ImGui.Text(string.Create(provider2, ref handler)); ImGui.Text(string.Create(provider2, ref handler2));
ImGui.SameLine(); ImGui.SameLine();
float value2 = target.Position.Y - _objectTable.LocalPlayer.Position.Y; float value2 = target.Position.Y - _objectTable.LocalPlayer.Position.Y;
invariantCulture = CultureInfo.InvariantCulture; invariantCulture = CultureInfo.InvariantCulture;
IFormatProvider provider3 = invariantCulture; IFormatProvider provider3 = invariantCulture;
handler = new DefaultInterpolatedStringHandler(3, 1, invariantCulture); DefaultInterpolatedStringHandler handler3 = new DefaultInterpolatedStringHandler(3, 1, invariantCulture);
handler.AppendLiteral("Y: "); handler3.AppendLiteral("Y: ");
handler.AppendFormatted(value2, "F2"); handler3.AppendFormatted(value2, "F2");
string text = string.Create(provider3, ref handler); string text = string.Create(provider3, ref handler3);
if (Math.Abs(value2) >= 1.95f) if (Math.Abs(value2) >= 1.95f)
{ {
ImGui.TextColored(ImGuiColors.DalamudOrange, text); ImGui.TextColored(ImGuiColors.DalamudOrange, text);
@ -217,10 +213,9 @@ internal sealed class CreationUtilsComponent
} }
if (num) if (num)
{ {
ImU8String clipboardText;
if (target.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint) if (target.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint)
{ {
clipboardText = new ImU8String(59, 4); ImU8String clipboardText = new ImU8String(59, 4);
clipboardText.AppendLiteral("\"DataId\": "); clipboardText.AppendLiteral("\"DataId\": ");
clipboardText.AppendFormatted(target.BaseId); clipboardText.AppendFormatted(target.BaseId);
clipboardText.AppendLiteral(",\n\"Position\": {\n \"X\": "); clipboardText.AppendLiteral(",\n\"Position\": {\n \"X\": ");
@ -265,31 +260,30 @@ internal sealed class CreationUtilsComponent
break; break;
} }
string value = text; string value = text;
clipboardText = new ImU8String(99, 6); ImU8String clipboardText2 = new ImU8String(99, 6);
clipboardText.AppendLiteral("\"DataId\": "); clipboardText2.AppendLiteral("\"DataId\": ");
clipboardText.AppendFormatted(target.BaseId); clipboardText2.AppendFormatted(target.BaseId);
clipboardText.AppendLiteral(",\n\"Position\": {\n \"X\": "); clipboardText2.AppendLiteral(",\n\"Position\": {\n \"X\": ");
clipboardText.AppendFormatted(target.Position.X.ToString(CultureInfo.InvariantCulture)); clipboardText2.AppendFormatted(target.Position.X.ToString(CultureInfo.InvariantCulture));
clipboardText.AppendLiteral(",\n \"Y\": "); clipboardText2.AppendLiteral(",\n \"Y\": ");
clipboardText.AppendFormatted(target.Position.Y.ToString(CultureInfo.InvariantCulture)); clipboardText2.AppendFormatted(target.Position.Y.ToString(CultureInfo.InvariantCulture));
clipboardText.AppendLiteral(",\n \"Z\": "); clipboardText2.AppendLiteral(",\n \"Z\": ");
clipboardText.AppendFormatted(target.Position.Z.ToString(CultureInfo.InvariantCulture)); clipboardText2.AppendFormatted(target.Position.Z.ToString(CultureInfo.InvariantCulture));
clipboardText.AppendLiteral("\n},\n\"TerritoryId\": "); clipboardText2.AppendLiteral("\n},\n\"TerritoryId\": ");
clipboardText.AppendFormatted(_clientState.TerritoryType); clipboardText2.AppendFormatted(_clientState.TerritoryType);
clipboardText.AppendLiteral(",\n\"InteractionType\": \""); clipboardText2.AppendLiteral(",\n\"InteractionType\": \"");
clipboardText.AppendFormatted(value); clipboardText2.AppendFormatted(value);
clipboardText.AppendLiteral("\""); clipboardText2.AppendLiteral("\"");
ImGui.SetClipboardText(clipboardText); ImGui.SetClipboardText(clipboardText2);
} }
else if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) else if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
{ {
DefaultInterpolatedStringHandler handler;
if (target.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Aetheryte) if (target.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Aetheryte)
{ {
EAetheryteLocation baseId = (EAetheryteLocation)target.BaseId; EAetheryteLocation baseId = (EAetheryteLocation)target.BaseId;
IFormatProvider invariantCulture = CultureInfo.InvariantCulture; IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
IFormatProvider provider = invariantCulture; IFormatProvider provider = invariantCulture;
handler = new DefaultInterpolatedStringHandler(36, 4, invariantCulture); DefaultInterpolatedStringHandler handler = new DefaultInterpolatedStringHandler(36, 4, invariantCulture);
handler.AppendLiteral("{EAetheryteLocation."); handler.AppendLiteral("{EAetheryteLocation.");
handler.AppendFormatted(baseId); handler.AppendFormatted(baseId);
handler.AppendLiteral(", new("); handler.AppendLiteral(", new(");
@ -305,15 +299,15 @@ internal sealed class CreationUtilsComponent
{ {
IFormatProvider invariantCulture = CultureInfo.InvariantCulture; IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
IFormatProvider provider2 = invariantCulture; IFormatProvider provider2 = invariantCulture;
handler = new DefaultInterpolatedStringHandler(12, 3, invariantCulture); DefaultInterpolatedStringHandler handler2 = new DefaultInterpolatedStringHandler(12, 3, invariantCulture);
handler.AppendLiteral("new("); handler2.AppendLiteral("new(");
handler.AppendFormatted(target.Position.X); handler2.AppendFormatted(target.Position.X);
handler.AppendLiteral("f, "); handler2.AppendLiteral("f, ");
handler.AppendFormatted(target.Position.Y); handler2.AppendFormatted(target.Position.Y);
handler.AppendLiteral("f, "); handler2.AppendLiteral("f, ");
handler.AppendFormatted(target.Position.Z); handler2.AppendFormatted(target.Position.Z);
handler.AppendLiteral("f)"); handler2.AppendLiteral("f)");
ImGui.SetClipboardText(string.Create(provider2, ref handler)); ImGui.SetClipboardText(string.Create(provider2, ref handler2));
} }
} }
} }

View file

@ -168,10 +168,10 @@ internal sealed class EventInfoComponent
{ {
continue; continue;
} }
ImU8String text3 = new ImU8String(21, 1); ImU8String id = new ImU8String(21, 1);
text3.AppendLiteral("##EventQuestSelection"); id.AppendLiteral("##EventQuestSelection");
text3.AppendFormatted(questId); id.AppendFormatted(questId);
using (ImRaii.PushId(text3)) using (ImRaii.PushId(id))
{ {
string name = _questData.GetQuestInfo(questId).Name; string name = _questData.GetQuestInfo(questId).Name;
if (list.Contains(questId) && _questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest)) if (list.Contains(questId) && _questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest))

View file

@ -136,10 +136,10 @@ internal sealed class ManualPriorityComponent
using (ImRaii.PushId(id)) using (ImRaii.PushId(id))
{ {
ImGui.AlignTextToFramePadding(); ImGui.AlignTextToFramePadding();
id = new ImU8String(1, 1); ImU8String text = new ImU8String(1, 1);
id.AppendFormatted(i + 1); text.AppendFormatted(i + 1);
id.AppendLiteral("."); text.AppendLiteral(".");
ImGui.Text(id); ImGui.Text(text);
ImGui.SameLine(); ImGui.SameLine();
(Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(quest3.Id); (Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(quest3.Id);
bool flag; bool flag;

View file

@ -331,11 +331,11 @@ internal sealed class PresetBuilderComponent
} }
if (ImGui.IsItemHovered()) if (ImGui.IsItemHovered())
{ {
label = new ImU8String(23, 1); ImU8String tooltip = new ImU8String(23, 1);
label.AppendLiteral("Add '"); tooltip.AppendLiteral("Add '");
label.AppendFormatted(questInfo.Name); tooltip.AppendFormatted(questInfo.Name);
label.AppendLiteral("' to priority list"); tooltip.AppendLiteral("' to priority list");
ImGui.SetTooltip(label); ImGui.SetTooltip(tooltip);
} }
} }
} }
@ -600,7 +600,7 @@ internal sealed class PresetBuilderComponent
EExpansionVersion.Dawntrail => new uint[6] { 1187u, 1188u, 1189u, 1190u, 1191u, 1192u }, EExpansionVersion.Dawntrail => new uint[6] { 1187u, 1188u, 1189u, 1190u, 1191u, 1192u },
_ => Array.Empty<uint>(), _ => Array.Empty<uint>(),
}; };
return QuestData.AetherCurrentQuestsByTerritory.Where<KeyValuePair<uint, ImmutableList<QuestId>>>((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => territoryRanges.Contains(kvp.Key)).SelectMany((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => kvp.Value).Cast<ElementId>() return QuestData.AetherCurrentQuestsByTerritory.Where<KeyValuePair<uint, ImmutableList<QuestId>>>((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => ((ReadOnlySpan<uint>)territoryRanges).Contains(kvp.Key)).SelectMany((KeyValuePair<uint, ImmutableList<QuestId>> kvp) => kvp.Value).Cast<ElementId>()
.ToList(); .ToList();
} }
@ -613,9 +613,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list15 = new List<ElementId>(num); List<ElementId> list15 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list15, num); CollectionsMarshal.SetCount(list15, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list15); Span<ElementId> span15 = CollectionsMarshal.AsSpan(list15);
int index = 0; int index = 0;
span[index] = new AethernetId(1); span15[index] = new AethernetId(1);
return list15; return list15;
} }
case "Gridania": case "Gridania":
@ -623,9 +623,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list14 = new List<ElementId>(index); List<ElementId> list14 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list14, index); CollectionsMarshal.SetCount(list14, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list14); Span<ElementId> span14 = CollectionsMarshal.AsSpan(list14);
int num = 0; int num = 0;
span[num] = new AethernetId(2); span14[num] = new AethernetId(2);
return list14; return list14;
} }
case "Uldah": case "Uldah":
@ -633,9 +633,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list13 = new List<ElementId>(num); List<ElementId> list13 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list13, num); CollectionsMarshal.SetCount(list13, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list13); Span<ElementId> span13 = CollectionsMarshal.AsSpan(list13);
int index = 0; int index = 0;
span[index] = new AethernetId(3); span13[index] = new AethernetId(3);
return list13; return list13;
} }
case "GoldSaucer": case "GoldSaucer":
@ -643,9 +643,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list12 = new List<ElementId>(index); List<ElementId> list12 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list12, index); CollectionsMarshal.SetCount(list12, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list12); Span<ElementId> span12 = CollectionsMarshal.AsSpan(list12);
int num = 0; int num = 0;
span[num] = new AethernetId(4); span12[num] = new AethernetId(4);
return list12; return list12;
} }
case "Ishgard": case "Ishgard":
@ -653,9 +653,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list11 = new List<ElementId>(num); List<ElementId> list11 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list11, num); CollectionsMarshal.SetCount(list11, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list11); Span<ElementId> span11 = CollectionsMarshal.AsSpan(list11);
int index = 0; int index = 0;
span[index] = new AethernetId(5); span11[index] = new AethernetId(5);
return list11; return list11;
} }
case "Idyllshire": case "Idyllshire":
@ -663,9 +663,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list10 = new List<ElementId>(index); List<ElementId> list10 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list10, index); CollectionsMarshal.SetCount(list10, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list10); Span<ElementId> span10 = CollectionsMarshal.AsSpan(list10);
int num = 0; int num = 0;
span[num] = new AethernetId(6); span10[num] = new AethernetId(6);
return list10; return list10;
} }
case "Rhalgr's Reach": case "Rhalgr's Reach":
@ -673,9 +673,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list9 = new List<ElementId>(num); List<ElementId> list9 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list9, num); CollectionsMarshal.SetCount(list9, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list9); Span<ElementId> span9 = CollectionsMarshal.AsSpan(list9);
int index = 0; int index = 0;
span[index] = new AethernetId(7); span9[index] = new AethernetId(7);
return list9; return list9;
} }
case "Kugane": case "Kugane":
@ -683,9 +683,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list8 = new List<ElementId>(index); List<ElementId> list8 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list8, index); CollectionsMarshal.SetCount(list8, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list8); Span<ElementId> span8 = CollectionsMarshal.AsSpan(list8);
int num = 0; int num = 0;
span[num] = new AethernetId(8); span8[num] = new AethernetId(8);
return list8; return list8;
} }
case "Doman Enclave": case "Doman Enclave":
@ -693,9 +693,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list7 = new List<ElementId>(num); List<ElementId> list7 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list7, num); CollectionsMarshal.SetCount(list7, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list7); Span<ElementId> span7 = CollectionsMarshal.AsSpan(list7);
int index = 0; int index = 0;
span[index] = new AethernetId(9); span7[index] = new AethernetId(9);
return list7; return list7;
} }
case "The Crystarium": case "The Crystarium":
@ -703,9 +703,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list6 = new List<ElementId>(index); List<ElementId> list6 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list6, index); CollectionsMarshal.SetCount(list6, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list6); Span<ElementId> span6 = CollectionsMarshal.AsSpan(list6);
int num = 0; int num = 0;
span[num] = new AethernetId(10); span6[num] = new AethernetId(10);
return list6; return list6;
} }
case "Eulmore": case "Eulmore":
@ -713,9 +713,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list5 = new List<ElementId>(num); List<ElementId> list5 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list5, num); CollectionsMarshal.SetCount(list5, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list5); Span<ElementId> span5 = CollectionsMarshal.AsSpan(list5);
int index = 0; int index = 0;
span[index] = new AethernetId(11); span5[index] = new AethernetId(11);
return list5; return list5;
} }
case "Old Sharlayan": case "Old Sharlayan":
@ -723,9 +723,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list4 = new List<ElementId>(index); List<ElementId> list4 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list4, index); CollectionsMarshal.SetCount(list4, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list4); Span<ElementId> span4 = CollectionsMarshal.AsSpan(list4);
int num = 0; int num = 0;
span[num] = new AethernetId(12); span4[num] = new AethernetId(12);
return list4; return list4;
} }
case "Radz-at-Han": case "Radz-at-Han":
@ -733,9 +733,9 @@ internal sealed class PresetBuilderComponent
int num = 1; int num = 1;
List<ElementId> list3 = new List<ElementId>(num); List<ElementId> list3 = new List<ElementId>(num);
CollectionsMarshal.SetCount(list3, num); CollectionsMarshal.SetCount(list3, num);
Span<ElementId> span = CollectionsMarshal.AsSpan(list3); Span<ElementId> span3 = CollectionsMarshal.AsSpan(list3);
int index = 0; int index = 0;
span[index] = new AethernetId(13); span3[index] = new AethernetId(13);
return list3; return list3;
} }
case "Tuliyollal": case "Tuliyollal":
@ -743,9 +743,9 @@ internal sealed class PresetBuilderComponent
int index = 1; int index = 1;
List<ElementId> list2 = new List<ElementId>(index); List<ElementId> list2 = new List<ElementId>(index);
CollectionsMarshal.SetCount(list2, index); CollectionsMarshal.SetCount(list2, index);
Span<ElementId> span = CollectionsMarshal.AsSpan(list2); Span<ElementId> span2 = CollectionsMarshal.AsSpan(list2);
int num = 0; int num = 0;
span[num] = new AethernetId(14); span2[num] = new AethernetId(14);
return list2; return list2;
} }
case "Solution Nine": case "Solution Nine":

View file

@ -238,10 +238,10 @@ internal sealed class QuestSequenceComponent
float num3 = (float)ImGui.GetTime(); float num3 = (float)ImGui.GetTime();
float num4 = 0.85f + MathF.Sin(num3 * 3f) * 0.15f; float num4 = 0.85f + MathF.Sin(num3 * 3f) * 0.15f;
col = new Vector4(0.5f * num4, 1f * num4, 0.6f * num4, 1f); col = new Vector4(0.5f * num4, 1f * num4, 0.6f * num4, 1f);
text = new ImU8String(17, 1); ImU8String text2 = new ImU8String(17, 1);
text.AppendLiteral("Active: Sequence "); text2.AppendLiteral("Active: Sequence ");
text.AppendFormatted(currentSequence.Value); text2.AppendFormatted(currentSequence.Value);
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text2);
} }
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY()); ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY());
ImGui.Spacing(); ImGui.Spacing();
@ -343,21 +343,21 @@ internal sealed class QuestSequenceComponent
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text);
ImGui.SameLine(); ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f); col = new Vector4(0.7f, 0.9f, 1f, 1f);
text = new ImU8String(0, 1); ImU8String text2 = new ImU8String(0, 1);
text.AppendFormatted(totalSequences); text2.AppendFormatted(totalSequences);
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text2);
ImGui.Spacing(); ImGui.Spacing();
col = new Vector4(0.9f, 0.9f, 0.98f, 1f); col = new Vector4(0.9f, 0.9f, 0.98f, 1f);
text = new ImU8String(6, 0); ImU8String text3 = new ImU8String(6, 0);
text.AppendLiteral("Range:"); text3.AppendLiteral("Range:");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text3);
ImGui.SameLine(); ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f); col = new Vector4(0.7f, 0.9f, 1f, 1f);
text = new ImU8String(9, 1); ImU8String text4 = new ImU8String(9, 1);
text.AppendLiteral("0 → "); text4.AppendLiteral("0 → ");
text.AppendFormatted(maxSeq); text4.AppendFormatted(maxSeq);
text.AppendLiteral(", 255"); text4.AppendLiteral(", 255");
ImGui.TextColored(in col, text); ImGui.TextColored(in col, text4);
ImGui.Unindent(10f); ImGui.Unindent(10f);
}); });
ImGui.TableNextColumn(); ImGui.TableNextColumn();
@ -376,16 +376,16 @@ internal sealed class QuestSequenceComponent
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "/"); ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "/");
ImGui.SameLine(); ImGui.SameLine();
Vector4 col2 = new Vector4(0.9f, 0.9f, 0.98f, 1f); Vector4 col2 = new Vector4(0.9f, 0.9f, 0.98f, 1f);
text = new ImU8String(0, 1); ImU8String text2 = new ImU8String(0, 1);
text.AppendFormatted(expectedCount); text2.AppendFormatted(expectedCount);
ImGui.TextColored(in col2, text); ImGui.TextColored(in col2, text2);
ImGui.SameLine(); ImGui.SameLine();
ref Vector4 col3 = ref coverageColor; ref Vector4 col3 = ref coverageColor;
text = new ImU8String(3, 1); ImU8String text3 = new ImU8String(3, 1);
text.AppendLiteral("("); text3.AppendLiteral("(");
text.AppendFormatted(coverage, "F0"); text3.AppendFormatted(coverage, "F0");
text.AppendLiteral("%)"); text3.AppendLiteral("%)");
ImGui.TextColored(in col3, text); ImGui.TextColored(in col3, text3);
ImGui.Spacing(); ImGui.Spacing();
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos(); Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float x = ImGui.GetContentRegionAvail().X - 10f; float x = ImGui.GetContentRegionAvail().X - 10f;
@ -536,10 +536,10 @@ internal sealed class QuestSequenceComponent
{ {
using (ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.98f, 0.98f, 1f, 1f))) using (ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.98f, 0.98f, 1f, 1f)))
{ {
strId = new ImU8String(9, 1); ImU8String text2 = new ImU8String(9, 1);
strId.AppendLiteral("Sequence "); text2.AppendLiteral("Sequence ");
strId.AppendFormatted(sequenceId); text2.AppendFormatted(sequenceId);
ImGui.Text(strId); ImGui.Text(text2);
} }
ImGui.Separator(); ImGui.Separator();
if (flag2 && sequenceDetails.TryGetValue(sequenceId, out (int, string) value)) if (flag2 && sequenceDetails.TryGetValue(sequenceId, out (int, string) value))
@ -551,14 +551,14 @@ internal sealed class QuestSequenceComponent
ImGui.TextColored(new Vector4(0.5f, 1f, 0.6f, 1f), "Implemented"); ImGui.TextColored(new Vector4(0.5f, 1f, 0.6f, 1f), "Implemented");
ImGui.Spacing(); ImGui.Spacing();
Vector4 col = new Vector4(0.9f, 0.9f, 0.98f, 1f); Vector4 col = new Vector4(0.9f, 0.9f, 0.98f, 1f);
strId = new ImU8String(6, 0); ImU8String text3 = new ImU8String(6, 0);
strId.AppendLiteral("Steps:"); text3.AppendLiteral("Steps:");
ImGui.TextColored(in col, strId); ImGui.TextColored(in col, text3);
ImGui.SameLine(); ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f); col = new Vector4(0.7f, 0.9f, 1f, 1f);
strId = new ImU8String(0, 1); ImU8String text4 = new ImU8String(0, 1);
strId.AppendFormatted(value.Item1); text4.AppendFormatted(value.Item1);
ImGui.TextColored(in col, strId); ImGui.TextColored(in col, text4);
if (!string.IsNullOrEmpty(value.Item2)) if (!string.IsNullOrEmpty(value.Item2))
{ {
ImGui.Separator(); ImGui.Separator();

View file

@ -78,17 +78,17 @@ internal sealed class QuestTooltipComponent
} }
if (quest.Root.Author.Count == 1) if (quest.Root.Author.Count == 1)
{ {
text = new ImU8String(8, 1); ImU8String text3 = new ImU8String(8, 1);
text.AppendLiteral("Author: "); text3.AppendLiteral("Author: ");
text.AppendFormatted(quest.Root.Author[0]); text3.AppendFormatted(quest.Root.Author[0]);
ImGui.Text(text); ImGui.Text(text3);
} }
else else
{ {
text = new ImU8String(9, 1); ImU8String text4 = new ImU8String(9, 1);
text.AppendLiteral("Authors: "); text4.AppendLiteral("Authors: ");
text.AppendFormatted(string.Join(", ", quest.Root.Author)); text4.AppendFormatted(string.Join(", ", quest.Root.Author));
ImGui.Text(text); ImGui.Text(text4);
} }
} }
else else

View file

@ -57,10 +57,10 @@ internal sealed class QuestValidationComponent
ImGui.SameLine(); ImGui.SameLine();
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
{ {
text = new ImU8String(7, 1); ImU8String text2 = new ImU8String(7, 1);
text.AppendFormatted(errorCount); text2.AppendFormatted(errorCount);
text.AppendLiteral(" errors"); text2.AppendLiteral(" errors");
ImGui.Text(text); ImGui.Text(text2);
} }
} }
if (num > 0) if (num > 0)
@ -70,11 +70,11 @@ internal sealed class QuestValidationComponent
ImGui.SameLine(); ImGui.SameLine();
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
{ {
text = new ImU8String(12, 1); ImU8String text3 = new ImU8String(12, 1);
text.AppendLiteral(", "); text3.AppendLiteral(", ");
text.AppendFormatted(num); text3.AppendFormatted(num);
text.AppendLiteral(" warnings)"); text3.AppendLiteral(" warnings)");
ImGui.Text(text); ImGui.Text(text3);
return; return;
} }
} }
@ -83,10 +83,10 @@ internal sealed class QuestValidationComponent
ImGui.SameLine(); ImGui.SameLine();
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
{ {
text = new ImU8String(10, 1); ImU8String text4 = new ImU8String(10, 1);
text.AppendFormatted(num); text4.AppendFormatted(num);
text.AppendLiteral(" warnings)"); text4.AppendLiteral(" warnings)");
ImGui.Text(text); ImGui.Text(text4);
return; return;
} }
} }

View file

@ -133,33 +133,33 @@ internal sealed class ValidationDetailsRenderer
if (issue.ElementId != null) if (issue.ElementId != null)
{ {
IQuestInfo questInfo = _questData.GetQuestInfo(issue.ElementId); IQuestInfo questInfo = _questData.GetQuestInfo(issue.ElementId);
ImU8String text = new ImU8String(10, 2); ImU8String text2 = new ImU8String(10, 2);
text.AppendLiteral("Quest: "); text2.AppendLiteral("Quest: ");
text.AppendFormatted(issue.ElementId); text2.AppendFormatted(issue.ElementId);
text.AppendLiteral(" - "); text2.AppendLiteral(" - ");
text.AppendFormatted(questInfo.Name); text2.AppendFormatted(questInfo.Name);
ImGui.Text(text); ImGui.Text(text2);
} }
else if (issue.AlliedSociety != EAlliedSociety.None) else if (issue.AlliedSociety != EAlliedSociety.None)
{ {
ImU8String text = new ImU8String(16, 1); ImU8String text3 = new ImU8String(16, 1);
text.AppendLiteral("Allied Society: "); text3.AppendLiteral("Allied Society: ");
text.AppendFormatted(issue.AlliedSociety); text3.AppendFormatted(issue.AlliedSociety);
ImGui.Text(text); ImGui.Text(text3);
} }
if (issue.Sequence.HasValue) if (issue.Sequence.HasValue)
{ {
ImU8String text = new ImU8String(10, 1); ImU8String text4 = new ImU8String(10, 1);
text.AppendLiteral("Sequence: "); text4.AppendLiteral("Sequence: ");
text.AppendFormatted(issue.Sequence); text4.AppendFormatted(issue.Sequence);
ImGui.Text(text); ImGui.Text(text4);
} }
if (issue.Step.HasValue) if (issue.Step.HasValue)
{ {
ImU8String text = new ImU8String(6, 1); ImU8String text5 = new ImU8String(6, 1);
text.AppendLiteral("Step: "); text5.AppendLiteral("Step: ");
text.AppendFormatted(issue.Step); text5.AppendFormatted(issue.Step);
ImGui.Text(text); ImGui.Text(text5);
} }
ImGui.Separator(); ImGui.Separator();
ImGui.Text("Description:"); ImGui.Text("Description:");
@ -270,19 +270,19 @@ internal sealed class ValidationDetailsRenderer
} }
catch catch
{ {
ImU8String text = new ImU8String(18, 1); ImU8String text2 = new ImU8String(18, 1);
text.AppendLiteral("\ufffd "); text2.AppendLiteral("\ufffd ");
text.AppendFormatted(value); text2.AppendFormatted(value);
text.AppendLiteral(" (unknown quest)"); text2.AppendLiteral(" (unknown quest)");
ImGui.TextWrapped(text); ImGui.TextWrapped(text2);
} }
} }
else else
{ {
ImU8String text = new ImU8String(2, 1); ImU8String text3 = new ImU8String(2, 1);
text.AppendLiteral("\ufffd "); text3.AppendLiteral("\ufffd ");
text.AppendFormatted(value); text3.AppendFormatted(value);
ImGui.TextWrapped(text); ImGui.TextWrapped(text3);
} }
} }
} }
@ -351,10 +351,10 @@ internal sealed class ValidationDetailsRenderer
{ {
text2 = "JSON schema validation failed - check that all properties match the expected format and values"; text2 = "JSON schema validation failed - check that all properties match the expected format and values";
} }
ImU8String text = new ImU8String(2, 1); ImU8String text3 = new ImU8String(2, 1);
text.AppendLiteral("\ufffd "); text3.AppendLiteral("\ufffd ");
text.AppendFormatted(text2); text3.AppendFormatted(text2);
ImGui.TextWrapped(text); ImGui.TextWrapped(text3);
ImGui.Unindent(12f); ImGui.Unindent(12f);
} }
} }

View file

@ -189,6 +189,6 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
_framework.RunOnTick(delegate _framework.RunOnTick(delegate
{ {
_interactionUiController.HandleCurrentDialogueChoices(); _interactionUiController.HandleCurrentDialogueChoices();
}, TimeSpan.FromMilliseconds(200L, 0L)); }, TimeSpan.FromMilliseconds(200L));
} }
} }

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>Questionable</AssemblyName> <AssemblyName>Questionable</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>netcoreapp9.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@ -38,6 +38,9 @@
<Reference Include="Microsoft.Extensions.Logging.Abstractions"> <Reference Include="Microsoft.Extensions.Logging.Abstractions">
<HintPath>..\..\Microsoft.Extensions.Logging.Abstractions.dll</HintPath> <HintPath>..\..\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference> </Reference>
<Reference Include="Serilog">
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Serilog.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection"> <Reference Include="Microsoft.Extensions.DependencyInjection">
<HintPath>..\..\Microsoft.Extensions.DependencyInjection.dll</HintPath> <HintPath>..\..\Microsoft.Extensions.DependencyInjection.dll</HintPath>
</Reference> </Reference>
@ -59,9 +62,6 @@
<Reference Include="InteropGenerator.Runtime"> <Reference Include="InteropGenerator.Runtime">
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\InteropGenerator.Runtime.dll</HintPath> <HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\InteropGenerator.Runtime.dll</HintPath>
</Reference> </Reference>
<Reference Include="NotificationMasterAPI">
<HintPath>..\..\NotificationMasterAPI.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging"> <Reference Include="Microsoft.Extensions.Logging">
<HintPath>..\..\Microsoft.Extensions.Logging.dll</HintPath> <HintPath>..\..\Microsoft.Extensions.Logging.dll</HintPath>
</Reference> </Reference>
@ -71,9 +71,6 @@
<Reference Include="GatheringPaths"> <Reference Include="GatheringPaths">
<HintPath>..\..\GatheringPaths.dll</HintPath> <HintPath>..\..\GatheringPaths.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dalamud.Extensions.MicrosoftLogging">
<HintPath>..\..\Dalamud.Extensions.MicrosoftLogging.dll</HintPath>
</Reference>
<Reference Include="JsonPointer.Net"> <Reference Include="JsonPointer.Net">
<HintPath>..\..\JsonPointer.Net.dll</HintPath> <HintPath>..\..\JsonPointer.Net.dll</HintPath>
</Reference> </Reference>

View file

@ -98,10 +98,6 @@ internal sealed class Configuration : IPluginConfiguration
public bool Enabled { get; set; } = true; public bool Enabled { get; set; } = true;
public XivChatType ChatType { get; set; } = XivChatType.Debug; public XivChatType ChatType { get; set; } = XivChatType.Debug;
public bool ShowTrayMessage { get; set; }
public bool FlashTaskbar { get; set; }
} }
internal sealed class AdvancedConfiguration internal sealed class AdvancedConfiguration

View file

@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.Text;
using Dalamud.Plugin.Services;
using Microsoft.Extensions.Logging;
using Serilog.Events;
namespace Questionable;
internal sealed class DalamudLoggerProvider : ILoggerProvider, IDisposable, ISupportExternalScope
{
private sealed class DalamudLogger : ILogger
{
private sealed class NullScope : IDisposable
{
public static NullScope Instance { get; } = new NullScope();
private NullScope()
{
}
public void Dispose()
{
}
}
private readonly string? _name;
private readonly IExternalScopeProvider? _scopeProvider;
private readonly IPluginLog _pluginLog;
public DalamudLogger(string? name, IExternalScopeProvider? scopeProvider, IPluginLog pluginLog)
{
_name = name;
_scopeProvider = scopeProvider;
_pluginLog = pluginLog;
}
public IDisposable BeginScope<TState>(TState state) where TState : notnull
{
return _scopeProvider?.Push(state) ?? NullScope.Instance;
}
public bool IsEnabled(LogLevel logLevel)
{
if (logLevel == LogLevel.None)
{
return false;
}
return ToSerilogLevel(logLevel) >= _pluginLog.MinimumLogLevel;
}
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
{
if (!IsEnabled(logLevel))
{
return;
}
ArgumentNullException.ThrowIfNull(formatter, "formatter");
LogEventLevel level = ToSerilogLevel(logLevel);
StringBuilder stringBuilder = new StringBuilder();
_scopeProvider?.ForEachScope(delegate(object? scope, StringBuilder builder)
{
if (scope is IEnumerable<KeyValuePair<string, object>> enumerable)
{
{
foreach (KeyValuePair<string, object> item in enumerable)
{
builder.Append('<').Append(item.Key).Append('=')
.Append(item.Value)
.Append("> ");
}
return;
}
}
if (scope != null)
{
builder.Append('<').Append(scope).Append("> ");
}
}, stringBuilder);
if (!string.IsNullOrEmpty(_name))
{
stringBuilder.Append(_name).Append(": ");
}
stringBuilder.Append(formatter(state, null));
_pluginLog.Write(level, exception, stringBuilder.ToString());
}
private static LogEventLevel ToSerilogLevel(LogLevel logLevel)
{
return logLevel switch
{
LogLevel.Trace => LogEventLevel.Verbose,
LogLevel.Debug => LogEventLevel.Debug,
LogLevel.Information => LogEventLevel.Information,
LogLevel.Warning => LogEventLevel.Warning,
LogLevel.Error => LogEventLevel.Error,
LogLevel.Critical => LogEventLevel.Fatal,
_ => throw new ArgumentOutOfRangeException("logLevel", logLevel, null),
};
}
}
private readonly IPluginLog _pluginLog;
private readonly Func<string, string?> _categoryNameFormatter;
private IExternalScopeProvider? _scopeProvider;
public DalamudLoggerProvider(IPluginLog pluginLog, Func<string, string?>? categoryNameFormatter = null)
{
_pluginLog = pluginLog;
_categoryNameFormatter = categoryNameFormatter ?? ((Func<string, string>)((string t) => t));
}
public ILogger CreateLogger(string categoryName)
{
return new DalamudLogger(_categoryNameFormatter(categoryName), _scopeProvider, _pluginLog);
}
public void SetScopeProvider(IExternalScopeProvider scopeProvider)
{
_scopeProvider = scopeProvider;
}
public void Dispose()
{
}
}

View file

@ -1,6 +1,5 @@
using System; using System;
using System.Linq; using System.Linq;
using Dalamud.Extensions.MicrosoftLogging;
using Dalamud.Game; using Dalamud.Game;
using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects;
using Dalamud.Interface.Windowing; using Dalamud.Interface.Windowing;
@ -47,11 +46,15 @@ public sealed class QuestionablePlugin : IDalamudPlugin, IDisposable
ServiceCollection serviceCollection = new ServiceCollection(); ServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddLogging(delegate(ILoggingBuilder builder) serviceCollection.AddLogging(delegate(ILoggingBuilder builder)
{ {
builder.SetMinimumLevel(LogLevel.Trace).ClearProviders().AddDalamudLogger(pluginLog, delegate(string t) builder.SetMinimumLevel(LogLevel.Trace).ClearProviders().AddProvider(new DalamudLoggerProvider(pluginLog, delegate(string t)
{ {
if (t == null)
{
return (string?)null;
}
int num = t.LastIndexOf('.') + 1; int num = t.LastIndexOf('.') + 1;
return t.Substring(num, t.Length - num); return t.Substring(num, t.Length - num);
}); }));
}); });
((IServiceCollection)serviceCollection).AddSingleton((IDalamudPlugin)this); ((IServiceCollection)serviceCollection).AddSingleton((IDalamudPlugin)this);
serviceCollection.AddSingleton(pluginInterface); serviceCollection.AddSingleton(pluginInterface);
@ -113,7 +116,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin, IDisposable
serviceCollection.AddSingleton<ArtisanIpc>(); serviceCollection.AddSingleton<ArtisanIpc>();
serviceCollection.AddSingleton<QuestionableIpc>(); serviceCollection.AddSingleton<QuestionableIpc>();
serviceCollection.AddSingleton<TextAdvanceIpc>(); serviceCollection.AddSingleton<TextAdvanceIpc>();
serviceCollection.AddSingleton<NotificationMasterIpc>();
serviceCollection.AddSingleton<AutomatonIpc>(); serviceCollection.AddSingleton<AutomatonIpc>();
serviceCollection.AddSingleton<AutoDutyIpc>(); serviceCollection.AddSingleton<AutoDutyIpc>();
serviceCollection.AddSingleton<BossModIpc>(); serviceCollection.AddSingleton<BossModIpc>();

View file

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
namespace System.Text.RegularExpressions.Generated; namespace System.Text.RegularExpressions.Generated;
[GeneratedCode("System.Text.RegularExpressions.Generator", "9.0.13.1716")] [GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
[SkipLocalsInit] [SkipLocalsInit]
internal sealed class _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0 : Regex internal sealed class _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0 : Regex
{ {

View file

@ -3,12 +3,12 @@ using System.CodeDom.Compiler;
namespace System.Text.RegularExpressions.Generated; namespace System.Text.RegularExpressions.Generated;
[GeneratedCode("System.Text.RegularExpressions.Generator", "9.0.13.1716")] [GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
internal static class _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__Utilities internal static class _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__Utilities
{ {
internal static readonly TimeSpan s_defaultTimeout = ((AppContext.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") is TimeSpan timeSpan) ? timeSpan : Regex.InfiniteMatchTimeout); internal static readonly TimeSpan s_defaultTimeout = ((AppContext.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") is TimeSpan timeSpan) ? timeSpan : Regex.InfiniteMatchTimeout);
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout; internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
internal static readonly SearchValues<char> s_whitespace = SearchValues.Create("\t\n\v\f\r \u0085\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000"); internal static readonly SearchValues<char> s_whitespace = SearchValues.Create("\t\n\v\f\r \u0085\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000".AsSpan());
} }