Issue#42 feeding benches in coops and barns are now dynamic
parent
b600eda78e
commit
34cb47bdaa
|
@ -478,6 +478,72 @@ namespace stardew_access.Features
|
|||
return (CATEGORY.Interactables, "Island Trader");
|
||||
}
|
||||
}
|
||||
else if (Game1.currentLocation.name.Value.ToLower().Equals("coop"))
|
||||
{
|
||||
if (x >= 6 && x <= 9 && y == 3)
|
||||
{
|
||||
(string? name, CATEGORY category) bench = getObjectAtTile(x, y, true);
|
||||
if (bench.name != null && bench.name.ToLower().Contains("hay"))
|
||||
return (CATEGORY.Others, "Feeding Bench");
|
||||
else
|
||||
return (CATEGORY.Others, "Empty Feeding Bench");
|
||||
}
|
||||
}
|
||||
else if (Game1.currentLocation.name.Value.ToLower().Equals("big coop") || Game1.currentLocation.name.Value.ToLower().Equals("coop2"))
|
||||
{
|
||||
if (x >= 6 && x <= 13 && y == 3)
|
||||
{
|
||||
(string? name, CATEGORY category) bench = getObjectAtTile(x, y, true);
|
||||
if (bench.name != null && bench.name.ToLower().Contains("hay"))
|
||||
return (CATEGORY.Others, "Feeding Bench");
|
||||
else
|
||||
return (CATEGORY.Others, "Empty Feeding Bench");
|
||||
}
|
||||
}
|
||||
else if (Game1.currentLocation.name.Value.ToLower().Equals("deluxe coop") || Game1.currentLocation.name.Value.ToLower().Equals("coop3"))
|
||||
{
|
||||
if (x >= 6 && x <= 17 && y == 3)
|
||||
{
|
||||
(string? name, CATEGORY category) bench = getObjectAtTile(x, y, true);
|
||||
if (bench.name != null && bench.name.ToLower().Contains("hay"))
|
||||
return (CATEGORY.Others, "Feeding Bench");
|
||||
else
|
||||
return (CATEGORY.Others, "Empty Feeding Bench");
|
||||
}
|
||||
}
|
||||
else if (Game1.currentLocation.name.Value.ToLower().Equals("barn"))
|
||||
{
|
||||
if (x >= 8 && x <= 11 && y == 3)
|
||||
{
|
||||
(string? name, CATEGORY category) bench = getObjectAtTile(x, y, true);
|
||||
if (bench.name != null && bench.name.ToLower().Contains("hay"))
|
||||
return (CATEGORY.Others, "Feeding Bench");
|
||||
else
|
||||
return (CATEGORY.Others, "Empty Feeding Bench");
|
||||
}
|
||||
}
|
||||
else if (Game1.currentLocation.name.Value.ToLower().Equals("big barn") || Game1.currentLocation.name.Value.ToLower().Equals("barn2"))
|
||||
{
|
||||
if (x >= 8 && x <= 15 && y == 3)
|
||||
{
|
||||
(string? name, CATEGORY category) bench = getObjectAtTile(x, y, true);
|
||||
if (bench.name != null && bench.name.ToLower().Contains("hay"))
|
||||
return (CATEGORY.Others, "Feeding Bench");
|
||||
else
|
||||
return (CATEGORY.Others, "Empty Feeding Bench");
|
||||
}
|
||||
}
|
||||
else if (Game1.currentLocation.name.Value.ToLower().Equals("deluxe barn") || Game1.currentLocation.name.Value.ToLower().Equals("barn3"))
|
||||
{
|
||||
if (x >= 8 && x <= 19 && y == 3)
|
||||
{
|
||||
(string? name, CATEGORY category) bench = getObjectAtTile(x, y, true);
|
||||
if (bench.name != null && bench.name.ToLower().Contains("hay"))
|
||||
return (CATEGORY.Others, "Feeding Bench");
|
||||
else
|
||||
return (CATEGORY.Others, "Empty Feeding Bench");
|
||||
}
|
||||
}
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
|
@ -689,6 +755,8 @@ namespace stardew_access.Features
|
|||
(string? name, CATEGORY category) toReturn = (null, CATEGORY.Others);
|
||||
|
||||
StardewValley.Object obj = Game1.currentLocation.getObjectAtTile(x, y);
|
||||
if (obj == null) return toReturn;
|
||||
|
||||
int index = obj.ParentSheetIndex;
|
||||
toReturn.name = obj.DisplayName;
|
||||
|
||||
|
|
|
@ -318,26 +318,6 @@
|
|||
"y": [3],
|
||||
"type": "interactable"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [11],
|
||||
"y": [14],
|
||||
|
@ -350,46 +330,6 @@
|
|||
"y": [3],
|
||||
"type": "interactable"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [14],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [15],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [11],
|
||||
"y": [14],
|
||||
|
@ -402,46 +342,6 @@
|
|||
"y": [3],
|
||||
"type": "interactable"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [14],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [15],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [11],
|
||||
"y": [14],
|
||||
|
@ -454,66 +354,6 @@
|
|||
"y": [3],
|
||||
"type": "interactable"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [14],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [15],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench I": {
|
||||
"x": [16],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench J": {
|
||||
"x": [17],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench K": {
|
||||
"x": [18],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench L": {
|
||||
"x": [19],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [11],
|
||||
"y": [14],
|
||||
|
@ -526,66 +366,6 @@
|
|||
"y": [3],
|
||||
"type": "interactable"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [14],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [15],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench I": {
|
||||
"x": [16],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench J": {
|
||||
"x": [17],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench K": {
|
||||
"x": [18],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench L": {
|
||||
"x": [19],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [11],
|
||||
"y": [14],
|
||||
|
@ -906,26 +686,6 @@
|
|||
"y": [3],
|
||||
"type": "interactable"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [6],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [7],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [2],
|
||||
"y": [9],
|
||||
|
@ -943,46 +703,6 @@
|
|||
"y": [3],
|
||||
"type": "machine"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [6],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [7],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [2],
|
||||
"y": [9],
|
||||
|
@ -1000,46 +720,6 @@
|
|||
"y": [3],
|
||||
"type": "machine"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [6],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [7],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [2],
|
||||
"y": [9],
|
||||
|
@ -1057,66 +737,6 @@
|
|||
"y": [3],
|
||||
"type": "machine"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [6],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [7],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench I": {
|
||||
"x": [14],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench J": {
|
||||
"x": [15],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench K": {
|
||||
"x": [16],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench L": {
|
||||
"x": [17],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [2],
|
||||
"y": [9],
|
||||
|
@ -1134,66 +754,6 @@
|
|||
"y": [3],
|
||||
"type": "machine"
|
||||
},
|
||||
"Feeding Bench A": {
|
||||
"x": [6],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench B": {
|
||||
"x": [7],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench C": {
|
||||
"x": [8],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench D": {
|
||||
"x": [9],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench E": {
|
||||
"x": [10],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench F": {
|
||||
"x": [11],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench G": {
|
||||
"x": [12],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench H": {
|
||||
"x": [13],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench I": {
|
||||
"x": [14],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench J": {
|
||||
"x": [15],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench K": {
|
||||
"x": [16],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Feeding Bench L": {
|
||||
"x": [17],
|
||||
"y": [3],
|
||||
"type": "other"
|
||||
},
|
||||
"Exit": {
|
||||
"x": [2],
|
||||
"y": [9],
|
||||
|
|
Loading…
Reference in New Issue