Added config option to toggle detecting dropped items \n Fixed bug
parent
dd0d052f64
commit
c4ce0a5280
|
@ -150,6 +150,8 @@ namespace stardew_access.Features
|
|||
}
|
||||
|
||||
#region Track dropped items
|
||||
if (MainClass.Config.TrackDroppedItems)
|
||||
{
|
||||
NetCollection<Debris> droppedItems = Game1.currentLocation.debris;
|
||||
if (droppedItems.Count() > 0)
|
||||
{
|
||||
|
@ -159,6 +161,8 @@ namespace stardew_access.Features
|
|||
int yPos = ((int)item.Chunks[0].position.Value.Y / Game1.tileSize) + 1;
|
||||
if (xPos != x || yPos != y) continue;
|
||||
|
||||
if (item.item == null) continue;
|
||||
|
||||
string name = item.item.DisplayName;
|
||||
int count = item.item.Stack;
|
||||
|
||||
|
@ -168,6 +172,7 @@ namespace stardew_access.Features
|
|||
toReturn = $"{toReturn}, Dropped Item: {count} {name}";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (toReturn == "")
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace stardew_access
|
|||
public Boolean SnapMouse { get; set; } = true; // Toggles the snap mouse feature
|
||||
public Boolean Warning { get; set; } = true; // Toggles the warnings feature
|
||||
public Boolean TTS { get; set; } = true; // Toggles the screen reader/tts.
|
||||
// TODO add command to toggle warning feature
|
||||
public Boolean TrackDroppedItems {get; set;} = true; // Toggles detecting the dropped items.
|
||||
#endregion
|
||||
|
||||
// TODO Add the exclusion and focus list too
|
||||
|
|
Loading…
Reference in New Issue