mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B BYOND Ref: When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
for(var/X in O.internal_organs)
|
||||
var/obj/item/organ/G = X
|
||||
if(BP.body_zone == check_zone(G.zone))
|
||||
if(mind && mind.has_antag_datum(/datum/antagonist/changeling) && istype(G, /obj/item/organ/brain))
|
||||
if(mind?.has_antag_datum(/datum/antagonist/changeling) && istype(G, /obj/item/organ/brain))
|
||||
continue //so headless changelings don't lose their brain when transforming
|
||||
qdel(G) //we lose the organs in the missing limbs
|
||||
qdel(BP)
|
||||
@@ -298,7 +298,7 @@
|
||||
for(var/X in O.internal_organs)
|
||||
var/obj/item/organ/G = X
|
||||
if(BP.body_zone == check_zone(G.zone))
|
||||
if(mind && mind.has_antag_datum(/datum/antagonist/changeling) && istype(G, /obj/item/organ/brain))
|
||||
if(mind?.has_antag_datum(/datum/antagonist/changeling) && istype(G, /obj/item/organ/brain))
|
||||
continue //so headless changelings don't lose their brain when transforming
|
||||
qdel(G) //we lose the organs in the missing limbs
|
||||
qdel(BP)
|
||||
|
||||
Reference in New Issue
Block a user