Double Use of Seed Items


While implementing the sprinklers I noticed that two were being used at a time instead of just one. Because the sprinklers are a child of the Seed Bag item I checked that blue prints functionality as well. It turns out all of the items that spawn actors were using multiple charges per use. In order to solve the issue I looked through the inventory component as well as the items themselves. Eventually I found that the UseItem function was bound to multiple event dispatchers mistakenly. 


The event dispatcher OnPlantingGranted was also completely unnecessary. After, refactoring the code the seeds and sprinklers now use one charge per use. 



Leave a comment

Log in with itch.io to leave a comment.