mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-31 12:33:08 +00:00
Merge pull request #5300 from Anewbe/more_runtimes
Adds a number of accessory related null checks
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
accessories = null
|
||||
|
||||
/obj/item/clothing/emp_act(severity)
|
||||
if(accessories.len)
|
||||
if(LAZYLEN(accessories))
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
A.emp_act(severity)
|
||||
..()
|
||||
@@ -98,7 +98,7 @@
|
||||
H = src
|
||||
else if (istype(src, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/S = src
|
||||
if (S.accessories.len)
|
||||
if (LAZYLEN(S.accessories))
|
||||
H = locate() in S.accessories
|
||||
|
||||
if (!H)
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
if(legcuffed)
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
|
||||
|
||||
if(suit && suit.accessories.len)
|
||||
if(suit && LAZYLEN(suit.accessories))
|
||||
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
return
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = w_uniform
|
||||
if(!istype(suit) || !suit.accessories.len)
|
||||
if(!istype(suit) || !LAZYLEN(suit.accessories))
|
||||
return
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
if(!istype(A))
|
||||
|
||||
Reference in New Issue
Block a user