KamiToolKit --- Text
1 Subproject commit 26a0abbc8795a3b4b903623022ae8ba6725b59a5 1 Subproject commit d9402bf2511c9f36b0f864f01def3f05152df144
KamiToolKit.Components --- Text
1 Subproject commit a13fa93095875ccd88dfa6133e23658d5221a57b 1 Subproject commit 43d15a7bebdb7b4a00fc3acd3d0669a21e3f0004
VanillaPlus.sln.DotSettings --- Text
13 13 <s:Boolean x:Key="/Default/UserDictionary/Words/=guildhests/@EntryIndexedValue">True</s:Boolean>
14 14 <s:Boolean x:Key="/Default/UserDictionary/Words/=hasel/@EntryIndexedValue">True</s:Boolean>
15 15 <s:Boolean x:Key="/Default/UserDictionary/Words/=listinventory/@EntryIndexedValue">True</s:Boolean>
.. 16 <s:Boolean x:Key="/Default/UserDictionary/Words/=loadingimage/@EntryIndexedValue">True</s:Boolean>
16 17 <s:Boolean x:Key="/Default/UserDictionary/Words/=macroicon/@EntryIndexedValue">True</s:Boolean>
17 18 <s:Boolean x:Key="/Default/UserDictionary/Words/=micon/@EntryIndexedValue">True</s:Boolean>
18 19 <s:Boolean x:Key="/Default/UserDictionary/Words/=ninegrid/@EntryIndexedValue">True</s:Boolean>
VanillaPlus/Classes/MemoryReplacement.cs --- 1/2 --- C#
22 } 22 }
23 23
24 public async Task EnableAsync() 24 public async Task EnableAsync()
25 => await Services.Framework.Run(Enable); 25 => await Services.Framework.RunSafely(Enable);
26 26
27 public void Disable() { 27 public void Disable() {
28 ThreadSafety.AssertMainThread(); 28 ThreadSafety.AssertMainThread();
VanillaPlus/Classes/MemoryReplacement.cs --- 2/2 --- C#
35 } 35 }
36 36
37 public async Task DisableAsync() 37 public async Task DisableAsync()
38 => await Services.Framework.Run(Disable); 38 => await Services.Framework.RunSafely(Disable);
39 39
40 public void Dispose() 40 public void Dispose()
41 => Disable(); 41 => Disable();
VanillaPlus/Classes/ModificationManager.cs --- C#
44 44 public async ValueTask DisposeAsync() {
45 45 Services.PluginInterface.ActivePluginsChanged -= OnPluginsChanged;
46 ..
47 .. if (Services.Framework.IsFrameworkUnloading) {
48 .. Services.PluginLog.InternalInfo("Game is unloading, aborting module disable/disposals.");
49 .. return;
50 .. }
51 46
52 47 Services.PluginLog.InternalDebug("Disposing Modification Manager, now disabling all GameModifications");
53 48
VanillaPlus/DevFeatures/DebugCustomAddon/DebugAddon.cs --- 1/2 --- C#
. 1 // ReSharper disable RedundantOverriddenMember
. 2
1 3 using System;
2 4 using FFXIVClientStructs.FFXIV.Component.GUI;
VanillaPlus/DevFeatures/DebugCustomAddon/DebugAddon.cs --- 2/2 --- C#
11 13 public class DebugAddon : NativeAddon {
12 14
13 15 protected override unsafe void OnSetup(AtkUnitBase* addon, Span<AtkValue> atkValueSpan) {
.. 16 base.OnSetup(addon, atkValueSpan);
14 17
15 18 }
.. 19
.. 20 protected override unsafe void OnFinalize(AtkUnitBase* addon) {
.. 21 base.OnFinalize(addon);
.. 22
.. 23
.. 24 }
16 25 }
17 26 #endif
VanillaPlus/DevFeatures/DebugCustomAddon/DebugCustomAddon.cs --- C#
29 29
30 OpenConfigAction = debugAddon.Toggle; 30 OpenConfigAction = debugAddon.Toggle;
31 31
32 await Services.Framework.Run(debugAddon.Open); 32 await Services.Framework.RunSafely(debugAddon.Open);
33 } 33 }
34 34
35 public override async Task OnDisableAsync() { 35 public override async Task OnDisableAsync() {
VanillaPlus/Extensions/ClassJobCategoryExtensions.cs --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
7 7 extension(ClassJobCategory row) {
8 8 public Lumina.Excel.Collection<bool> ClassesJobs
9 9 => new(row.ExcelPage, parentOffset: row.RowOffset, offset: row.RowOffset, &ClassJobCtor, size: row.ExcelPage.Module.GetSheet<ClassJob>().Count);
. 10
. 11 /// <summary>
. 12 /// Returns true when the provided job is supported by this ClassJob.
. 13 /// </summary>
. 14 public bool IncludesJob(ClassJob job)
. 15 => row.ClassesJobs[(int) job.RowId];
. 16
. 17 /// <summary>
. 18 /// Returns true when the provided job row id is supported by this ClassJob.
. 19 /// </summary>
. 20 public bool IncludesJob(uint classJobId)
. 21 => row.ClassesJobs[(int) classJobId];
10 22 }
11 23
12 24 private static bool ClassJobCtor(ExcelPage page, uint parentOffset, uint offset, uint i)
VanillaPlus/Extensions/FrameworkExtensions.cs --- C#
1 using System;
2 using System.Threading.Tasks;
3 using Dalamud.Plugin.Services;
4
5 namespace VanillaPlus.Extensions;
6
7 /// <summary>
8 /// Extensions for dalamuds IFramework service class.
9 /// </summary>
10 public static class FrameworkExtensions {
11 extension(IFramework framework) {
12 /// <summary>
13 /// Helper method for calling Framework.Run in a safe way that does nothing in the case of a game shutdown.
14 /// </summary>
15 public Task RunSafely(Action runAction)
16 => framework.IsFrameworkUnloading ? Task.CompletedTask : framework.Run(runAction);
17 }
18 }
19
VanillaPlus/Extensions/TerritoryTypeExtensions.cs --- Text (1 C# parse error, exceeded DFT_PARSE_ERROR_LIMIT)
1 using Lumina.Excel;
2 using Lumina.Excel.Sheets;
3 using Lumina.Text.ReadOnly;
4
5 namespace VanillaPlus.Extensions;
6
7 public static class TerritoryTypeExtensions {
8 extension(TerritoryType territoryType) {
9 public string LoadingImagePath {
10 get {
11 if (!Services.DataManager.GetExcelSheet<LoadingImage>().TryGetRow(territoryType.LoadingImage.RowId, out var loadingImage)) return string.Empty;
12
13 var imageName = loadingImage.Name.ExtractText();
14 if (string.IsNullOrEmpty(imageName)) return string.Empty;
15
16 return $"ui/loadingimage/{imageName}_hr1.tex";
17 }
18 }
19 }
20 }
21
22 /// <summary>
23 /// Minimal definition of the game's "LoadingImage" Excel sheet, which Lumina does not generate.
24 /// Exposes the single texture-name column referenced by <c>TerritoryType.LoadingImage</c>.
25 /// </summary>
26 [Sheet("LoadingImage")]
27 public readonly struct LoadingImage(ExcelPage page, uint offset, uint row) : IExcelRow<LoadingImage> {
28 public uint RowId => row;
29 public uint RowOffset => offset;
30 public ExcelPage ExcelPage => page;
31
32 public ReadOnlySeString Name => page.ReadString(offset, offset);
33
34 static LoadingImage IExcelRow<LoadingImage>.Create(ExcelPage page, uint offset, uint row)
35 => new(page, offset, row);
36 }
37
38
VanillaPlus/Features/ActionHighlight/ActionHighlight.cs --- 1/5 --- Text (5 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
25 25 Type = ModificationType.UserInterface,
26 26 Authors = ["attickdoor", "Zeffuro"],
27 27 CompatibilityModule = new PluginCompatibilityModule("AbilityAnts"),
28 .. DisabledReason = "Currently unavailable.\n\nTemporarily disabled, Will return shortly. Sorry for the trouble.",
29 28 };
30 29
31 30 public override string ImageName => "ActionHighlight.png";
VanillaPlus/Features/ActionHighlight/ActionHighlight.cs --- 2/5 --- Text (5 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
55 Size = new Vector2(700.0f, 650.0f), 54 Size = new Vector2(700.0f, 650.0f),
56 InternalName = "ActionHighlightConfig", 55 InternalName = "ActionHighlightConfig",
57 Title = Strings.ActionHighlight_Configuration, 56 Title = Strings.ActionHighlight_Configuration,
58 OptionsList = Config.ClassJobConfigs, 57 OptionsList = [],
59 SaveConfig = () => Task.Run(Config.Save), 58 SaveConfig = () => Task.Run(Config.Save),
60 GetEntrySearchString = entry => Services.DataManager.GetExcelSheet<ClassJob>().GetRow(entry.ClassJobId) 59 GetEntrySearchString = entry => Services.DataManager.GetExcelSheet<ClassJob>().GetRow(entry.ClassJobId)
.. .Name.ToString(), .. .Name.ToString(),
61 AddClicked = OnAddClicked, 60 AddClicked = OnAddClicked,
62 RemoveClicked = OnRemoveClicked, 61 RemoveClicked = OnRemoveClicked,
63 }; 62 };
64 63
.. 64 UpdateOptionsList();
.. 65
65 OpenConfigAction = configAddon.Toggle; 66 OpenConfigAction = configAddon.Toggle;
66 67
67 unsafe { 68 unsafe {
VanillaPlus/Features/ActionHighlight/ActionHighlight.cs --- 3/5 --- Text (5 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
71 } 72 }
72 73
73 public override async Task OnDisableAsync() { 74 public override async Task OnDisableAsync() {
74 await Services.Framework.Run(() => { 75 onAntsHook?.Dispose();
75 onAntsHook?.Dispose(); ..
76 }); ..
77 onAntsHook = null; 76 onAntsHook = null;
78 77
79 await Task.WhenAll( 78 await Task.WhenAll(
VanillaPlus/Features/ActionHighlight/ActionHighlight.cs --- 4/5 --- Text (5 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
98 } 97 }
99 98
100 Task.Run(Config.Save); 99 Task.Run(Config.Save);
101 configAddon?.OptionsList = Config.ClassJobConfigs; 100 UpdateOptionsList();
102 }; 101 };
103 102
104 classJobSearchAddon?.Open(); 103 classJobSearchAddon?.Open();
VanillaPlus/Features/ActionHighlight/ActionHighlight.cs --- 5/5 --- Text (5 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
168 } 167 }
169 } 168 }
170 169
171 public static List<Action> GetClassActions() { 170 private void UpdateOptionsList() {
172 List<uint> additionalActions = [7444, 7445, 37018, 37023, 37024, 37025, 37026, 37027, 37028]; 171 if (configAddon is null) return;
... 172 if (Config is null) return;
173 173
174 // I have no idea what Unknown6 is, but it's been in there since the very first AbilityAnts release. 174 Task.Run(() => {
... 175 var results = Config.ClassJobConfigs
... 176 .Where(entry => entry.ClassJobId is not 0)
... 177 .OrderBy(entry => Services.SeStringEvaluator.EvaluateFromAddon(981, [entry.ClassJobId]).ToString())
... 178 .ToList();
... 179
175 // My best guess at the moment is that it removes abilities that have been replaced or upgraded. 180 Services.Framework.RunSafely(() => {
... 181 configAddon.OptionsList = results;
... 182 });
... 183 });
... 184 }
... 185
... 186 /// <summary>
... 187 /// Gets all valid actions for the specified ClassJob.
... 188 /// </summary>
... 189 public static List<Action> GetClassActions(ClassJob classJob)
176 return Services.DataManager.GetExcelSheet<Action>() 190 => Services.DataManager.GetExcelSheet<Action>()
177 .Where(action => IsValidAction(action) || additionalActions.Contains(action.RowId)) 191 .Where(action => IsValidAction(action, classJob))
... 192 .DistinctBy(action => action.RowId)
178 .ToList(); 193 .ToList();
... 194
179 } 195 /// <summary>
... 196 /// Returns true for actions that belong to the specified ClassJob <b>or its parent class</b>.
... 197 /// </summary>
... 198 private static bool IsPlayerClassAction(Action action, ClassJob classJob)
... 199 => action.IsPlayerAction && action.ClassJobCategory.Value.IncludesJob(classJob);
... 200
... 201 /// <summary>
... 202 /// Returns true for actions that can be used, but only as flip actions from other skills, such as dancer steps
... ... .
... 203 /// </summary>
... 204 private static bool IsUnassignableClassAction(Action action, ClassJob classJob)
... 205 => action is { IsPlayerAction: false, ClassJob.RowId: 0, ClassJobLevel: not 0 }
... 206 && action.IsUsableByJob(classJob);
... 207
... 208 /// <summary>
... 209 /// Returns true for actions that we want to allow ActionHighlight to highlight.
... 210 /// </summary>
... 211 internal static bool IsValidAction(Action action, ClassJob classJob)
... 212 => action is { IsPvP: false, IsRoleAction: false, RowId: not (2272u or 29581u or 1584u) } // Rabbit Medium
... ... and 六道輪廻 (should be a PVP action) and Purify
... 213 && (action.ActionCategory.RowId == 4 || action.Recast100ms > 150)
... 214 && (IsPlayerClassAction(action, classJob) || IsUnassignableClassAction(action, classJob));
180 215
181 public static bool IsValidAction(Action action) 216 /// <summary>
... 217 /// Returns true for actions that are valid for the specified ClassJob.
... 218 /// </summary>
... 219 internal static bool IsValidRoleAction(Action action, ClassJob classJob)
182 => action is { IsPvP: false, ClassJob.ValueNullable.Unknown6: > 0, IsPlayerAction: true } and ({ ActionCate 220 => action is { IsPvP: false, IsRoleAction: true }
... gory.RowId: 4 } or { Recast100ms: > 100 }); ...
... 221 && action.ClassJobCategory.Value.IncludesJob(classJob);
183 } 222 }
VanillaPlus/Features/ActionHighlight/Config/AntsConfig.cs --- 1/4 --- C#
1 1 using System;
2 2 using System.Collections.Generic;
3 3 using System.Linq;
. 4 using Lumina.Excel.Sheets;
4 5 using Newtonsoft.Json.Linq;
5 6 using VanillaPlus.Classes;
6 7 using Action = Lumina.Excel.Sheets.Action;
VanillaPlus/Features/ActionHighlight/Config/AntsConfig.cs --- 2/4 --- C#
30 31 var actionSettingsObj = jObject["ActionSettings"]?.ToObject<JObject>();
31 32 if (actionSettingsObj is null) return false;
.. 33
.. 34 var classJobs = Services.DataManager.GetExcelSheet<ClassJob>()
.. 35 .Where(job => job is { RowId: not 0, Name.IsEmpty: false, IsCrafter: false, IsGatherer: false })
.. 36 .ToList();
32 37
33 38 List<AntsClassJobConfig> newEntries = [];
34 39
VanillaPlus/Features/ActionHighlight/Config/AntsConfig.cs --- 3/4 --- C#
38 var actionSettings = property.Value.ToObject<AntsActionSetting>(); 43 var actionSettings = property.Value.ToObject<AntsActionSetting>();
39 if (actionSettings is null) continue; 44 if (actionSettings is null) continue;
40 45
41 var actionInfo = Services.DataManager.GetExcelSheet<Action>().GetRow(actionId); 46 var action = Services.DataManager.GetExcelSheet<Action>().GetRow(actionId);
42 47
43 var classJobEntry = newEntries.FirstOrDefault(entry => entry.ClassJobId == actionInfo.ClassJob.R 48 foreach (var classJob in classJobs) {
.. owId); ..
44 ..
45 if (classJobEntry is null) { 49 if (!ActionHighlight.IsValidAction(action, classJob) && !ActionHighlight.IsValidRoleAction(a
.. .. ction, classJob)) continue;
.. 50
46 newEntries.Add(new AntsClassJobConfig { 51 AddActionSetting(newEntries, classJob.RowId, actionSettings, actionId);
47 ClassJobId = actionInfo.ClassJob.RowId, 52 }
48 ActionSettings = [ ..
49 actionSettings, ..
50 ], ..
51 }); ..
52 } ..
53 else { ..
54 classJobEntry.ActionSettings.Add(actionSettings); ..
55 } ..
56 } 53 }
57 54
58 ClassJobConfigs = newEntries; 55 ClassJobConfigs = newEntries;
VanillaPlus/Features/ActionHighlight/Config/AntsConfig.cs --- 4/4 --- C#
62 59 return false;
63 60 }
.. 61
.. 62 private static void AddActionSetting(List<AntsClassJobConfig> entries, uint classJobId, AntsActionSetting source, uint actionId) {
.. 63 if (entries.FirstOrDefault(configEntry => configEntry.ClassJobId == classJobId) is not { } entry) {
.. 64 entry = new AntsClassJobConfig {
.. 65 ClassJobId = classJobId,
.. 66 ActionSettings = [],
.. 67 };
.. 68
.. 69 entries.Add(entry);
.. 70 }
.. 71
.. 72 if (entry.ActionSettings.Any(setting => setting.ActionId == actionId)) return;
.. 73
.. 74 entry.ActionSettings.Add(new AntsActionSetting {
.. 75 ActionId = actionId,
.. 76 IsEnabled = source.IsEnabled,
.. 77 ThresholdMs = source.ThresholdMs,
.. 78 });
.. 79 }
64 80 }
VanillaPlus/Features/ActionHighlight/Nodes/AntsClassJobConfigurationNode.cs --- 1/2 --- C#
1 1 using System;
2 . using System.Collections.Generic;
3 2 using System.Linq;
4 3 using System.Numerics;
5 4 using KamiToolKit.Components.ConfigurationNodes;
VanillaPlus/Features/ActionHighlight/Nodes/AntsClassJobConfigurationNode.cs --- 2/2 --- C#
35 34
36 backgroundImageNode.IconId = 62000 + entry.ClassJobId; 35 backgroundImageNode.IconId = 62000 + entry.ClassJobId;
37 ..
38 List<Action> additionalActions = []; ..
39 ..
40 // Astrologian Entries. ..
41 if (entry.ClassJobId is 33) { ..
42 foreach (var action in (List<uint>)[7444, 7445, 37018, 37023, 37024, 37025, 37026, 37027, 37028]) { ..
43 additionalActions.Add(Services.DataManager.GetExcelSheet<Action>().GetRow(action)); ..
44 } ..
45 } ..
46 36
47 actionsListNode.OptionsList = Services.DataManager.GetExcelSheet<Action>() 37 actionsListNode.OptionsList = ActionHighlight.GetClassActions(classJob);
48 .Where(a => !a.IsPvP && (a.ClassJob.RowId == classJob.RowId || a.ClassJob.RowId == classJob.ClassJobPare ..
.. nt.RowId) ..
49 && a.IsPlayerAction && (a.ActionCategory.RowId == 4 || a.Recast100ms > 100) && a.Ro ..
.. wId != 29581) ..
50 .Where(action => action is { IsRoleAction: false }) ..
51 .Concat(additionalActions) ..
52 .ToList(); ..
53 38
54 rolesListNode.OptionsList = Services.DataManager.GetExcelSheet<Action>() 39 rolesListNode.OptionsList = Services.DataManager.GetExcelSheet<Action>()
55 .Where(action => action.ClassJobCategory.Value.ClassesJobs[(int) entry.ClassJobId]) 40 .Where(action => action.ClassJobCategory.Value.ClassesJobs[(int) entry.ClassJobId])
VanillaPlus/Features/AetherwellProgress/AetherwellProgress.cs --- C#
41 }; 41 };
42 } 42 }
43 43
44 await Services.Framework.Run(addonController.Enable); 44 await Services.Framework.RunSafely(addonController.Enable);
45 } 45 }
46 46
47 public override async Task OnDisableAsync() { 47 public override async Task OnDisableAsync() {
48 await Services.Framework.Run(() => addonController?.Dispose()); 48 await Services.Framework.RunSafely(() => addonController?.Dispose());
49 addonController = null; 49 addonController = null;
50 50
51 nodes = null; 51 nodes = null;
VanillaPlus/Features/AprilFools/AprilFools.cs --- C#
77 } 77 }
78 78
79 public override async Task OnDisableAsync() { 79 public override async Task OnDisableAsync() {
80 await Services.Framework.Run(() => { 80 await Services.Framework.RunSafely(() => {
81 configAddon?.Dispose(); 81 configAddon?.Dispose();
82 configAddon = null; 82 configAddon = null;
83 }); 83 });
VanillaPlus/Features/AprilFools/FlippingOutFools.cs --- C#
23 }; 23 };
24 } 24 }
25 25
26 await Services.Framework.Run(locationTitleController.Enable); 26 await Services.Framework.RunSafely(locationTitleController.Enable);
27 } 27 }
28 28
29 protected override async Task OnDisable() { 29 protected override async Task OnDisable() {
30 await Services.Framework.Run(() => locationTitleController?.Dispose()); 30 await Services.Framework.RunSafely(() => locationTitleController?.Dispose());
31 locationTitleController = null; 31 locationTitleController = null;
32 } 32 }
33 33
VanillaPlus/Features/AprilFools/IndecisiveFools.cs --- C#
31 }; 31 };
32 } 32 }
33 33
34 await Services.Framework.Run(addonController.Enable); 34 await Services.Framework.RunSafely(addonController.Enable);
35 } 35 }
36 36
37 protected override async Task OnDisable() { 37 protected override async Task OnDisable() {
38 await Services.Framework.Run(() => { 38 await Services.Framework.RunSafely(() => {
39 foreach (var textButton in textButtons ?? []) { 39 foreach (var textButton in textButtons ?? []) {
40 textButton.Dispose(); 40 textButton.Dispose();
41 } 41 }
VanillaPlus/Features/ArmourySearchBar/ArmourySearchBar.cs --- 1/2 --- C#
54 Callback = OnKeybindPressed, 54 Callback = OnKeybindPressed,
55 }; 55 };
56 56
57 await Services.Framework.Run(inventoryController.Enable); 57 await Services.Framework.RunSafely(inventoryController.Enable);
58 58
59 Services.GameGui.AgentUpdate += OnAgentUpdate; 59 Services.GameGui.AgentUpdate += OnAgentUpdate;
60 Services.Framework.Update += OnFrameworkUpdate; 60 Services.Framework.Update += OnFrameworkUpdate;
VanillaPlus/Features/ArmourySearchBar/ArmourySearchBar.cs --- 2/2 --- C#
64 Services.Framework.Update -= OnFrameworkUpdate; 64 Services.Framework.Update -= OnFrameworkUpdate;
65 Services.GameGui.AgentUpdate -= OnAgentUpdate; 65 Services.GameGui.AgentUpdate -= OnAgentUpdate;
66 66
67 await Services.Framework.Run(() => inventoryController?.Dispose()); 67 await Services.Framework.RunSafely(() => inventoryController?.Dispose());
68 inventoryController = null; 68 inventoryController = null;
69 } 69 }
70 70
VanillaPlus/Features/BetterCursor/BetterCursor.cs --- 1/2 --- C#
50 OpenConfigAction = configWindow.Toggle; 50 OpenConfigAction = configWindow.Toggle;
51 51
52 52
53 await Services.Framework.Run(() => { 53 await Services.Framework.RunSafely(() => {
54 overlayController = new OverlayController(); 54 overlayController = new OverlayController();
55 overlayController.AddNode(new CursorImageNode { 55 overlayController.AddNode(new CursorImageNode {
56 Config = config, 56 Config = config,
VanillaPlus/Features/BetterCursor/BetterCursor.cs --- 2/2 --- C#
59 } 59 }
60 60
61 public override async Task OnDisableAsync() { 61 public override async Task OnDisableAsync() {
62 await Services.Framework.Run(() => overlayController?.Dispose()); 62 await Services.Framework.RunSafely(() => overlayController?.Dispose());
63 overlayController = null; 63 overlayController = null;
64 64
65 await (configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask); 65 await (configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/BetterInterruptableCastBars/BetterInterruptableCastBars.cs --- C#
43 }; 43 };
44 } 44 }
45 45
46 await Services.Framework.Run(targetInfoCastbarController.Enable); 46 await Services.Framework.RunSafely(targetInfoCastbarController.Enable);
47 } 47 }
48 48
49 public override async Task OnDisableAsync() { 49 public override async Task OnDisableAsync() {
50 await Services.Framework.Run(() => targetInfoCastbarController?.Disable() ); 50 await Services.Framework.RunSafely(() => targetInfoCastbarController?.Disable() );
51 targetInfoCastbarController = null; 51 targetInfoCastbarController = null;
52 52
53 antsHook?.Dispose(); 53 antsHook?.Dispose();
VanillaPlus/Features/BetterSelectString/BetterSelectString.cs --- C#
54 }; 54 };
55 } 55 }
56 56
57 await Services.Framework.Run(() => { 57 await Services.Framework.RunSafely(() => {
58 selectStringController.Enable(); 58 selectStringController.Enable();
59 selectStringListController.Enable(); 59 selectStringListController.Enable();
60 }); 60 });
61 } 61 }
62 62
63 public override async Task OnDisableAsync() { 63 public override async Task OnDisableAsync() {
64 await Services.Framework.Run(() => { 64 await Services.Framework.RunSafely(() => {
65 selectStringController?.Dispose(); 65 selectStringController?.Dispose();
66 selectStringListController?.Dispose(); 66 selectStringListController?.Dispose();
67 }); 67 });
VanillaPlus/Features/BetterTeleportWindow/BetterTeleportWindow.cs --- C#
33 }, 33 },
34 }; 34 };
35 35
36 await Services.Framework.Run(teleportFactoryController.Enable); 36 await Services.Framework.RunSafely(teleportFactoryController.Enable);
37 } 37 }
38 38
39 public override async Task OnDisableAsync() { 39 public override async Task OnDisableAsync() {
40 await Services.Framework.Run(() => teleportFactoryController?.Dispose()); 40 await Services.Framework.RunSafely(() => teleportFactoryController?.Dispose());
41 teleportFactoryController = null; 41 teleportFactoryController = null;
42 } 42 }
43 } 43 }
VanillaPlus/Features/BiggerConfigWindows/BiggerConfigWindows.cs --- C#
44 Config = config, 44 Config = config,
45 }; 45 };
46 46
47 await Services.Framework.Run(() => { 47 await Services.Framework.RunSafely(() => {
48 systemConfigController.Enable(); 48 systemConfigController.Enable();
49 characterConfigController.Enable(); 49 characterConfigController.Enable();
50 }); 50 });
51 } 51 }
52 52
53 public override async Task OnDisableAsync() { 53 public override async Task OnDisableAsync() {
54 await Services.Framework.Run(() => { 54 await Services.Framework.RunSafely(() => {
55 systemConfigController?.Dispose(); 55 systemConfigController?.Dispose();
56 characterConfigController?.Dispose(); 56 characterConfigController?.Dispose();
57 }); 57 });
VanillaPlus/Features/BiggerConfigWindows/CharacterConfigController.cs --- C#
39 } 39 }
40 40
41 public void Dispose() { 41 public void Dispose() {
42 Services.Framework.Run(() => { 42 Services.Framework.RunSafely(() => {
43 characterConfigController?.Dispose(); 43 characterConfigController?.Dispose();
44 childAddonController?.Dispose(); 44 childAddonController?.Dispose();
45 }); 45 });
VanillaPlus/Features/BorderlessCutscenes/BorderlessCutscenes.cs --- 1/2 --- C#
10 DisplayName = Strings.ModificationDisplay_BorderlessCutscenes, 10 DisplayName = Strings.ModificationDisplay_BorderlessCutscenes,
11 Description = Strings.ModificationDescription_BorderlessCutscenes, 11 Description = Strings.ModificationDescription_BorderlessCutscenes,
12 Type = ModificationType.GameBehavior, 12 Type = ModificationType.GameBehavior,
13 Authors = ["goat", "Maple", "MidoriKami"], 13 Authors = ["goat", "MapleRecall", "MidoriKami"],
14 CompatibilityModule = new PluginCompatibilityModule("Dalamud.FullscreenCutscenes"), 14 CompatibilityModule = new PluginCompatibilityModule("Dalamud.FullscreenCutscenes"),
15 }; 15 };
16 16
VanillaPlus/Features/BorderlessCutscenes/BorderlessCutscenes.cs --- 2/2 --- C#
24 24
25 if (memoryAddress is { } address && memoryAddress != nint.Zero) { 25 if (memoryAddress is { } address && memoryAddress != nint.Zero) {
26 jumpPatch = new MemoryReplacement(address, [0x00]); 26 jumpPatch = new MemoryReplacement(address, [0x00]);
27 await Services.Framework.Run(jumpPatch.Enable); 27 await Services.Framework.RunSafely(jumpPatch.Enable);
28 } 28 }
29 } 29 }
30 30
VanillaPlus/Features/ChatPlayerTooltip/ChatPlayerTooltip.cs --- C#
39 public override async Task OnDisableAsync() { 39 public override async Task OnDisableAsync() {
40 Services.AddonLifecycle.UnregisterListener(PreReceiveEvent); 40 Services.AddonLifecycle.UnregisterListener(PreReceiveEvent);
41 41
42 await Services.Framework.Run(HideTooltip); 42 await Services.Framework.RunSafely(HideTooltip);
43 } 43 }
44 44
45 private unsafe void PreReceiveEvent(AddonEvent type, AddonArgs args) { 45 private unsafe void PreReceiveEvent(AddonEvent type, AddonArgs args) {
VanillaPlus/Features/ClearFlag/ClearFlag.cs --- C#
30 }; 30 };
31 } 31 }
32 32
33 await Services.Framework.Run(minimapController.Enable); 33 await Services.Framework.RunSafely(minimapController.Enable);
34 } 34 }
35 35
36 public override async Task OnDisableAsync() { 36 public override async Task OnDisableAsync() {
37 await Services.Framework.Run(() => minimapController?.Dispose()); 37 await Services.Framework.RunSafely(() => minimapController?.Dispose());
38 minimapMouseClick = null; 38 minimapMouseClick = null;
39 } 39 }
40 40
VanillaPlus/Features/ClockOverlay/ClockOverlay.cs --- 1/2 --- C#
49 49
50 OpenConfigAction = configWindow.Toggle; 50 OpenConfigAction = configWindow.Toggle;
51 51
52 await Services.Framework.Run(() => { 52 await Services.Framework.RunSafely(() => {
53 overlayController = new OverlayController(); 53 overlayController = new OverlayController();
54 overlayController.AddNode(new ClockOverlayNode { 54 overlayController.AddNode(new ClockOverlayNode {
55 Config = config, 55 Config = config,
VanillaPlus/Features/ClockOverlay/ClockOverlay.cs --- 2/2 --- C#
64 } 64 }
65 65
66 public override async Task OnDisableAsync() { 66 public override async Task OnDisableAsync() {
67 await Services.Framework.Run(() => overlayController?.Dispose()); 67 await Services.Framework.RunSafely(() => overlayController?.Dispose());
68 overlayController = null; 68 overlayController = null;
69 69
70 await Task.WhenAll(configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask); 70 await Task.WhenAll(configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/CommandPanelSync/CommandPanelSync.cs --- 1/2 --- C#
21 Services.ClientState.Logout += OnLogout; 21 Services.ClientState.Logout += OnLogout;
22 22
23 if (Services.ClientState.IsLoggedIn) { 23 if (Services.ClientState.IsLoggedIn) {
24 await Services.Framework.Run(ApplySharedQuickPanel); 24 await Services.Framework.RunSafely(ApplySharedQuickPanel);
25 } 25 }
26 } 26 }
27 27
VanillaPlus/Features/CommandPanelSync/CommandPanelSync.cs --- 2/2 --- C#
30 Services.ClientState.Logout -= OnLogout; 30 Services.ClientState.Logout -= OnLogout;
31 31
32 if (Services.ClientState.IsLoggedIn) { 32 if (Services.ClientState.IsLoggedIn) {
33 await Services.Framework.Run(RestoreOriginalQuickPanel); 33 await Services.Framework.RunSafely(RestoreOriginalQuickPanel);
34 } 34 }
35 } 35 }
36 36
VanillaPlus/Features/ConfigSearchBar/SystemConfigSearchBar.cs --- C#
52 }; 52 };
53 } 53 }
54 54
55 await Services.Framework.Run(systemConfigController.Enable); 55 await Services.Framework.RunSafely(systemConfigController.Enable);
56 } 56 }
57 57
58 public override async Task OnDisableAsync() { 58 public override async Task OnDisableAsync() {
59 await Services.Framework.Run(() => systemConfigController?.Dispose()); 59 await Services.Framework.RunSafely(() => systemConfigController?.Dispose());
60 systemConfigController = null; 60 systemConfigController = null;
61 61
62 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask); 62 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/CosmicExplorationProgressWindow/CosmicExplorationProgressWindow.cs --- C#
42 }; 42 };
43 } 43 }
44 44
45 await Services.Framework.Run(wksHudController.Enable); 45 await Services.Framework.RunSafely(wksHudController.Enable);
46 } 46 }
47 47
48 public override async Task OnDisableAsync() { 48 public override async Task OnDisableAsync() {
49 await Services.Framework.Run(() => { 49 await Services.Framework.RunSafely(() => {
50 wksHudController?.Dispose(); 50 wksHudController?.Dispose();
51 hudShowNode?.Dispose(); 51 hudShowNode?.Dispose();
52 }); 52 });
VanillaPlus/Features/CurrencyOverlay/CurrencyOverlay.cs --- 1/2 --- Text (2 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
57 57
58 OpenConfigAction = configAddon.Toggle; 58 OpenConfigAction = configAddon.Toggle;
59 59
60 await Services.Framework.Run(() => { 60 await Services.Framework.RunSafely(() => {
61 overlayController = new OverlayController(); 61 overlayController = new OverlayController();
62 62
63 foreach (var currencySetting in config.Currencies) { 63 foreach (var currencySetting in config.Currencies) {
VanillaPlus/Features/CurrencyOverlay/CurrencyOverlay.cs --- 2/2 --- Text (2 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
69 } 69 }
70 70
71 public override async Task OnDisableAsync() { 71 public override async Task OnDisableAsync() {
72 await Services.Framework.Run(() => overlayController?.Dispose()); 72 await Services.Framework.RunSafely(() => overlayController?.Dispose());
73 overlayController = null; 73 overlayController = null;
74 74
75 await Task.WhenAll( 75 await Task.WhenAll(
VanillaPlus/Features/CurrencyWarning/CurrencyWarning.cs --- 1/2 --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
64 64
65 OpenConfigAction = configAddon.Toggle; 65 OpenConfigAction = configAddon.Toggle;
66 66
67 await Services.Framework.Run(() => { 67 await Services.Framework.RunSafely(() => {
68 overlayController = new OverlayController(); 68 overlayController = new OverlayController();
69 69
70 var tooltipNode = new CurrencyTooltipNode { 70 var tooltipNode = new CurrencyTooltipNode {
VanillaPlus/Features/CurrencyWarning/CurrencyWarning.cs --- 2/2 --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
91 } 91 }
92 92
93 public override async Task OnDisableAsync() { 93 public override async Task OnDisableAsync() {
94 await Services.Framework.Run(() => { 94 await Services.Framework.RunSafely(() => {
95 overlayController?.Dispose(); 95 overlayController?.Dispose();
96 }); 96 });
97 overlayController = null; 97 overlayController = null;
VanillaPlus/Features/DisableTitleScreenMovie/DisableTitleScreenMovie.cs --- C#
39 ]); 39 ]);
40 } 40 }
41 41
42 await Services.Framework.Run(jumpPatch.Enable); 42 await Services.Framework.RunSafely(jumpPatch.Enable);
43 } 43 }
44 } 44 }
45 45
VanillaPlus/Features/DraggableWindowDeadSpace/DraggableWindowDeadSpace.cs --- 1/2 --- C#
31 public override async Task OnEnableAsync() { 31 public override async Task OnEnableAsync() {
32 windowInteractionNodes = []; 32 windowInteractionNodes = [];
33 33
34 await Services.Framework.Run(() => { 34 await Services.Framework.RunSafely(() => {
35 unsafe { 35 unsafe {
36 return cursorEventListener = new ViewportEventListener(OnViewportEvent); 36 cursorEventListener = new ViewportEventListener(OnViewportEvent);
37 } 37 }
38 }); 38 });
39 39
VanillaPlus/Features/DraggableWindowDeadSpace/DraggableWindowDeadSpace.cs --- 2/2 --- C#
44 public override async Task OnDisableAsync() { 44 public override async Task OnDisableAsync() {
45 Services.AddonLifecycle.UnregisterListener(OnAddonSetup, OnAddonFinalize); 45 Services.AddonLifecycle.UnregisterListener(OnAddonSetup, OnAddonFinalize);
46 46
47 await Services.Framework.Run(() => { 47 await Services.Framework.RunSafely(() => {
48 cursorEventListener?.Dispose(); 48 cursorEventListener?.Dispose();
49 49
50 foreach (var (_, node) in windowInteractionNodes ?? []) { 50 foreach (var (_, node) in windowInteractionNodes ?? []) {
VanillaPlus/Features/DutyLootPreview/Data/DutyLootDataLoader.cs --- 1/2 --- C#
48 }; 48 };
49 } 49 }
50 50
51 await Services.Framework.Run(() => { 51 await Services.Framework.RunSafely(() => {
52 contentsFinder.Enable(); 52 contentsFinder.Enable();
53 raidFinder.Enable(); 53 raidFinder.Enable();
54 }); 54 });
VanillaPlus/Features/DutyLootPreview/Data/DutyLootDataLoader.cs --- 2/2 --- C#
59 } 59 }
60 60
61 public async ValueTask DisposeAsync() { 61 public async ValueTask DisposeAsync() {
62 await Services.Framework.Run(() => { 62 await Services.Framework.RunSafely(() => {
63 contentsFinder?.Dispose(); 63 contentsFinder?.Dispose();
64 raidFinder?.Dispose(); 64 raidFinder?.Dispose();
65 }); 65 });
VanillaPlus/Features/DutyLootPreview/DutyLootAddon.cs --- C#
111 )) 111 ))
112 .ToList(); 112 .ToList();
113 113
114 await Services.Framework.Run(() => listNode.OptionsList = viewModels); 114 await Services.Framework.RunSafely(() => listNode.OptionsList = viewModels);
115 listNode.ResetScroll(); 115 listNode.ResetScroll();
116 116
117 var hasData = items.Count != 0; 117 var hasData = items.Count != 0;
VanillaPlus/Features/DutyLootPreview/DutyLootPreview.cs --- C#
46 OnButtonClicked = addonDutyLoot.Toggle, 46 OnButtonClicked = addonDutyLoot.Toggle,
47 }; 47 };
48 48
49 await Services.Framework.Run(() => { 49 await Services.Framework.RunSafely(() => {
50 journalUiController.Enable(); 50 journalUiController.Enable();
51 inDutyUiController.Enable(); 51 inDutyUiController.Enable();
52 }); 52 });
53 } 53 }
54 54
55 public override async Task OnDisableAsync() { 55 public override async Task OnDisableAsync() {
56 await Services.Framework.Run(() => { 56 await Services.Framework.RunSafely(() => {
57 journalUiController?.Dispose(); 57 journalUiController?.Dispose();
58 inDutyUiController?.Dispose(); 58 inDutyUiController?.Dispose();
59 }); 59 });
VanillaPlus/Features/EnhancedLootWindow/EnhancedLootWindow.cs --- C#
60 }; 60 };
61 } 61 }
62 62
63 await Services.Framework.Run(needGreedController.Enable); 63 await Services.Framework.RunSafely(needGreedController.Enable);
64 } 64 }
65 65
66 public override async Task OnDisableAsync() { 66 public override async Task OnDisableAsync() {
67 await Services.Framework.Run(() => needGreedController?.Dispose()); 67 await Services.Framework.RunSafely(() => needGreedController?.Dispose());
68 needGreedController = null; 68 needGreedController = null;
69 69
70 await Task.WhenAll(configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask); 70 await Task.WhenAll(configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/EnhancedWardNavigation/EnhancedWardNavigation.cs --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
35 }; 35 };
36 } 36 }
37 37
38 await Services.Framework.Run(housingAddonController.Enable); 38 await Services.Framework.RunSafely(housingAddonController.Enable);
39 } 39 }
40 40
41 public override async Task OnDisableAsync() { 41 public override async Task OnDisableAsync() {
42 await Services.Framework.Run(() => housingAddonController?.Dispose()); 42 await Services.Framework.RunSafely(() => housingAddonController?.Dispose());
43 housingAddonController = null; 43 housingAddonController = null;
44 } 44 }
45 45
VanillaPlus/Features/FadeLootButton/FadeLootButton.cs --- C#
46 }; 46 };
47 } 47 }
48 48
49 await Services.Framework.Run(notificationLootController.Enable); 49 await Services.Framework.RunSafely(notificationLootController.Enable);
50 } 50 }
51 51
52 public override async Task OnDisableAsync() { 52 public override async Task OnDisableAsync() {
53 await Services.Framework.Run(() => notificationLootController?.Dispose()); 53 await Services.Framework.RunSafely(() => notificationLootController?.Dispose());
54 notificationLootController = null; 54 notificationLootController = null;
55 55
56 await Task.WhenAll(configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask); 56 await Task.WhenAll(configWindow?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/FadeUnavailableActions/FadeUnavailableActions.cs --- C#
70 70
71 actionCache = null; 71 actionCache = null;
72 72
73 await Services.Framework.Run(ResetAllHotbars); 73 await Services.Framework.RunSafely(ResetAllHotbars);
74 } 74 }
75 75
76 private unsafe void OnHotBarSlotUpdate(AddonActionBarBase* addon, ActionBarSlot* hotBarSlotData, NumberArrayData 76 private unsafe void OnHotBarSlotUpdate(AddonActionBarBase* addon, ActionBarSlot* hotBarSlotData, NumberArrayData
.. * numberArray, StringArrayData* stringArray, int numberArrayIndex, int stringArrayIndex) { .. * numberArray, StringArrayData* stringArray, int numberArrayIndex, int stringArrayIndex) {
VanillaPlus/Features/FancyLoadingScreens/FancyLoadingScreens.cs --- Text (3 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
1 using System;
2 using System.Numerics;
3 using System.Threading.Tasks;
4 using Dalamud.Game.Addon.Lifecycle;
5 using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
6 using Dalamud.Hooking;
7 using FFXIVClientStructs.FFXIV.Client.Game.UI;
8 using FFXIVClientStructs.FFXIV.Client.UI;
9 using FFXIVClientStructs.FFXIV.Component.GUI;
10 using KamiToolKit.Controllers;
11 using KamiToolKit.Enums;
12 using KamiToolKit.Nodes;
13 using KamiToolKit.Nodes.Simplified;
14 using KamiToolKit.Timelines;
15 using Lumina.Excel.Sheets;
16 using VanillaPlus.Classes;
17 using VanillaPlus.Enums;
18
19 namespace VanillaPlus.Features.FancyLoadingScreens;
20
21 public class FancyLoadingScreens : GameModification {
22 public override ModificationInfo ModificationInfo => new() {
23 DisplayName = Strings.ModificationDisplay_FancyLoadingScreens,
24 Description = Strings.ModificationDescription_FancyLoadingScreens,
25 Type = ModificationType.UserInterface,
26 Authors = ["goat", "MapleRecall", "MidoriKami"],
27 CompatibilityModule = new PluginCompatibilityModule("Dalamud.LoadingImage"),
28 };
29
30 private Hook<Telepo.Delegates.Teleport>? teleportHook;
31
32 private AddonController? locationTitleController;
33 private TimelineNode<SimpleImageNode>? artworkImageNode;
34 private bool isTeleporting;
35
36 public override async Task OnEnableAsync() {
37 unsafe {
38 teleportHook = Services.Hooker.HookFromAddress<Telepo.Delegates.Teleport>(Telepo.MemberFunctionPointers.Teleport, OnTeleport);
39 teleportHook?.Enable();
40
41 locationTitleController = new AddonController {
42 AddonName = "_LocationTitle",
43 OnSetup = OnLocationTitleSetup,
44 OnFinalize = OnLocationTitleFinalize,
45 };
46 }
47
48 await Services.Framework.RunSafely(() => locationTitleController.Enable());
49
50 Services.AddonLifecycle.RegisterListener(AddonEvent.PostHide, "_LocationTitle", OnLoadingScreenHide);
51 Services.ClientState.TerritoryChanged += OnTerritoryChanged;
52 }
53
54 public override async Task OnDisableAsync() {
55 Services.ClientState.TerritoryChanged -= OnTerritoryChanged;
56 Services.AddonLifecycle.UnregisterListener(OnLoadingScreenHide);
57
58 teleportHook?.Dispose();
59 teleportHook = null;
60
61 await Services.Framework.RunSafely(() => {
62 locationTitleController?.Dispose();
63 });
64 locationTitleController = null;
65
66 artworkImageNode = null;
67 }
68
69 private unsafe void OnLocationTitleSetup(AtkUnitBase* addon) {
70 artworkImageNode = new TimelineNode<SimpleImageNode> {
71 ContentNode = {
72 FitTexture = true,
73 },
74
75 LabelsetTimeline = new TimelineBuilder()
76 .BeginFrameSet(1, 480)
77 .AddLabel(1, 1, AtkTimelineJumpBehavior.Start, 0)
78 .AddLabel(480, 0, AtkTimelineJumpBehavior.PlayOnce, 0)
79 .EndFrameSet()
80 .Build(),
81
82 ContentTimeline = new TimelineBuilder()
83 .BeginFrameSet(1, 480)
84 .AddFrame(1, scale: new Vector2(1.0f, 1.0f), alpha: 0)
85 .AddFrame(60, scale: new Vector2(1.1f, 1.1f), alpha: 255)
86 .AddFrame(480, scale: new Vector2(1.4f, 1.4f), alpha: 255)
87 .EndFrameSet()
88 .Build(),
89 };
90 artworkImageNode.AttachNode(addon, NodePosition.AsFirstChild);
91 }
92
93 private unsafe void OnLocationTitleFinalize(AtkUnitBase* addon) {
94 artworkImageNode?.Dispose();
95 artworkImageNode = null;
96 }
97
98 private void OnTerritoryChanged(uint territoryId) {
99 if (!isTeleporting) {
100 SetLoadingScreenImage(territoryId);
101 }
102 }
103
104 private void SetLoadingScreenImage(uint territoryId) {
105 if (artworkImageNode is null) return;
106
107 unsafe {
108 var parentAddon = RaptureAtkUnitManager.Instance()->GetAddonByNode(artworkImageNode);
109 if (parentAddon is null) return;
110
111 var screenSize = (Vector2) AtkStage.Instance()->ScreenSize;
112 var rootScale = parentAddon->RootNode->Scale;
113
114 artworkImageNode.Position = -parentAddon->RootNode->Position / rootScale;
115 artworkImageNode.Size = screenSize / rootScale;
116 artworkImageNode.ContentNode.Origin = screenSize / rootScale / 2.0f;
117
118 if (!Services.DataManager.GetExcelSheet<TerritoryType>().TryGetRow(territoryId, out var territory)) return;
119 artworkImageNode?.ContentNode.TexturePath = territory.LoadingImagePath;
120 artworkImageNode?.Timeline?.PlayAnimation(1, true);
121 artworkImageNode?.IsVisible = true;
122 }
123 }
124
125 private void OnLoadingScreenHide(AddonEvent type, AddonArgs args) {
126 artworkImageNode?.IsVisible = false;
127 isTeleporting = false;
128 }
129
130 private unsafe bool OnTeleport(Telepo* thisPtr, uint aetheryteId, byte subIndex) {
131 var accepted = teleportHook!.Original(thisPtr, aetheryteId, subIndex);
132
133 try {
134 if (accepted && Services.DataManager.GetExcelSheet<Aetheryte>().TryGetRow(aetheryteId, out var aetheryte)) {
135 isTeleporting = true;
136 SetLoadingScreenImage(aetheryte.Territory.RowId);
137 }
138 }
139 catch (Exception exception) {
140 Services.PluginLog.Exception(exception);
141 }
142
143 return accepted;
144 }
145 }
146
VanillaPlus/Features/FastMouseClick/FastMouseClick.cs --- C#
24 24
25 if (memoryAddress is { } address && memoryAddress != nint.Zero) { 25 if (memoryAddress is { } address && memoryAddress != nint.Zero) {
26 memoryPatch = new MemoryReplacement(address, [0x90, 0x90]); 26 memoryPatch = new MemoryReplacement(address, [0x90, 0x90]);
27 await Services.Framework.Run(memoryPatch.Enable); 27 await Services.Framework.RunSafely(memoryPatch.Enable);
28 } 28 }
29 } 29 }
30 30
VanillaPlus/Features/FateListWindow/FateListWindow.cs --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
76 => addonFateList?.Toggle(); 76 => addonFateList?.Toggle();
77 77
78 private void OnKeybindPressed(ref bool isHandled) { 78 private void OnKeybindPressed(ref bool isHandled) {
79 Services.Framework.Run(() => addonFateList?.Toggle()); 79 Services.Framework.RunSafely(() => addonFateList?.Toggle());
80 80
81 isHandled = true; 81 isHandled = true;
82 } 82 }
VanillaPlus/Features/GearSetReorderButtons/GearSetReorderButtons.cs --- C#
43 }; 43 };
44 } 44 }
45 45
46 await Services.Framework.Run(() => { 46 await Services.Framework.RunSafely(() => {
47 gearSetsAddonController.Enable(); 47 gearSetsAddonController.Enable();
48 gearSetsListController.Enable(); 48 gearSetsListController.Enable();
49 }); 49 });
50 } 50 }
51 51
52 public override async Task OnDisableAsync() { 52 public override async Task OnDisableAsync() {
53 await Services.Framework.Run(() => { 53 await Services.Framework.RunSafely(() => {
54 gearSetsAddonController?.Dispose(); 54 gearSetsAddonController?.Dispose();
55 gearSetsListController?.Dispose(); 55 gearSetsListController?.Dispose();
56 }); 56 });
VanillaPlus/Features/HUDCoordinates/HUDCoordinates.cs --- C#
35 }; 35 };
36 } 36 }
37 37
38 await Services.Framework.Run(hudLayoutScreenController.Enable); 38 await Services.Framework.RunSafely(hudLayoutScreenController.Enable);
39 } 39 }
40 40
41 public override async Task OnDisableAsync() { 41 public override async Task OnDisableAsync() {
42 await Services.Framework.Run(() => hudLayoutScreenController?.Dispose()); 42 await Services.Framework.RunSafely(() => hudLayoutScreenController?.Dispose());
43 hudLayoutScreenController = null; 43 hudLayoutScreenController = null;
44 44
45 textNodes?.Clear(); 45 textNodes?.Clear();
VanillaPlus/Features/HUDPresets/HUDPreset.cs --- C#
48 }; 48 };
49 } 49 }
50 50
51 await Services.Framework.Run(hudLayoutController.Enable); 51 await Services.Framework.RunSafely(hudLayoutController.Enable);
52 } 52 }
53 53
54 public override async Task OnDisableAsync() { 54 public override async Task OnDisableAsync() {
55 await Services.Framework.Run(() => hudLayoutController?.Dispose()); 55 await Services.Framework.RunSafely(() => hudLayoutController?.Dispose());
56 hudLayoutController = null; 56 hudLayoutController = null;
57 57
58 await Task.WhenAll(renameAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask); 58 await Task.WhenAll(renameAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/HideMpBars/HideMpBars.cs --- C#
63 }; 63 };
64 } 64 }
65 65
66 await Services.Framework.Run(() => { 66 await Services.Framework.RunSafely(() => {
67 partyListController.Enable(); 67 partyListController.Enable();
68 paramController.Enable(); 68 paramController.Enable();
69 }); 69 });
70 } 70 }
71 71
72 public override async Task OnDisableAsync() { 72 public override async Task OnDisableAsync() {
73 await Services.Framework.Run(() => { 73 await Services.Framework.RunSafely(() => {
74 partyListController?.Dispose(); 74 partyListController?.Dispose();
75 paramController?.Dispose(); 75 paramController?.Dispose();
76 }); 76 });
VanillaPlus/Features/InventoryCooldowns/InventoryCooldowns.cs --- C#
40 40
41 Services.AddonLifecycle.RegisterListener(AddonEvent.PostReceiveEvent, ["InventoryExpansion", "InventoryLarge 41 Services.AddonLifecycle.RegisterListener(AddonEvent.PostReceiveEvent, ["InventoryExpansion", "InventoryLarge
.. ", "Inventory"], OnPostReceiveEvent); .. ", "Inventory"], OnPostReceiveEvent);
42 42
43 await Services.Framework.Run(controller.Enable); 43 await Services.Framework.RunSafely(controller.Enable);
44 } 44 }
45 45
46 public override async Task OnDisableAsync() { 46 public override async Task OnDisableAsync() {
47 Services.AddonLifecycle.UnregisterListener(OnPostReceiveEvent); 47 Services.AddonLifecycle.UnregisterListener(OnPostReceiveEvent);
48 48
49 await Services.Framework.Run(() => controller?.Dispose()); 49 await Services.Framework.RunSafely(() => controller?.Dispose());
50 controller = null; 50 controller = null;
51 } 51 }
52 52
VanillaPlus/Features/InventorySearchBar/InventorySearchBar.cs --- 1/2 --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
53 Services.ClientState.Login -= OnLogin; 53 Services.ClientState.Login -= OnLogin;
54 Services.ClientState.Logout -= OnLogout; 54 Services.ClientState.Logout -= OnLogout;
55 55
56 await Services.Framework.Run(() => inventoryController?.Dispose()); 56 await Services.Framework.RunSafely(() => inventoryController?.Dispose());
57 keybindListener = null; 57 keybindListener = null;
58 inventoryController = null; 58 inventoryController = null;
59 } 59 }
VanillaPlus/Features/InventorySearchBar/InventorySearchBar.cs --- 2/2 --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
95 Callback = OnKeybindPressed, 95 Callback = OnKeybindPressed,
96 }; 96 };
97 97
98 await Services.Framework.Run(inventoryController.Enable); 98 await Services.Framework.RunSafely(inventoryController.Enable);
99 } 99 }
100 100
101 private unsafe void OnInventorySetup(AtkUnitBase* addon) { 101 private unsafe void OnInventorySetup(AtkUnitBase* addon) {
VanillaPlus/Features/ListInventory/ListInventory.cs --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
76 => inventoryListAddon?.Toggle(); 76 => inventoryListAddon?.Toggle();
77 77
78 private void OnKeybindPressed(ref bool isHandled) { 78 private void OnKeybindPressed(ref bool isHandled) {
79 Services.Framework.Run(() => inventoryListAddon?.Toggle()); 79 Services.Framework.RunSafely(() => inventoryListAddon?.Toggle());
80 80
81 isHandled = true; 81 isHandled = true;
82 } 82 }
VanillaPlus/Features/LockChatButton/LockChatButton.cs --- C#
54 }; 54 };
55 } 55 }
56 56
57 await Services.Framework.Run(() => { 57 await Services.Framework.RunSafely(() => {
58 chatLogController.Enable(); 58 chatLogController.Enable();
59 panelController.Enable(); 59 panelController.Enable();
60 }); 60 });
61 } 61 }
62 62
63 public override async Task OnDisableAsync() { 63 public override async Task OnDisableAsync() {
.. 64 addonControlHook?.Dispose();
.. 65 addonControlHook = null;
.. 66
64 await Services.Framework.Run(() => { 67 await Services.Framework.RunSafely(() => {
65 chatLogController?.Dispose(); 68 chatLogController?.Dispose();
66 panelController?.Dispose(); 69 panelController?.Dispose();
67 70
VanillaPlus/Features/MSQProgressPercent/MSQProgressBar.cs --- Text (20 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
76 }; 76 };
77 } 77 }
78 78
79 await Services.Framework.Run(scenarioTreeAddonController.Enable); 79 await Services.Framework.RunSafely(scenarioTreeAddonController.Enable);
80 } 80 }
81 81
82 public override async Task OnDisableAsync() { 82 public override async Task OnDisableAsync() {
83 await Services.Framework.Run(() => scenarioTreeAddonController?.Dispose()); 83 await Services.Framework.RunSafely(() => scenarioTreeAddonController?.Dispose());
84 scenarioTreeAddonController = null; 84 scenarioTreeAddonController = null;
85 85
86 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask); 86 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/MacroLineNumbers/MacroLineNumbers.cs --- C#
37 }; 37 };
38 } 38 }
39 39
40 await Services.Framework.Run(macroAddonController.Enable); 40 await Services.Framework.RunSafely(macroAddonController.Enable);
41 } 41 }
42 42
43 public override async Task OnDisableAsync() { 43 public override async Task OnDisableAsync() {
44 await Services.Framework.Run(() => macroAddonController?.Dispose()); 44 await Services.Framework.RunSafely(() => macroAddonController?.Dispose());
45 macroAddonController = null; 45 macroAddonController = null;
46 46
47 textNodes?.Clear(); 47 textNodes?.Clear();
VanillaPlus/Features/MiniCactpotHelper/MiniCactpotHelper.cs --- C#
73 }; 73 };
74 } 74 }
75 75
76 await Services.Framework.Run(lotteryDailyController.Enable); 76 await Services.Framework.RunSafely(lotteryDailyController.Enable);
77 } 77 }
78 78
79 public override async Task OnDisableAsync() { 79 public override async Task OnDisableAsync() {
80 gameTask?.Dispose(); 80 gameTask?.Dispose();
81 gameTask = null; 81 gameTask = null;
82 82
83 await Services.Framework.Run(() => lotteryDailyController?.Dispose()); 83 await Services.Framework.RunSafely(() => lotteryDailyController?.Dispose());
84 lotteryDailyController = null; 84 lotteryDailyController = null;
85 85
86 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask); 86 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/MissingJobStoneLockout/MissingJobStoneLockout.cs --- C#
42 }; 42 };
43 } 43 }
44 44
45 await Services.Framework.Run(contentsFinderController.Enable); 45 await Services.Framework.RunSafely(contentsFinderController.Enable);
46 } 46 }
47 47
48 public override async Task OnDisableAsync() { 48 public override async Task OnDisableAsync() {
49 await Services.Framework.Run(() => contentsFinderController?.Dispose()); 49 await Services.Framework.RunSafely(() => contentsFinderController?.Dispose());
50 contentsFinderController = null; 50 contentsFinderController = null;
51 } 51 }
52 52
VanillaPlus/Features/QuestListWindow/QuestListWindow.cs --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
78 => questListAddon?.Toggle(); 78 => questListAddon?.Toggle();
79 79
80 private void OnKeybindPressed(ref bool isHandled) { 80 private void OnKeybindPressed(ref bool isHandled) {
81 Services.Framework.Run(() => questListAddon?.Toggle()); 81 Services.Framework.RunSafely(() => questListAddon?.Toggle());
82 82
83 isHandled = true; 83 isHandled = true;
84 } 84 }
VanillaPlus/Features/QuickPanelAdjustments/CommandPanelAdjustments.cs --- C#
51 }; 51 };
52 } 52 }
53 53
54 await Services.Framework.Run(quickPanelController.Enable); 54 await Services.Framework.RunSafely(quickPanelController.Enable);
55 } 55 }
56 56
57 public override async Task OnDisableAsync() { 57 public override async Task OnDisableAsync() {
58 await Services.Framework.Run(() => quickPanelController?.Dispose()); 58 await Services.Framework.RunSafely(() => quickPanelController?.Dispose());
59 quickPanelController = null; 59 quickPanelController = null;
60 60
61 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask); 61 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/RecentlyLootedWindow/RecentlyLootedWindow.cs --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
77 => addonRecentlyLooted?.Toggle(); 77 => addonRecentlyLooted?.Toggle();
78 78
79 private void OnKeybindPressed(ref bool isHandled) { 79 private void OnKeybindPressed(ref bool isHandled) {
80 Services.Framework.Run(() => addonRecentlyLooted?.Toggle()); 80 Services.Framework.RunSafely(() => addonRecentlyLooted?.Toggle());
81 81
82 isHandled = true; 82 isHandled = true;
83 } 83 }
VanillaPlus/Features/ResetDummyEnmity/ResetDummyEnmity.cs --- C#
47 resetButtons = new CircleButtonNode?[MaxEnemyCount]; 47 resetButtons = new CircleButtonNode?[MaxEnemyCount];
48 buttonTargets = new IBattleChara?[MaxEnemyCount]; 48 buttonTargets = new IBattleChara?[MaxEnemyCount];
49 49
50 await Services.Framework.Run(enemyListController.Enable); 50 await Services.Framework.RunSafely(enemyListController.Enable);
51 } 51 }
52 52
53 public override async Task OnDisableAsync() { 53 public override async Task OnDisableAsync() {
54 await Services.Framework.Run(() => { 54 await Services.Framework.RunSafely(() => {
55 enemyListController?.Dispose(); 55 enemyListController?.Dispose();
56 }); 56 });
57 57
VanillaPlus/Features/ResourceBarPercentages/ResourceBarPercentages.cs --- C#
80 public override async Task OnDisableAsync() { 80 public override async Task OnDisableAsync() {
81 Services.AddonLifecycle.UnregisterListener(OnParameterDraw, OnPartyListDraw); 81 Services.AddonLifecycle.UnregisterListener(OnParameterDraw, OnPartyListDraw);
82 82
83 await Services.Framework.Run(() => { 83 await Services.Framework.RunSafely(() => {
84 OnParameterDisable(); 84 OnParameterDisable();
85 OnPartyListDisable(); 85 OnPartyListDisable();
86 }); 86 });
VanillaPlus/Features/RetainerSearchBar/RetainerSearchBar.cs --- 1/2 --- C#
49 Services.ClientState.Login -= OnLogin; 49 Services.ClientState.Login -= OnLogin;
50 Services.ClientState.Logout -= OnLogout; 50 Services.ClientState.Logout -= OnLogout;
51 51
52 await Services.Framework.Run(() => inventoryController?.Dispose()); 52 await Services.Framework.RunSafely(() => inventoryController?.Dispose());
53 keybindListener = null; 53 keybindListener = null;
54 inventoryController = null; 54 inventoryController = null;
55 } 55 }
VanillaPlus/Features/RetainerSearchBar/RetainerSearchBar.cs --- 2/2 --- C#
90 Callback = OnKeybindPressed, 90 Callback = OnKeybindPressed,
91 }; 91 };
92 92
93 await Services.Framework.Run(inventoryController.Enable); 93 await Services.Framework.RunSafely(inventoryController.Enable);
94 } 94 }
95 95
96 private unsafe void OnInventorySetup(AtkUnitBase* addon) { 96 private unsafe void OnInventorySetup(AtkUnitBase* addon) {
VanillaPlus/Features/ReverseCharacterPanel/ReverseCharacterPanel.cs --- C#
29 }; 29 };
30 } 30 }
31 31
32 await Services.Framework.Run(characterController.Enable); 32 await Services.Framework.RunSafely(characterController.Enable);
33 } 33 }
34 34
35 public override async Task OnDisableAsync() { 35 public override async Task OnDisableAsync() {
36 await Services.Framework.Run(() => characterController?.Dispose()); 36 await Services.Framework.RunSafely(() => characterController?.Dispose());
37 characterController = null; 37 characterController = null;
38 } 38 }
39 39
VanillaPlus/Features/SaddlebagSearchBar/SaddlebagSearchBar.cs --- 1/2 --- C#
48 Callback = OnKeybindPressed, 48 Callback = OnKeybindPressed,
49 }; 49 };
50 50
51 await Services.Framework.Run(inventoryController.Enable); 51 await Services.Framework.RunSafely(inventoryController.Enable);
52 52
53 Services.GameGui.AgentUpdate += OnAgentUpdate; 53 Services.GameGui.AgentUpdate += OnAgentUpdate;
54 Services.Framework.Update += OnFrameworkUpdate; 54 Services.Framework.Update += OnFrameworkUpdate;
VanillaPlus/Features/SaddlebagSearchBar/SaddlebagSearchBar.cs --- 2/2 --- C#
58 Services.Framework.Update -= OnFrameworkUpdate; 58 Services.Framework.Update -= OnFrameworkUpdate;
59 Services.GameGui.AgentUpdate -= OnAgentUpdate; 59 Services.GameGui.AgentUpdate -= OnAgentUpdate;
60 60
61 await Services.Framework.Run(() => inventoryController?.Dispose()); 61 await Services.Framework.RunSafely(() => inventoryController?.Dispose());
62 inventoryController = null; 62 inventoryController = null;
63 } 63 }
64 64
VanillaPlus/Features/ShowAetherCurrents/ShowAetherCurrents.cs --- 1/2 --- C#
41 } 41 }
42 } 42 }
43 43
44 await Services.Framework.Run(() => { 44 await Services.Framework.RunSafely(() => {
45 45
46 foreach (var aetherCurrent in aetherCurrentInfos) { 46 foreach (var aetherCurrent in aetherCurrentInfos) {
47 mapOverlayController.AddMarker(new AetherCurrentMapMarker { 47 mapOverlayController.AddMarker(new AetherCurrentMapMarker {
VanillaPlus/Features/ShowAetherCurrents/ShowAetherCurrents.cs --- 2/2 --- C#
56 } 56 }
57 57
58 public override async Task OnDisableAsync() { 58 public override async Task OnDisableAsync() {
59 await Services.Framework.Run(() => mapOverlayController?.Dispose()); 59 await Services.Framework.RunSafely(() => mapOverlayController?.Dispose());
60 mapOverlayController = null; 60 mapOverlayController = null;
61 } 61 }
62 } 62 }
VanillaPlus/Features/ShowEnemies/ShowEnemies.cs --- 1/2 --- C#
24 public override async Task OnEnableAsync() { 24 public override async Task OnEnableAsync() {
25 mapOverlayController = new MapOverlayController(); 25 mapOverlayController = new MapOverlayController();
26 26
27 await Services.Framework.Run(() => { 27 await Services.Framework.RunSafely(() => {
28 unsafe { 28 unsafe {
29 foreach (var index in Enumerable.Range(0, CharacterManager.Instance()->BattleCharas.Length)) { 29 foreach (var index in Enumerable.Range(0, CharacterManager.Instance()->BattleCharas.Length)) {
30 mapOverlayController.AddMarker(new EnemyMapMarker { 30 mapOverlayController.AddMarker(new EnemyMapMarker {
VanillaPlus/Features/ShowEnemies/ShowEnemies.cs --- 2/2 --- C#
38 } 38 }
39 39
40 public override async Task OnDisableAsync() { 40 public override async Task OnDisableAsync() {
41 await Services.Framework.Run(() => mapOverlayController?.Dispose()); 41 await Services.Framework.RunSafely(() => mapOverlayController?.Dispose());
42 mapOverlayController = null; 42 mapOverlayController = null;
43 } 43 }
44 } 44 }
VanillaPlus/Features/ShowGatheringPoints/ShowGatheringPoints.cs --- 1/2 --- C#
24 public override async Task OnEnableAsync() { 24 public override async Task OnEnableAsync() {
25 mapOverlayController = new MapOverlayController(); 25 mapOverlayController = new MapOverlayController();
26 26
27 await Services.Framework.Run(() => { 27 await Services.Framework.RunSafely(() => {
28 unsafe { 28 unsafe {
29 foreach (var index in Enumerable.Range(0, EventObjectManager.Instance()->EventObjects.Length)) { 29 foreach (var index in Enumerable.Range(0, EventObjectManager.Instance()->EventObjects.Length)) {
30 mapOverlayController.AddMarker(new GatheringPointMapMarker { 30 mapOverlayController.AddMarker(new GatheringPointMapMarker {
VanillaPlus/Features/ShowGatheringPoints/ShowGatheringPoints.cs --- 2/2 --- C#
38 } 38 }
39 39
40 public override async Task OnDisableAsync() { 40 public override async Task OnDisableAsync() {
41 await Services.Framework.Run(() => mapOverlayController?.Dispose()); 41 await Services.Framework.RunSafely(() => mapOverlayController?.Dispose());
42 mapOverlayController = null; 42 mapOverlayController = null;
43 } 43 }
44 } 44 }
VanillaPlus/Features/ShowPlayers/ShowPlayers.cs --- 1/2 --- C#
24 public override async Task OnEnableAsync() { 24 public override async Task OnEnableAsync() {
25 mapOverlayController = new MapOverlayController(); 25 mapOverlayController = new MapOverlayController();
26 26
27 await Services.Framework.Run(() => { 27 await Services.Framework.RunSafely(() => {
28 unsafe { 28 unsafe {
29 foreach (var index in Enumerable.Range(0, CharacterManager.Instance()->BattleCharas.Length)) { 29 foreach (var index in Enumerable.Range(0, CharacterManager.Instance()->BattleCharas.Length)) {
30 mapOverlayController.AddMarker(new PlayerMapMarker { 30 mapOverlayController.AddMarker(new PlayerMapMarker {
VanillaPlus/Features/ShowPlayers/ShowPlayers.cs --- 2/2 --- C#
38 } 38 }
39 39
40 public override async Task OnDisableAsync() { 40 public override async Task OnDisableAsync() {
41 await Services.Framework.Run(() => mapOverlayController?.Dispose()); 41 await Services.Framework.RunSafely(() => mapOverlayController?.Dispose());
42 mapOverlayController = null; 42 mapOverlayController = null;
43 } 43 }
44 } 44 }
VanillaPlus/Features/ShowTreasureChests/ShowTreasureChests.cs --- 1/2 --- C#
24 public override async Task OnEnableAsync() { 24 public override async Task OnEnableAsync() {
25 mapOverlayController = new MapOverlayController(); 25 mapOverlayController = new MapOverlayController();
26 26
27 await Services.Framework.Run(() => { 27 await Services.Framework.RunSafely(() => {
28 unsafe { 28 unsafe {
29 foreach (var index in Enumerable.Range(0, EventObjectManager.Instance()->EventObjects.Length)) { 29 foreach (var index in Enumerable.Range(0, EventObjectManager.Instance()->EventObjects.Length)) {
30 mapOverlayController.AddMarker(new TreasureChestMapMarker { 30 mapOverlayController.AddMarker(new TreasureChestMapMarker {
VanillaPlus/Features/ShowTreasureChests/ShowTreasureChests.cs --- 2/2 --- C#
38 } 38 }
39 39
40 public override async Task OnDisableAsync() { 40 public override async Task OnDisableAsync() {
41 await Services.Framework.Run(() => mapOverlayController?.Dispose()); 41 await Services.Framework.RunSafely(() => mapOverlayController?.Dispose());
42 mapOverlayController = null; 42 mapOverlayController = null;
43 } 43 }
44 } 44 }
VanillaPlus/Features/TargetCastBarCountdown/TargetCastBarCountdown.cs --- Text (10 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
56 }; 56 };
57 } 57 }
58 58
59 await Services.Framework.Run(addonController.Enable); 59 await Services.Framework.RunSafely(addonController.Enable);
60 } 60 }
61 61
62 public override async Task OnDisableAsync() { 62 public override async Task OnDisableAsync() {
63 await Services.Framework.Run(() => addonController?.Dispose()); 63 await Services.Framework.RunSafely(() => addonController?.Dispose());
64 addonController = null; 64 addonController = null;
65 65
66 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask); 66 await Task.WhenAll(configAddon?.DisposeAsync().AsTask() ?? Task.CompletedTask);
VanillaPlus/Features/WindowBackground/WindowBackground.cs --- 1/2 --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
46 AllowMultiselect = true, 46 AllowMultiselect = true,
47 }; 47 };
48 48
49 await Services.Framework.Run(() => { 49 await Services.Framework.RunSafely(() => {
50 unsafe { 50 unsafe {
51 overlayController = new OverlayController(); 51 overlayController = new OverlayController();
52 52
VanillaPlus/Features/WindowBackground/WindowBackground.cs --- 2/2 --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
76 } 76 }
77 77
78 public override async Task OnDisableAsync() { 78 public override async Task OnDisableAsync() {
79 await Services.Framework.Run(() => { 79 await Services.Framework.RunSafely(() => {
80 dynamicAddonController?.Dispose(); 80 dynamicAddonController?.Dispose();
81 overlayController?.Dispose(); 81 overlayController?.Dispose();
82 }); 82 });
VanillaPlus/Features/WondrousTailsProbabilities/WondrousTailsProbabilities.cs --- Text (2 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
50 }; 50 };
51 } 51 }
52 52
53 await Services.Framework.Run(weeklyBingoController.Enable); 53 await Services.Framework.RunSafely(weeklyBingoController.Enable);
54 } 54 }
55 55
56 public override async Task OnDisableAsync() { 56 public override async Task OnDisableAsync() {
57 await Services.Framework.Run(() => weeklyBingoController?.Dispose()); 57 await Services.Framework.RunSafely(() => weeklyBingoController?.Dispose());
58 weeklyBingoController = null; 58 weeklyBingoController = null;
59 59
60 perfectTails = null; 60 perfectTails = null;
VanillaPlus/Native/Addons/ModificationBrowserAddon.cs --- Text (6 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
125 125 }
126 126 }
127 127
... 128 protected override unsafe void OnFinalize(AtkUnitBase* addon) {
... 129 base.OnFinalize(addon);
... 130
... 131 textInputNode = null;
... 132 listNode = null;
... 133 modificationInfoNode = null;
... 134 searchRegex = null;
... 135
... 136 selectedTab = BrowserSelectedTab.All;
... 137 selectedCategory = BrowserSelectedCategory.All;
... 138 }
... 139
128 140 private void SwitchTab(BrowserSelectedTab tab) {
129 141 selectedTab = tab;
130 142 Task.Run(UpdateListNode);
VanillaPlus/Native/Nodes/GameModificationListItemNode.cs --- 1/2 --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
98 refreshCompatabilityButton?.IsEnabled = true; 98 refreshCompatabilityButton?.IsEnabled = true;
99 99
100 if (ItemData is not null) { 100 if (ItemData is not null) {
101 await Services.Framework.Run(() => { 101 await Services.Framework.RunSafely(() => {
102 SetNodeData(ItemData); 102 SetNodeData(ItemData);
103 Addon.UpdateCollisionForNode(this); 103 Addon.UpdateCollisionForNode(this);
104 }); 104 });
VanillaPlus/Native/Nodes/GameModificationListItemNode.cs --- 2/2 --- Text (4 C# parse errors, exceeded DFT_PARSE_ERROR_LIMIT)
252 252
253 Task.Run(async () => { 253 Task.Run(async () => {
254 await ModificationManager.TryToggleModification(ItemData); 254 await ModificationManager.TryToggleModification(ItemData);
255 await Services.Framework.Run(() => SetNodeData(ItemData)); 255 await Services.Framework.RunSafely(() => SetNodeData(ItemData));
256 }); 256 });
257 } 257 }
258 } 258 }
VanillaPlus/Resources/Strings.Designer.cs --- C#
4711 4711 }
4712 4712 }
.... 4713
.... 4714 /// <summary>
.... 4715 /// Looks up a localized string similar to Fancy Loading Screens.
.... 4716 /// </summary>
.... 4717 internal static string ModificationDisplay_FancyLoadingScreens {
.... 4718 get {
.... 4719 return ResourceManager.GetString("ModificationDisplay_FancyLoadingScreens", resourceCulture);
.... 4720 }
.... 4721 }
.... 4722
.... 4723 /// <summary>
.... 4724 /// Looks up a localized string similar to Replaces the loading screen artwork with the destination zone's full-size loading image..
.... 4725 /// </summary>
.... 4726 internal static string ModificationDescription_FancyLoadingScreens {
.... 4727 get {
.... 4728 return ResourceManager.GetString("ModificationDescription_FancyLoadingScreens", resourceCulture);
.... 4729 }
.... 4730 }
.... 4731
.... 4732 /// <summary>
.... 4733 /// Looks up a localized string similar to Fancy Loading Screens.
.... 4734 /// </summary>
.... 4735 internal static string FancyLoadingScreens_ConfigTitle {
.... 4736 get {
.... 4737 return ResourceManager.GetString("FancyLoadingScreens_ConfigTitle", resourceCulture);
.... 4738 }
.... 4739 }
.... 4740
.... 4741 /// <summary>
.... 4742 /// Looks up a localized string similar to General.
.... 4743 /// </summary>
.... 4744 internal static string FancyLoadingScreens_CategoryGeneral {
.... 4745 get {
.... 4746 return ResourceManager.GetString("FancyLoadingScreens_CategoryGeneral", resourceCulture);
.... 4747 }
.... 4748 }
.... 4749
.... 4750 /// <summary>
.... 4751 /// Looks up a localized string similar to Show artwork on instance loads.
.... 4752 /// </summary>
.... 4753 internal static string FancyLoadingScreens_LabelInstancedLoad {
.... 4754 get {
.... 4755 return ResourceManager.GetString("FancyLoadingScreens_LabelInstancedLoad", resourceCulture);
.... 4756 }
.... 4757 }
.... 4758
.... 4759 /// <summary>
.... 4760 /// Looks up a localized string similar to Shows the destination artwork when switching instanced areas (duties, housing, etc.). Note: the artwork covers the chat box, so you cannot chat while loading.
.... 4761 /// </summary>
.... 4762 internal static string FancyLoadingScreens_LabelInstancedLoadNote {
.... 4763 get {
.... 4764 return ResourceManager.GetString("FancyLoadingScreens_LabelInstancedLoadNote", resourceCulture);
.... 4765 }
.... 4766 }
4713 4767 }
4714 4768 }
VanillaPlus/Resources/Strings.resx --- XML
1692 1692 <data name="AddonConfig_DisableKeybindInCombat" xml:space="preserve">
1693 1693 <value>Disable Keybind in Combat</value>
1694 1694 </data>
.... 1695 <data name="ModificationDisplay_FancyLoadingScreens" xml:space="preserve">
.... 1696 <value>Fancy Loading Screens</value>
.... 1697 </data>
.... 1698 <data name="ModificationDescription_FancyLoadingScreens" xml:space="preserve">
.... 1699 <value>Replaces the loading screen artwork with the destination zone's full-size loading image.</value>
.... 1700 </data>
.... 1701 <data name="FancyLoadingScreens_ConfigTitle" xml:space="preserve">
.... 1702 <value>Fancy Loading Screens</value>
.... 1703 </data>
.... 1704 <data name="FancyLoadingScreens_CategoryGeneral" xml:space="preserve">
.... 1705 <value>General</value>
.... 1706 </data>
.... 1707 <data name="FancyLoadingScreens_LabelInstancedLoad" xml:space="preserve">
.... 1708 <value>Show artwork on instance loads</value>
.... 1709 </data>
.... 1710 <data name="FancyLoadingScreens_LabelInstancedLoadNote" xml:space="preserve">
.... 1711 <value>Shows the destination artwork when switching instanced areas (duties, housing, etc.). Note: the artwork covers the chat box, so you cannot chat while loading.</value>
.... 1712 </data>
1695 1713 </root>
VanillaPlus/VanillaPlus.cs --- C#
98 private static void AutoOpenBrowser(bool enabled) { 98 private static void AutoOpenBrowser(bool enabled) {
99 if (!enabled) return; 99 if (!enabled) return;
100 100
101 Services.Framework.Run(System.ModificationBrowserAddon.Open); 101 Services.Framework.RunSafely(System.ModificationBrowserAddon.Open);
102 } 102 }
103 103
104 private static void CommandHandler(string command, string arguments) { 104 private static void CommandHandler(string command, string arguments) {
VanillaPlus/VanillaPlus.csproj --- XML
1 <Project Sdk="Dalamud.NET.Sdk/15.0.0"> 1 <Project Sdk="Dalamud.NET.Sdk/15.0.0">
2 <PropertyGroup> 2 <PropertyGroup>
3 <Version>1.4.1.0</Version> 3 <Version>1.4.1.2</Version>
4 </PropertyGroup> 4 </PropertyGroup>
5 5
6 <PropertyGroup> 6 <PropertyGroup>