Also, several problems arose.
Debugging the plug-in and sharing which code caused the problem.
1. The number of available recyclers goes down to less than 0 (negative number): When subtracting the number of available recyclers in line 607, it seems to be a problem because there is no process to check whether the currently available recyclers are greater than 0. Also, I don't understand why the number of available recyclers is deducted each time it is placed. I would like it to be changed so that it is deducted only when redeeming.
2. When the base is destroyed, the recycler is also destroyed, but the recycler is created as an item at that time: Delete the item drop code on line 488, and instead copy the code on lines 238-241, modify it appropriately, and paste it below line 496 to return the number of recyclers available to the player when destroyed.
3. If you don't understand what I've explained, please contact me again.