mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
Runtime fixes for life() (#1172)
Basically, missing safety checks. Apparently blood_dna is conditionally defined and filled out. This should stop some surprisingly common runtime errors from life() that we've been seeing. Bypassed review.
This commit is contained in:
@@ -13,19 +13,19 @@
|
||||
for(var/obj/effect/decal/cleanable/O in view(1,src))
|
||||
if(istype(O,/obj/effect/decal/cleanable/blood))
|
||||
var/obj/effect/decal/cleanable/blood/B = O
|
||||
if(B.virus2.len)
|
||||
if(B.virus2 && B.virus2.len)
|
||||
for (var/ID in B.virus2)
|
||||
var/datum/disease2/disease/V = B.virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
else if(istype(O,/obj/effect/decal/cleanable/mucus))
|
||||
var/obj/effect/decal/cleanable/mucus/M = O
|
||||
if(M.virus2.len)
|
||||
if(M.virus2 && M.virus2.len)
|
||||
for (var/ID in M.virus2)
|
||||
var/datum/disease2/disease/V = M.virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
if(virus2.len)
|
||||
if(virus2 && virus2.len)
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
|
||||
@@ -40,4 +40,4 @@
|
||||
if(common_antibodies.len)
|
||||
V.dead = 1
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user