diff --git a/Questionable.Model/GatheringMath.cs b/Questionable.Model/GatheringMath.cs index 46105e1aa..86fca7854 100644 --- a/Questionable.Model/GatheringMath.cs +++ b/Questionable.Model/GatheringMath.cs @@ -2,23 +2,23 @@ using System.Numerics; using Questionable.Model.Gathering; -namespace GatheringPathRenderer; +namespace Questionable.Model; public static class GatheringMath { - private static readonly Random RNG = new Random(); + private static readonly Random Rng = new Random(); public static (Vector3, int, float) CalculateLandingLocation(GatheringLocation location) { int degrees; if (location.IsCone()) - degrees = RNG.Next( + degrees = Rng.Next( location.MinimumAngle.GetValueOrDefault(), location.MaximumAngle.GetValueOrDefault()); else - degrees = RNG.Next(0, 360); + degrees = Rng.Next(0, 360); - float range = RNG.Next( + float range = Rng.Next( (int)(location.CalculateMinimumDistance() * 100), (int)((location.CalculateMaximumDistance() - location.CalculateMinimumDistance()) * 100)) / 100f; return (CalculateLandingLocation(location.Position, degrees, range), degrees, range); diff --git a/Questionable.sln.DotSettings b/Questionable.sln.DotSettings index a8a650e8a..3c6b4ec86 100644 --- a/Questionable.sln.DotSettings +++ b/Questionable.sln.DotSettings @@ -1,4 +1,5 @@  + ExplicitlyExcluded True True True diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 1b62bc650..3cf9def63 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -182,7 +182,7 @@ internal sealed class QuestController : MiniTaskController UpdateCurrentTask(); } - private unsafe void UpdateCurrentQuest() + private void UpdateCurrentQuest() { lock (_progressLock) { diff --git a/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs b/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs index 45f4113d2..36447e997 100644 --- a/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs +++ b/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Dalamud.Game.Text; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -149,6 +150,7 @@ internal sealed class DoGatherCollectable( public override string ToString() => $"DoGatherCollectable({SeIconChar.Collectible.ToIconString()} {_currentRequest.Collectability})"; + [SuppressMessage("ReSharper", "NotAccessedPositionalProperty.Local")] private sealed record NodeCondition( uint CurrentCollectability, uint MaxCollectability, diff --git a/Questionable/Controller/Steps/Gathering/MoveToLandingLocation.cs b/Questionable/Controller/Steps/Gathering/MoveToLandingLocation.cs index b565cfc1e..ff27374ed 100644 --- a/Questionable/Controller/Steps/Gathering/MoveToLandingLocation.cs +++ b/Questionable/Controller/Steps/Gathering/MoveToLandingLocation.cs @@ -4,11 +4,11 @@ using System.Linq; using System.Numerics; using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Plugin.Services; -using GatheringPathRenderer; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Questionable.Controller.Steps.Shared; using Questionable.Functions; +using Questionable.Model; using Questionable.Model.Gathering; namespace Questionable.Controller.Steps.Gathering; diff --git a/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs b/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs index 3c1a92ff2..e1ef508bd 100644 --- a/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs +++ b/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs @@ -24,7 +24,6 @@ internal sealed class ActiveQuestComponent private readonly MovementController _movementController; private readonly CombatController _combatController; private readonly GatheringController _gatheringController; - private readonly GameFunctions _gameFunctions; private readonly QuestFunctions _questFunctions; private readonly ICommandManager _commandManager; private readonly IDalamudPluginInterface _pluginInterface; @@ -37,7 +36,6 @@ internal sealed class ActiveQuestComponent MovementController movementController, CombatController combatController, GatheringController gatheringController, - GameFunctions gameFunctions, QuestFunctions questFunctions, ICommandManager commandManager, IDalamudPluginInterface pluginInterface, @@ -49,7 +47,6 @@ internal sealed class ActiveQuestComponent _movementController = movementController; _combatController = combatController; _gatheringController = gatheringController; - _gameFunctions = gameFunctions; _questFunctions = questFunctions; _commandManager = commandManager; _pluginInterface = pluginInterface;