mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
[MIRROR] Converts all A && A.B into A?.B (#1292)
* 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. * Converts all A && A.B into A?.B Co-authored-by: ZeWaka <zewakagamer@gmail.com>
This commit is contained in:
@@ -310,7 +310,7 @@
|
||||
return
|
||||
var/mob/living/owner = parent
|
||||
var/datum/hud/hud = owner.hud_used
|
||||
if(hud && hud.infodisplay)
|
||||
if(hud?.infodisplay)
|
||||
hud.infodisplay -= screen_obj
|
||||
QDEL_NULL(screen_obj)
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ handles linking back and forth.
|
||||
return COMPONENT_BLOCK_TOOL_ATTACK
|
||||
|
||||
/datum/component/remote_materials/proc/on_hold()
|
||||
return silo && silo.holds["[get_area(parent)]/[category]"]
|
||||
return silo?.holds["[get_area(parent)]/[category]"]
|
||||
|
||||
/datum/component/remote_materials/proc/silo_log(obj/machinery/M, action, amount, noun, list/mats)
|
||||
if (silo)
|
||||
|
||||
@@ -635,7 +635,7 @@
|
||||
to_chat(M, "<span class='warning'>[I] is too big for [host]!</span>")
|
||||
return FALSE
|
||||
var/datum/component/storage/biggerfish = real_location.loc.GetComponent(/datum/component/storage)
|
||||
if(biggerfish && biggerfish.max_w_class < max_w_class)//return false if we are inside of another container, and that container has a smaller max_w_class than us (like if we're a bag in a box)
|
||||
if(biggerfish && biggerfish.max_w_class < max_w_class) //return false if we are inside of another container, and that container has a smaller max_w_class than us (like if we're a bag in a box)
|
||||
if(!stop_messages)
|
||||
to_chat(M, "<span class='warning'>[I] can't fit in [host] while [real_location.loc] is in the way!</span>")
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user