Bump manifest version to 1.3.5-beta2. Fix error in json loading and missing static tiles.

master
Katie Durden 2023-04-05 19:17:57 -07:00
parent dacbff92ea
commit 803bc64868
3 changed files with 15 additions and 15 deletions

View File

@ -141,8 +141,8 @@ namespace stardew_access.Features
/// <returns>A dictionary with all the detected tiles along with the name of the object on it and it's category.</returns>
public Dictionary<Vector2, (string, string)> SearchLocation()
{
var watch = new Stopwatch();
watch.Start();
//var watch = new Stopwatch();
//watch.Start();
var currentLocation = Game1.currentLocation;
Dictionary<Vector2, (string, string)> 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;
}

View File

@ -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<string, Dictionary<(short x, short y), (string name, CATEGORY category)>>();
var mergedDict = new Dictionary<string, Dictionary<(short x, short y), (string name, CATEGORY category)>>(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
/// </summary>
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<string, Dictionary<(short x, short y), (string name, CATEGORY category)>>();
}
if (customTilesData.HasValue)
if (customTilesData.HasValue && customTilesData.Value.ValueKind != JsonValueKind.Undefined)
{
customTilesDataDict = BuildTilesDict(customTilesData.Value);
}

View File

@ -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"
]
}
}