From 7cef5aea08dc79f6e69d4c9070b89f20bef08cfd Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 11:33:28 -0500 Subject: [PATCH 01/10] Fix issue with parsed roms not tracking dungeon items --- .../WorldData/Regions/Region.cs | 16 +++++++++++++--- .../WorldData/Regions/Zelda/CastleTower.cs | 5 ++++- .../WorldData/Regions/Zelda/DesertPalace.cs | 8 +++++++- .../WorldData/Regions/Zelda/EasternPalace.cs | 7 ++++++- .../WorldData/Regions/Zelda/GanonsTower.cs | 8 +++++++- .../WorldData/Regions/Zelda/HyruleCastle.cs | 6 +++++- .../WorldData/Regions/Zelda/IcePalace.cs | 8 +++++++- .../WorldData/Regions/Zelda/MiseryMire.cs | 8 +++++++- .../WorldData/Regions/Zelda/PalaceOfDarkness.cs | 8 +++++++- .../WorldData/Regions/Zelda/SkullWoods.cs | 8 +++++++- .../WorldData/Regions/Zelda/SwampPalace.cs | 8 +++++++- .../WorldData/Regions/Zelda/ThievesTown.cs | 8 +++++++- .../WorldData/Regions/Zelda/TowerOfHera.cs | 8 +++++++- .../WorldData/Regions/Zelda/TurtleRock.cs | 8 +++++++- .../FileData/Patches/LocationsPatch.cs | 6 +++++- 15 files changed, 103 insertions(+), 17 deletions(-) diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Region.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Region.cs index 660098b9..50d4d544 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Region.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Region.cs @@ -83,9 +83,9 @@ protected Region(World world, Config config, IMetadataService? metadata, Tracker public ILogic Logic => World.Logic; /// - /// Gets the list of region-specific items, e.g. keys, maps, compasses. + /// Gets the map of generic items to region-specific items, e.g. keys, maps, compasses /// - protected IList RegionItems { get; init; } = new List(); + protected IDictionary RegionItems { get; init; } = new Dictionary(); /// /// Name of the map to display when in this region @@ -102,7 +102,17 @@ protected Region(World world, Config config, IMetadataService? metadata, Tracker /// public bool IsRegionItem(Item item) { - return RegionItems.Contains(item.Type); + return RegionItems.Values.Contains(item.Type); + } + + /// + /// Takes a generic item (e.g. key, compass, etc.) and returns the regional specific version of it if found + /// + /// The generic item that is desired to be replaced + /// The regional version of the item, if found. Returns the originalType passed in if not found. + public ItemType ConvertToRegionItemType(ItemType originalType) + { + return RegionItems.TryGetValue(originalType, out var itemType) ? itemType : originalType; } /// diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/CastleTower.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/CastleTower.cs index a18bb095..73d70582 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/CastleTower.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/CastleTower.cs @@ -14,7 +14,10 @@ public class CastleTower : Z3Region, IHasReward, IHasTreasure, IHasBoss public CastleTower(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyCT]; + RegionItems = new Dictionary() + { + { ItemType.Key, ItemType.KeyCT } + }; Foyer = new FoyerRoom(this, metadata, trackerState); DarkMaze = new DarkMazeRoom(this, metadata, trackerState); diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DesertPalace.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DesertPalace.cs index 9224befc..8ac5919a 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DesertPalace.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DesertPalace.cs @@ -14,7 +14,13 @@ public class DesertPalace : Z3Region, IHasReward, IHasTreasure, IHasBoss { public DesertPalace(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyDP, ItemType.BigKeyDP, ItemType.MapDP, ItemType.CompassDP]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyDP }, + { ItemType.BigKey, ItemType.BigKeyDP }, + { ItemType.Map, ItemType.MapDP }, + { ItemType.Compass, ItemType.CompassDP }, + }; BigChest = new Location(this, LocationId.DesertPalaceBigChest, 0x1E98F, LocationType.Regular, name: "Big Chest", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/EasternPalace.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/EasternPalace.cs index 4def7d2f..bbf4044f 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/EasternPalace.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/EasternPalace.cs @@ -14,7 +14,12 @@ public class EasternPalace : Z3Region, IHasReward, IHasTreasure, IHasBoss { public EasternPalace(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.BigKeyEP, ItemType.MapEP, ItemType.CompassEP]; + RegionItems = new Dictionary + { + { ItemType.BigKey, ItemType.BigKeyEP }, + { ItemType.Map, ItemType.MapEP }, + { ItemType.Compass, ItemType.CompassEP }, + }; CannonballChest = new Location(this, LocationId.EasternPalaceCannonballChest, 0x1E9B3, LocationType.Regular, name: "Cannonball Chest", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs index 7926705b..71a5e382 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs @@ -14,7 +14,13 @@ public class GanonsTower : Z3Region, IHasTreasure, IHasBoss { public GanonsTower(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyGT, ItemType.BigKeyGT, ItemType.MapGT, ItemType.CompassGT]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyGT }, + { ItemType.BigKey, ItemType.BigKeyGT }, + { ItemType.Map, ItemType.MapGT }, + { ItemType.Compass, ItemType.CompassGT }, + }; BobsTorch = new Location(this, LocationId.GanonsTowerBobsTorch, 0x308161, LocationType.Regular, name: "Bob's Torch", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/HyruleCastle.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/HyruleCastle.cs index 9d7a8921..3c1d8c9d 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/HyruleCastle.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/HyruleCastle.cs @@ -16,7 +16,11 @@ public class HyruleCastle : Z3Region, IHasTreasure, IHasBoss public HyruleCastle(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyHC, ItemType.MapHC]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyHC }, + { ItemType.Map, ItemType.MapHC }, + }; Sanctuary = new Location(this, LocationId.Sanctuary, 0x1EA79, LocationType.Regular, name: "Sanctuary", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs index d0eeb229..e804e5b3 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs @@ -14,7 +14,13 @@ public class IcePalace : Z3Region, IHasReward, IHasTreasure, IHasBoss { public IcePalace(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyIP, ItemType.BigKeyIP, ItemType.MapIP, ItemType.CompassIP]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyIP }, + { ItemType.BigKey, ItemType.BigKeyIP }, + { ItemType.Map, ItemType.MapIP }, + { ItemType.Compass, ItemType.CompassIP }, + }; CompassChest = new Location(this, LocationId.IcePalaceCompassChest, 0x1E9D4, LocationType.Regular, name: "Compass Chest", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs index 117661b3..0322997f 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs @@ -14,7 +14,13 @@ public class MiseryMire : Z3Region, IHasReward, IHasPrerequisite, IHasTreasure, { public MiseryMire(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyMM, ItemType.BigKeyMM, ItemType.MapMM, ItemType.CompassMM]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyMM }, + { ItemType.BigKey, ItemType.BigKeyMM }, + { ItemType.Map, ItemType.MapMM }, + { ItemType.Compass, ItemType.CompassMM }, + }; MainLobby = new Location(this, LocationId.MiseryMireMainLobby, 0x1EA5E, LocationType.Regular, name: "Main Lobby", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs index cd08f83a..4751d578 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs @@ -14,7 +14,13 @@ public class PalaceOfDarkness : Z3Region, IHasReward, IHasTreasure, IHasBoss { public PalaceOfDarkness(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyPD, ItemType.BigKeyPD, ItemType.MapPD, ItemType.CompassPD]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyPD }, + { ItemType.BigKey, ItemType.BigKeyPD }, + { ItemType.Map, ItemType.MapPD }, + { ItemType.Compass, ItemType.CompassPD }, + }; ShooterRoom = new Location(this, LocationId.PalaceOfDarknessShooterRoom, 0x1EA5B, LocationType.Regular, name: "Shooter Room", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs index 20111987..ac5002e6 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs @@ -14,7 +14,13 @@ public class SkullWoods : Z3Region, IHasReward, IHasTreasure, IHasBoss { public SkullWoods(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeySW, ItemType.BigKeySW, ItemType.MapSW, ItemType.CompassSW]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeySW }, + { ItemType.BigKey, ItemType.BigKeySW }, + { ItemType.Map, ItemType.MapSW }, + { ItemType.Compass, ItemType.CompassSW }, + }; PotPrison = new Location(this, LocationId.SkullWoodsPotPrison, 0x1E9A1, LocationType.Regular, name: "Pot Prison", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs index 1f103918..746e2117 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs @@ -14,7 +14,13 @@ public class SwampPalace : Z3Region, IHasReward, IHasTreasure, IHasBoss { public SwampPalace(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeySP, ItemType.BigKeySP, ItemType.MapSP, ItemType.CompassSP]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeySP }, + { ItemType.BigKey, ItemType.BigKeySP }, + { ItemType.Map, ItemType.MapSP }, + { ItemType.Compass, ItemType.CompassSP }, + }; Entrance = new Location(this, LocationId.SwampPalaceEntrance, 0x1EA9D, LocationType.Regular, name: "Entrance", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs index 6f6a57d0..753d4671 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs @@ -14,7 +14,13 @@ public class ThievesTown : Z3Region, IHasReward, IHasTreasure, IHasBoss { public ThievesTown(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyTT, ItemType.BigKeyTT, ItemType.MapTT, ItemType.CompassTT]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyTT }, + { ItemType.BigKey, ItemType.BigKeyTT }, + { ItemType.Map, ItemType.MapTT }, + { ItemType.Compass, ItemType.CompassTT }, + }; MapChest = new Location(this, LocationId.ThievesTownMapChest, 0x1EA01, LocationType.Regular, name: "Map Chest", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TowerOfHera.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TowerOfHera.cs index 35e29a50..241fdfb1 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TowerOfHera.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TowerOfHera.cs @@ -14,7 +14,13 @@ public class TowerOfHera : Z3Region, IHasReward, IHasTreasure, IHasBoss { public TowerOfHera(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyTH, ItemType.BigKeyTH, ItemType.MapTH, ItemType.CompassTH]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyTH }, + { ItemType.BigKey, ItemType.BigKeyTH }, + { ItemType.Map, ItemType.MapTH }, + { ItemType.Compass, ItemType.CompassTH }, + }; BasementCage = new Location(this, LocationId.TowerOfHeraBasementCage, 0x308162, LocationType.HeraStandingKey, name: "Basement Cage", diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs index bdd64d01..67ff27ce 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs @@ -14,7 +14,13 @@ public class TurtleRock : Z3Region, IHasReward, IHasPrerequisite, IHasTreasure, { public TurtleRock(World world, Config config, IMetadataService? metadata, TrackerState? trackerState) : base(world, config, metadata, trackerState) { - RegionItems = [ItemType.KeyTR, ItemType.BigKeyTR, ItemType.MapTR, ItemType.CompassTR]; + RegionItems = new Dictionary + { + { ItemType.Key, ItemType.KeyTR }, + { ItemType.BigKey, ItemType.BigKeyTR }, + { ItemType.Map, ItemType.MapTR }, + { ItemType.Compass, ItemType.CompassTR }, + }; CompassChest = new Location(this, LocationId.TurtleRockCompassChest, 0x1EA22, LocationType.Regular, name: "Compass Chest", diff --git a/src/TrackerCouncil.Smz3.SeedGenerator/FileData/Patches/LocationsPatch.cs b/src/TrackerCouncil.Smz3.SeedGenerator/FileData/Patches/LocationsPatch.cs index dbb7b541..0a7498e2 100644 --- a/src/TrackerCouncil.Smz3.SeedGenerator/FileData/Patches/LocationsPatch.cs +++ b/src/TrackerCouncil.Smz3.SeedGenerator/FileData/Patches/LocationsPatch.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Text; using TrackerCouncil.Smz3.Data.ParsedRom; @@ -212,6 +211,11 @@ private static ParsedRomLocationDetails GetParsedLocationDetails(byte[] rom, Loc isProgression = true; } + if (itemType is ItemType.Key or ItemType.BigKey or ItemType.Compass or ItemType.Map) + { + var originalItemType = itemType; + itemType = location.Region.ConvertToRegionItemType(originalItemType); + } return new ParsedRomLocationDetails() { From faf2c8066d4579e701600bf7ae607839db956060 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 12:03:34 -0500 Subject: [PATCH 02/10] Update to clear auto tracked locations even if item tracking fails --- .../TrackingServices/TrackerItemService.cs | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerItemService.cs b/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerItemService.cs index 290a9595..eb89eed9 100644 --- a/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerItemService.cs +++ b/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerItemService.cs @@ -87,7 +87,7 @@ public bool TrackItem(Item item, string? trackedAs = null, float? confidence = n Tracker.Say(response: Responses.TrackedItemByStage, args: [itemName, stageName]); } } - else + else if (!autoTracked) { Tracker.Say(response: Responses.TrackedOlderProgressiveItem, args: [itemName, item.Metadata.Stages[item.TrackingState].ToString()]); } @@ -111,7 +111,7 @@ public bool TrackItem(Item item, string? trackedAs = null, float? confidence = n Tracker.Say(response: Responses.TrackedProgressiveItem, args: [itemName, stageName]); } } - else + else if (!autoTracked) { Tracker.Say(response: Responses.TrackedTooManyOfAnItem, args: [itemName]); } @@ -123,27 +123,28 @@ public bool TrackItem(Item item, string? trackedAs = null, float? confidence = n logger.LogInformation("Tracking local player multiple item {ItemType}", item.Type.GetDescription()); didTrack = item.Track(); - if (item.TryGetTrackingResponse(out var response)) + + if (stateResponse) { - if (stateResponse) + if (item.TryGetTrackingResponse(out var response)) + { Tracker.Say(response: response, args: [item.Counter]); - } - else if (item.Counter == 1) - { - if (stateResponse) + } + else if (item.Counter == 1) + { Tracker.Say(response: Responses.TrackedItem, args: [itemName, item.Metadata.NameWithArticle]); - } - else if (item.Counter > 1) - { - if (stateResponse) + } + else if (item.Counter > 1) + { Tracker.Say(response: Responses.TrackedItemMultiple, args: [item.Metadata.Plural ?? $"{itemName}s", item.Counter, item.Name]); - } - else - { - logger.LogWarning("Encountered multiple item with counter 0: {Item} has counter {Counter}", item, item.Counter); - if (stateResponse) + } + else if (!autoTracked) + { + logger.LogWarning("Encountered multiple item with counter 0: {Item} has counter {Counter}", item, item.Counter); Tracker.Say(response: Responses.TrackedAlreadyTrackedItem, args: [itemName]); + } } + } else { @@ -163,7 +164,7 @@ public bool TrackItem(Item item, string? trackedAs = null, float? confidence = n Tracker.Say(response: Responses.TrackedItem, args: [itemName, item.Metadata.NameWithArticle]); } } - else + else if (!autoTracked) { Tracker.Say(response: Responses.TrackedAlreadyTrackedItem, args: [itemName]); } @@ -199,6 +200,13 @@ public bool TrackItem(Item item, string? trackedAs = null, float? confidence = n if (!didTrack) { + // If we couldn't track the item for some reason (e.g. an AP seed where you had starting items), but this + // is an uncleared auto tracked location, we should still clear it + if (location != null && autoTracked && !location.Cleared) + { + Tracker.LocationTracker.Clear(location, confidence, autoTracked, stateResponse: false, allowLocationComments: true, updateTreasureCount: true); + } + return false; } From d0bd0130a0d831070e577730f1b9167e76c6ad79 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 14:10:52 -0500 Subject: [PATCH 03/10] Fix pyramid ledge not properly showing in logic for AP seeds --- src/TrackerCouncil.Smz3.LegacyLogic/LegacyWorld.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TrackerCouncil.Smz3.LegacyLogic/LegacyWorld.cs b/src/TrackerCouncil.Smz3.LegacyLogic/LegacyWorld.cs index 84ca39ca..9c03f8e5 100644 --- a/src/TrackerCouncil.Smz3.LegacyLogic/LegacyWorld.cs +++ b/src/TrackerCouncil.Smz3.LegacyLogic/LegacyWorld.cs @@ -126,7 +126,7 @@ public void Setup(LegacyWorldState state) { } void SetRewards(IEnumerable rewards) { - var regions = Regions.OfType().Where(x => x.LegacyReward == None); + var regions = Regions.OfType().Where(x => x.LegacyReward != Agahnim); foreach (var (region, reward) in regions.Zip(rewards)) { region.LegacyReward = reward; } From c4f59a46082bf0bc93afc6bcb9c9759d980d3215 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 14:33:38 -0500 Subject: [PATCH 04/10] Fix Aga not being marked by default --- src/TrackerCouncil.Smz3.Data/WorldData/Regions/IHasReward.cs | 4 ++++ .../ViewModels/TrackerWindowDungeonPanelViewModel.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/IHasReward.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/IHasReward.cs index 398cd87b..941ddcd0 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/IHasReward.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/IHasReward.cs @@ -49,6 +49,10 @@ public void SetRewardType(RewardType rewardType) Reward = region.World.Rewards.First(x => x.Type == rewardType && x.Region == null); Reward.Region = this; RewardState.RewardType = rewardType; + if (rewardType.IsInCategory(RewardCategory.NonRandomized)) + { + RewardState.MarkedReward = RewardType; + } } public RewardType MarkedReward diff --git a/src/TrackerCouncil.Smz3.UI/ViewModels/TrackerWindowDungeonPanelViewModel.cs b/src/TrackerCouncil.Smz3.UI/ViewModels/TrackerWindowDungeonPanelViewModel.cs index 1dbbf89c..4fd413be 100644 --- a/src/TrackerCouncil.Smz3.UI/ViewModels/TrackerWindowDungeonPanelViewModel.cs +++ b/src/TrackerCouncil.Smz3.UI/ViewModels/TrackerWindowDungeonPanelViewModel.cs @@ -74,7 +74,7 @@ public override List GetMenuItems() menuItems.Add(menuItem); } - if (RewardRegion != null) + if (RewardRegion != null && RewardRegion?.RewardType.IsInCategory(RewardCategory.NonRandomized) != true) { AddRewardMenuItem(menuItems, RewardType.PendantGreen); AddRewardMenuItem(menuItems, RewardType.PendantRed); @@ -84,7 +84,7 @@ public override List GetMenuItems() } // For parsed AP/Mainline roms, show the Metroid boss rewards - if (Region?.World.Config.RomGenerator != RomGenerator.Cas) + if (Region?.World.Config.RomGenerator != RomGenerator.Cas && RewardRegion?.RewardType.IsInCategory(RewardCategory.NonRandomized) != true) { AddRewardMenuItem(menuItems, RewardType.KraidToken); AddRewardMenuItem(menuItems, RewardType.PhantoonToken); From 19e070379b4bc269f36735ffa0ff5dd9cdffd810 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 14:40:57 -0500 Subject: [PATCH 05/10] Remove verification comments on killing bosses for content --- .../ITrackerBossService.cs | 2 +- .../VoiceCommands/BossTrackingModule.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TrackerCouncil.Smz3.Abstractions/ITrackerBossService.cs b/src/TrackerCouncil.Smz3.Abstractions/ITrackerBossService.cs index 38233116..4f7314b4 100644 --- a/src/TrackerCouncil.Smz3.Abstractions/ITrackerBossService.cs +++ b/src/TrackerCouncil.Smz3.Abstractions/ITrackerBossService.cs @@ -17,8 +17,8 @@ public interface ITrackerBossService /// /// if the command implies the boss was killed; /// if the boss was simply "tracked". - /// If the boss should be forced to be tracked while auto tracking /// + /// If the boss should be forced to be tracked while auto tracking public void MarkBossAsDefeated(IHasBoss region, float? confidence = null, bool autoTracked = false, bool admittedGuilt = false, bool force = false); /// diff --git a/src/TrackerCouncil.Smz3.Tracking/VoiceCommands/BossTrackingModule.cs b/src/TrackerCouncil.Smz3.Tracking/VoiceCommands/BossTrackingModule.cs index 18b8b082..a8f7c500 100644 --- a/src/TrackerCouncil.Smz3.Tracking/VoiceCommands/BossTrackingModule.cs +++ b/src/TrackerCouncil.Smz3.Tracking/VoiceCommands/BossTrackingModule.cs @@ -149,11 +149,11 @@ public override void AddCommands() if (contentItemData != null) { TrackerBase.Say(x => x.DungeonBossClearedAddContent); - TrackerBase.ItemTracker.TrackItem(contentItemData); + TrackerBase.ItemTracker.TrackItem(contentItemData, force: true); } // Track boss with associated dungeon - TrackerBase.BossTracker.MarkBossAsDefeated(dungeon, result.Confidence); + TrackerBase.BossTracker.MarkBossAsDefeated(dungeon, result.Confidence, force: true); return; } @@ -163,13 +163,13 @@ public override void AddCommands() if (contentItemData != null) { TrackerBase.Say(x => x.DungeonBossClearedAddContent); - TrackerBase.ItemTracker.TrackItem(contentItemData); + TrackerBase.ItemTracker.TrackItem(contentItemData, force: true); } // Track standalone boss var admittedGuilt = result.Text.ContainsAny("killed", "beat", "defeated", "dead") && !result.Text.ContainsAny("beat off", "beaten off"); - TrackerBase.BossTracker.MarkBossAsDefeated(boss, admittedGuilt, result.Confidence); + TrackerBase.BossTracker.MarkBossAsDefeated(boss, admittedGuilt, result.Confidence, force: true); return; } From 65015ee263585bfb43d3165b09f89c403f5f650e Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 17:16:06 -0500 Subject: [PATCH 06/10] Update chat greeting time limit verbiage --- .../ViewModels/OptionsWindowTwitchIntegration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TrackerCouncil.Smz3.Data/ViewModels/OptionsWindowTwitchIntegration.cs b/src/TrackerCouncil.Smz3.Data/ViewModels/OptionsWindowTwitchIntegration.cs index a91724d4..407ec31a 100644 --- a/src/TrackerCouncil.Smz3.Data/ViewModels/OptionsWindowTwitchIntegration.cs +++ b/src/TrackerCouncil.Smz3.Data/ViewModels/OptionsWindowTwitchIntegration.cs @@ -62,7 +62,7 @@ public string TwitchStatusText [DynamicFormFieldCheckBox("Enable poll creation", order: 60)] public bool EnablePollCreation { get; set; } - [DynamicFormFieldNumericUpDown(minValue: 0, label: "Chat response time limit (in minutes):", groupName: "Bottom", order: 70)] + [DynamicFormFieldNumericUpDown(minValue: 0, label: "Chat greeting time period (in minutes):", groupName: "Bottom", order: 70, toolTipText: "How long before tracker will stop responding to messages from chat greeting her.")] public int ChatGreetingTimeLimit { get; set; } [DynamicFormFieldComboBox(label: "GT guessing game style:", order: 80)] From aa4bf7f45f2977eec4e8ebe31f14109c865059f5 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 18:57:10 -0500 Subject: [PATCH 07/10] Fix refresh profiles not working --- src/TrackerCouncil.Smz3.Data/TrackerCouncil.Smz3.Data.csproj | 2 +- src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TrackerCouncil.Smz3.Data/TrackerCouncil.Smz3.Data.csproj b/src/TrackerCouncil.Smz3.Data/TrackerCouncil.Smz3.Data.csproj index 7da69b66..d040d65f 100644 --- a/src/TrackerCouncil.Smz3.Data/TrackerCouncil.Smz3.Data.csproj +++ b/src/TrackerCouncil.Smz3.Data/TrackerCouncil.Smz3.Data.csproj @@ -23,7 +23,7 @@ - + diff --git a/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj b/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj index 631dc709..8dedd10d 100644 --- a/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj +++ b/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj @@ -20,7 +20,7 @@ - + From ff43b865c4206103cae622dfa9accab659fdac39 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 19:06:04 -0500 Subject: [PATCH 08/10] Fix bomb merchant red crystal marking --- .../AutoTracking/ZeldaStateChecks/ViewedText.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TrackerCouncil.Smz3.Tracking/AutoTracking/ZeldaStateChecks/ViewedText.cs b/src/TrackerCouncil.Smz3.Tracking/AutoTracking/ZeldaStateChecks/ViewedText.cs index b67a8c73..0be9caff 100644 --- a/src/TrackerCouncil.Smz3.Tracking/AutoTracking/ZeldaStateChecks/ViewedText.cs +++ b/src/TrackerCouncil.Smz3.Tracking/AutoTracking/ZeldaStateChecks/ViewedText.cs @@ -103,7 +103,7 @@ private void MarkGreenPendantDungeons() private void MarkRedCrystalDungeons() { var dungeons = World.RewardRegions.Where(x => - x is { RewardType: RewardType.PendantGreen, HasCorrectlyMarkedReward: false }).ToList(); + x is { RewardType: RewardType.CrystalRed, HasCorrectlyMarkedReward: false }).ToList(); if (dungeons.Count == 0) { From 4766d259d0b7a9fcfa3a2489cbd01fc537bab271 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 20:03:09 -0500 Subject: [PATCH 09/10] Update to hopefully not incorrectly say places are out of logic --- .../TrackingServices/TrackerLocationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerLocationService.cs b/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerLocationService.cs index f13d8932..daa7bef3 100644 --- a/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerLocationService.cs +++ b/src/TrackerCouncil.Smz3.Tracking/TrackingServices/TrackerLocationService.cs @@ -77,7 +77,7 @@ public void Clear(Location location, float? confidence = null, bool autoTracked var isKeysanityForLocation = (location.Region is Z3Region && World.Config.ZeldaKeysanity) || (location.Region is SMRegion && World.Config.MetroidKeysanity); var items = playerProgressionService.GetProgression(!isKeysanityForLocation); - if (previousAccessibility is not (Accessibility.Available or Accessibility.AvailableWithKeys) && (confidence >= Options.MinimumSassConfidence || autoTracked)) + if (previousAccessibility is Accessibility.OutOfLogic && (confidence >= Options.MinimumSassConfidence || autoTracked)) { var locationInfo = location.Metadata; var roomInfo = location.Room?.Metadata; From 46ee130dd4a967c1134c1a3287cf4dcb63117e89 Mon Sep 17 00:00:00 2001 From: MattEqualsCoder Date: Sun, 5 Jan 2025 20:07:08 -0500 Subject: [PATCH 10/10] Update version number --- .../Multiplayer/MultiplayerVersion.cs | 2 +- src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TrackerCouncil.Smz3.Shared/Multiplayer/MultiplayerVersion.cs b/src/TrackerCouncil.Smz3.Shared/Multiplayer/MultiplayerVersion.cs index 52088bd5..d5922f3b 100644 --- a/src/TrackerCouncil.Smz3.Shared/Multiplayer/MultiplayerVersion.cs +++ b/src/TrackerCouncil.Smz3.Shared/Multiplayer/MultiplayerVersion.cs @@ -2,5 +2,5 @@ public static class MultiplayerVersion { - public const int Id = 5; + public const int Id = 6; } diff --git a/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj b/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj index 8dedd10d..8fe8bfb0 100644 --- a/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj +++ b/src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj @@ -6,7 +6,7 @@ true app.manifest true - 9.9.0-rc.3 + 9.9.0 SMZ3CasRandomizer Assets\smz3.ico $(MSBuildProjectName.Replace(" ", "_"))