mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge pull request #5300 from Anewbe/more_runtimes
Adds a number of accessory related null checks
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
/decl/hierarchy/outfit/costume/horrorcop/post_equip(var/mob/living/carbon/human/H)
|
/decl/hierarchy/outfit/costume/horrorcop/post_equip(var/mob/living/carbon/human/H)
|
||||||
var/obj/item/clothing/under/U = H.w_uniform
|
var/obj/item/clothing/under/U = H.w_uniform
|
||||||
if(U.accessories.len)
|
if(LAZYLEN(U.accessories))
|
||||||
for(var/obj/item/clothing/accessory/A in U.accessories)
|
for(var/obj/item/clothing/accessory/A in U.accessories)
|
||||||
if(istype(A, /obj/item/clothing/accessory/holster))
|
if(istype(A, /obj/item/clothing/accessory/holster))
|
||||||
var/obj/item/clothing/accessory/holster/O = A
|
var/obj/item/clothing/accessory/holster/O = A
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
/decl/hierarchy/outfit/costume/cowboy/post_equip(var/mob/living/carbon/human/H)
|
/decl/hierarchy/outfit/costume/cowboy/post_equip(var/mob/living/carbon/human/H)
|
||||||
var/obj/item/clothing/under/U = H.w_uniform
|
var/obj/item/clothing/under/U = H.w_uniform
|
||||||
if(U.accessories.len)
|
if(LAZYLEN(U.accessories))
|
||||||
for(var/obj/item/clothing/accessory/A in U.accessories)
|
for(var/obj/item/clothing/accessory/A in U.accessories)
|
||||||
if(istype(A, /obj/item/clothing/accessory/holster))
|
if(istype(A, /obj/item/clothing/accessory/holster))
|
||||||
var/obj/item/clothing/accessory/holster/O = A
|
var/obj/item/clothing/accessory/holster/O = A
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
accessories = null
|
accessories = null
|
||||||
|
|
||||||
/obj/item/clothing/emp_act(severity)
|
/obj/item/clothing/emp_act(severity)
|
||||||
if(accessories.len)
|
if(LAZYLEN(accessories))
|
||||||
for(var/obj/item/clothing/accessory/A in accessories)
|
for(var/obj/item/clothing/accessory/A in accessories)
|
||||||
A.emp_act(severity)
|
A.emp_act(severity)
|
||||||
..()
|
..()
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
H = src
|
H = src
|
||||||
else if (istype(src, /obj/item/clothing/under))
|
else if (istype(src, /obj/item/clothing/under))
|
||||||
var/obj/item/clothing/under/S = src
|
var/obj/item/clothing/under/S = src
|
||||||
if (S.accessories.len)
|
if (LAZYLEN(S.accessories))
|
||||||
H = locate() in S.accessories
|
H = locate() in S.accessories
|
||||||
|
|
||||||
if (!H)
|
if (!H)
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
if(legcuffed)
|
if(legcuffed)
|
||||||
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
|
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=tie'>Remove accessory</A>"
|
||||||
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</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>"
|
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
return
|
return
|
||||||
if("tie")
|
if("tie")
|
||||||
var/obj/item/clothing/under/suit = w_uniform
|
var/obj/item/clothing/under/suit = w_uniform
|
||||||
if(!istype(suit) || !suit.accessories.len)
|
if(!istype(suit) || !LAZYLEN(suit.accessories))
|
||||||
return
|
return
|
||||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||||
if(!istype(A))
|
if(!istype(A))
|
||||||
|
|||||||
Reference in New Issue
Block a user