Fix - Contractor targets are stripped of suit accessories when extracted (#17580)

* Out of the original for loop to prevent wasteful checks

* We had that discussion a few days ago and I already forgot about it
This commit is contained in:
Vi3trice
2022-04-07 17:04:05 +01:00
committed by GitHub
parent d4fe9b0f0f
commit e841f4b1be
@@ -409,6 +409,14 @@
if(M.unEquip(I))
stuff_to_transfer += I
// Remove accessories from the suit if present
if(length(H.w_uniform?.accessories))
for(var/obj/item/clothing/accessory/A in H.w_uniform.accessories)
A.on_removed(H)
H.w_uniform.accessories -= A
H.unEquip(A)
stuff_to_transfer += A
// Transfer it all (or drop it if not possible)
for(var/i in stuff_to_transfer)
var/obj/item/I = i