From 372221e5c018397739cb6a04395dea48d3c14efa Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Wed, 11 Sep 2024 03:37:44 -0400 Subject: [PATCH] allow non harvestables to restock --- Winch/Core/WinchBehaviour.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Winch/Core/WinchBehaviour.cs b/Winch/Core/WinchBehaviour.cs index 0e029c8e..aa85e715 100644 --- a/Winch/Core/WinchBehaviour.cs +++ b/Winch/Core/WinchBehaviour.cs @@ -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)