diff --git a/stardew-access/Features/Radar.cs b/stardew-access/Features/Radar.cs index eac37e8..d2216fe 100644 --- a/stardew-access/Features/Radar.cs +++ b/stardew-access/Features/Radar.cs @@ -141,8 +141,8 @@ namespace stardew_access.Features /// A dictionary with all the detected tiles along with the name of the object on it and it's category. public Dictionary SearchLocation() { - var watch = new Stopwatch(); - watch.Start(); + //var watch = new Stopwatch(); + //watch.Start(); var currentLocation = Game1.currentLocation; Dictionary detectedTiles = new(); Vector2 position = Vector2.Zero; @@ -157,11 +157,11 @@ namespace stardew_access.Features toSearch.Enqueue(Game1.player.getTileLocation()); searched.Add(Game1.player.getTileLocation()); - watch.Stop(); - var elapsedMs = watch.ElapsedMilliseconds; - MainClass.DebugLog($"Search init duration: {elapsedMs}"); - watch.Reset(); - watch.Start(); + //watch.Stop(); + //var elapsedMs = watch.ElapsedMilliseconds; + //MainClass.DebugLog($"Search init duration: {elapsedMs}"); + //watch.Reset(); + //watch.Start(); while (toSearch.Count > 0) { Vector2 item = toSearch.Dequeue(); @@ -185,9 +185,9 @@ namespace stardew_access.Features } } } - watch.Stop(); - elapsedMs = watch.ElapsedMilliseconds; - MainClass.DebugLog($"Search loop duration: {elapsedMs}; {count} iterations."); + //watch.Stop(); + //elapsedMs = watch.ElapsedMilliseconds; + //MainClass.DebugLog($"Search loop duration: {elapsedMs}; {count} iterations."); searched.Clear(); return detectedTiles; } diff --git a/stardew-access/Features/StaticTiles.cs b/stardew-access/Features/StaticTiles.cs index 4b2ed15..6ee4d9c 100644 --- a/stardew-access/Features/StaticTiles.cs +++ b/stardew-access/Features/StaticTiles.cs @@ -420,7 +420,7 @@ namespace stardew_access.Features var (modConditionalLocations, modLocations, vanillaConditionalLocations, vanillaLocations) = SortLocationsByType(json); // Create a merged dictionary to store all the location dictionaries - var mergedDict = new Dictionary>(); + var mergedDict = new Dictionary>(StringComparer.OrdinalIgnoreCase); // Merge each category-specific dictionary into the merged dictionary. Prioritize conditional locations whose conditions are true and mod locations where the corresponding mod is loaded. Overwrite their default and vanilla versions, respectively. MergeDicts(mergedDict, modConditionalLocations); @@ -436,7 +436,7 @@ namespace stardew_access.Features /// public static void SetupTilesDicts() { - if (staticTilesData.HasValue) + if (staticTilesData.HasValue && staticTilesData.Value.ValueKind != JsonValueKind.Undefined) { staticTilesDataDict = BuildTilesDict(staticTilesData.Value); } @@ -445,7 +445,7 @@ namespace stardew_access.Features staticTilesDataDict = new Dictionary>(); } - if (customTilesData.HasValue) + if (customTilesData.HasValue && customTilesData.Value.ValueKind != JsonValueKind.Undefined) { customTilesDataDict = BuildTilesDict(customTilesData.Value); } diff --git a/stardew-access/manifest.json b/stardew-access/manifest.json index a95415e..dfa4abb 100644 --- a/stardew-access/manifest.json +++ b/stardew-access/manifest.json @@ -1,7 +1,7 @@ { "Name": "Stardew Access", "Author": "Mohammad Shoaib", - "Version": "1.3.5-alpha2", + "Version": "1.3.5-beta2", "Description": "An accessibility mod with screen reader support!", "UniqueID": "shoaib.stardewaccess", "EntryDll": "stardew-access.dll", @@ -9,4 +9,4 @@ "UpdateKeys": [ "Github:stardew-access/stardew-access" ] -} \ No newline at end of file +}