Added the Missing Bundle

master
Mohammad Shoaib 2022-03-19 13:12:45 +05:30
parent 2d3d79be04
commit 5e65ca8dbd
1 changed files with 24 additions and 14 deletions

View File

@ -326,12 +326,12 @@ namespace stardew_access.Features
public static string? getJunimoBundleAt(int x, int y) public static string? getJunimoBundleAt(int x, int y)
{ {
if (Game1.currentLocation is not CommunityCenter) if (Game1.currentLocation is not CommunityCenter communityCenter || Game1.currentLocation is not AbandonedJojaMart abandonedJojaMart)
return null; return null;
CommunityCenter communityCenter = ((CommunityCenter)Game1.currentLocation); string? name = null;
if (communityCenter != null)
string? name = (x, y) switch name = (x, y) switch
{ {
(14, 5) => "Pantry", (14, 5) => "Pantry",
(14, 23) => "Crafts Room", (14, 23) => "Crafts Room",
@ -341,8 +341,16 @@ namespace stardew_access.Features
(46, 11) => "Bulletin Board", (46, 11) => "Bulletin Board",
_ => null, _ => null,
}; };
else if (abandonedJojaMart != null)
name = (x, y) switch
{
(8, 8) => "Missing",
_ => null,
};
if (name != null && communityCenter.shouldNoteAppearInArea(CommunityCenter.getAreaNumberFromName(name))) if (name != null && communityCenter != null && communityCenter.shouldNoteAppearInArea(CommunityCenter.getAreaNumberFromName(name)))
return $"{name} bundle";
else if (name != null && abandonedJojaMart != null)
return $"{name} bundle"; return $"{name} bundle";
else else
return null; return null;
@ -655,6 +663,7 @@ namespace stardew_access.Features
return seedName; return seedName;
} }
#region Objects
public static (string? name, CATEGORY category) getObjectAtTile(int x, int y) public static (string? name, CATEGORY category) getObjectAtTile(int x, int y)
{ {
(string? name, CATEGORY category) toReturn = (null, CATEGORY.Others); (string? name, CATEGORY category) toReturn = (null, CATEGORY.Others);
@ -827,6 +836,7 @@ namespace stardew_access.Features
return (null, CATEGORY.Others); return (null, CATEGORY.Others);
} }
#endregion
public static bool isMineDownLadderAtTile(int x, int y) public static bool isMineDownLadderAtTile(int x, int y)
{ {