From 36201d98adfd74bd093bd81a83b6277202642c46 Mon Sep 17 00:00:00 2001 From: shoaib11120 Date: Fri, 21 Jan 2022 14:28:11 +0530 Subject: [PATCH] Added junimo bundle narration in radar --- stardew-access/Game/Radar.cs | 18 ++++++++++++------ stardew-access/Game/ReadTile.cs | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/stardew-access/Game/Radar.cs b/stardew-access/Game/Radar.cs index 3565a9a..f1a5de6 100644 --- a/stardew-access/Game/Radar.cs +++ b/stardew-access/Game/Radar.cs @@ -8,6 +8,7 @@ namespace stardew_access.Game internal class door {} internal class building{} internal class otherObjects{} + internal class junimoBundle{} public class Radar { @@ -126,7 +127,7 @@ namespace stardew_access.Game playSoundAt(position, objectName, typeof(Furniture)); } } - else if(obj is not Furniture) + else if (obj is not Furniture) { playSoundAt(position, objectName, typeof(otherObjects)); } @@ -184,22 +185,27 @@ namespace stardew_access.Game // Check for Mine ladders else if (ReadTile.isMineLadderAtTile((int)position.X, (int)position.Y) && !exclusions.Contains("ladder")) { - playSoundAt(position, null, typeof(door)); + playSoundAt(position, "ladder", typeof(door)); } // Check for doors else if (ReadTile.isDoorAtTile((int)position.X, (int)position.Y) && !exclusions.Contains("door")) { - playSoundAt(position, null, typeof(door)); + playSoundAt(position, "door", typeof(door)); } // Check for buildings on maps - else if (ReadTile.getBuildingAtTile((int)position.X, (int)position.Y) != null) + else if (ReadTile.getBuildingAtTile((int)position.X, (int)position.Y) != null && !exclusions.Contains("building")) { playSoundAt(position, ReadTile.getBuildingAtTile((int)position.X, (int)position.Y), typeof(building)); } // Check for resource clumps - else if (ReadTile.getResourceClumpAtTile((int)position.X, (int)position.Y) != null) + else if (ReadTile.getResourceClumpAtTile((int)position.X, (int)position.Y) != null && !exclusions.Contains("resource clump")) { - playSoundAt(position, ReadTile.getResourceClumpAtTile((int)position.X, (int)position.Y), typeof(ResourceClump)); + playSoundAt(position, "resource clump", typeof(ResourceClump)); + } + // Check for junimo bundle + else if (ReadTile.getJunimoBundleAt((int)position.X, (int)position.Y) != null && !exclusions.Contains("junimo bundle")) + { + playSoundAt(position, "junimo bundle", typeof(junimoBundle)); } } catch (Exception e) diff --git a/stardew-access/Game/ReadTile.cs b/stardew-access/Game/ReadTile.cs index dc33502..848359f 100644 --- a/stardew-access/Game/ReadTile.cs +++ b/stardew-access/Game/ReadTile.cs @@ -115,7 +115,7 @@ namespace stardew_access.Game isReadingTile = false; } - private static string? getJunimoBundleAt(int x, int y) + public static string? getJunimoBundleAt(int x, int y) { if (Game1.currentLocation is not CommunityCenter) return null;