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