mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +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:
@@ -51,7 +51,7 @@
|
||||
else if(open || broken)
|
||||
if(istype(I, /obj/item/fireaxe) && !fireaxe)
|
||||
var/obj/item/fireaxe/F = I
|
||||
if(F && F.wielded)
|
||||
if(F?.wielded)
|
||||
to_chat(user, "<span class='warning'>Unwield the [F.name] first.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(F, src))
|
||||
|
||||
Reference in New Issue
Block a user