Code formatting fixes
This commit is contained in:
@@ -98,7 +98,7 @@ internal static class Program
|
||||
}
|
||||
|
||||
s.Stop();
|
||||
Console.WriteLine($"{s.Elapsed.TotalMilliseconds/60:0.00}ms/cycle");
|
||||
Console.WriteLine($"{s.Elapsed.TotalMilliseconds / 60:0.00}ms/cycle");
|
||||
Console.WriteLine(string.Join(',', q));
|
||||
q.Sort();
|
||||
Console.WriteLine($"Min: {Quartile(q, 0)}, Max: {Quartile(q, 4)}, Avg: {Quartile(q, 2)}, Q1: {Quartile(q, 1)}, Q3: {Quartile(q, 3)}");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Lumina.Excel;
|
||||
using Dalamud;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
|
||||
namespace Craftimizer.Plugin;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Interface.Windowing;
|
||||
|
||||
namespace Craftimizer.Plugin;
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using ImGuiScene;
|
||||
using Dalamud.Utility;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using System.Linq;
|
||||
using Craftimizer.Simulator;
|
||||
using Craftimizer.Simulator.Actions;
|
||||
using Action = Lumina.Excel.GeneratedSheets.Action;
|
||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
using Dalamud.Utility;
|
||||
using ImGuiScene;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using Action = Lumina.Excel.GeneratedSheets.Action;
|
||||
using ClassJob = Craftimizer.Simulator.ClassJob;
|
||||
using Condition = Craftimizer.Simulator.Condition;
|
||||
using Craftimizer.Simulator;
|
||||
using System.Text;
|
||||
using System.Numerics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Craftimizer.Plugin;
|
||||
|
||||
@@ -29,7 +29,7 @@ internal static class ActionUtils
|
||||
var actionId = actionType.Base().ActionId;
|
||||
if (LuminaSheets.CraftActionSheet.GetRow(actionId) is CraftAction baseCraftAction)
|
||||
{
|
||||
foreach(var classJob in classJobs)
|
||||
foreach (var classJob in classJobs)
|
||||
{
|
||||
ActionRows[(int)actionType, (int)classJob] = (classJob switch
|
||||
{
|
||||
@@ -94,7 +94,7 @@ internal static class ActionUtils
|
||||
|
||||
public static ActionType? GetActionTypeFromId(uint actionId, ClassJob classJob, bool isCraftAction)
|
||||
{
|
||||
foreach(var action in Enum.GetValues<ActionType>())
|
||||
foreach (var action in Enum.GetValues<ActionType>())
|
||||
{
|
||||
var row = action.GetActionRow(classJob);
|
||||
if (isCraftAction)
|
||||
@@ -197,7 +197,7 @@ internal static class ConditionUtils
|
||||
_ => Vector3.Zero // Unknown
|
||||
};
|
||||
|
||||
private const float ConditionCyclePeriod = 19/30f;
|
||||
private const float ConditionCyclePeriod = 19 / 30f;
|
||||
// The real period of all condition color cycles are 0.633... (19/30) seconds
|
||||
// Interp accepts 0-1
|
||||
public static Vector4 GetColor(this Condition me, float interp)
|
||||
@@ -210,7 +210,7 @@ internal static class ConditionUtils
|
||||
{
|
||||
addRgb = interp switch
|
||||
{
|
||||
< 0.155f => Vector3.Lerp(new(128,0,0), new(128,80,0), (interp - 0) / 0.155f),
|
||||
< 0.155f => Vector3.Lerp(new(128, 0, 0), new(128, 80, 0), (interp - 0) / 0.155f),
|
||||
< 0.315f => Vector3.Lerp(new(128, 80, 0), new(128, 128, 0), (interp - 0.155f) / 0.16f),
|
||||
< 0.475f => Vector3.Lerp(new(128, 128, 0), new(0, 64, 0), (interp - 0.315f) / 0.16f),
|
||||
< 0.630f => Vector3.Lerp(new(0, 64, 0), new(0, 128, 128), (interp - 0.475f) / 0.155f),
|
||||
@@ -293,7 +293,7 @@ internal static class EffectUtils
|
||||
public static ushort GetIconId(this EffectType me, int strength)
|
||||
{
|
||||
var status = me.Status();
|
||||
uint iconId = status.Icon;
|
||||
var iconId = status.Icon;
|
||||
if (status.MaxStacks != 0)
|
||||
iconId += (uint)Math.Clamp(strength, 1, status.MaxStacks) - 1;
|
||||
return (ushort)iconId;
|
||||
|
||||
@@ -65,7 +65,7 @@ internal static unsafe class Gearsets
|
||||
foreach (var statIncrease in item.UnkData73)
|
||||
IncreaseStat(statIncrease.BaseParamSpecial, statIncrease.BaseParamValueSpecial);
|
||||
|
||||
foreach(var gearsetMateria in gearsetItem.materia)
|
||||
foreach (var gearsetMateria in gearsetItem.materia)
|
||||
{
|
||||
if (gearsetMateria.Type == 0)
|
||||
continue;
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
using Craftimizer.Simulator.Actions;
|
||||
using Craftimizer.Plugin;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using System;
|
||||
using ActionType = Craftimizer.Simulator.Actions.ActionType;
|
||||
using CSActionType = FFXIVClientStructs.FFXIV.Client.Game.ActionType;
|
||||
using Condition = Craftimizer.Simulator.Condition;
|
||||
using Craftimizer.Plugin;
|
||||
using ActionUtils = Craftimizer.Plugin.ActionUtils;
|
||||
using CSActionType = FFXIVClientStructs.FFXIV.Client.Game.ActionType;
|
||||
|
||||
namespace Craftimizer.Utils;
|
||||
|
||||
@@ -35,7 +31,8 @@ public sealed unsafe class Hooks : IDisposable
|
||||
if (canCast && ret && (actionType == CSActionType.CraftAction || actionType == CSActionType.Spell))
|
||||
{
|
||||
var classJob = ClassJobUtils.GetClassJobFromIdx((byte)(Service.ClientState.LocalPlayer?.ClassJob.Id ?? 0));
|
||||
if (classJob != null) {
|
||||
if (classJob != null)
|
||||
{
|
||||
var simActionType = ActionUtils.GetActionTypeFromId(actionId, classJob.Value, actionType == CSActionType.CraftAction);
|
||||
if (simActionType != null)
|
||||
OnActionUsed?.Invoke(simActionType.Value);
|
||||
|
||||
@@ -283,7 +283,8 @@ public unsafe class CraftingLog : Window
|
||||
ImGui.TableNextRow();
|
||||
|
||||
SimulationState? state = null;
|
||||
if (CharacterCannotCraftReason == CannotCraftReason.OK) {
|
||||
if (CharacterCannotCraftReason == CannotCraftReason.OK)
|
||||
{
|
||||
state = new(CharacterSimulationInput);
|
||||
foreach (var action in macro.Actions)
|
||||
(_, state) = simulation.Execute(state.Value, action);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Interface;
|
||||
using ImGuiNET;
|
||||
using System.Numerics;
|
||||
using System;
|
||||
using Craftimizer.Solver.Crafty;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using ImGuiNET;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Craftimizer.Plugin.Windows;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
using Craftimizer.Simulator.Actions;
|
||||
using Craftimizer.Simulator;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using ImGuiNET;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Utility;
|
||||
using System;
|
||||
using ImGuiScene;
|
||||
using Dalamud.Interface.Components;
|
||||
using System.Linq;
|
||||
using Craftimizer.Simulator.Actions;
|
||||
using Dalamud.Game.Text;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Utility;
|
||||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Craftimizer.Plugin.Windows;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user