Skip to content

Commit c3272ca

Browse files
committed
API13
1 parent 26a322f commit c3272ca

File tree

11 files changed

+20
-56
lines changed

11 files changed

+20
-56
lines changed

TinyCmds/Chat/ChatUtil.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace VariableVixen.TinyCmds.Chat;
1010
public static class ChatUtil {
1111

1212
internal static List<Payload> GenerateMessagePayloads(params object[] payloads) {
13-
return new List<Payload>(payloads
13+
return payloads
1414
.Where(e => e is not null)
1515
.SelectMany(e => {
1616
return e switch {
@@ -28,7 +28,7 @@ internal static List<Payload> GenerateMessagePayloads(params object[] payloads)
2828
],
2929
};
3030
})
31-
);
31+
.ToList();
3232
}
3333

3434
#region Chatlog functions

TinyCmds/Commands/ClearMapFlag.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class ClearMapFlag: PluginCommand {
1515
protected override unsafe void Execute(string? command, string rawArguments, FlagMap flags, bool verbose, bool dryRun, ref bool showHelp) {
1616
AgentMap* map = AgentMap.Instance();
1717
Assert(map is not null, "failed to load AgentMap");
18-
map->IsFlagMarkerSet = false;
18+
map->FlagMarkerCount = 0;
1919
}
2020
}

