Skip to content

Commit

Permalink
allow non harvestables to restock
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaPiggy committed Sep 11, 2024
1 parent 840ad13 commit 372221e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Winch/Core/WinchBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ private void OnGameUnloaded()

private void OnItemDestroyed(SpatialItemData spatialItemData, bool playerDestroyed)
{
if (spatialItemData is HarvestableItemData harvestableItemData && harvestableItemData.regenHarvestSpotOnDestroy)
if ((spatialItemData is HarvestableItemData harvestableItemData && harvestableItemData.regenHarvestSpotOnDestroy) || spatialItemData is not HarvestableItemData)
{
StartCoroutine(FindAndRegenItemSpot(harvestableItemData));
StartCoroutine(FindAndRegenItemSpot(spatialItemData));
}
}
private IEnumerator FindAndRegenItemSpot(ItemData itemData)
Expand Down

0 comments on commit 372221e

Please sign in to comment.