diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm index 5a7e3381089..55f7d502dd0 100644 --- a/code/modules/modular_computers/computers/modular_computer/core.dm +++ b/code/modules/modular_computers/computers/modular_computer/core.dm @@ -116,7 +116,8 @@ QDEL_LIST(hard_drive.stored_files) for(var/obj/item/computer_hardware/CH in src.get_all_components()) - uninstall_component(null, CH) + // Eject_id is made false here as we want to delete the id too + uninstall_component(null, CH, eject_id = FALSE) qdel(CH) registered_id = null diff --git a/code/modules/modular_computers/computers/modular_computer/hardware.dm b/code/modules/modular_computers/computers/modular_computer/hardware.dm index eb2e8e26bbb..92962389ebe 100644 --- a/code/modules/modular_computers/computers/modular_computer/hardware.dm +++ b/code/modules/modular_computers/computers/modular_computer/hardware.dm @@ -1,4 +1,4 @@ -// Attempts to install the hardware into appropriate slot. +/// Attempts to install the hardware into appropriate slot. /obj/item/modular_computer/proc/try_install_component(var/mob/living/user, var/obj/item/computer_hardware/H, var/found = FALSE) // "USB" flash drive. if(istype(H, /obj/item/computer_hardware/hard_drive/portable)) @@ -96,8 +96,9 @@ user.drop_from_inventory(H, src) update_icon() -// Uninstalls component. Found and Critical vars may be passed by parent types, if they have additional hardware. -/obj/item/modular_computer/proc/uninstall_component(var/mob/living/user, var/obj/item/computer_hardware/H, var/found = FALSE, var/critical = FALSE, var/put_in_hands = FALSE) +/// Uninstalls component. Found and Critical vars may be passed by parent types, if they have additional hardware. +/// Eject_id should only ever be made false if we're trying to delete the whole thing, such as when using cryo to leave the round. +/obj/item/modular_computer/proc/uninstall_component(mob/living/user, obj/item/computer_hardware/H, found = FALSE, critical = FALSE, put_in_hands = FALSE, eject_id = TRUE) if(portable_drive == H) portable_drive = null found = TRUE @@ -112,7 +113,8 @@ nano_printer = null found = TRUE else if(card_slot == H) - astype(H, /obj/item/computer_hardware/card_slot)?.eject_id() + if(eject_id) + astype(H, /obj/item/computer_hardware/card_slot)?.eject_id() card_slot = null found = TRUE else if(battery_module == H) @@ -160,7 +162,7 @@ to_chat(user, SPAN_WARNING("\The [src]'s screen freezes for few seconds and then displays, \"HARDWARE ERROR: Critical component disconnected. Please verify component connection and reboot the device. If the problem persists contact technical support for assistance.\".")) shutdown_computer() -// Checks all hardware pieces to determine if name matches, if yes, returns the hardware piece, otherwise returns null +/// Checks all hardware pieces to determine if name matches, if yes, returns the hardware piece, otherwise returns null /obj/item/modular_computer/proc/find_hardware_by_name(var/name) if(portable_drive && (initial(portable_drive.name) == name)) return portable_drive @@ -190,7 +192,7 @@ return access_cable_dongle return null -// Returns list of all components +/// Returns list of all components /obj/item/modular_computer/proc/get_all_components() var/list/all_components = list() if(hard_drive) diff --git a/html/changelogs/IDFixAgain.yml b/html/changelogs/IDFixAgain.yml new file mode 100644 index 00000000000..6adc3f24bde --- /dev/null +++ b/html/changelogs/IDFixAgain.yml @@ -0,0 +1,6 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - bugfix: "Fixes ID being ejected on the floor when going to cryo/residential deck."