BeeStation / BeeStation-Hornet

99.95% station. 0.05% bees
https://beestation13.com
GNU Affero General Public License v3.0
200 stars 682 forks source link

Explosion batching #11878

Closed PowerfulBacon closed 1 week ago

PowerfulBacon commented 1 week ago

About The Pull Request

Why It's Good For The Game

Fixes an issue with explosive lemons in fridges causing the server to freeze

Testing Photographs and Procedure

https://github.com/user-attachments/assets/8b33bf96-e124-4bcd-a97d-5a564e662429

Changelog

:cl: fix: Fixes some issues related to mass explosions /:cl:

Rukofamicom commented 1 week ago

Thank you for the superior fix

Rukofamicom commented 1 week ago

While this is a vast improvement, this may not catch cases such as the lavaland base or adjacent fridges filled with the fruits due to simultaneous explosions on multiple turfs.

These are a lot rarer than the single botany fridge though.

PowerfulBacon commented 1 week ago

The lavaland based seemed fine the last time I saw it explode, which part of it causes crashes? Nothing but the wall explosives?

Rukofamicom commented 1 week ago

Explosion act caused a bomb core to appear and immediately explode... Which then triggered explosion act on the wall again, which causes another bomb core to spawn and explode.

The difference is that each explosion would trigger a new core spawn and explosion on each affected turf, not just a single one.

This would repeat until the game processing got far enough to realize the walls were destroyed and should stop spawning further bomb cores.


That has since been (mostly) fixed because I made it so walls can only spawn a single core each. (Now instead the walls have a ?% chance to spontaneously spawn a syndicate bomb core on top of them at init and I don't know why)

EvilDragonfiend commented 1 week ago

I still don't like the code but addtimer part was what there was already. Maybe it wouldn't be matter at this PR.