Compare commits
No commits in common. "master" and "v6.0" have entirely different histories.
@ -29,7 +29,7 @@ internal sealed class Configuration : IPluginConfiguration
|
|||||||
public bool UncapFrameRate { get; set; }
|
public bool UncapFrameRate { get; set; }
|
||||||
public VirtualKey QuickTurnInKey { get; set; } = VirtualKey.SHIFT;
|
public VirtualKey QuickTurnInKey { get; set; } = VirtualKey.SHIFT;
|
||||||
|
|
||||||
public MinimizableWindowConfig TurnInWindowConfig { get; } = new();
|
public WindowConfig TurnInWindowConfig { get; } = new();
|
||||||
public WindowConfig ConfigWindowConfig { get; } = new();
|
public WindowConfig ConfigWindowConfig { get; } = new();
|
||||||
|
|
||||||
internal sealed class PurchaseOption
|
internal sealed class PurchaseOption
|
||||||
@ -84,9 +84,4 @@ internal sealed class Configuration : IPluginConfiguration
|
|||||||
Warning,
|
Warning,
|
||||||
DisableTurnIn,
|
DisableTurnIn,
|
||||||
}
|
}
|
||||||
|
|
||||||
internal sealed class MinimizableWindowConfig : WindowConfig
|
|
||||||
{
|
|
||||||
public bool IsMinimized { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project>
|
<Project>
|
||||||
<Target Name="PackagePluginDebug" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
|
<Target Name="PackagePlugin" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
|
||||||
<DalamudPackager
|
<DalamudPackager
|
||||||
ProjectDir="$(ProjectDir)"
|
ProjectDir="$(ProjectDir)"
|
||||||
OutputPath="$(OutputPath)"
|
OutputPath="$(OutputPath)"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
|
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>6.3</Version>
|
<Version>6.0</Version>
|
||||||
<OutputPath>dist</OutputPath>
|
<OutputPath>dist</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ internal sealed class GameStrings
|
|||||||
ExchangeItems = dataManager.GetRegex<Addon>(3290, addon => addon.Text, pluginLog)
|
ExchangeItems = dataManager.GetRegex<Addon>(3290, addon => addon.Text, pluginLog)
|
||||||
?? throw new ConstraintException($"Unable to resolve {nameof(ExchangeItems)}");
|
?? throw new ConstraintException($"Unable to resolve {nameof(ExchangeItems)}");
|
||||||
TradeHighQualityItem =
|
TradeHighQualityItem =
|
||||||
dataManager.GetString<Addon>(102434, addon => addon.Text, pluginLog)
|
dataManager.GetString<Addon>(102434, addon => addon.Text, pluginLog)?.ReplaceLineEndings("")
|
||||||
?? throw new ConstraintException($"Unable to resolve {nameof(TradeHighQualityItem)}");
|
?? throw new ConstraintException($"Unable to resolve {nameof(TradeHighQualityItem)}");
|
||||||
|
|
||||||
var rankUpFc = dataManager.GetExcelSheet<LogMessage>().GetRow(3123);
|
var rankUpFc = dataManager.GetExcelSheet<LogMessage>().GetRow(3123);
|
||||||
@ -42,16 +42,14 @@ internal sealed class GameStrings
|
|||||||
|
|
||||||
[Sheet("custom/000/ComDefGrandCompanyOfficer_00073")]
|
[Sheet("custom/000/ComDefGrandCompanyOfficer_00073")]
|
||||||
[SuppressMessage("Performance", "CA1812")]
|
[SuppressMessage("Performance", "CA1812")]
|
||||||
private readonly struct ComDefGrandCompanyOfficer(ExcelPage page, uint offset, uint row)
|
private readonly struct ComDefGrandCompanyOfficer(ExcelPage page, uint offset, uint row) : IQuestDialogueText, IExcelRow<ComDefGrandCompanyOfficer>
|
||||||
: IQuestDialogueText, IExcelRow<ComDefGrandCompanyOfficer>
|
|
||||||
{
|
{
|
||||||
public uint RowId => row;
|
public uint RowId => row;
|
||||||
|
|
||||||
public ReadOnlySeString Key => page.ReadString(offset, offset);
|
public ReadOnlySeString Key => page.ReadString(offset, offset);
|
||||||
public ReadOnlySeString Value => page.ReadString(offset + 4, offset);
|
public ReadOnlySeString Value => page.ReadString(offset + 4, offset);
|
||||||
|
|
||||||
static ComDefGrandCompanyOfficer IExcelRow<ComDefGrandCompanyOfficer>.Create(ExcelPage page, uint offset,
|
static ComDefGrandCompanyOfficer IExcelRow<ComDefGrandCompanyOfficer>.Create(ExcelPage page, uint offset, uint row) =>
|
||||||
uint row) =>
|
|
||||||
new(page, offset, row);
|
new(page, offset, row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ using Dalamud.Interface.Colors;
|
|||||||
using Dalamud.Interface.Components;
|
using Dalamud.Interface.Components;
|
||||||
using Dalamud.Interface.Textures.TextureWraps;
|
using Dalamud.Interface.Textures.TextureWraps;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using Dalamud.Interface.Utility.Raii;
|
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using Deliveroo.GameData;
|
using Deliveroo.GameData;
|
||||||
@ -22,7 +21,7 @@ using LLib.ImGui;
|
|||||||
|
|
||||||
namespace Deliveroo.Windows;
|
namespace Deliveroo.Windows;
|
||||||
|
|
||||||
internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configuration.MinimizableWindowConfig>
|
internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig
|
||||||
{
|
{
|
||||||
private static readonly IReadOnlyList<InventoryType> InventoryTypes = new[]
|
private static readonly IReadOnlyList<InventoryType> InventoryTypes = new[]
|
||||||
{
|
{
|
||||||
@ -56,7 +55,6 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
private readonly IconCache _iconCache;
|
private readonly IconCache _iconCache;
|
||||||
private readonly IKeyState _keyState;
|
private readonly IKeyState _keyState;
|
||||||
private readonly GameFunctions _gameFunctions;
|
private readonly GameFunctions _gameFunctions;
|
||||||
private readonly TitleBarButton _minimizeButton;
|
|
||||||
|
|
||||||
private bool _state;
|
private bool _state;
|
||||||
private Guid? _draggedItem;
|
private Guid? _draggedItem;
|
||||||
@ -90,20 +88,6 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
ShowCloseButton = false;
|
ShowCloseButton = false;
|
||||||
AllowClickthrough = false;
|
AllowClickthrough = false;
|
||||||
|
|
||||||
_minimizeButton = new TitleBarButton
|
|
||||||
{
|
|
||||||
Icon = FontAwesomeIcon.Minus,
|
|
||||||
Priority = int.MinValue,
|
|
||||||
IconOffset = new Vector2(1.5f, 1),
|
|
||||||
Click = _ =>
|
|
||||||
{
|
|
||||||
IsMinimized = !IsMinimized;
|
|
||||||
_minimizeButton!.Icon = IsMinimized ? FontAwesomeIcon.WindowMaximize : FontAwesomeIcon.Minus;
|
|
||||||
},
|
|
||||||
AvailableClickthrough = true,
|
|
||||||
};
|
|
||||||
TitleBarButtons.Insert(0, _minimizeButton);
|
|
||||||
|
|
||||||
TitleBarButtons.Add(new TitleBarButton
|
TitleBarButtons.Add(new TitleBarButton
|
||||||
{
|
{
|
||||||
Icon = FontAwesomeIcon.Cog,
|
Icon = FontAwesomeIcon.Cog,
|
||||||
@ -119,17 +103,7 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Configuration.MinimizableWindowConfig WindowConfig => _configuration.TurnInWindowConfig;
|
public WindowConfig WindowConfig => _configuration.TurnInWindowConfig;
|
||||||
|
|
||||||
private bool IsMinimized
|
|
||||||
{
|
|
||||||
get => WindowConfig.IsMinimized;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
WindowConfig.IsMinimized = value;
|
|
||||||
SaveWindowConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool State
|
public bool State
|
||||||
{
|
{
|
||||||
@ -244,17 +218,14 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
}
|
}
|
||||||
|
|
||||||
float indentSize = ImGui.GetFrameHeight() + ImGui.GetStyle().ItemInnerSpacing.X;
|
float indentSize = ImGui.GetFrameHeight() + ImGui.GetStyle().ItemInnerSpacing.X;
|
||||||
|
ImGui.Indent(indentSize);
|
||||||
if (!string.IsNullOrEmpty(Error))
|
if (!string.IsNullOrEmpty(Error))
|
||||||
{
|
{
|
||||||
using (ImRaii.PushIndent(indentSize))
|
|
||||||
ImGui.TextColored(ImGuiColors.DalamudRed, Error);
|
ImGui.TextColored(ImGuiColors.DalamudRed, Error);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (ImRaii.PushIndent(indentSize))
|
if (_configuration.BehaviorOnOtherWorld == Configuration.EBehaviorOnOtherWorld.Warning && !IsOnHomeWorld)
|
||||||
{
|
|
||||||
if (_configuration.BehaviorOnOtherWorld == Configuration.EBehaviorOnOtherWorld.Warning &&
|
|
||||||
!IsOnHomeWorld)
|
|
||||||
{
|
{
|
||||||
ImGui.TextColored(ImGuiColors.DalamudRed,
|
ImGui.TextColored(ImGuiColors.DalamudRed,
|
||||||
"You are not on your home world and will not earn FC points.");
|
"You are not on your home world and will not earn FC points.");
|
||||||
@ -278,8 +249,7 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
ImGui.BeginDisabled(_condition[ConditionFlag.OccupiedInQuestEvent] ||
|
ImGui.BeginDisabled(_condition[ConditionFlag.OccupiedInQuestEvent] ||
|
||||||
_condition[ConditionFlag.Casting] ||
|
_condition[ConditionFlag.Casting] ||
|
||||||
agentInventoryContext == null);
|
agentInventoryContext == null);
|
||||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Bolt,
|
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Bolt, "Use Priority Seal Allowance (15%)"))
|
||||||
"Use Priority Seal Allowance (15%)"))
|
|
||||||
{
|
{
|
||||||
agentInventoryContext->UseItem(ItemIds.PrioritySealAllowance);
|
agentInventoryContext->UseItem(ItemIds.PrioritySealAllowance);
|
||||||
}
|
}
|
||||||
@ -287,16 +257,17 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
ImGui.EndDisabled();
|
ImGui.EndDisabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!IsMinimized)
|
ImGui.Unindent(indentSize);
|
||||||
{
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
using (ImRaii.Disabled(state))
|
ImGui.BeginDisabled(state);
|
||||||
|
|
||||||
DrawItemsToBuy(grandCompany);
|
DrawItemsToBuy(grandCompany);
|
||||||
}
|
|
||||||
|
ImGui.EndDisabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.Separator();
|
||||||
if (_configuration.QuickTurnInKey != VirtualKey.NO_KEY)
|
if (_configuration.QuickTurnInKey != VirtualKey.NO_KEY)
|
||||||
{
|
{
|
||||||
var key = _configuration.QuickTurnInKey switch
|
var key = _configuration.QuickTurnInKey switch
|
||||||
@ -307,23 +278,15 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig<Configura
|
|||||||
_ => _configuration.QuickTurnInKey.ToString()
|
_ => _configuration.QuickTurnInKey.ToString()
|
||||||
};
|
};
|
||||||
if (!State && _keyState[_configuration.QuickTurnInKey])
|
if (!State && _keyState[_configuration.QuickTurnInKey])
|
||||||
{
|
|
||||||
ImGui.Separator();
|
|
||||||
ImGui.TextColored(ImGuiColors.HealerGreen, "Click an item to turn it in without confirmation");
|
ImGui.TextColored(ImGuiColors.HealerGreen, "Click an item to turn it in without confirmation");
|
||||||
}
|
else
|
||||||
else if (!IsMinimized)
|
|
||||||
{
|
|
||||||
ImGui.Separator();
|
|
||||||
ImGui.Text($"Hold '{key}' when clicking an item to turn it in without confirmation.");
|
ImGui.Text($"Hold '{key}' when clicking an item to turn it in without confirmation.");
|
||||||
}
|
|
||||||
|
ImGui.Separator();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsMinimized)
|
|
||||||
{
|
|
||||||
ImGui.Separator();
|
|
||||||
ImGui.Text($"Debug (State): {_plugin.CurrentStage}");
|
ImGui.Text($"Debug (State): {_plugin.CurrentStage}");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private unsafe void DrawNextRankPrequesites()
|
private unsafe void DrawNextRankPrequesites()
|
||||||
{
|
{
|
||||||
|
2
LLib
2
LLib
@ -1 +1 @@
|
|||||||
Subproject commit b581e2ea2a61f44ed3f0cb4f6ea8cc1595525544
|
Subproject commit 538329a1e80acbcd09e28bd6dd459c35b5563c0a
|
Loading…
Reference in New Issue
Block a user