mirror of
https://github.com/Skyrat-SS13/Skyrat-tg.git
synced 2026-08-24 05:18:33 +01:00
[MIRROR] Removes tablet hard drives entirely (HDD & SSD) [MDB IGNORE] (#17164)
* Removes tablet hard drives entirely (HDD & SSD) * map updates * changes * contractor uplink theme * uplink improvements * tab Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
co-authored by
John Willard
tastyfish
parent
9b4fb5848a
commit
097e913e4b
@@ -33,13 +33,6 @@
|
||||
active_program.ui_interact(user)
|
||||
return
|
||||
|
||||
// We are still here, that means there is no program loaded. Load the BIOS/ROM/OS/whatever you want to call it.
|
||||
// This screen simply lists available programs and user may select them.
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
if(!hard_drive || !hard_drive.stored_files || !hard_drive.stored_files.len)
|
||||
to_chat(user, span_danger("\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning."))
|
||||
return // No HDD, No HDD files list or no stored files. Something is very broken.
|
||||
|
||||
if(honkvirus_amount > 0) // EXTRA annoying, huh!
|
||||
honkvirus_amount--
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 30, TRUE)
|
||||
@@ -55,7 +48,7 @@
|
||||
. = ..()
|
||||
var/list/data = list()
|
||||
|
||||
data["show_imprint"] = istype(src, /obj/item/modular_computer/tablet/)
|
||||
data["show_imprint"] = istype(src, /obj/item/modular_computer/tablet)
|
||||
|
||||
return data
|
||||
|
||||
@@ -83,12 +76,10 @@
|
||||
IDJob = cardholder.current_job,
|
||||
)
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
|
||||
data["removable_media"] = list()
|
||||
if(all_components[MC_SDD])
|
||||
if(inserted_disk)
|
||||
data["removable_media"] += "Eject Disk"
|
||||
var/datum/computer_file/program/ai_restorer/airestore_app = locate() in hard_drive.stored_files
|
||||
var/datum/computer_file/program/ai_restorer/airestore_app = locate() in stored_files
|
||||
if(airestore_app?.stored_card)
|
||||
data["removable_media"] += "intelliCard"
|
||||
var/obj/item/computer_hardware/card_slot/secondarycardholder = all_components[MC_CARD2]
|
||||
@@ -96,7 +87,7 @@
|
||||
data["removable_media"] += "secondary RFID card"
|
||||
|
||||
data["programs"] = list()
|
||||
for(var/datum/computer_file/program/P in hard_drive.stored_files)
|
||||
for(var/datum/computer_file/program/P in stored_files)
|
||||
var/running = FALSE
|
||||
if(P in idle_threads)
|
||||
running = TRUE
|
||||
@@ -122,7 +113,6 @@
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
switch(action)
|
||||
if("PC_exit")
|
||||
kill_program()
|
||||
@@ -147,8 +137,7 @@
|
||||
var/prog = params["name"]
|
||||
var/datum/computer_file/program/P = null
|
||||
var/mob/user = usr
|
||||
if(hard_drive)
|
||||
P = hard_drive.find_file_by_name(prog)
|
||||
P = find_file_by_name(prog)
|
||||
|
||||
if(!istype(P) || P.program_state == PROGRAM_STATE_KILLED)
|
||||
return
|
||||
@@ -157,7 +146,7 @@
|
||||
to_chat(user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed."))
|
||||
|
||||
if("PC_runprogram")
|
||||
open_program(usr, hard_drive.find_file_by_name(params["name"]))
|
||||
open_program(usr, find_file_by_name(params["name"]))
|
||||
|
||||
if("PC_toggle_light")
|
||||
return toggle_flashlight()
|
||||
@@ -179,14 +168,13 @@
|
||||
var/mob/user = usr
|
||||
switch(param)
|
||||
if("Eject Disk")
|
||||
var/obj/item/computer_hardware/hard_drive/portable/portable_drive = all_components[MC_SDD]
|
||||
if(!portable_drive)
|
||||
if(!inserted_disk)
|
||||
return
|
||||
if(uninstall_component(portable_drive, usr))
|
||||
user.put_in_hands(portable_drive)
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
user.put_in_hands(inserted_disk)
|
||||
inserted_disk = null
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
if("intelliCard")
|
||||
var/datum/computer_file/program/ai_restorer/airestore_app = locate() in hard_drive.stored_files
|
||||
var/datum/computer_file/program/ai_restorer/airestore_app = locate() in stored_files
|
||||
if(!airestore_app)
|
||||
return
|
||||
if(airestore_app.try_eject(user))
|
||||
|
||||
Reference in New Issue
Block a user