mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +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:
@@ -349,7 +349,7 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_overlays()
|
||||
. = ..()
|
||||
if(reagents && reagents.total_volume)
|
||||
if(reagents?.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/lavaland/ash_flora.dmi', "fullbowl")
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
. += filling
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if(O.refined_type == null)
|
||||
return
|
||||
|
||||
if(O && O.refined_type)
|
||||
if(O?.refined_type)
|
||||
points += O.points * point_upgrade * O.amount
|
||||
|
||||
var/material_amount = mat_container.get_item_material_amount(O, BREAKDOWN_FLAGS_ORM)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
. += "<span class='boldwarning'>[t_He] look[t_s] severely dented!</span>"
|
||||
. += {"<span class='notice'>Using a mining scanner on [t_him] will instruct [t_him] to drop stored ore. <b>[max(0, LAZYLEN(contents) - 1)] Stored Ore</b>\n
|
||||
Field repairs can be done with a welder."}
|
||||
if(stored_gun && stored_gun.max_mod_capacity)
|
||||
if(stored_gun?.max_mod_capacity)
|
||||
. += "<b>[stored_gun.get_remaining_mod_capacity()]%</b> mod capacity remaining."
|
||||
for(var/A in stored_gun.get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
|
||||
Reference in New Issue
Block a user