Added dynamic detection of sink in farm house

Replace the name of kitchen with stove
master
Mohammad Shoaib Khan 2023-02-19 22:26:10 +05:30
parent b6b8ad8c8a
commit 9af30890bc
No known key found for this signature in database
GPG Key ID: D8040D966320B620
1 changed files with 8 additions and 4 deletions

View File

@ -455,15 +455,19 @@ namespace stardew_access.Features
else if (Game1.currentLocation is FarmHouse farmHouse) else if (Game1.currentLocation is FarmHouse farmHouse)
{ {
if (farmHouse.upgradeLevel >= 1) if (farmHouse.upgradeLevel >= 1)
if (farmHouse.getKitchenStandingSpot().X == x && (farmHouse.getKitchenStandingSpot().Y - 1) == y) // Standing spot is where the player will stand if (farmHouse.getKitchenStandingSpot().X == x && (farmHouse.getKitchenStandingSpot().Y - 1) == y)
return (CATEGORY.Interactables, "Kitchen"); return (CATEGORY.Interactables, "Stove");
else if ((farmHouse.getKitchenStandingSpot().X + 1) == x && (farmHouse.getKitchenStandingSpot().Y - 1) == y)
return (CATEGORY.Others, "Sink");
else if (farmHouse.fridgePosition.X == x && farmHouse.fridgePosition.Y == y) else if (farmHouse.fridgePosition.X == x && farmHouse.fridgePosition.Y == y)
return (CATEGORY.Interactables, "Fridge"); return (CATEGORY.Interactables, "Fridge");
} }
else if (Game1.currentLocation is IslandFarmHouse islandFarmHouse) else if (Game1.currentLocation is IslandFarmHouse islandFarmHouse)
{ {
if ((islandFarmHouse.fridgePosition.X - 1) == x && islandFarmHouse.fridgePosition.Y == y) if ((islandFarmHouse.fridgePosition.X - 2) == x && islandFarmHouse.fridgePosition.Y == y)
return (CATEGORY.Interactables, "Kitchen"); return (CATEGORY.Interactables, "Stove");
else if ((islandFarmHouse.fridgePosition.X - 1) == x && islandFarmHouse.fridgePosition.Y == y)
return (CATEGORY.Others, "Sink");
else if (islandFarmHouse.fridgePosition.X == x && islandFarmHouse.fridgePosition.Y == y) else if (islandFarmHouse.fridgePosition.X == x && islandFarmHouse.fridgePosition.Y == y)
return (CATEGORY.Interactables, "Fridge"); return (CATEGORY.Interactables, "Fridge");
} }