mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 01:24:21 +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:
@@ -14,6 +14,25 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
armor = list(MELEE = 0, BULLET = 20, LASER = 20, ENERGY = 100, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
|
||||
light_system = MOVABLE_LIGHT_DIRECTIONAL
|
||||
|
||||
///The disk in this PDA. If set, this will be inserted on Initialize.
|
||||
var/obj/item/computer_disk/inserted_disk
|
||||
|
||||
///The amount of storage space the computer starts with.
|
||||
var/max_capacity = 128
|
||||
///The amount of storage space we've got filled
|
||||
var/used_capacity = 0
|
||||
///List of stored files on this drive. DO NOT MODIFY DIRECTLY!
|
||||
var/list/datum/computer_file/stored_files = list()
|
||||
|
||||
///Non-static list of programs the computer should recieve on Initialize.
|
||||
var/list/datum/computer_file/starting_programs = list()
|
||||
///Static list of default programs that come with ALL computers, here so computers don't have to repeat this.
|
||||
var/static/list/datum/computer_file/default_programs = list(
|
||||
/datum/computer_file/program/computerconfig,
|
||||
/datum/computer_file/program/ntnetdownload,
|
||||
/datum/computer_file/program/filemanager,
|
||||
)
|
||||
|
||||
///Flag of the type of device the modular computer is, deciding what types of apps it can run.
|
||||
var/hardware_flag = NONE
|
||||
// Options: PROGRAM_ALL | PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET
|
||||
@@ -73,7 +92,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
///The program currently active on the tablet.
|
||||
var/datum/computer_file/program/active_program
|
||||
///Idle programs on background. They still receive process calls but can't be interacted with.
|
||||
var/list/idle_threads
|
||||
var/list/idle_threads = list()
|
||||
/// Amount of programs that can be ran at once
|
||||
var/max_idle_programs = 2
|
||||
|
||||
@@ -105,32 +124,42 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
physical = src
|
||||
set_light_color(comp_light_color)
|
||||
set_light_range(comp_light_luminosity)
|
||||
idle_threads = list()
|
||||
if(looping_sound)
|
||||
soundloop = new(src, enabled)
|
||||
UpdateDisplay()
|
||||
if(has_light)
|
||||
add_item_action(/datum/action/item_action/toggle_computer_light)
|
||||
if(inserted_disk)
|
||||
inserted_disk = new inserted_disk(src)
|
||||
|
||||
update_appearance()
|
||||
register_context()
|
||||
init_network_id(NETWORK_TABLETS)
|
||||
Add_Messenger()
|
||||
install_default_programs()
|
||||
|
||||
/obj/item/modular_computer/proc/install_default_programs()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
for(var/programs in default_programs + starting_programs)
|
||||
var/datum/computer_file/program/program_type = new programs
|
||||
store_file(program_type)
|
||||
|
||||
/obj/item/modular_computer/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
wipe_program(forced = TRUE)
|
||||
for(var/datum/computer_file/program/idle as anything in idle_threads)
|
||||
idle.kill_program(TRUE)
|
||||
idle_threads?.Cut()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
for(var/port in all_components)
|
||||
var/obj/item/computer_hardware/component = all_components[port]
|
||||
qdel(component)
|
||||
all_components?.Cut()
|
||||
//Some components will actually try and interact with this, so let's do it later
|
||||
QDEL_NULL(soundloop)
|
||||
QDEL_LIST(stored_files)
|
||||
Remove_Messenger()
|
||||
|
||||
if(istype(inserted_disk))
|
||||
QDEL_NULL(inserted_disk)
|
||||
if(istype(inserted_pai))
|
||||
QDEL_NULL(inserted_pai)
|
||||
|
||||
@@ -317,8 +346,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
return FALSE
|
||||
obj_flags |= EMAGGED //Mostly for consistancy purposes; the programs will do their own emag handling
|
||||
var/newemag = FALSE
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
for(var/datum/computer_file/program/app in drive.stored_files)
|
||||
for(var/datum/computer_file/program/app in stored_files)
|
||||
if(!istype(app))
|
||||
continue
|
||||
if(app.run_emag())
|
||||
@@ -342,6 +370,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
if(long_ranged)
|
||||
. += "It is upgraded with an experimental long-ranged network capabilities, picking up NTNet frequencies while further away."
|
||||
. += span_notice("It has [max_capacity] GQ of storage capacity.")
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
var/obj/item/computer_hardware/card_slot/card_slot2 = all_components[MC_CARD2]
|
||||
@@ -361,11 +390,11 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
/obj/item/modular_computer/examine_more(mob/user)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/app_examine as anything in hdd.stored_files)
|
||||
if(app_examine.on_examine(src, user))
|
||||
. += app_examine.on_examine(src, user)
|
||||
. += "Storage capacity: [used_capacity]/[max_capacity]GQ"
|
||||
|
||||
for(var/datum/computer_file/app_examine as anything in stored_files)
|
||||
if(app_examine.on_examine(src, user))
|
||||
. += app_examine.on_examine(src, user)
|
||||
|
||||
if(Adjacent(user))
|
||||
. += span_notice("Paper level: [stored_paper] / [max_paper].")
|
||||
@@ -383,7 +412,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
context[SCREENTIP_CONTEXT_ALT_LMB] = "Remove pAI"
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(all_components[MC_SDD])
|
||||
if(inserted_disk)
|
||||
context[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB] = "Remove SSD"
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
@@ -421,13 +450,11 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/ssd = all_components[MC_SDD]
|
||||
if(!ssd)
|
||||
if(!inserted_disk)
|
||||
return
|
||||
if(uninstall_component(ssd, usr))
|
||||
user.put_in_hands(ssd)
|
||||
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)
|
||||
|
||||
/obj/item/modular_computer/proc/turn_on(mob/user, open_ui = TRUE)
|
||||
var/issynth = issilicon(user) // Robots and AIs get different activation messages.
|
||||
@@ -654,7 +681,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
kill_program(forced = TRUE)
|
||||
for(var/datum/computer_file/program/P in idle_threads)
|
||||
P.kill_program(forced = TRUE)
|
||||
idle_threads.Remove(P)
|
||||
if(looping_sound)
|
||||
soundloop.stop()
|
||||
if(physical && loud)
|
||||
@@ -726,11 +752,9 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
return
|
||||
|
||||
// Check if any Applications need it
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/item_holding_app as anything in hdd.stored_files)
|
||||
if(item_holding_app.try_insert(attacking_item, user))
|
||||
return
|
||||
for(var/datum/computer_file/item_holding_app as anything in stored_files)
|
||||
if(item_holding_app.try_insert(attacking_item, user))
|
||||
return
|
||||
|
||||
if(istype(attacking_item, /obj/item/paper))
|
||||
if(stored_paper >= max_paper)
|
||||
@@ -766,6 +790,14 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
if(H.try_insert(attacking_item, user))
|
||||
return
|
||||
|
||||
// Insert a data disk
|
||||
if(istype(attacking_item, /obj/item/computer_disk))
|
||||
if(!user.transferItemToLoc(attacking_item, src))
|
||||
return
|
||||
inserted_disk = attacking_item
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
return
|
||||
|
||||
// Insert new hardware
|
||||
if(istype(attacking_item, /obj/item/computer_hardware))
|
||||
if(install_component(attacking_item, user))
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
if(prob(component_probability))
|
||||
H.take_damage(round(damage_amount*0.5), damage_type, damage_flag, 0)
|
||||
|
||||
|
||||
/obj/item/modular_computer/deconstruct(disassembled = TRUE)
|
||||
break_apart()
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/proc/break_apart()
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
@@ -30,4 +30,3 @@
|
||||
if(prob(25))
|
||||
H.take_damage(rand(10,30), BRUTE, 0, 0)
|
||||
relay_qdel()
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/**
|
||||
* store_file
|
||||
*
|
||||
* Adds an already initialized file to the computer, checking if one already exists.
|
||||
* Returns TRUE if successfully stored, FALSE otherwise.
|
||||
*/
|
||||
/obj/item/modular_computer/proc/store_file(datum/computer_file/file_storing)
|
||||
if(!file_storing || !istype(file_storing))
|
||||
return FALSE
|
||||
if(!can_store_file(file_storing))
|
||||
return FALSE
|
||||
|
||||
// This file is already stored. Don't store it again.
|
||||
if(file_storing in stored_files)
|
||||
return FALSE
|
||||
|
||||
SEND_SIGNAL(file_storing, COMSIG_MODULAR_COMPUTER_FILE_ADDING)
|
||||
file_storing.computer = src
|
||||
stored_files.Add(file_storing)
|
||||
used_capacity += file_storing.size
|
||||
SEND_SIGNAL(file_storing, COMSIG_MODULAR_COMPUTER_FILE_ADDED)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* remove_file
|
||||
*
|
||||
* Removes a given file from the computer, if possible.
|
||||
* Properly checking if the file even exists and is in the computer.
|
||||
* Returns TRUE if successfully completed, FALSE otherwise
|
||||
*/
|
||||
/obj/item/modular_computer/proc/remove_file(datum/computer_file/file_removing)
|
||||
if(!file_removing || !istype(file_removing))
|
||||
return FALSE
|
||||
if(!(file_removing in stored_files))
|
||||
return FALSE
|
||||
if(istype(file_removing, /datum/computer_file/program))
|
||||
var/datum/computer_file/program/program_file = file_removing
|
||||
if(program_file.program_state != PROGRAM_STATE_KILLED)
|
||||
program_file.kill_program(TRUE)
|
||||
if(program_file.program_state == PROGRAM_STATE_ACTIVE)
|
||||
active_program = null
|
||||
|
||||
SEND_SIGNAL(file_removing, COMSIG_MODULAR_COMPUTER_FILE_DELETING)
|
||||
stored_files.Remove(file_removing)
|
||||
used_capacity -= file_removing.size
|
||||
SEND_SIGNAL(file_removing, COMSIG_MODULAR_COMPUTER_FILE_DELETED)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* can_store_file
|
||||
*
|
||||
* Checks if a computer can store a file, as computers can only store unique files.
|
||||
* returns TRUE if possible, FALSE otherwise.
|
||||
*/
|
||||
/obj/item/modular_computer/proc/can_store_file(datum/computer_file/file)
|
||||
if(!file || !istype(file))
|
||||
return FALSE
|
||||
if(file in stored_files)
|
||||
return FALSE
|
||||
if(find_file_by_name(file.filename))
|
||||
return FALSE
|
||||
// In the unlikely event someone manages to create that many files.
|
||||
// BYOND is acting weird with numbers above 999 in loops (infinite loop prevention)
|
||||
if(stored_files.len >= 999)
|
||||
return FALSE
|
||||
if((used_capacity + file.size) > max_capacity)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* find_file_by_name
|
||||
*
|
||||
* Will check all applications in a tablet for files and, if they have \
|
||||
* the same filename (disregarding extension), will return it.
|
||||
* If a computer disk is passed instead, it will check the disk over the computer.
|
||||
*/
|
||||
/obj/item/modular_computer/proc/find_file_by_name(filename, obj/item/computer_disk/target_disk)
|
||||
if(!filename)
|
||||
return null
|
||||
if(target_disk)
|
||||
for(var/datum/computer_file/file as anything in target_disk.stored_files)
|
||||
if(file.filename == filename)
|
||||
return file
|
||||
else
|
||||
for(var/datum/computer_file/file as anything in stored_files)
|
||||
if(file.filename == filename)
|
||||
return file
|
||||
return null
|
||||
@@ -34,9 +34,8 @@
|
||||
if(enabled) // Shut down the computer
|
||||
if(active_program)
|
||||
active_program.event_powerfailure(0)
|
||||
for(var/I in idle_threads)
|
||||
var/datum/computer_file/program/PRG = I
|
||||
PRG.event_powerfailure(1)
|
||||
for(var/datum/computer_file/program/programs as anything in idle_threads)
|
||||
programs.event_powerfailure(background = TRUE)
|
||||
shutdown_computer(0)
|
||||
|
||||
// Handles power-related things, such as battery interaction, recharging, shutdown when it's discharged
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/obj/item/computer_disk
|
||||
name = "data disk"
|
||||
desc = "Removable disk used to store data."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "datadisk6"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
///The amount of storage space is on the disk
|
||||
var/max_capacity = 16
|
||||
///The amount of storage space we've got filled
|
||||
var/used_capacity = 0
|
||||
///List of stored files on this drive. DO NOT MODIFY DIRECTLY!
|
||||
var/list/datum/computer_file/stored_files = list()
|
||||
|
||||
///List of all programs that the disk should start with.
|
||||
var/list/datum/computer_file/starting_programs = list()
|
||||
|
||||
/obj/item/computer_disk/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/programs in starting_programs)
|
||||
var/datum/computer_file/program/program_type = new programs
|
||||
add_file(program_type)
|
||||
|
||||
/**
|
||||
* add_file
|
||||
*
|
||||
* Attempts to add an already existing file to the computer disk, then adds that capacity to the used capicity.
|
||||
*/
|
||||
/obj/item/computer_disk/proc/add_file(datum/computer_file/file)
|
||||
if((file.size + used_capacity) > max_capacity)
|
||||
return FALSE
|
||||
stored_files.Add(file)
|
||||
used_capacity += file.size
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* remove_file
|
||||
*
|
||||
* Removes an app from the stored_files list, then removes their size from the capacity.
|
||||
*/
|
||||
/obj/item/computer_disk/proc/remove_file(datum/computer_file/file)
|
||||
if(!(file in stored_files))
|
||||
return FALSE
|
||||
stored_files.Remove(file)
|
||||
used_capacity -= file.size
|
||||
return TRUE
|
||||
|
||||
/obj/item/computer_disk/advanced
|
||||
name = "advanced data disk"
|
||||
icon_state = "datadisk5"
|
||||
max_capacity = 64
|
||||
|
||||
/obj/item/computer_disk/super
|
||||
name = "super data disk"
|
||||
desc = "Removable disk used to store large amounts of data."
|
||||
icon_state = "datadisk3"
|
||||
max_capacity = 256
|
||||
@@ -0,0 +1,145 @@
|
||||
/**
|
||||
* Command
|
||||
*/
|
||||
/obj/item/computer_disk/command
|
||||
icon_state = "datadisk7"
|
||||
max_capacity = 32
|
||||
///Static list of programss ALL command tablets have.
|
||||
var/static/list/datum/computer_file/command_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/science,
|
||||
/datum/computer_file/program/status,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/command/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/programs in command_programs)
|
||||
var/datum/computer_file/program/program_type = new programs
|
||||
add_file(program_type)
|
||||
|
||||
/obj/item/computer_disk/command/captain
|
||||
name = "captain data disk"
|
||||
desc = "Removable disk used to download essential Captain tablet apps."
|
||||
icon_state = "datadisk10"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/records/medical,
|
||||
/datum/computer_file/program/phys_scanner/all,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/command/cmo
|
||||
name = "chief medical officer data disk"
|
||||
desc = "Removable disk used to download essential CMO tablet apps."
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/all,
|
||||
/datum/computer_file/program/records/medical,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/command/rd
|
||||
name = "research director data disk"
|
||||
desc = "Removable disk used to download essential RD tablet apps."
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/chemistry,
|
||||
/datum/computer_file/program/signal_commander,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/command/hos
|
||||
name = "head of security data disk"
|
||||
desc = "Removable disk used to download essential HoS tablet apps."
|
||||
icon_state = "datadisk9"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/command/hop
|
||||
name = "head of personnel data disk"
|
||||
desc = "Removable disk used to download essential HoP tablet apps."
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/job_management,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/command/ce
|
||||
name = "chief engineer data disk"
|
||||
desc = "Removable disk used to download essential CE tablet apps."
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/supermatter_monitor,
|
||||
/datum/computer_file/program/atmosscan,
|
||||
/datum/computer_file/program/alarm_monitor,
|
||||
)
|
||||
|
||||
/**
|
||||
* Security
|
||||
*/
|
||||
/obj/item/computer_disk/security
|
||||
name = "security officer data disk"
|
||||
desc = "Removable disk used to download security-related tablet apps."
|
||||
icon_state = "datadisk9"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
)
|
||||
|
||||
/**
|
||||
* Medical
|
||||
*/
|
||||
/obj/item/computer_disk/medical
|
||||
name = "medical doctor data disk"
|
||||
desc = "Removable disk used to download medical-related tablet apps."
|
||||
icon_state = "datadisk7"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/medical,
|
||||
/datum/computer_file/program/records/medical,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/chemistry
|
||||
name = "chemistry data disk"
|
||||
desc = "Removable disk used to download chemistry-related tablet apps."
|
||||
icon_state = "datadisk5"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/chemistry,
|
||||
)
|
||||
|
||||
/**
|
||||
* Supply
|
||||
*/
|
||||
/obj/item/computer_disk/quartermaster
|
||||
name = "cargo data disk"
|
||||
desc = "Removable disk used to download cargo-related tablet apps."
|
||||
icon_state = "cargodisk"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/shipping,
|
||||
/datum/computer_file/program/budgetorders,
|
||||
)
|
||||
|
||||
/**
|
||||
* Science
|
||||
*/
|
||||
/obj/item/computer_disk/ordnance
|
||||
name = "ordnance data disk"
|
||||
desc = "Removable disk used to download ordnance-related tablet apps."
|
||||
icon_state = "datadisk5"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/signal_commander,
|
||||
/datum/computer_file/program/scipaper_program,
|
||||
)
|
||||
|
||||
/**
|
||||
* Engineering
|
||||
*/
|
||||
/obj/item/computer_disk/engineering
|
||||
name = "station engineer data disk"
|
||||
desc = "Removable disk used to download engineering-related tablet apps."
|
||||
icon_state = "datadisk6"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/supermatter_monitor,
|
||||
)
|
||||
|
||||
/obj/item/computer_disk/atmos
|
||||
name = "atmospheric technician data disk"
|
||||
desc = "Removable disk used to download atmos-related tablet apps."
|
||||
icon_state = "datadisk6"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/atmosscan,
|
||||
/datum/computer_file/program/alarm_monitor,
|
||||
)
|
||||
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* Virus disk
|
||||
* Can't hold apps, instead does unique actions.
|
||||
*/
|
||||
/obj/item/computer_disk/virus
|
||||
name = "\improper generic virus disk"
|
||||
icon_state = "virusdisk"
|
||||
max_capacity = 0
|
||||
///How many charges the virus has left
|
||||
var/charges = 5
|
||||
|
||||
/obj/item/computer_disk/virus/proc/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
|
||||
if(charges <= 0)
|
||||
to_chat(user, span_notice("ERROR: Out of charges."))
|
||||
return FALSE
|
||||
if(!target)
|
||||
to_chat(user, span_notice("ERROR: Could not find device."))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Clown virus
|
||||
* Makes people's PDA honk
|
||||
* Can also be used on open panel airlocks to make them honk on opening.
|
||||
*/
|
||||
/obj/item/computer_disk/virus/clown
|
||||
name = "\improper H.O.N.K. disk"
|
||||
|
||||
/obj/item/computer_disk/virus/clown/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
user.show_message(span_notice("Success!"))
|
||||
charges--
|
||||
target.honkvirus_amount = rand(15, 25)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Mime virus
|
||||
* Makes PDA's silent, removing their ringtone.
|
||||
*/
|
||||
/obj/item/computer_disk/virus/mime
|
||||
name = "\improper sound of silence disk"
|
||||
|
||||
/obj/item/computer_disk/virus/mime/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
var/datum/computer_file/program/messenger/app = locate() in target.stored_files
|
||||
if(!app)
|
||||
return FALSE
|
||||
user.show_message(span_notice("Success!"))
|
||||
charges--
|
||||
app.ringer_status = FALSE
|
||||
app.ringtone = ""
|
||||
|
||||
/**
|
||||
* Detomatix virus
|
||||
* Sends a false message, and blows the PDA up if the target responds to it (or opens their messenger before a timer)
|
||||
*/
|
||||
/obj/item/computer_disk/virus/detomatix
|
||||
name = "\improper D.E.T.O.M.A.T.attacking_item.X. disk"
|
||||
charges = 6
|
||||
|
||||
/obj/item/computer_disk/virus/detomatix/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
var/difficulty = target.get_detomatix_difficulty()
|
||||
if(SEND_SIGNAL(target, COMSIG_TABLET_CHECK_DETONATE) & COMPONENT_TABLET_NO_DETONATE || prob(difficulty * 15))
|
||||
user.show_message(span_danger("ERROR: Target could not be bombed."), MSG_VISUAL)
|
||||
charges--
|
||||
return
|
||||
|
||||
var/original_host = source
|
||||
var/fakename = sanitize_name(tgui_input_text(user, "Enter a name for the rigged message.", "Forge Message", max_length = MAX_NAME_LEN), allow_numbers = TRUE)
|
||||
if(!fakename || source != original_host || !user.canUseTopic(source, be_close = TRUE))
|
||||
return
|
||||
var/fakejob = sanitize_name(tgui_input_text(user, "Enter a job for the rigged message.", "Forge Message", max_length = MAX_NAME_LEN), allow_numbers = TRUE)
|
||||
if(!fakejob || source != original_host || !user.canUseTopic(source, be_close = TRUE))
|
||||
return
|
||||
|
||||
var/datum/computer_file/program/messenger/app = locate() in source.stored_files
|
||||
if(!app || charges <= 0 || !app.send_message(user, list(target), rigged = REF(user), fake_name = fakename, fake_job = fakejob))
|
||||
return FALSE
|
||||
charges--
|
||||
user.show_message(span_notice("Success!"))
|
||||
var/reference = REF(src)
|
||||
ADD_TRAIT(target, TRAIT_PDA_CAN_EXPLODE, reference)
|
||||
ADD_TRAIT(target, TRAIT_PDA_MESSAGE_MENU_RIGGED, reference)
|
||||
addtimer(TRAIT_CALLBACK_REMOVE(target, TRAIT_PDA_MESSAGE_MENU_RIGGED, reference), 10 SECONDS)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Frame cartridge
|
||||
* Creates and opens a false uplink on someone's PDA
|
||||
* Can be loaded with TC to show up on the false uplink.
|
||||
*/
|
||||
/obj/item/computer_disk/virus/frame
|
||||
name = "\improper F.R.A.M.E. disk"
|
||||
|
||||
///How many telecrystals the uplink should have
|
||||
var/telecrystals = 0
|
||||
///How much progression should be shown in the uplink, set on purchase of the item.
|
||||
var/current_progression = 0
|
||||
|
||||
/obj/item/computer_disk/virus/frame/attackby(obj/item/attacking_item, mob/user, params)
|
||||
. = ..()
|
||||
if(!istype(attacking_item, /obj/item/stack/telecrystal))
|
||||
return
|
||||
if(!charges)
|
||||
to_chat(user, span_notice("[src] is out of charges, it's refusing to accept [attacking_item]."))
|
||||
return
|
||||
var/obj/item/stack/telecrystal/telecrystal_stack = attacking_item
|
||||
telecrystals += telecrystal_stack.amount
|
||||
to_chat(user, span_notice("You slot [telecrystal_stack] into [src]. The next time it's used, it will also give telecrystals."))
|
||||
telecrystal_stack.use(telecrystal_stack.amount)
|
||||
|
||||
|
||||
/obj/item/computer_disk/virus/frame/send_virus(obj/item/modular_computer/tablet/target, mob/living/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
charges--
|
||||
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
to_chat(user, span_notice("Success! The unlock code to the target is: [lock_code]"))
|
||||
var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink)
|
||||
if(!hidden_uplink)
|
||||
var/datum/mind/target_mind
|
||||
var/list/backup_players = list()
|
||||
for(var/datum/mind/player as anything in get_crewmember_minds())
|
||||
if(player.assigned_role?.title == target.saved_job)
|
||||
backup_players += player
|
||||
if(player.name == target.saved_identification)
|
||||
target_mind = player
|
||||
break
|
||||
if(!target_mind)
|
||||
if(!length(backup_players))
|
||||
target_mind = user.mind
|
||||
else
|
||||
target_mind = pick(backup_players)
|
||||
hidden_uplink = target.AddComponent(/datum/component/uplink, target_mind, enabled = TRUE, starting_tc = telecrystals, has_progression = TRUE)
|
||||
hidden_uplink.uplink_handler.has_objectives = TRUE
|
||||
hidden_uplink.uplink_handler.owner = target_mind
|
||||
hidden_uplink.uplink_handler.can_take_objectives = FALSE
|
||||
hidden_uplink.uplink_handler.progression_points = min(SStraitor.current_global_progression, current_progression)
|
||||
hidden_uplink.uplink_handler.generate_objectives()
|
||||
SStraitor.register_uplink_handler(hidden_uplink.uplink_handler)
|
||||
else
|
||||
hidden_uplink.add_telecrystals(telecrystals)
|
||||
telecrystals = 0
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.active = TRUE
|
||||
@@ -1,16 +1,9 @@
|
||||
/obj/item/modular_computer/laptop/preset/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(new /obj/item/computer_hardware/hard_drive)
|
||||
install_programs()
|
||||
|
||||
/obj/item/modular_computer/laptop/preset/proc/install_programs()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/modular_computer/laptop/preset/civilian
|
||||
desc = "A low-end laptop often used for personal recreation."
|
||||
|
||||
/obj/item/modular_computer/laptop/preset/civilian/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/chatclient,
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/obj/item/modular_computer/tablet/pda/heads
|
||||
greyscale_config = /datum/greyscale_config/tablet/head
|
||||
greyscale_colors = "#67A364#a92323"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -26,17 +26,14 @@
|
||||
/obj/item/modular_computer/tablet/pda/heads/captain/Initialize(mapload)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TABLET_CHECK_DETONATE, .proc/tab_no_detonate)
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
if(!drive)
|
||||
return
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in stored_files)
|
||||
messenger_app.spam_mode = TRUE
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/heads/hop
|
||||
name = "head of personnel PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#374f7e#a52f29#a52f29"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -50,7 +47,7 @@
|
||||
name = "head of security PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/head
|
||||
greyscale_colors = "#EA3232#0000CC"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -63,7 +60,7 @@
|
||||
name = "chief engineer PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#D99A2E#69DBF3#FAFAFA"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -78,7 +75,7 @@
|
||||
name = "chief medical officer PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#FAFAFA#000099#3F96CC"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -93,7 +90,7 @@
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#FAFAFA#000099#B347BC"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -102,13 +99,14 @@
|
||||
/datum/computer_file/program/phys_scanner/chemistry,
|
||||
/datum/computer_file/program/signal_commander,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/heads/quartermaster
|
||||
name = "quartermaster PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#D6B328#6506CA#927444"
|
||||
inserted_item = /obj/item/pen/survival
|
||||
stored_paper = 20
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
/datum/computer_file/program/science,
|
||||
@@ -125,7 +123,7 @@
|
||||
/obj/item/modular_computer/tablet/pda/security
|
||||
name = "security PDA"
|
||||
greyscale_colors = "#EA3232#0000cc"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
@@ -134,7 +132,7 @@
|
||||
/obj/item/modular_computer/tablet/pda/detective
|
||||
name = "detective PDA"
|
||||
greyscale_colors = "#805A2F#990202"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
@@ -145,7 +143,7 @@
|
||||
name = "warden PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_split
|
||||
greyscale_colors = "#EA3232#0000CC#363636"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
@@ -159,17 +157,19 @@
|
||||
name = "engineering PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#D99A2E#69DBF3#E3DF3D"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/supermatter_monitor,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/atmos
|
||||
name = "atmospherics PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#EEDC43#00E5DA#727272"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/atmosscan,
|
||||
/datum/computer_file/program/alarm_monitor,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -180,26 +180,29 @@
|
||||
name = "scientist PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#000099#B347BC"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/atmosscan,
|
||||
/datum/computer_file/program/signal_commander,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/roboticist
|
||||
name = "roboticist PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_split
|
||||
greyscale_colors = "#484848#0099CC#D94927"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/robocontrol,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/geneticist
|
||||
name = "geneticist PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_split
|
||||
greyscale_colors = "#FAFAFA#000099#0097CA"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/medical,
|
||||
/datum/computer_file/program/records/medical,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -210,36 +213,40 @@
|
||||
name = "medical PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#000099#3F96CC"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/medical,
|
||||
/datum/computer_file/program/records/medical,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/medical/paramedic
|
||||
name = "paramedic PDA"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/medical,
|
||||
/datum/computer_file/program/records/medical,
|
||||
/datum/computer_file/program/radar/lifeline,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/viro
|
||||
name = "virology PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_split
|
||||
greyscale_colors = "#FAFAFA#355FAC#57C451"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/medical,
|
||||
/datum/computer_file/program/records/medical,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/chemist
|
||||
name = "chemist PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#355FAC#EA6400"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/phys_scanner/chemistry,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -250,10 +257,11 @@
|
||||
name = "cargo technician PDA"
|
||||
greyscale_colors = "#D6B328#6506CA"
|
||||
stored_paper = 20
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/shipping,
|
||||
/datum/computer_file/program/budgetorders,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/shaftminer
|
||||
@@ -268,8 +276,9 @@
|
||||
/obj/item/modular_computer/tablet/pda/janitor
|
||||
name = "janitor PDA"
|
||||
greyscale_colors = "#933ea8#235AB2"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/radar/custodial_locator,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/chaplain
|
||||
@@ -281,16 +290,14 @@
|
||||
name = "lawyer PDA"
|
||||
greyscale_colors = "#4C76C8#FFE243"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/records/security,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/lawyer/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
if(!drive)
|
||||
return
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in stored_files)
|
||||
messenger_app.spam_mode = TRUE
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/botanist
|
||||
@@ -308,7 +315,7 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/clown
|
||||
name = "clown PDA"
|
||||
loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/virus/clown
|
||||
inserted_disk = /obj/item/computer_disk/virus/clown
|
||||
icon_state = "pda-clown"
|
||||
greyscale_config = null
|
||||
greyscale_colors = null
|
||||
@@ -325,7 +332,7 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/clown/proc/AfterSlip(mob/living/carbon/human/M)
|
||||
if (istype(M) && (M.real_name != saved_identification))
|
||||
var/obj/item/computer_hardware/hard_drive/portable/virus/clown/cart = all_components[MC_SDD]
|
||||
var/obj/item/computer_disk/virus/clown/cart = inserted_disk
|
||||
if(istype(cart) && cart.charges < 5)
|
||||
cart.charges++
|
||||
playsound(src,'sound/machines/ping.ogg',30,TRUE)
|
||||
@@ -335,20 +342,17 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/mime
|
||||
name = "mime PDA"
|
||||
loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/virus/mime
|
||||
inserted_disk = /obj/item/computer_disk/virus/mime
|
||||
greyscale_config = /datum/greyscale_config/tablet/mime
|
||||
greyscale_colors = "#FAFAFA#EA3232"
|
||||
inserted_item = /obj/item/toy/crayon/mime
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/mime/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/program/messenger/msg in hdd.stored_files)
|
||||
msg.mime_mode = TRUE
|
||||
msg.allow_emojis = TRUE
|
||||
msg.ringer_status = FALSE
|
||||
for(var/datum/computer_file/program/messenger/msg in stored_files)
|
||||
msg.mime_mode = TRUE
|
||||
msg.allow_emojis = TRUE
|
||||
msg.ringer_status = FALSE
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/curator
|
||||
name = "curator PDA"
|
||||
@@ -358,18 +362,16 @@
|
||||
icon_state = "pda-library"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
long_ranged = TRUE
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/newscaster,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/curator/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/program/messenger/msg in hdd.stored_files)
|
||||
msg.allow_emojis = TRUE
|
||||
msg.ringer_status = FALSE
|
||||
for(var/datum/computer_file/program/messenger/msg in stored_files)
|
||||
msg.allow_emojis = TRUE
|
||||
msg.ringer_status = FALSE
|
||||
|
||||
/**
|
||||
* No Department
|
||||
@@ -377,8 +379,9 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/assistant
|
||||
name = "assistant PDA"
|
||||
default_applications = list(
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/bounty_board,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -394,11 +397,9 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/program/messenger/msg in hdd.stored_files)
|
||||
msg.invisible = TRUE
|
||||
var/datum/computer_file/program/messenger/msg = locate() in stored_files
|
||||
if(msg)
|
||||
msg.invisible = TRUE
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/clear
|
||||
name = "clear PDA"
|
||||
|
||||
@@ -37,6 +37,16 @@
|
||||
/obj/item/clothing/mask/cigarette,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/Initialize(mapload)
|
||||
. = ..()
|
||||
if(inserted_item)
|
||||
inserted_item = new inserted_item(src)
|
||||
|
||||
/obj/item/modular_computer/tablet/Destroy()
|
||||
if(istype(inserted_item))
|
||||
QDEL_NULL(inserted_item)
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/tablet/update_icon_state()
|
||||
if(has_variants && !bypass_state)
|
||||
if(!finish_color)
|
||||
@@ -108,10 +118,8 @@
|
||||
/obj/item/modular_computer/tablet/proc/get_detomatix_difficulty()
|
||||
var/detomatix_difficulty
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/program/downloaded_apps as anything in hdd.stored_files)
|
||||
detomatix_difficulty += downloaded_apps.detomatix_resistance
|
||||
for(var/datum/computer_file/program/downloaded_apps as anything in stored_files)
|
||||
detomatix_difficulty += downloaded_apps.detomatix_resistance
|
||||
|
||||
return detomatix_difficulty
|
||||
|
||||
@@ -153,7 +161,7 @@
|
||||
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
if(istype(all_components[MC_SDD], /obj/item/computer_hardware/hard_drive/portable/virus/deto))
|
||||
if(istype(inserted_disk, /obj/item/computer_disk/virus/detomatix))
|
||||
explosion(src, devastation_range = -1, heavy_impact_range = 1, light_impact_range = 3, flash_range = 4)
|
||||
else
|
||||
explosion(src, devastation_range = -1, heavy_impact_range = -1, light_impact_range = 2, flash_range = 3)
|
||||
@@ -176,12 +184,7 @@
|
||||
if(!new_ringtone || new_ringtone == MESSENGER_RINGTONE_DEFAULT)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
|
||||
if(!drive)
|
||||
return
|
||||
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in stored_files)
|
||||
messenger_app.ringtone = new_ringtone
|
||||
|
||||
|
||||
@@ -226,12 +229,26 @@
|
||||
has_light = FALSE //tablet light button actually enables/disables the borg lamp
|
||||
comp_light_luminosity = 0
|
||||
has_variants = FALSE
|
||||
///Ref to the silicon we're installed in. Set by the silicon itself during its creation.
|
||||
var/mob/living/silicon/silicon_owner
|
||||
inserted_item = null
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/messenger,
|
||||
)
|
||||
|
||||
///Ref to the RoboTact app. Important enough to borgs to deserve a ref.
|
||||
var/datum/computer_file/program/robotact/robotact
|
||||
///IC log that borgs can view in their personal management app
|
||||
var/list/borglog = list()
|
||||
///Ref to the silicon we're installed in. Set by the silicon itself during its creation.
|
||||
var/mob/living/silicon/silicon_owner
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/cyborg
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/computerconfig,
|
||||
/datum/computer_file/program/filemanager,
|
||||
/datum/computer_file/program/robotact,
|
||||
/datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for borgs
|
||||
/datum/computer_file/program/messenger, // SKYRAT EDIT ADDITION - Messenger for borgs
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -239,9 +256,14 @@
|
||||
silicon_owner = loc
|
||||
if(!istype(silicon_owner))
|
||||
silicon_owner = null
|
||||
stack_trace("[type] initialized outside of a borg, deleting.")
|
||||
stack_trace("[type] initialized outside of a silicon, deleting.")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/install_default_programs()
|
||||
for(var/programs in starting_programs)
|
||||
var/datum/computer_file/program/program_type = new programs
|
||||
store_file(program_type)
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/Destroy()
|
||||
silicon_owner = null
|
||||
return ..()
|
||||
@@ -279,22 +301,21 @@
|
||||
* RoboTact is supposed to be undeletable, so these will create runtime messages.
|
||||
*/
|
||||
/obj/item/modular_computer/tablet/integrated/proc/get_robotact()
|
||||
if(!silicon_owner)
|
||||
return null
|
||||
if(!robotact)
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
robotact = hard_drive.find_file_by_name("robotact")
|
||||
if(!robotact)
|
||||
stack_trace("Cyborg [silicon_owner] ( [silicon_owner.type] ) was somehow missing their self-manage app in their tablet. A new copy has been created.")
|
||||
robotact = new(hard_drive)
|
||||
if(!hard_drive.store_file(robotact))
|
||||
qdel(robotact)
|
||||
robotact = null
|
||||
CRASH("Cyborg [silicon_owner]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.")
|
||||
return robotact
|
||||
if(robotact)
|
||||
return robotact
|
||||
robotact = find_file_by_name("robotact")
|
||||
if(robotact)
|
||||
return robotact
|
||||
stack_trace("Cyborg [silicon_owner] ( [silicon_owner.type] ) was somehow missing their self-manage app in their tablet. A new copy has been created.")
|
||||
robotact = new(src)
|
||||
if(store_file(robotact))
|
||||
return robotact
|
||||
qdel(robotact)
|
||||
robotact = null
|
||||
CRASH("Cyborg [silicon_owner]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.")
|
||||
|
||||
//Makes the light settings reflect the borg's headlamp settings
|
||||
/obj/item/modular_computer/tablet/integrated/ui_data(mob/user)
|
||||
/obj/item/modular_computer/tablet/integrated/cyborg/ui_data(mob/user)
|
||||
. = ..()
|
||||
.["has_light"] = TRUE
|
||||
if(iscyborg(silicon_owner))
|
||||
@@ -346,25 +367,29 @@
|
||||
greyscale_config = /datum/greyscale_config/tablet
|
||||
greyscale_colors = "#999875#a92323"
|
||||
|
||||
max_capacity = 64
|
||||
bypass_state = TRUE
|
||||
allow_chunky = TRUE
|
||||
|
||||
///All applications this tablet has pre-installed
|
||||
var/list/default_applications = list()
|
||||
///The pre-installed cartridge that comes with the tablet
|
||||
var/loaded_cartridge
|
||||
///Static list of default PDA apps to install on Initialize.
|
||||
var/static/list/datum/computer_file/pda_programs = list(
|
||||
/datum/computer_file/program/messenger,
|
||||
/datum/computer_file/program/nt_pay,
|
||||
/datum/computer_file/program/notepad,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/install_default_programs()
|
||||
for(var/programs as anything in (default_programs + pda_programs + starting_programs))
|
||||
var/datum/computer_file/program/program_type = new programs
|
||||
store_file(program_type)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/update_overlays()
|
||||
. = ..()
|
||||
var/init_icon = initial(icon)
|
||||
var/obj/item/computer_hardware/card_slot/card = all_components[MC_CARD]
|
||||
if(!init_icon)
|
||||
return
|
||||
if(card)
|
||||
if(card.stored_card)
|
||||
. += mutable_appearance(init_icon, "id_overlay")
|
||||
if(card?.stored_card)
|
||||
. += mutable_appearance(initial(icon), "id_overlay")
|
||||
if(light_on)
|
||||
. += mutable_appearance(init_icon, "light_overlay")
|
||||
. += mutable_appearance(initial(icon), "light_overlay")
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/attack_ai(mob/user)
|
||||
to_chat(user, span_notice("It doesn't feel right to snoop around like that..."))
|
||||
@@ -372,18 +397,5 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/hard_drive/small)
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(new /obj/item/computer_hardware/card_slot)
|
||||
|
||||
if(!isnull(default_applications))
|
||||
var/obj/item/computer_hardware/hard_drive/small/hard_drive = find_hardware_by_name("solid state drive")
|
||||
for(var/datum/computer_file/program/default_programs as anything in default_applications)
|
||||
hard_drive.store_file(new default_programs)
|
||||
|
||||
if(loaded_cartridge)
|
||||
var/obj/item/computer_hardware/hard_drive/portable/disk = new loaded_cartridge(src)
|
||||
install_component(disk)
|
||||
|
||||
if(inserted_item)
|
||||
inserted_item = new inserted_item(src)
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
/// Given to Nuke Ops members.
|
||||
/obj/item/modular_computer/tablet/nukeops
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/ntnetdownload/syndicate,
|
||||
/datum/computer_file/program/radar/fission360,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/nukeops/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(new /obj/item/computer_hardware/hard_drive/small/nukeops)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// Can be changed to give devices specific hardware
|
||||
var/_has_second_id_slot = FALSE
|
||||
var/_has_battery = FALSE
|
||||
///List of programs the computer starts with, given on Initialize.
|
||||
var/list/datum/computer_file/starting_programs = list()
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -13,23 +15,20 @@
|
||||
cpu.install_component(new /obj/item/computer_hardware/card_slot/secondary)
|
||||
if(_has_battery)
|
||||
cpu.install_component(new /obj/item/computer_hardware/battery(cpu, /obj/item/stock_parts/cell/computer/super))
|
||||
install_programs()
|
||||
|
||||
// Override in child types to install preset-specific programs.
|
||||
/obj/machinery/modular_computer/console/preset/proc/install_programs()
|
||||
return
|
||||
for(var/programs in starting_programs)
|
||||
var/datum/computer_file/program/program_type = new programs
|
||||
cpu.store_file(program_type)
|
||||
|
||||
// ===== ENGINEERING CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/engineering
|
||||
console_department = "Engineering"
|
||||
name = "engineering console"
|
||||
desc = "A stationary computer. This one comes preloaded with engineering programs."
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/engineering/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/power_monitor())
|
||||
hard_drive.store_file(new/datum/computer_file/program/alarm_monitor())
|
||||
hard_drive.store_file(new/datum/computer_file/program/supermatter_monitor())
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/power_monitor,
|
||||
/datum/computer_file/program/alarm_monitor,
|
||||
/datum/computer_file/program/supermatter_monitor,
|
||||
)
|
||||
|
||||
// ===== RESEARCH CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/research
|
||||
@@ -37,14 +36,13 @@
|
||||
name = "research director's console"
|
||||
desc = "A stationary computer. This one comes preloaded with research programs."
|
||||
_has_second_id_slot = TRUE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/research/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/ntnetmonitor())
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/ai_restorer())
|
||||
hard_drive.store_file(new/datum/computer_file/program/robocontrol())
|
||||
hard_drive.store_file(new/datum/computer_file/program/scipaper_program())
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/ntnetmonitor,
|
||||
/datum/computer_file/program/chatclient,
|
||||
/datum/computer_file/program/ai_restorer,
|
||||
/datum/computer_file/program/robocontrol,
|
||||
/datum/computer_file/program/scipaper_program,
|
||||
)
|
||||
|
||||
// ===== COMMAND CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/command
|
||||
@@ -52,12 +50,10 @@
|
||||
name = "command console"
|
||||
desc = "A stationary computer. This one comes preloaded with command programs."
|
||||
_has_second_id_slot = TRUE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/command/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/card_mod())
|
||||
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/chatclient,
|
||||
/datum/computer_file/program/card_mod,
|
||||
)
|
||||
|
||||
// ===== IDENTIFICATION CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/id
|
||||
@@ -65,59 +61,51 @@
|
||||
name = "identification console"
|
||||
desc = "A stationary computer. This one comes preloaded with identification modification programs."
|
||||
_has_second_id_slot = TRUE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/id/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/card_mod())
|
||||
hard_drive.store_file(new/datum/computer_file/program/job_management())
|
||||
hard_drive.store_file(new/datum/computer_file/program/crew_manifest())
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/chatclient,
|
||||
/datum/computer_file/program/card_mod,
|
||||
/datum/computer_file/program/job_management,
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
)
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/id/centcom
|
||||
desc = "A stationary computer. This one comes preloaded with CentCom identification modification programs."
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/id/centcom/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
var/datum/computer_file/program/card_mod/card_mod_centcom = new /datum/computer_file/program/card_mod()
|
||||
/obj/machinery/modular_computer/console/preset/id/centcom/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/computer_file/program/card_mod/card_mod_centcom = cpu.find_file_by_name("plexagonidwriter")
|
||||
card_mod_centcom.is_centcom = TRUE
|
||||
hard_drive.store_file(new /datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(card_mod_centcom)
|
||||
hard_drive.store_file(new /datum/computer_file/program/job_management())
|
||||
hard_drive.store_file(new /datum/computer_file/program/crew_manifest())
|
||||
|
||||
// ===== CIVILIAN CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/civilian
|
||||
console_department = "Civilian"
|
||||
name = "civilian console"
|
||||
desc = "A stationary computer. This one comes preloaded with generic programs."
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/civilian/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/arcade())
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/chatclient,
|
||||
/datum/computer_file/program/arcade,
|
||||
)
|
||||
|
||||
// curator
|
||||
/obj/machinery/modular_computer/console/preset/curator
|
||||
console_department = "Civilian"
|
||||
name = "curator console"
|
||||
desc = "A stationary computer. This one comes preloaded with art programs."
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/curator/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/portrait_printer())
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/portrait_printer,
|
||||
)
|
||||
|
||||
// ===== CARGO CHAT CONSOLES =====
|
||||
/obj/machinery/modular_computer/console/preset/cargochat
|
||||
name = "cargo chatroom console"
|
||||
desc = "A stationary computer. This one comes preloaded with a chatroom for your cargo requests."
|
||||
///chat client installed on this computer, just helpful for linking all the computers
|
||||
var/datum/computer_file/program/chatclient/chatprogram
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/chatclient,
|
||||
)
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
chatprogram = new
|
||||
chatprogram.computer = cpu
|
||||
hard_drive.store_file(chatprogram)
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client")
|
||||
chatprogram.username = "[lowertext(console_department)]_department"
|
||||
chatprogram.program_state = PROGRAM_STATE_ACTIVE
|
||||
cpu.active_program = chatprogram
|
||||
@@ -128,16 +116,9 @@
|
||||
name = "department chatroom console"
|
||||
desc = "A stationary computer. This one comes preloaded with a chatroom for incoming cargo requests. You may moderate it from this computer."
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/cargo/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
|
||||
//adding chat, setting it as the active window immediately
|
||||
chatprogram = new
|
||||
chatprogram.computer = cpu
|
||||
hard_drive.store_file(chatprogram)
|
||||
chatprogram.program_state = PROGRAM_STATE_ACTIVE
|
||||
cpu.active_program = chatprogram
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/cargo/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client")
|
||||
//setting up chat
|
||||
chatprogram.username = "cargo_requests_operator"
|
||||
var/datum/ntnet_conversation/cargochat = new
|
||||
@@ -149,12 +130,14 @@
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/cargo/LateInitialize()
|
||||
. = ..()
|
||||
var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client")
|
||||
var/datum/ntnet_conversation/cargochat = SSnetworks.station_network.get_chat_channel_by_id(chatprogram.active_channel)
|
||||
for(var/obj/machinery/modular_computer/console/preset/cargochat/cargochat_console in GLOB.machines)
|
||||
if(cargochat_console == src)
|
||||
continue
|
||||
cargochat_console.chatprogram.active_channel = chatprogram.active_channel
|
||||
cargochat.add_client(cargochat_console.chatprogram, silent = TRUE)
|
||||
var/datum/computer_file/program/chatclient/other_chatprograms = cargochat_console.cpu.find_file_by_name("ntnrc_client")
|
||||
other_chatprograms.active_channel = chatprogram.active_channel
|
||||
cargochat.add_client(chatprogram, silent = TRUE)
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/service
|
||||
console_department = "Service"
|
||||
|
||||
@@ -18,20 +18,12 @@
|
||||
///Used in New() to set network tag according to our area.
|
||||
var/console_department = ""
|
||||
|
||||
/obj/machinery/modular_computer/console/buildable/Initialize(mapload)
|
||||
. = ..()
|
||||
// User-built consoles start as empty frames.
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
qdel(hard_drive)
|
||||
|
||||
/obj/machinery/modular_computer/console/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/battery/battery_module = cpu.all_components[MC_CELL]
|
||||
if(battery_module)
|
||||
qdel(battery_module)
|
||||
|
||||
cpu.install_component(new /obj/item/computer_hardware/hard_drive/super) // Consoles generally have better HDDs due to lower space limitations
|
||||
|
||||
if(cpu)
|
||||
cpu.screen_on = TRUE
|
||||
update_appearance()
|
||||
|
||||
Reference in New Issue
Block a user