Skip to content

Commit

Permalink
Update cryopod.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Helg2 committed Dec 21, 2024
1 parent 3636bb9 commit 0ccfde1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code/game/objects/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,22 @@
assigned_squad?.remove_from_squad(src)
return ..()

/obj/item/proc/store_in_cryo()
/// Move the item to the cryo, if storage_to_remove_from is set, it will try to properly remove the item from the storage
/obj/item/proc/store_in_cryo(obj/item/storage/storage_to_remove_from)
if(is_type_in_typecache(src, GLOB.do_not_preserve) || HAS_TRAIT(src, TRAIT_NODROP) || (flags_item & (ITEM_ABSTRACT|DELONDROP)))
if(!QDELETED(src))
qdel(src)
return
moveToNullspace()
if(!isnull(storage_to_remove_from))
storage_to_remove_from.remove_from_storage(src, null, usr)
else
moveToNullspace()
GLOB.cryoed_item_list += src

/obj/item/storage/store_in_cryo()
if(!(flags_storage & BYPASS_CRYO_CHECK))
for(var/obj/item/I AS in src)
I.store_in_cryo()
I.store_in_cryo(src)
return ..()

/obj/machinery/cryopod/attackby(obj/item/I, mob/user, params)
Expand Down

0 comments on commit 0ccfde1

Please sign in to comment.