Fixes resources/consumables/big pickups failing to spawn.
Specifically, this improves the spawning logic to reduce the possibility that there may not be enough space to spawn them, but if there still isn't, they will spawn on the ground instead.
This includes fixing "Surprise!" boxes so they actually work.
Technical Details
- The game allocates a certain number of spawns per room depending on its size. If these run out, the game allocates new spawns but it will never re-use them after creation, so only one item is added. The fix allows them to be re-used.
- The allocated spawns consume markers even if they have nothing to create. The fix prevents them from doing so.
- If there are no markers left for one of the initially allocated spawns, it will not create anything. On the other hand, if it is one of the newly allocated spawns, it will create its item(s) randomly on the floor. The fix replaces this logic with the following:
- Try to create the item(s) in a random area in the zone.
- (Resources/Consumables) If no areas have room, try to place the items in random containers.
- Create the item(s) on the ground. This doesn't work normally, but the fix corrects that too.