mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Adds some throwing datum nullchecks (#91720)
## About The Pull Request A few places seem to call `hitby` or `throw_impact` without a throwing datum to mimic the effect of colliding with something, which is cringe, but I guess we should support it. So we need to nullcheck for `get_thrower`, else it runtimes and cancels the whole proc. ## Changelog 🆑 Melbert fix: Glass shards from colliding with vendors or glass table hurt you again. /🆑
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
/obj/item/freeze_cube/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
icon_state = initial(icon_state)
|
||||
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
|
||||
var/mob/thrown_by = throwingdatum.get_thrower()
|
||||
var/mob/thrown_by = throwingdatum?.get_thrower()
|
||||
if(ismovable(hit_atom) && !caught && (!thrown_by || thrown_by && COOLDOWN_FINISHED(src, freeze_cooldown)))
|
||||
freeze_hit_atom(hit_atom)
|
||||
if(thrown_by && !caught)
|
||||
|
||||
Reference in New Issue
Block a user