Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Tracker Services & Regions #584

Merged
merged 29 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e4cd69c
Initial archipelago mode test
MattEqualsCoder Sep 24, 2024
a34865e
Updates to scan all data from the rom
MattEqualsCoder Sep 27, 2024
3a70a09
Updates to db models
MattEqualsCoder Sep 27, 2024
2068f97
Created separate tracker services
MattEqualsCoder Oct 3, 2024
3ce6baa
DB updates and fixes for generation
MattEqualsCoder Oct 4, 2024
2694e69
Moved to events on Locations, Bosses, etc.
MattEqualsCoder Oct 7, 2024
52357eb
UI fixes
MattEqualsCoder Oct 7, 2024
e508e82
Fixed UI and various issues from testing
MattEqualsCoder Oct 9, 2024
e16f1a5
Updated column sizes
MattEqualsCoder Oct 9, 2024
f1d1d12
Updated unit test
MattEqualsCoder Oct 10, 2024
9e3c533
Fix build errors & warnings
MattEqualsCoder Oct 11, 2024
69ea675
UI Fixes from Testing
MattEqualsCoder Oct 11, 2024
3c8b263
Removed Legacy WPF UI
MattEqualsCoder Oct 11, 2024
4dd1335
Fix certain things not tracking properly
MattEqualsCoder Oct 12, 2024
1e1c135
Fixed various issues from testing
MattEqualsCoder Oct 15, 2024
02de354
Changed ItemService to PlayerProgressionService and WorldService to W…
MattEqualsCoder Oct 16, 2024
4a1b855
Fixes from testing
MattEqualsCoder Oct 17, 2024
5282020
Fix multiworld boss list
MattEqualsCoder Oct 17, 2024
6ead734
Fix multiworld generation issues
MattEqualsCoder Oct 18, 2024
bb932eb
Update multiworld hashing
MattEqualsCoder Oct 18, 2024
3ca8fc1
Fix saving the reward state
MattEqualsCoder Oct 18, 2024
aa6ff41
Merge remote-tracking branch 'origin/main' into ap-mode-model-updates
MattEqualsCoder Oct 22, 2024
fc8d8db
Fix multiworld item syncing
MattEqualsCoder Oct 22, 2024
e9f06f7
Update version number
MattEqualsCoder Oct 22, 2024
7906d69
Fix multiplayer window issues
MattEqualsCoder Oct 24, 2024
4b77e4f
Fix for initial valid memory check not working in some cases
MattEqualsCoder Oct 24, 2024
ef6b62e
Additional fixes for not properly disconnecting from multiworld
MattEqualsCoder Oct 26, 2024
d023321
Merge branch 'main' into ap-mode-model-updates
MattEqualsCoder Oct 26, 2024
784126e
Hide archipelago button
MattEqualsCoder Oct 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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