Tech Support Things (#10050)

This commit is contained in:
Geeves
2020-10-23 15:22:41 +02:00
committed by GitHub
parent a9b5d0faa7
commit f15de32f31
6 changed files with 16 additions and 9 deletions
@@ -5,7 +5,6 @@
icon_state = "hdd_normal"
hardware_size = 1
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
var/has_installed = FALSE // whether we've been installed in a computer yet
var/max_capacity = 128
var/used_capacity = 0
var/read_only = FALSE // If the HDD is read only
@@ -74,8 +73,9 @@
if(!stored_files)
return FALSE
// This file is already stored. Don't store it again.
if(F in stored_files)
return FALSE
for(var/datum/computer_file/program/P in stored_files)
if(F.type == P.type)
return FALSE
F.hard_drive = src
stored_files.Add(F)
@@ -84,11 +84,10 @@
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/computer_hardware/hard_drive/proc/install_default_programs()
if(parent_computer && !has_installed)
if(parent_computer)
store_file(new /datum/computer_file/program/computerconfig(parent_computer)) // Computer configuration utility, allows hardware control and displays more info than status bar
store_file(new /datum/computer_file/program/clientmanager(parent_computer)) // Client Manager to Enroll the Device
store_file(new /datum/computer_file/program/pai_access_lock(parent_computer)) // pAI access control, to stop pesky pAI from messing with computers
has_installed = TRUE
// Use this proc to remove file from the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/computer_hardware/hard_drive/proc/remove_file(var/datum/computer_file/F)