TinyCmds/Commands/Conditional/ConditionalMount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected override unsafe bool TryExecute(string? command, string rawArguments,
3232
string arg = rawArguments ?? string.Empty;
3333
PC* player = (PC*)Plugin.Client.LocalPlayer!.Address; // LocalPlayer is guaranteed to be non-null by BaseConditionalCommand
3434
Assert(player is not null, "failed to acquire CS LocalPlayer");
35-
MountContainer? mount = Plugin.Conditions[ConditionFlag.Mounted] || Plugin.Conditions[ConditionFlag.Mounted2] ? player->Mount : null;
35+
MountContainer? mount = Plugin.Conditions[ConditionFlag.Mounted] || Plugin.Conditions[ConditionFlag.RidingPillion] ? player->Mount : null;
3636
ushort mountId = mount?.MountId ?? 0;
3737

3838
if (flags['g']) {

TinyCmds/Commands/EvaluatePlaceholders.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private static unsafe string readObjName(GameObject* obj)
5656
private static unsafe string replace(string p) {
5757
string[] parts = p.ToLower().Split('.', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
5858
string flag = parts[0];
59-
HashSet<string> mods = new(parts.Skip(1));
59+
HashSet<string> mods = parts.Skip(1).ToHashSet();
6060
string value = flag.Trim().ToLower() switch {
6161
// Custom placeholders - time
6262
"year"

TinyCmds/Commands/LocateBestFATECommand.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
1111

12-
using Lumina.Excel;
1312
using Lumina.Excel.Sheets;
1413

1514
using VariableVixen.TinyCmds.Attributes;
@@ -46,7 +45,7 @@ public class LocateBestFATECommand: PluginCommand {
4645
internal static DalamudLinkPayload findFateByNamePayload = null!;
4746
protected override void Initialise() {
4847
base.Initialise();
49-
findFateByNamePayload ??= Plugin.PluginInterface.AddChatLinkHandler(Plugin.FindFateByNamePayloadId, this.findFateByName);
48+
findFateByNamePayload ??= Plugin.Chat.AddChatLinkHandler(Plugin.FindFateByNamePayloadId, this.findFateByName);
5049
}
5150
private unsafe void findFateByName(uint linkId, SeString linkText) {
5251
if (linkId is not Plugin.FindFateByNamePayloadId) { // ...how?
@@ -123,13 +122,13 @@ protected override unsafe void Execute(string? command, string rawArguments, Fla
123122
? fates.OrderByDescending(f => f.Level).First().Level
124123
: fates.OrderBy(f => f.Level).First().Level;
125124
Fate[] filtered = fates.Where(f => f.Level == fateLevel).ToArray();
126-
IEnumerable<Fate> found = filtered.Where(f => f.State is FateState.Preparation || f.TimeRemaining >= minTime && f.Progress <= maxProgress);
125+
IEnumerable<Fate> found = filtered.Where(f => f.State is FateState.Preparation || (f.TimeRemaining >= minTime && f.Progress <= maxProgress));
127126
bool adjusted = false;
128127
while (!found.Any()) { // nothing was found that matches, so we need to gradually relax the limits until SOMETHING comes up
129128
adjusted = true;
130129
minTime = minTime >= 30 ? minTime - 30 : 0;
131130
maxProgress = (byte)Math.Min(maxProgress + 5, 100);
132-
found = filtered.Where(f => f.State is FateState.Preparation || f.TimeRemaining >= minTime && f.Progress <= maxProgress);
131+
found = filtered.Where(f => f.State is FateState.Preparation || (f.TimeRemaining >= minTime && f.Progress <= maxProgress));
133132
if (minTime == 0 && maxProgress == 100) // just in case, to avoid infinite thrash loops
134133
break;
135134
}

TinyCmds/TinyCmds.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project Sdk="Dalamud.NET.Sdk/12.0.2">
2+
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
33
<PropertyGroup>
44
<Product>TinyCmds</Product>
55
<Version>8.9.3</Version>

TinyCmds/Ui/BaseWindow.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using System.Diagnostics;
22

3+
using Dalamud.Bindings.ImGui;
34
using Dalamud.Interface;
45
using Dalamud.Interface.Windowing;
56

6-
using ImGuiNET;
7-
87
namespace VariableVixen.TinyCmds.Ui;
98

109
internal abstract class BaseWindow: Window {

TinyCmds/Ui/CommandListWindow.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1+
using Dalamud.Bindings.ImGui;
12
using Dalamud.Interface;
23
using Dalamud.Interface.Windowing;
34

4-
using ImGuiNET;
5-
6-
using VariableVixen.TinyCmds;
7-
85
namespace VariableVixen.TinyCmds.Ui;
96

107
internal class CommandListWindow: HelpWindow {

TinyCmds/Ui/HelpWindow.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
3-
using Dalamud.Interface.Windowing;
4-
5-
using ImGuiNET;
6-
7-
using VariableVixen.TinyCmds;
1+
using Dalamud.Bindings.ImGui;
82

93
namespace VariableVixen.TinyCmds.Ui;
104

TinyCmds/dalamud.props

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,20 @@
99
<Deterministic>false</Deterministic>
1010
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1111
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
12-
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
1312
</PropertyGroup>
1413

1514
<Import Project="framework.props" />
1615

17-
<ItemGroup>
18-
<Reference Include="Newtonsoft.Json">
19-
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
20-
<Private>False</Private>
21-
</Reference>
22-
<Reference Include="Dalamud">
23-
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
24-
<Private>False</Private>
25-
</Reference>
26-
<Reference Include="ImGui.NET">
27-
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
28-
<Private>False</Private>
29-
</Reference>
16+
<!--ItemGroup>
3017
<Reference Include="ImGuiScene">
3118
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
3219
<Private>False</Private>
3320
</Reference>
34-
<Reference Include="Lumina">
35-
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
36-
<Private>False</Private>
37-
</Reference>
38-
<Reference Include="Lumina.Excel">
39-
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
40-
<Private>False</Private>
41-
</Reference>
42-
<Reference Include="FFXIVClientStructs">
43-
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
44-
<Private>False</Private>
45-
</Reference>
4621
<Reference Include="InteropGenerator.Runtime">
4722
<HintPath>$(DalamudLibPath)InteropGenerator.Runtime.dll</HintPath>
4823
<Private>False</Private>
4924
</Reference>
50-
</ItemGroup>
25+
</ItemGroup-->
5126

5227
<ItemGroup>
5328
<None Remove="dalamud.props" />

0 commit comments

Comments
 (0)