Files
tbd-station-14/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs
Daniel Castro Razo cc4669244d Fixes to explosionhelper (#2819)
* Revert "Make handheld explosives affect tiles (#2806)"

This reverts commit 005e142949.

* Fixes tiles being destroyed under walls by an explosion

* Extra imports removed

* Handles explosion in space and different grids

This handle explosions across different grids, and tiles are still protected if there is an entity airtight and currently blocking air on top of them that survived the explosion.

* Some bug fixes

- The way tiles were being protected was silly.
- Big explosions cause a lot of objects to trigger multiple events and at the same time they are destroyed.
- Explosions spawning inside containers like closets work now.

* Range bug fixes

* Explosive

The explosion works even if the entity exploding is inside multiple 'layers' of containers like.
bomb -> survival box -> tool box -> closet

* Explosions are different now

Explosion can't jump over walls now.
Explosions work like rays now, if an explosion breaks a wall it can scatter inside the room.
If entities are behind impassable entities that survive the blast  they are left unscathed.

* Little fix

* Remove the extra lookup of tiles

* Another small change

* Restore the second lookup

I thought this was extra, but this protects the tile under it if there is an Impassable entity on top. None wants anchored girders on top of lattice/space

* Changing order of conditions

IsBlockedTurf is cheaper to run than InRangeUnobstructed.

* Yep
2021-01-02 19:03:10 +01:00

4.2 KiB