some more stuff

This commit is contained in:
Geevies
2020-04-15 21:54:01 +02:00
parent d41a4e5926
commit 7200a638a8
7 changed files with 13 additions and 9 deletions
@@ -2,8 +2,8 @@
..()
if(Adjacent(user))
to_chat(user, FONT_SMALL(SPAN_NOTICE("It contains the following hardware:")))
for(var/CH in get_all_components())
to_chat(user, FONT_SMALL(SPAN_NOTICE(" - [capitalize_first_letters(CH)]")))
for(var/obj/CH in get_all_components())
to_chat(user, FONT_SMALL(SPAN_NOTICE(" - [capitalize_first_letters(CH.name)]")))
if(damage > broken_damage)
to_chat(user, SPAN_DANGER("It is heavily damaged!"))
else if(damage)
@@ -62,7 +62,7 @@
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)
/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)
if(portable_drive == H)
portable_drive = null
found = TRUE
@@ -97,6 +97,8 @@
if(user)
to_chat(user, SPAN_NOTICE("You remove \the [H] from \the [src]."))
H.forceMove(get_turf(src))
if(put_in_hands)
user.put_in_hands(H)
H.parent_computer = null
update_icon()
if(critical && enabled)
@@ -64,7 +64,7 @@
to_chat(user, SPAN_WARNING("There is no portable drive connected to \the [src]."))
return
uninstall_component(user, portable_drive)
uninstall_component(user, portable_drive, put_in_hands = TRUE)
update_uis()
/obj/item/modular_computer/proc/proc_eject_ai(mob/user)
@@ -312,7 +312,7 @@ var/last_message_id = 0
l.Add(message)
for (var/obj/item/modular_computer/computer in get_listeners_by_type(LISTENER_MODULAR_COMPUTER, /obj/item/modular_computer))
if(computer?.working && !!computer.nano_printer)
if(computer?.working && !!computer.nano_printer && computer.hard_drive?.stored_files.len)
var/datum/computer_file/program/comm/C = locate(/datum/computer_file/program/comm) in computer.hard_drive.stored_files
if(C?.intercept)
computer.nano_printer.print_text(message_text, message_title, "#deebff")
@@ -1,4 +1,4 @@
/obj/item/computer_hardware/hard_drive/
/obj/item/computer_hardware/hard_drive
name = "basic hard drive"
desc = "A small power efficient solid state drive, with 128GQ of storage capacity for use in basic computers where power efficiency is desired."
power_usage = 25 // SSD or something with low power usage
@@ -32,8 +32,8 @@
max_capacity = PRG.size // Set the capacity of the backup disk to the capacity of the program
store_file(PRG)
read_only = TRUE
desc = "A read-only backup storage crystal containing a backup of the following software: [PRG.filename]"
name = "[PRG.filename] backup crystal"
desc = "A read-only backup storage crystal containing a backup of the following software: [PRG.filedesc]"
name = "[PRG.filedesc] backup crystal"
/obj/structure/closet/crate/software_backup
desc = "A crate containing a backup of all the NT Software available."