Skip to content

Commit 85abcb0

Browse files
committed
API13
1 parent cca4653 commit 85abcb0

File tree

11 files changed

+20
-59
lines changed

11 files changed

+20
-59
lines changed

WoLua/Lua/Api/GameApi.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ public FateWrapper FindFate(string name) {
124124
public unsafe bool HasMapFlag {
125125
get {
126126
AgentMap* map = AgentMap.Instance();
127-
return map is not null && map->IsFlagMarkerSet;
127+
return map is not null && map->FlagMarkerCount > 0;
128128
}
129129
}
130130

131131
[LuaDoc("Clears the player's custom map flag marker, hiding it from display.")]
132132
public unsafe void ClearMapFlag() {
133133
AgentMap* map = AgentMap.Instance();
134134
if (map is not null)
135-
map->IsFlagMarkerSet = false;
135+
map->FlagMarkerCount = 0;
136136
}
137137

138138
[LuaDoc("Sets the player's custom map flag marker to the given x/y coordinates in the current zone.",
@@ -142,7 +142,7 @@ public unsafe void SetMapFlag(float x, float y) {
142142
AgentMap* map = AgentMap.Instance();
143143
if (map is null)
144144
return;
145-
map->IsFlagMarkerSet = false;
145+
map->FlagMarkerCount = 0;
146146
map->SetFlagMapMarker(map->CurrentTerritoryId, map->CurrentMapId, x, y);
147147
}
148148

WoLua/Lua/Api/Script/KeysApi.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
using System.Diagnostics.CodeAnalysis;
22

3-
using ImGuiNET;
3+
using Dalamud.Bindings.ImGui;
44

55
using MoonSharp.Interpreter;
66

7-
using VariableVixen.WoLua.Lua;
87
using VariableVixen.WoLua.Lua.Docs;
98

10-
using VariableVixen.WoLua.Lua.Api;
11-
129
namespace VariableVixen.WoLua.Lua.Api.Script;
1310

1411
[MoonSharpUserData]

WoLua/Lua/Api/ScriptApi.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
using System.Linq;
55
using System.Runtime.InteropServices;
66

7+
using Dalamud.Bindings.ImGui;
78
using Dalamud.Interface.ImGuiNotification;
89

9-
using ImGuiNET;
10-
1110
using MoonSharp.Interpreter;
1211
using MoonSharp.Interpreter.Serialization.Json;
1312

WoLua/Lua/Api/ScriptWindowApi.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
using System.Diagnostics.CodeAnalysis;
22

3-
using Dalamud.Interface.Utility;
4-
5-
using ImGuiNET;
6-
73
using MoonSharp.Interpreter;
84

9-
using VariableVixen.WoLua.Lua;
10-
115
namespace VariableVixen.WoLua.Lua.Api;
126

137
[MoonSharpUserData]

WoLua/Service.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Service() {
5959
Hooks = new();
6060
StatusLine = DtrBar.Get($"{Plugin.Name} status", StatusText.Initialising);
6161
StatusLine.Tooltip = StatusText.TooltipInitialising;
62-
StatusLine.OnClick = ScriptManager.Rescan;
62+
StatusLine.OnClick = (DtrInteractionEvent _) => ScriptManager.Rescan();
6363
StatusLine.Shown = true;
6464
}
6565
}

WoLua/Ui/BaseWindow.cs

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

4+
using Dalamud.Bindings.ImGui;
45
using Dalamud.Interface;
56
using Dalamud.Interface.Windowing;
67

7-
using ImGuiNET;
8-
98
namespace VariableVixen.WoLua.Ui;
109

1110
internal abstract class BaseWindow: Window {
@@ -44,7 +43,7 @@ protected BaseWindow(string name, ImGuiWindowFlags flags = ImGuiWindowFlags.None
4443

4544
protected static void Centred(string text, uint spacing = 1) {
4645
float width = ImGui.CalcTextSize(text).X;
47-
float offset = ImGui.GetContentRegionAvail().X / 2 - width / 2;
46+
float offset = (ImGui.GetContentRegionAvail().X / 2) - (width / 2);
4847
ImGui.SetCursorPosX(offset);
4948
Textline(text, spacing);
5049
}

WoLua/Ui/DebugWindow.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
using System.Linq;
44
using System.Numerics;
55

6+
using Dalamud.Bindings.ImGui;
67
using Dalamud.Plugin;
78

8-
using ImGuiNET;
9-
109
using MoonSharp.Interpreter;
1110

1211
using VariableVixen.WoLua.Lua;
13-
1412
using VariableVixen.WoLua.Lua.Api;
1513

1614
namespace VariableVixen.WoLua.Ui;
@@ -131,7 +129,7 @@ private static void drawScriptList() {
131129
ImGui.Spacing();
132130

133131
if (script.Ready) {
134-
ImGui.PushTextWrapPos(Width - ImGui.GetStyle().WindowPadding.X * 2);
132+
ImGui.PushTextWrapPos(Width - (ImGui.GetStyle().WindowPadding.X * 2));
135133

136134
Textline("Globals:", 0);
137135
ImGui.Indent();

WoLua/Ui/MainWindow.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Diagnostics;
2-
using System.IO;
32

4-
using ImGuiNET;
3+
using Dalamud.Bindings.ImGui;
54

65
using VariableVixen.WoLua.Lua;
76

WoLua/WoLua.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>WoLua</Product>
55
<Version>3.8.1</Version>

WoLua/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)