Skip to content

Commit

Permalink
Merge pull request #584 from TheTrackerCouncil/ap-mode-model-updates
Browse files Browse the repository at this point in the history
Split Tracker Services & Regions
  • Loading branch information
MattEqualsCoder authored Nov 3, 2024
2 parents 80f0b4e + 784126e commit 331b769
Show file tree
Hide file tree
Showing 311 changed files with 10,500 additions and 16,164 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,7 @@ healthchecksdb
/asar/
setup/Output/
patch-config*
**/.DS_Store
**/.DS_Store
**/*.db
**/*.db-shm
**/*.db-wal
9 changes: 0 additions & 9 deletions TrackerCouncil.Smz3.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrackerCouncil.Smz3.Shared"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrackerCouncil.Smz3.Tools", "src\TrackerCouncil.Smz3.Tools\TrackerCouncil.Smz3.Tools.csproj", "{B594A95C-7B87-447A-8A80-EBF6991EB04C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrackerCouncil.Smz3.UI.Legacy", "src\TrackerCouncil.Smz3.UI.Legacy\TrackerCouncil.Smz3.UI.Legacy.csproj", "{CCEDE012-894B-48F6-811E-B2324E74C604}"
ProjectSection(ProjectDependencies) = postProject
{A9465041-3416-4C60-A160-1454A045B90F} = {A9465041-3416-4C60-A160-1454A045B90F}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F11C9119-7B5E-46E4-9A58-E157B80C7E9F}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Expand Down Expand Up @@ -69,10 +64,6 @@ Global
{B594A95C-7B87-447A-8A80-EBF6991EB04C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B594A95C-7B87-447A-8A80-EBF6991EB04C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B594A95C-7B87-447A-8A80-EBF6991EB04C}.Release|Any CPU.Build.0 = Release|Any CPU
{CCEDE012-894B-48F6-811E-B2324E74C604}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCEDE012-894B-48F6-811E-B2324E74C604}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCEDE012-894B-48F6-811E-B2324E74C604}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCEDE012-894B-48F6-811E-B2324E74C604}.Release|Any CPU.Build.0 = Release|Any CPU
{286CCBD5-FB69-4120-A0DB-FBDAD5C43072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{286CCBD5-FB69-4120-A0DB-FBDAD5C43072}.Debug|Any CPU.Build.0 = Debug|Any CPU
{286CCBD5-FB69-4120-A0DB-FBDAD5C43072}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
168 changes: 0 additions & 168 deletions src/TrackerCouncil.Smz3.Abstractions/IItemService.cs

This file was deleted.

75 changes: 75 additions & 0 deletions src/TrackerCouncil.Smz3.Abstractions/IPlayerProgressionService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using TrackerCouncil.Smz3.Data.WorldData;
using TrackerCouncil.Smz3.Data.WorldData.Regions;
using TrackerCouncil.Smz3.Shared.Enums;

namespace TrackerCouncil.Smz3.Abstractions;

/// <summary>
/// Defines methods for retrieving the progression and individual tracking statuses
/// </summary>
public interface IPlayerProgressionService
{
/// <summary>
/// Enumarates all currently tracked items for the local player.
/// </summary>
/// <returns>
/// A collection of items that have been tracked at least once.
/// </returns>
IEnumerable<Item> TrackedItems();

/// <summary>
/// Indicates whether an item of the specified type has been tracked
/// for the local player.
/// </summary>
/// <param name="itemType">The type of item to check.</param>
/// <returns>
/// <see langword="true"/> if an item with the specified type has been
/// tracked at least once; otherwise, <see langword="false"/>.
/// </returns>
bool IsTracked(ItemType itemType);

/// <summary>
/// Enumarates all currently tracked rewards for the local player.
/// </summary>
/// <returns>
/// A collection of reward that have been tracked.
/// </returns>
IEnumerable<Reward> TrackedRewards();

/// <summary>
/// Enumarates all currently tracked bosses for the local player.
/// </summary>
/// <returns>
/// A collection of bosses that have been tracked.
/// </returns>
IEnumerable<Boss> TrackedBosses();

/// <summary>
/// Retrieves the progression containing all of the tracked items, rewards, and bosses
/// for determining in logic locations
/// </summary>
/// <param name="assumeKeys">If it should be assumed that the player has all keys and keycards</param>
/// <returns></returns>
Progression GetProgression(bool assumeKeys);

/// <summary>
/// Retrieves the progression containing all of the tracked items, rewards, and bosses
/// for determining in logic locations
/// </summary>
/// <param name="area">The area being looked at to see if keys/keycards should be assumed or not</param>
/// <returns></returns>
Progression GetProgression(IHasLocations area);

/// <summary>
/// Retrieves the progression containing all of the tracked items, rewards, and bosses
/// for determining in logic locations
/// </summary>
/// <param name="location">The location being looked at to see if keys/keycards should be assumed or not</param>
/// <returns></returns>
Progression GetProgression(Location location);

/// <summary>
/// Clears cached progression
/// </summary>
void ResetProgression();
}
58 changes: 58 additions & 0 deletions src/TrackerCouncil.Smz3.Abstractions/ITrackerBossService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using TrackerCouncil.Smz3.Data.Tracking;
using TrackerCouncil.Smz3.Data.WorldData;
using TrackerCouncil.Smz3.Data.WorldData.Regions;

namespace TrackerCouncil.Smz3.Abstractions;

public interface ITrackerBossService
{
public event EventHandler<BossTrackedEventArgs>? BossUpdated;

/// <summary>
/// Marks a dungeon as cleared and, if possible, tracks the boss reward.
/// </summary>
/// <param name="region">The dungeon that was cleared.</param>
/// <param name="confidence">The speech recognition confidence.</param>
/// <param name="autoTracked">If this was cleared by the auto tracker</param>
/// <param name="admittedGuilt">
/// <see langword="true"/> if the command implies the boss was killed;
/// <see langword="false"/> if the boss was simply "tracked".
/// </param>
public void MarkBossAsDefeated(IHasBoss region, float? confidence = null, bool autoTracked = false, bool admittedGuilt = false);

/// <summary>
/// Marks a boss as defeated.
/// </summary>
/// <param name="boss">The boss that was defeated.</param>
/// <param name="admittedGuilt">
/// <see langword="true"/> if the command implies the boss was killed;
/// <see langword="false"/> if the boss was simply "tracked".
/// </param>
/// <param name="confidence">The speech recognition confidence.</param>
/// <param name="autoTracked">If this was tracked by the auto tracker</param>
public void MarkBossAsDefeated(Boss boss, bool admittedGuilt = true, float? confidence = null,
bool autoTracked = false);

/// <summary>
/// Un-marks a boss as defeated.
/// </summary>
/// <param name="boss">The boss that should be 'revived'.</param>
/// <param name="confidence">The speech recognition confidence.</param>
public void MarkBossAsNotDefeated(Boss boss, float? confidence = null);

/// <summary>
/// Un-marks a dungeon as cleared and, if possible, untracks the boss
/// reward.
/// </summary>
/// <param name="region">The dungeon that should be un-cleared.</param>
/// <param name="confidence">The speech recognition confidence.</param>
public void MarkBossAsNotDefeated(IHasBoss region, float? confidence = null);

public void UpdateAccessibility(Progression? actualProgression = null, Progression? withKeysProgression = null);

public void UpdateAccessibility(Boss boss, Progression? actualProgression = null, Progression? withKeysProgression = null);

public void UpdateAccessibility(IHasBoss region, Progression? actualProgression = null, Progression? withKeysProgression = null);


}
Loading

0 comments on commit 331b769

Please sign in to comment.