Fix jumpsuits to drop accessories when destroyed (#65768)

Fixes #65103 and probably some other edge cases.

Medals of captaincy are an indestructible antag objective. If you attached the medal to the jumpsuit and somehow destroyed it, it would delete all the accessories on it. Now when jumpsuits are destroyed, they drop their accessories to the floor.
This commit is contained in:
Tim
2022-03-30 15:07:06 +01:00
committed by GitHub
parent dbcbcdb753
commit bdd0192168
2 changed files with 10 additions and 6 deletions
+4
View File
@@ -315,6 +315,10 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
for(var/atom/movable/atom_contents as anything in holo_atom) //make sure that things inside of a holoitem are moved outside before destroying it
atom_contents.forceMove(target_turf)
if(istype(holo_atom, /obj/item/clothing/under/rank))
var/obj/item/clothing/under/holo_clothing = holo_atom
holo_clothing.dump_attachment()
if(!silent)
visible_message(span_notice("[holo_atom] fades away!"))