mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Fixes runtime with the infective component on gibs (#70706)
* Fixes runtime with the infective component. streak_diseases is a lazylist and is sometimes not instantiated. * Lazynull
This commit is contained in:
@@ -117,6 +117,10 @@
|
||||
/datum/component/infective/proc/try_infect_streak(datum/source, list/directions, list/output_diseases)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
// This blood is not infectable / does not have a diseases list
|
||||
if(!islist(output_diseases))
|
||||
return
|
||||
|
||||
output_diseases |= diseases
|
||||
|
||||
/datum/component/infective/proc/try_infect(mob/living/L, target_zone)
|
||||
|
||||
@@ -116,6 +116,10 @@
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_MOVABLE_PIPE_EJECTING, .proc/on_pipe_eject)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Destroy()
|
||||
LAZYNULL(streak_diseases)
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/replace_decal(obj/effect/decal/cleanable/C)
|
||||
return FALSE //Never fail to place us
|
||||
|
||||
@@ -145,9 +149,9 @@
|
||||
streak(dirs)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions, mapload=FALSE)
|
||||
LAZYINITLIST(streak_diseases)
|
||||
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, streak_diseases)
|
||||
var/direction = pick(directions)
|
||||
streak_diseases = list()
|
||||
var/delay = 2
|
||||
var/range = pick(0, 200; 1, 150; 2, 50; 3, 17; 50) //the 3% chance of 50 steps is intentional and played for laughs.
|
||||
if(!step_to(src, get_step(src, direction), 0))
|
||||
|
||||
Reference in New Issue
Block a user