Skip to content

Commit

Permalink
Merge pull request #32 from Witchybun/SVE_Fixed_10
Browse files Browse the repository at this point in the history
Fix Crafting and let Analyze work on DeepWoods meteors
  • Loading branch information
agilbert1412 authored Jan 20, 2024
2 parents 6d7515e + a5d0b5e commit 91da407
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ private static void CheckTileAnalyzeLocations(Farmer player, List<string> spells
var tile = player.currentLocation.map.GetLayer("Buildings").Tiles[(int)tilePos.X, (int)tilePos.Y];
if (tile != null && tile.TileIndex == MINE_LADDER)
spellsLearned.Add(ANALYZE_DESCEND_AP_LOCATION);
if (player.currentLocation is Farm farm)
if (player.currentLocation is Farm farm || player.currentLocation.Name.Contains("DeepWoods"))
{
foreach (var clump in farm.resourceClumps)
foreach (var clump in player.currentLocation.resourceClumps)
{
if (clump.parentSheetIndex.Value == CROP_TILE &&
new Rectangle((int)clump.tile.Value.X, (int)clump.tile.Value.Y, clump.width.Value, clump.height.Value).Contains((int)tilePos.X, (int)tilePos.Y))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static bool AddCraftingRecipe_CheckForStrayRecipe_Prefix(Event __instance
return true;
}

_locationChecker.AddCheckedLocation($"{eventCooking[__instance.id]}{RECIPE_SUFFIX}");
_locationChecker.AddCheckedLocation($"{eventCrafting[__instance.id]}{RECIPE_SUFFIX}");
__instance.CurrentCommand++;
return false; // don't run original logic

Expand Down
4 changes: 4 additions & 0 deletions StardewArchipelago/ModEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ private void DoBugsCleanup()
Game1.player.cookingRecipes.Remove("Lucky Lunch");
}
}
if (_archipelago.HasReceivedItem("Magic Elixir Recipe") & !Game1.player.cookingRecipes.ContainsKey("Magic Elixir"))
{
Game1.player.cookingRecipes.Add("Magic Elixir", 0); // Its a cooking recipe.
}
// Fix to remove dupes in Railroad Boulder
if (!_archipelago.SlotData.Mods.HasMod(ModNames.SVE))
{
Expand Down

0 comments on commit 91da407

Please sign in to comment.