Update for 7.4
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
|
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
|
||||||
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.14.0" />
|
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.15.8" />
|
||||||
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.14.0" />
|
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.8" />
|
||||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.199">
|
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
|
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors>Asriel Camora</Authors>
|
<Authors>Asriel Camora</Authors>
|
||||||
<Version>2.8.0.0</Version>
|
<Version>2.9.0.0</Version>
|
||||||
<PackageProjectUrl>https://github.com/WorkingRobot/Craftimizer.git</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/WorkingRobot/Craftimizer.git</PackageProjectUrl>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0-windows7.0</TargetFramework>
|
<TargetFramework>net10.0-windows</TargetFramework>
|
||||||
<Platforms>x64</Platforms>
|
<Platforms>x64</Platforms>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
|
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
|
||||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.199">
|
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public sealed class Plugin : IDalamudPlugin
|
|||||||
var editorWindow = (EditorWindow?.IsOpen ?? false) ? EditorWindow : null;
|
var editorWindow = (EditorWindow?.IsOpen ?? false) ? EditorWindow : null;
|
||||||
var recipeData = editorWindow?.RecipeData ?? Service.Plugin.RecipeNoteWindow.RecipeData;
|
var recipeData = editorWindow?.RecipeData ?? Service.Plugin.RecipeNoteWindow.RecipeData;
|
||||||
var characterStats = editorWindow?.CharacterStats ?? Service.Plugin.RecipeNoteWindow.CharacterStats;
|
var characterStats = editorWindow?.CharacterStats ?? Service.Plugin.RecipeNoteWindow.CharacterStats;
|
||||||
var buffs = editorWindow?.Buffs ?? (RecipeNoteWindow.CharacterStats != null ? new(Service.ClientState.LocalPlayer?.StatusList) : null);
|
var buffs = editorWindow?.Buffs ?? (RecipeNoteWindow.CharacterStats != null ? new(Service.Objects.LocalPlayer?.StatusList) : null);
|
||||||
|
|
||||||
return (characterStats, recipeData, buffs);
|
return (characterStats, recipeData, buffs);
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ public sealed class Plugin : IDalamudPlugin
|
|||||||
ListWindow.BringToFront();
|
ListWindow.BringToFront();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OpenCraftingLog()
|
public static void OpenCraftingLog()
|
||||||
{
|
{
|
||||||
Chat.SendMessage("/craftinglog");
|
Chat.SendMessage("/craftinglog");
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ public sealed class Plugin : IDalamudPlugin
|
|||||||
ClipboardWindow = new(macros);
|
ClipboardWindow = new(macros);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActiveNotification DisplaySolverWarning(string text) =>
|
public static IActiveNotification DisplaySolverWarning(string text) =>
|
||||||
DisplayNotification(new()
|
DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = text,
|
Content = text,
|
||||||
@@ -162,7 +162,7 @@ public sealed class Plugin : IDalamudPlugin
|
|||||||
Type = NotificationType.Warning
|
Type = NotificationType.Warning
|
||||||
});
|
});
|
||||||
|
|
||||||
public IActiveNotification DisplayNotification(Notification notification)
|
public static IActiveNotification DisplayNotification(Notification notification)
|
||||||
{
|
{
|
||||||
var ret = Service.NotificationManager.AddNotification(notification);
|
var ret = Service.NotificationManager.AddNotification(notification);
|
||||||
// ret.SetIconTexture(Icon.RentAsync().ContinueWith(t => (IDalamudTextureWrap?)t));
|
// ret.SetIconTexture(Icon.RentAsync().ContinueWith(t => (IDalamudTextureWrap?)t));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public static class FoodStatus
|
|||||||
if (item.ItemAction.ValueNullable is not { } itemAction)
|
if (item.ItemAction.ValueNullable is not { } itemAction)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (itemAction.Type is not (844 or 845 or 846))
|
if (itemAction.Action.RowId is not (844 or 845 or 846))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (LuminaSheets.ItemFoodSheet.GetRowOrDefault(itemAction.Data[1]) is not { } itemFood)
|
if (LuminaSheets.ItemFoodSheet.GetRowOrDefault(itemAction.Data[1]) is not { } itemFood)
|
||||||
@@ -70,8 +70,8 @@ public static class FoodStatus
|
|||||||
FoodItems = foods.ToFrozenDictionary();
|
FoodItems = foods.ToFrozenDictionary();
|
||||||
MedicineItems = medicines.ToFrozenDictionary();
|
MedicineItems = medicines.ToFrozenDictionary();
|
||||||
|
|
||||||
FoodOrder = FoodItems.OrderByDescending(a => a.Value.Item.LevelItem.RowId).Select(a => a.Key).ToImmutableArray();
|
FoodOrder = [.. FoodItems.OrderByDescending(a => a.Value.Item.LevelItem.RowId).Select(a => a.Key)];
|
||||||
MedicineOrder = MedicineItems.OrderByDescending(a => a.Value.Item.LevelItem.RowId).Select(a => a.Key).ToImmutableArray();
|
MedicineOrder = [.. MedicineItems.OrderByDescending(a => a.Value.Item.LevelItem.RowId).Select(a => a.Key)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Initialize() { }
|
public static void Initialize() { }
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public sealed unsafe class Hooks : IDisposable
|
|||||||
var ret = UseActionHook.Original(manager, actionType, actionId, targetId, extraParam, mode, comboRouteId, optOutAreaTargeted);
|
var ret = UseActionHook.Original(manager, actionType, actionId, targetId, extraParam, mode, comboRouteId, optOutAreaTargeted);
|
||||||
if (canCast && ret && actionType is CSActionType.CraftAction or CSActionType.Action)
|
if (canCast && ret && actionType is CSActionType.CraftAction or CSActionType.Action)
|
||||||
{
|
{
|
||||||
var classJob = ClassJobUtils.GetClassJobFromIdx((byte)(Service.ClientState.LocalPlayer?.ClassJob.RowId ?? 0));
|
var classJob = ClassJobUtils.GetClassJobFromIdx((byte)(Service.Objects.LocalPlayer?.ClassJob.RowId ?? 0));
|
||||||
if (classJob != null)
|
if (classJob != null)
|
||||||
{
|
{
|
||||||
var simActionType = ActionUtils.GetActionTypeFromId(actionId, classJob.Value, actionType == CSActionType.CraftAction);
|
var simActionType = ActionUtils.GetActionTypeFromId(actionId, classJob.Value, actionType == CSActionType.CraftAction);
|
||||||
@@ -75,7 +75,7 @@ public sealed unsafe class Hooks : IDisposable
|
|||||||
if (actionType is not (CSActionType.CraftAction or CSActionType.Action))
|
if (actionType is not (CSActionType.CraftAction or CSActionType.Action))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
var jobId = Service.ClientState.LocalPlayer?.ClassJob.RowId;
|
var jobId = Service.Objects.LocalPlayer?.ClassJob.RowId;
|
||||||
if (jobId == null)
|
if (jobId == null)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public sealed class Ipc
|
|||||||
if (prop.GetMethod is not { } getMethod)
|
if (prop.GetMethod is not { } getMethod)
|
||||||
throw new InvalidOperationException("Property must have a getter");
|
throw new InvalidOperationException("Property must have a getter");
|
||||||
|
|
||||||
if (getMethod.GetCustomAttribute<CompilerGeneratedAttribute>() is null)
|
if (!getMethod.IsDefined<CompilerGeneratedAttribute>())
|
||||||
throw new InvalidOperationException("Property must have an auto getter");
|
throw new InvalidOperationException("Property must have an auto getter");
|
||||||
|
|
||||||
var type = prop.PropertyType;
|
var type = prop.PropertyType;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public static class MacroCopy
|
|||||||
{
|
{
|
||||||
if (actions.Count == 0)
|
if (actions.Count == 0)
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = "Cannot copy an empty macro.",
|
Content = "Cannot copy an empty macro.",
|
||||||
MinimizedText = "Cannot copy empty macro",
|
MinimizedText = "Cannot copy empty macro",
|
||||||
@@ -152,7 +152,7 @@ public static class MacroCopy
|
|||||||
|
|
||||||
if (config.ShowCopiedMessage)
|
if (config.ShowCopiedMessage)
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = i > 1 ? "Copied macro to User Macros." : $"Copied {i} macros to User Macros.",
|
Content = i > 1 ? "Copied macro to User Macros." : $"Copied {i} macros to User Macros.",
|
||||||
MinimizedText = i > 1 ? "Copied macro" : $"Copied {i} macros",
|
MinimizedText = i > 1 ? "Copied macro" : $"Copied {i} macros",
|
||||||
@@ -164,7 +164,7 @@ public static class MacroCopy
|
|||||||
{
|
{
|
||||||
Service.Plugin.OpenMacroClipboard(macros);
|
Service.Plugin.OpenMacroClipboard(macros);
|
||||||
var rest = macros.Count - i;
|
var rest = macros.Count - i;
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = $"Couldn't copy {rest} macro{(rest == 1 ? "" : "s")}, so a window was opened with all of them.",
|
Content = $"Couldn't copy {rest} macro{(rest == 1 ? "" : "s")}, so a window was opened with all of them.",
|
||||||
Minimized = false,
|
Minimized = false,
|
||||||
@@ -201,7 +201,7 @@ public static class MacroCopy
|
|||||||
ImGui.SetClipboardText(string.Join(Environment.NewLine + Environment.NewLine, macros));
|
ImGui.SetClipboardText(string.Join(Environment.NewLine + Environment.NewLine, macros));
|
||||||
if (Service.Configuration.MacroCopy.ShowCopiedMessage)
|
if (Service.Configuration.MacroCopy.ShowCopiedMessage)
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = macros.Count == 1 ? "Copied macro to clipboard." : $"Copied {macros.Count} macros to clipboard.",
|
Content = macros.Count == 1 ? "Copied macro to clipboard." : $"Copied {macros.Count} macros to clipboard.",
|
||||||
MinimizedText = macros.Count == 1 ? "Copied macro" : $"Copied {macros.Count} macros",
|
MinimizedText = macros.Count == 1 ? "Copied macro" : $"Copied {macros.Count} macros",
|
||||||
@@ -215,7 +215,7 @@ public static class MacroCopy
|
|||||||
{
|
{
|
||||||
if (!Service.Ipc.MacroMateIsAvailable())
|
if (!Service.Ipc.MacroMateIsAvailable())
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = "Please check if it installed and enabled.",
|
Content = "Please check if it installed and enabled.",
|
||||||
MinimizedText = "Macro Mate is unavailable",
|
MinimizedText = "Macro Mate is unavailable",
|
||||||
@@ -232,7 +232,7 @@ public static class MacroCopy
|
|||||||
var (isValidParent, parentError) = Service.Ipc.MacroMateValidateGroupPath(parentPath);
|
var (isValidParent, parentError) = Service.Ipc.MacroMateValidateGroupPath(parentPath);
|
||||||
if (!isValidParent)
|
if (!isValidParent)
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = parentError!,
|
Content = parentError!,
|
||||||
MinimizedText = parentError,
|
MinimizedText = parentError,
|
||||||
@@ -246,7 +246,7 @@ public static class MacroCopy
|
|||||||
|
|
||||||
if (Service.Configuration.MacroCopy.ShowCopiedMessage)
|
if (Service.Configuration.MacroCopy.ShowCopiedMessage)
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = "Copied macro to Macro Mate.",
|
Content = "Copied macro to Macro Mate.",
|
||||||
MinimizedText = "Copied macro",
|
MinimizedText = "Copied macro",
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public sealed class MacroClipboard : Window, IDisposable
|
|||||||
ImGui.SetClipboardText(macro);
|
ImGui.SetClipboardText(macro);
|
||||||
if (Service.Configuration.MacroCopy.ShowCopiedMessage)
|
if (Service.Configuration.MacroCopy.ShowCopiedMessage)
|
||||||
{
|
{
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = Macros.Count == 1 ? "Copied macro to clipboard." : $"Copied macro {idx + 1} to clipboard.",
|
Content = Macros.Count == 1 ? "Copied macro to clipboard." : $"Copied macro {idx + 1} to clipboard.",
|
||||||
MinimizedText = Macros.Count == 1 ? "Copied macro" : $"Copied macro {idx + 1}",
|
MinimizedText = Macros.Count == 1 ? "Copied macro" : $"Copied macro {idx + 1}",
|
||||||
|
|||||||
@@ -1008,13 +1008,13 @@ public sealed class MacroEditor : Window, IDisposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
private const int MAX_LEVEL = 100;
|
private const int MAX_LEVEL = 100;
|
||||||
private float GetLevelEntryWidth()
|
private static float GetLevelEntryWidth()
|
||||||
{
|
{
|
||||||
var levelTextWidth = ImGui.CalcTextSize(SqText.ToLevelString(MAX_LEVEL)).X + ImGui.GetStyle().FramePadding.X * 2 + 5;
|
var levelTextWidth = ImGui.CalcTextSize(SqText.ToLevelString(MAX_LEVEL)).X + ImGui.GetStyle().FramePadding.X * 2 + 5;
|
||||||
return ImGui.CalcTextSize(SqText.LevelPrefix.ToIconString()).X + 5 + levelTextWidth;
|
return ImGui.CalcTextSize(SqText.LevelPrefix.ToIconString()).X + 5 + levelTextWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DrawLevelEntry(ref int level)
|
private static bool DrawLevelEntry(ref int level)
|
||||||
{
|
{
|
||||||
static int LevelInputCallback(ImGuiInputTextCallbackDataPtr data)
|
static int LevelInputCallback(ImGuiInputTextCallbackDataPtr data)
|
||||||
{
|
{
|
||||||
@@ -1570,7 +1570,7 @@ public sealed class MacroEditor : Window, IDisposable
|
|||||||
foreach (var action in parsedActions)
|
foreach (var action in parsedActions)
|
||||||
AddStep(action);
|
AddStep(action);
|
||||||
|
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = $"Imported macro with {parsedActions.Count} step{(parsedActions.Count != 1 ? "s" : "")}",
|
Content = $"Imported macro with {parsedActions.Count} step{(parsedActions.Count != 1 ? "s" : "")}",
|
||||||
MinimizedText = $"Imported {parsedActions.Count} step macro",
|
MinimizedText = $"Imported {parsedActions.Count} step macro",
|
||||||
@@ -1626,7 +1626,7 @@ public sealed class MacroEditor : Window, IDisposable
|
|||||||
Macro.Clear();
|
Macro.Clear();
|
||||||
foreach (var action in actions)
|
foreach (var action in actions)
|
||||||
AddStep(action);
|
AddStep(action);
|
||||||
Service.Plugin.DisplayNotification(new()
|
Plugin.Plugin.DisplayNotification(new()
|
||||||
{
|
{
|
||||||
Content = $"Imported macro \"{name}\"",
|
Content = $"Imported macro \"{name}\"",
|
||||||
Title = "Macro Imported",
|
Title = "Macro Imported",
|
||||||
@@ -1677,7 +1677,7 @@ public sealed class MacroEditor : Window, IDisposable
|
|||||||
|
|
||||||
var solver = new Solver.Solver(config, state) { Token = token };
|
var solver = new Solver.Solver(config, state) { Token = token };
|
||||||
solver.OnLog += Log.Debug;
|
solver.OnLog += Log.Debug;
|
||||||
solver.OnWarn += t => Service.Plugin.DisplaySolverWarning(t);
|
solver.OnWarn += t => Plugin.Plugin.DisplaySolverWarning(t);
|
||||||
solver.OnNewAction += a => Macro.Enqueue(a);
|
solver.OnNewAction += a => Macro.Enqueue(a);
|
||||||
solver.OnSuggestSolution += a => Macro.EnqueueEphemeral(a.Actions);
|
solver.OnSuggestSolution += a => Macro.EnqueueEphemeral(a.Actions);
|
||||||
SolverObject = solver;
|
SolverObject = solver;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public sealed class MacroList : Window, IDisposable
|
|||||||
public CharacterStats? CharacterStats { get; private set; }
|
public CharacterStats? CharacterStats { get; private set; }
|
||||||
public RecipeData? RecipeData { get; private set; }
|
public RecipeData? RecipeData { get; private set; }
|
||||||
|
|
||||||
private IReadOnlyList<Macro> Macros => Service.Configuration.Macros;
|
private static IReadOnlyList<Macro> Macros => Service.Configuration.Macros;
|
||||||
private Dictionary<Macro, SimulationState> MacroStateCache { get; } = [];
|
private Dictionary<Macro, SimulationState> MacroStateCache { get; } = [];
|
||||||
|
|
||||||
public MacroList() : base("Craftimizer Macro List", WindowFlags, false)
|
public MacroList() : base("Craftimizer Macro List", WindowFlags, false)
|
||||||
@@ -60,7 +60,7 @@ public sealed class MacroList : Window, IDisposable
|
|||||||
|
|
||||||
public override bool DrawConditions()
|
public override bool DrawConditions()
|
||||||
{
|
{
|
||||||
return Service.ClientState.LocalPlayer != null;
|
return Service.Objects.LocalPlayer != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PreDraw()
|
public override void PreDraw()
|
||||||
@@ -129,7 +129,7 @@ public sealed class MacroList : Window, IDisposable
|
|||||||
ImGuiUtils.TextCentered(text2);
|
ImGuiUtils.TextCentered(text2);
|
||||||
ImGuiUtils.AlignCentered(buttonRowWidth);
|
ImGuiUtils.AlignCentered(buttonRowWidth);
|
||||||
if (ImGui.Button(text3))
|
if (ImGui.Button(text3))
|
||||||
Service.Plugin.OpenCraftingLog();
|
Plugin.Plugin.OpenCraftingLog();
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if (ImGui.Button(text4))
|
if (ImGui.Button(text4))
|
||||||
OpenEditor(null);
|
OpenEditor(null);
|
||||||
@@ -356,7 +356,7 @@ public sealed class MacroList : Window, IDisposable
|
|||||||
sortedMacros = [.. query];
|
sortedMacros = [.. query];
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenEditor(Macro? macro)
|
private static void OpenEditor(Macro? macro)
|
||||||
{
|
{
|
||||||
var stats = Service.Plugin.GetDefaultStats();
|
var stats = Service.Plugin.GetDefaultStats();
|
||||||
Service.Plugin.OpenMacroEditor(stats.Character, stats.Recipe, stats.Buffs, null, macro?.Actions ?? Enumerable.Empty<ActionType>(), macro != null ? (actions => { macro.ActionEnumerable = actions; Service.Configuration.Save(); }) : null);
|
Service.Plugin.OpenMacroEditor(stats.Character, stats.Recipe, stats.Buffs, null, macro?.Actions ?? Enumerable.Empty<ActionType>(), macro != null ? (actions => { macro.ActionEnumerable = actions; Service.Configuration.Save(); }) : null);
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
private bool StatsChanged { get; set; }
|
private bool StatsChanged { get; set; }
|
||||||
private bool CalculateShouldOpen()
|
private bool CalculateShouldOpen()
|
||||||
{
|
{
|
||||||
if (Service.ClientState.LocalPlayer == null)
|
if (Service.Objects.LocalPlayer == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ShouldUseRecipeNote()
|
bool ShouldUseRecipeNote()
|
||||||
@@ -476,7 +476,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
Service.Plugin.OpenMacroListWindow();
|
Service.Plugin.OpenMacroListWindow();
|
||||||
|
|
||||||
if (ImGui.Button("Open in Macro Editor", new(availWidth, 0)))
|
if (ImGui.Button("Open in Macro Editor", new(availWidth, 0)))
|
||||||
Service.Plugin.OpenMacroEditor(CharacterStats!, RecipeData!, new(Service.ClientState.LocalPlayer!.StatusList), CalculateIngredientHqCounts(), [], null);
|
Service.Plugin.OpenMacroEditor(CharacterStats!, RecipeData!, new(Service.Objects.LocalPlayer!.StatusList), CalculateIngredientHqCounts(), [], null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawCharacterStats()
|
private void DrawCharacterStats()
|
||||||
@@ -1031,7 +1031,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
{
|
{
|
||||||
if (ImGuiUtils.IconButtonSquare(FontAwesomeIcon.Edit, miniRowHeight))
|
if (ImGuiUtils.IconButtonSquare(FontAwesomeIcon.Edit, miniRowHeight))
|
||||||
Service.Plugin.OpenMacroEditor(CharacterStats!, RecipeData!, new(Service.ClientState.LocalPlayer!.StatusList), CalculateIngredientHqCounts(), actions, state.MacroEditorSetter);
|
Service.Plugin.OpenMacroEditor(CharacterStats!, RecipeData!, new(Service.Objects.LocalPlayer!.StatusList), CalculateIngredientHqCounts(), actions, state.MacroEditorSetter);
|
||||||
if (ImGui.IsItemHovered())
|
if (ImGui.IsItemHovered())
|
||||||
ImGuiUtils.Tooltip("Open in Macro Editor");
|
ImGuiUtils.Tooltip("Open in Macro Editor");
|
||||||
if (ImGuiUtils.IconButtonSquare(FontAwesomeIcon.Paste, miniRowHeight))
|
if (ImGuiUtils.IconButtonSquare(FontAwesomeIcon.Paste, miniRowHeight))
|
||||||
@@ -1125,7 +1125,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
var statusRequired = RecipeData.Recipe.StatusRequired;
|
var statusRequired = RecipeData.Recipe.StatusRequired;
|
||||||
if (statusRequired.RowId != 0 && statusRequired.IsValid)
|
if (statusRequired.RowId != 0 && statusRequired.IsValid)
|
||||||
{
|
{
|
||||||
if (!Service.ClientState.LocalPlayer!.StatusList.Any(s => s.StatusId == statusRequired.RowId))
|
if (!Service.Objects.LocalPlayer!.StatusList.Any(s => s.StatusId == statusRequired.RowId))
|
||||||
return CraftableStatus.RequiredStatus;
|
return CraftableStatus.RequiredStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1234,7 +1234,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
|
|
||||||
var solver = new Solver.Solver(config, state) { Token = token };
|
var solver = new Solver.Solver(config, state) { Token = token };
|
||||||
solver.OnLog += Log.Debug;
|
solver.OnLog += Log.Debug;
|
||||||
solver.OnWarn += t => Service.Plugin.DisplaySolverWarning(t);
|
solver.OnWarn += t => Plugin.Plugin.DisplaySolverWarning(t);
|
||||||
BestMacroSolver = solver;
|
BestMacroSolver = solver;
|
||||||
solver.Start();
|
solver.Start();
|
||||||
var solution = solver.GetTask().GetAwaiter().GetResult();
|
var solution = solver.GetTask().GetAwaiter().GetResult();
|
||||||
|
|||||||
@@ -653,7 +653,7 @@ public sealed class Settings : Window, IDisposable
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
DrawOption(
|
DrawOption(
|
||||||
"Quick Solve",
|
"Backload Progress",
|
||||||
"Speeds up solve times. Backloads all Progress " +
|
"Speeds up solve times. Backloads all Progress " +
|
||||||
"actions to the end of the rotation.",
|
"actions to the end of the rotation.",
|
||||||
config.BackloadProgress,
|
config.BackloadProgress,
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
|||||||
private bool wasInCraftAction;
|
private bool wasInCraftAction;
|
||||||
private bool CalculateShouldOpen()
|
private bool CalculateShouldOpen()
|
||||||
{
|
{
|
||||||
if (Service.ClientState.LocalPlayer == null)
|
if (Service.Objects.LocalPlayer == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!Service.Configuration.EnableSynthHelper)
|
if (!Service.Configuration.EnableSynthHelper)
|
||||||
@@ -486,7 +486,7 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.Button("Open in Macro Editor", new(-1, 0)))
|
if (ImGui.Button("Open in Macro Editor", new(-1, 0)))
|
||||||
Service.Plugin.OpenMacroEditor(CharacterStats!, RecipeData!, new(Service.ClientState.LocalPlayer!.StatusList), null, [], null);
|
Service.Plugin.OpenMacroEditor(CharacterStats!, RecipeData!, new(Service.Objects.LocalPlayer!.StatusList), null, [], null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExecuteNextAction()
|
public bool ExecuteNextAction()
|
||||||
@@ -559,7 +559,7 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
|||||||
|
|
||||||
private SimulationState GetCurrentState()
|
private SimulationState GetCurrentState()
|
||||||
{
|
{
|
||||||
var player = Service.ClientState.LocalPlayer!;
|
var player = Service.Objects.LocalPlayer!;
|
||||||
var values = new SynthesisValues(Addon);
|
var values = new SynthesisValues(Addon);
|
||||||
var statusManager = ((Character*)player.Address)->GetStatusManager();
|
var statusManager = ((Character*)player.Address)->GetStatusManager();
|
||||||
|
|
||||||
@@ -649,7 +649,7 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
|||||||
|
|
||||||
var solver = new Solver.Solver(config, state) { Token = token };
|
var solver = new Solver.Solver(config, state) { Token = token };
|
||||||
solver.OnLog += Log.Debug;
|
solver.OnLog += Log.Debug;
|
||||||
solver.OnWarn += t => Service.Plugin.DisplaySolverWarning(t);
|
solver.OnWarn += t => Plugin.Plugin.DisplaySolverWarning(t);
|
||||||
solver.OnNewAction += EnqueueAction;
|
solver.OnNewAction += EnqueueAction;
|
||||||
SolverObject = solver;
|
SolverObject = solver;
|
||||||
solver.Start();
|
solver.Start();
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"net9.0-windows7.0": {
|
"net10.0-windows7.0": {
|
||||||
"DalamudPackager": {
|
"DalamudPackager": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[13.0.0, )",
|
"requested": "[14.0.1, )",
|
||||||
"resolved": "13.0.0",
|
"resolved": "14.0.1",
|
||||||
"contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w=="
|
"contentHash": "y0WWyUE6dhpGdolK3iKgwys05/nZaVf4ZPtIjpLhJBZvHxkkiE23zYRo7K7uqAgoK/QvK5cqF6l3VG5AbgC6KA=="
|
||||||
},
|
},
|
||||||
"DotNet.ReproducibleBuilds": {
|
"DotNet.ReproducibleBuilds": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[1.2.25, )",
|
"requested": "[1.2.39, )",
|
||||||
"resolved": "1.2.25",
|
"resolved": "1.2.39",
|
||||||
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
|
"contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg=="
|
||||||
},
|
},
|
||||||
"MathNet.Numerics": {
|
"MathNet.Numerics": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
@@ -22,22 +22,22 @@
|
|||||||
},
|
},
|
||||||
"Meziantou.Analyzer": {
|
"Meziantou.Analyzer": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.0.199, )",
|
"requested": "[2.0.264, )",
|
||||||
"resolved": "2.0.199",
|
"resolved": "2.0.264",
|
||||||
"contentHash": "y8oRrTLDBw1b10pWci/PnFoahdIMflNSlVheL9kzUylAASnoJPFyvuyaNXcrbOTNOEk1aMLFRr1mSX/xvYR15g=="
|
"contentHash": "zRG13RDG446rZNdd/YjKRd4utpbjleRDUqNQSrX0etMnH8Rz9NBlXUpS5aR2ExoOokhNfkdOW8HpLzjLj5x0hQ=="
|
||||||
},
|
},
|
||||||
"DotNext": {
|
"DotNext": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "5.21.0",
|
"resolved": "5.26.1",
|
||||||
"contentHash": "fU63OJVSDSsOl6adjNM8e5zmyhdZkX2ztvmSeW6lBjFdvFG8ZwMOrJ+L8Ih/2yKr0cuaV8PNwnhDrlS4MFf14A==",
|
"contentHash": "rcy6Yrpb64B7qYm/+D+4sfBUzwX/IOGeJBYReDL8/TAIp8aZrZPtXx8nwkYjWCuakYn2tBppwefIM6pd/cOnMw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.IO.Hashing": "8.0.0"
|
"System.IO.Hashing": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Raphael.Net": {
|
"Raphael.Net": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "3.0.0",
|
"resolved": "4.0.1",
|
||||||
"contentHash": "9yY+jR2gddw52HtShBL/JikQ4gZa8lxFYSUIi2y510HLsaK86iqtuRgrv8/akrHR66QRWEPtmHXyehW1hrmP9Q=="
|
"contentHash": "LxzJhMnrjVF/jGkyJLWmMerkTDGW8zZ00ipXYg2BqfmGxgBjnjhZm4XsNLb6hLgkvV2rfWcuAtwF2rCdxkRPWw=="
|
||||||
},
|
},
|
||||||
"System.IO.Hashing": {
|
"System.IO.Hashing": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -51,16 +51,16 @@
|
|||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Craftimizer.Simulator": "[1.0.0, )",
|
"Craftimizer.Simulator": "[1.0.0, )",
|
||||||
"DotNext": "[5.21.0, )",
|
"DotNext": "[5.26.1, )",
|
||||||
"Raphael.Net": "[3.0.0, )"
|
"Raphael.Net": "[4.0.1, )"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"net9.0-windows7.0/win-x64": {
|
"net10.0-windows7.0/win-x64": {
|
||||||
"Raphael.Net": {
|
"Raphael.Net": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "3.0.0",
|
"resolved": "4.0.1",
|
||||||
"contentHash": "9yY+jR2gddw52HtShBL/JikQ4gZa8lxFYSUIi2y510HLsaK86iqtuRgrv8/akrHR66QRWEPtmHXyehW1hrmP9Q=="
|
"contentHash": "LxzJhMnrjVF/jGkyJLWmMerkTDGW8zZ00ipXYg2BqfmGxgBjnjhZm4XsNLb6hLgkvV2rfWcuAtwF2rCdxkRPWw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Platforms>x64</Platforms>
|
<Platforms>x64</Platforms>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.199">
|
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
@@ -10,12 +10,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DotNext" Version="5.21.0" />
|
<PackageReference Include="DotNext" Version="5.26.1" />
|
||||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.199">
|
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Raphael.Net" Version="3.0.0" />
|
<PackageReference Include="Raphael.Net" Version="4.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
|||||||
Reference in New Issue
Block a user