Merge from upstream

This commit is contained in:
Cyprex
2023-03-03 19:22:13 +01:00
2397 changed files with 233716 additions and 275509 deletions
@@ -14,13 +14,13 @@
/// Station alert datum for showing alerts UI
var/datum/station_alert/alert_control
/datum/computer_file/program/alarm_monitor/New()
/datum/computer_file/program/alarm_monitor/on_install()
. = ..()
//We want to send an alarm if we're in one of the mining home areas
//Or if we're on station. Otherwise, die.
var/list/allowed_areas = GLOB.the_station_areas + typesof(/area/mine)
alert_control = new(computer, list(ALARM_ATMOS, ALARM_FIRE, ALARM_POWER), listener_areas = allowed_areas)
RegisterSignals(alert_control.listener, list(COMSIG_ALARM_LISTENER_TRIGGERED, COMSIG_ALARM_LISTENER_CLEARED), PROC_REF(update_alarm_display))
return ..()
/datum/computer_file/program/alarm_monitor/Destroy()
QDEL_NULL(alert_control)
@@ -28,14 +28,17 @@
computer.visible_message(span_notice("\The [computer]'s screen brightly flashes and loud electrical buzzing is heard."))
computer.enabled = FALSE
computer.update_appearance()
QDEL_LIST(computer.stored_files)
computer.take_damage(25, BRUTE, 0, 0)
if(computer.internal_cell && prob(25))
QDEL_NULL(computer.internal_cell)
computer.visible_message(span_notice("\The [computer]'s battery explodes in rain of sparks."))
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
spark_system.start()
/datum/computer_file/program/revelation/ui_act(action, params)
. = ..()
if(.)
@@ -10,7 +10,6 @@
size = 5
tgui_id = "NtosCyborgRemoteMonitor"
program_icon = "project-diagram"
var/emagged = FALSE ///Bool of if this app has already been emagged
var/list/loglist = list() ///A list to copy a borg's IC log list into
var/mob/living/silicon/robot/DL_source ///reference of a borg if we're downloading a log, or null if not.
var/DL_progress = -1 ///Progress of current download, 0 to 100, -1 for no current download
@@ -26,12 +25,6 @@
DL_progress = 0
return ..()
/datum/computer_file/program/borg_monitor/run_emag()
if(emagged)
return FALSE
emagged = TRUE
return TRUE
/datum/computer_file/program/borg_monitor/tap(atom/A, mob/living/user, params)
var/mob/living/silicon/robot/borgo = A
if(!istype(borgo) || !borgo.modularInterface)
@@ -154,7 +147,7 @@
/datum/computer_file/program/borg_monitor/proc/checkID()
var/obj/item/card/id/ID = computer.GetID()
if(!ID)
if(emagged)
if(computer.obj_flags & EMAGGED)
return "STDERR:UNDF"
return FALSE
return ID.registered_name
@@ -170,10 +163,6 @@
available_on_ntnet = FALSE
available_on_syndinet = TRUE
transfer_access = list()
tgui_id = "NtosCyborgRemoteMonitorSyndicate"
/datum/computer_file/program/borg_monitor/syndicate/run_emag()
return FALSE
/datum/computer_file/program/borg_monitor/syndicate/evaluate_borg(mob/living/silicon/robot/R)
if(!is_valid_z_level(get_turf(computer), get_turf(R)))
@@ -133,7 +133,7 @@
// Eject the ID being modified.
if("PRG_ejectmodid")
if(inserted_auth_card)
GLOB.data_core.manifest_modify(inserted_auth_card.registered_name, inserted_auth_card.assignment, inserted_auth_card.get_trim_assignment())
GLOB.manifest.modify(inserted_auth_card.registered_name, inserted_auth_card.assignment, inserted_auth_card.get_trim_assignment())
return computer.RemoveID(usr)
else
var/obj/item/I = user.get_active_held_item()
@@ -1,34 +0,0 @@
// This is special hardware configuration program.
// It is to be used only with modular computers.
// It allows you to toggle components of your device.
/datum/computer_file/program/computerconfig
filename = "compconfig"
filedesc = "Hardware Configuration Tool"
extended_desc = "This program allows configuration of computer's hardware"
program_icon_state = "generic"
undeletable = TRUE
size = 4
available_on_ntnet = FALSE
requires_ntnet = FALSE
tgui_id = "NtosConfiguration"
program_icon = "cog"
/datum/computer_file/program/computerconfig/ui_data(mob/user)
// No computer connection, we can't get data from that.
if(!computer)
return FALSE
var/list/data = get_header_data()
data["disk_size"] = computer.max_capacity
data["disk_used"] = computer.used_capacity
data["power_usage"] = computer.last_power_usage
data["battery"] = null
if(computer.internal_cell)
data["battery"] = list(
"max" = computer.internal_cell.maxcharge,
"charge" = round(computer.internal_cell.charge),
)
return data
@@ -13,7 +13,7 @@
/datum/computer_file/program/crew_manifest/ui_static_data(mob/user)
var/list/data = get_header_data()
data["manifest"] = GLOB.data_core.get_manifest()
data["manifest"] = GLOB.manifest.get_manifest()
return data
/datum/computer_file/program/crew_manifest/ui_act(action, params, datum/tgui/ui)
@@ -26,7 +26,7 @@
if(computer) //This option should never be called if there is no printer
var/contents = {"<h4>Crew Manifest</h4>
<br>
[GLOB.data_core ? GLOB.data_core.get_manifest_html(0) : ""]
[GLOB.manifest ? GLOB.manifest.get_html(0) : ""]
"}
if(!computer.print_text(contents,text("crew manifest ([])", station_time_timestamp())))
to_chat(usr, span_notice("Printer is out of paper."))
@@ -70,6 +70,8 @@
var/datum/computer_file/F = computer.find_file_by_name(params["name"], computer.inserted_disk)
if(!F || !istype(F))
return
if(!computer.can_store_file(F))
return FALSE
var/datum/computer_file/C = F.clone(FALSE)
computer.store_file(C)
return TRUE
@@ -24,7 +24,7 @@
/datum/computer_file/program/scipaper_program/on_start(mob/living/user)
. = ..()
if(!CONFIG_GET(flag/no_default_techweb_link))
if(!CONFIG_GET(flag/no_default_techweb_link) && !linked_techweb)
linked_techweb = SSresearch.science_tech
/datum/computer_file/program/scipaper_program/application_attackby(obj/item/attacking_item, mob/living/user)
@@ -0,0 +1,13 @@
/**
* Maintenance programs
*
* Programs that are found from data disks in maintenance
* Can only be cloned once to a modular computer, then deletes itself.
*/
/datum/computer_file/program/maintenance
filetype = "MNT"
available_on_ntnet = FALSE
/datum/computer_file/program/maintenance/clone(rename = FALSE)
. = ..()
qdel(src)
@@ -0,0 +1,64 @@
/datum/computer_file/program/maintenance/camera
filename = "camera_app"
filedesc = "Camera"
program_icon_state = "camera"
category = PROGRAM_CATEGORY_MISC
extended_desc = "This program allows the taking of pictures."
size = 4
usage_flags = PROGRAM_TABLET
tgui_id = "NtosCamera"
program_icon = "camera"
/// Camera built-into the tablet.
var/obj/item/camera/internal_camera
/// Latest picture taken by the app.
var/datum/picture/internal_picture
/// How many pictures were taken already, used for the camera's TGUI photo display
var/picture_number = 1
/datum/computer_file/program/maintenance/camera/on_install()
. = ..()
internal_camera = new(computer)
internal_camera.print_picture_on_snap = FALSE
/datum/computer_file/program/maintenance/camera/Destroy()
if(internal_camera)
QDEL_NULL(internal_camera)
if(internal_picture)
QDEL_NULL(internal_picture)
return ..()
/datum/computer_file/program/maintenance/camera/tap(atom/tapped_atom, mob/living/user, params)
. = ..()
if(internal_picture)
QDEL_NULL(internal_picture)
var/turf/our_turf = get_turf(tapped_atom)
internal_picture = internal_camera.captureimage(our_turf, user, internal_camera.picture_size_x + 1, internal_camera.picture_size_y + 1)
picture_number++
computer.save_photo(internal_picture.picture_image)
/datum/computer_file/program/maintenance/camera/ui_data(mob/user)
var/list/data = get_header_data()
if(!isnull(internal_picture))
user << browse_rsc(internal_picture.picture_image, "tmp_photo[picture_number].png")
data["photo"] = "tmp_photo[picture_number].png"
data["paper_left"] = computer.stored_paper
return data
/datum/computer_file/program/maintenance/camera/ui_act(action, params, datum/tgui/ui)
. = ..()
if(.)
return
var/mob/living/user = usr
switch(action)
if("print_photo")
if(computer.stored_paper <= 0)
to_chat(usr, span_notice("Hardware error: Printer out of paper."))
return
internal_camera.printpicture(user, internal_picture)
computer.stored_paper--
computer.visible_message(span_notice("\The [computer] prints out a paper."))
@@ -0,0 +1,49 @@
/datum/computer_file/program/maintenance/modsuit_control
filename = "modsuit_control"
filedesc = "MODsuit Control"
program_icon_state = "modsuit_control"
category = PROGRAM_CATEGORY_SCI
extended_desc = "This program allows people to connect a MODsuit to it, allowing remote control."
size = 2
tgui_id = "NtosMODsuit"
program_icon = "user-astronaut"
///The suit we have control over.
var/obj/item/mod/control/controlled_suit
/datum/computer_file/program/maintenance/modsuit_control/Destroy()
if(controlled_suit)
unsync_modsuit()
return ..()
/datum/computer_file/program/maintenance/modsuit_control/application_attackby(obj/item/attacking_item, mob/living/user)
. = ..()
if(!istype(attacking_item, /obj/item/mod/control))
return FALSE
if(controlled_suit)
unsync_modsuit()
controlled_suit = attacking_item
RegisterSignal(controlled_suit, COMSIG_PARENT_QDELETING, PROC_REF(unsync_modsuit))
user.balloon_alert(user, "suit updated")
return TRUE
/datum/computer_file/program/maintenance/modsuit_control/proc/unsync_modsuit(atom/source)
UnregisterSignal(controlled_suit, COMSIG_PARENT_QDELETING)
controlled_suit = null
/datum/computer_file/program/maintenance/modsuit_control/ui_data(mob/user)
var/list/data = get_header_data()
data["has_suit"] = !!controlled_suit
if(controlled_suit)
data += controlled_suit.ui_data()
return data
/datum/computer_file/program/maintenance/modsuit_control/ui_static_data(mob/user)
return controlled_suit.ui_static_data()
/datum/computer_file/program/maintenance/modsuit_control/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
controlled_suit.ui_act(action, params, ui)
@@ -0,0 +1,26 @@
/datum/computer_file/program/maintenance/phys_scanner
filename = "phys_scanner"
filedesc = "Physical Scanner"
category = PROGRAM_CATEGORY_MISC
extended_desc = "This program allows the tablet to scan physical objects and display a data output."
size = 2
usage_flags = PROGRAM_TABLET
tgui_id = "NtosPhysScanner"
program_icon = "barcode"
/// Information from the last scanned person, to display on the app.
var/last_record = ""
/datum/computer_file/program/maintenance/phys_scanner/tap(atom/tapped_atom, mob/living/user, params)
. = ..()
if(!iscarbon(tapped_atom))
return
var/mob/living/carbon/carbon = tapped_atom
carbon.visible_message(span_notice("[user] analyzes [tapped_atom]'s vitals."))
last_record = healthscan(user, carbon, 1, tochat = FALSE)
/datum/computer_file/program/maintenance/phys_scanner/ui_data(mob/user)
var/list/data = get_header_data()
data["last_record"] = last_record
return data
@@ -0,0 +1,44 @@
/datum/computer_file/program/maintenance/theme
filename = "theme"
filedesc = "Theme holder"
extended_desc = "Holds a theme you can add to your Modular PC to set in the Themify application. Makes the application use more space"
size = 2
///The type of theme we have
var/theme_name
/datum/computer_file/program/maintenance/theme/New()
. = ..()
filename = "[theme_name] Theme"
/datum/computer_file/program/maintenance/theme/can_store_file(obj/item/modular_computer/potential_host)
. = ..()
if(!.)
return FALSE
var/datum/computer_file/program/themeify/theme_app = locate() in potential_host.stored_files
//no theme app, no themes!
if(!theme_app)
return FALSE
//don't get the same one twice
if(theme_app.imported_themes.Find(theme_name))
return FALSE
return TRUE
///Called post-installation of an application in a computer, after 'computer' var is set.
/datum/computer_file/program/maintenance/theme/on_install()
//add the theme to the computer and increase its size to match
var/datum/computer_file/program/themeify/theme_app = locate() in computer.stored_files
if(theme_app)
theme_app.imported_themes += theme_name
theme_app.size += size
qdel(src)
return ..()
/datum/computer_file/program/maintenance/theme/cat
theme_name = CAT_THEME_NAME
/datum/computer_file/program/maintenance/theme/lightmode
theme_name = LIGHT_THEME_NAME
/datum/computer_file/program/maintenance/theme/spooky
theme_name = ELDRITCH_THEME_NAME
@@ -17,7 +17,6 @@
var/download_completion = FALSE //GQ of downloaded data.
var/download_netspeed = 0
var/downloaderror = ""
var/emagged = FALSE
var/list/main_repo
var/list/antag_repo
@@ -34,13 +33,6 @@
main_repo = SSmodular_computers.available_station_software
antag_repo = SSmodular_computers.available_antag_software
/datum/computer_file/program/ntnetdownload/run_emag()
if(emagged)
return FALSE
emagged = TRUE
return TRUE
/datum/computer_file/program/ntnetdownload/proc/begin_file_download(filename)
if(downloaded_file)
return FALSE
@@ -51,7 +43,7 @@
return FALSE
// Attempting to download antag only program, but without having emagged/syndicate computer. No.
if(PRG.available_on_syndinet && !emagged)
if(PRG.available_on_syndinet && !(computer.obj_flags & EMAGGED))
return FALSE
if(!computer || !computer.can_store_file(PRG))
@@ -142,7 +134,7 @@
data["disk_size"] = computer.max_capacity
data["disk_used"] = computer.used_capacity
data["emagged"] = emagged
data["emagged"] = (computer.obj_flags & EMAGGED)
var/list/repo = antag_repo | main_repo
var/list/program_categories = list()
@@ -159,7 +151,7 @@
"installed" = !!computer.find_file_by_name(programs.filename),
"compatible" = check_compatibility(programs),
"size" = programs.size,
"access" = emagged && programs.available_on_syndinet ? TRUE : programs.can_run(user,transfer = TRUE, access = access),
"access" = (computer.obj_flags & EMAGGED) && programs.available_on_syndinet ? TRUE : programs.can_run(user,transfer = TRUE, access = access),
"verifiedsource" = programs.available_on_ntnet,
))
@@ -177,24 +169,3 @@
/datum/computer_file/program/ntnetdownload/kill_program(forced)
abort_file_download()
return ..()
////////////////////////
//Syndicate Downloader//
////////////////////////
/// This app only lists programs normally found in the emagged section of the normal downloader app
/datum/computer_file/program/ntnetdownload/syndicate
filename = "syndownloader"
filedesc = "Software Download Tool"
program_icon_state = "generic"
extended_desc = "This program allows downloads of software from shared Syndicate repositories"
requires_ntnet = FALSE
ui_header = "downloader_finished.gif"
tgui_id = "NtosNetDownloader"
emagged = TRUE
/datum/computer_file/program/ntnetdownload/syndicate/on_start()
. = ..()
main_repo = SSmodular_computers.available_antag_software
antag_repo = null
@@ -7,6 +7,7 @@
extended_desc = "This program allows old-school communication with other modular devices."
size = 0
undeletable = TRUE // It comes by default in tablets, can't be downloaded, takes no space and should obviously not be able to be deleted.
header_program = TRUE
available_on_ntnet = FALSE
usage_flags = PROGRAM_TABLET
ui_header = "ntnrc_idle.gif"
@@ -53,6 +54,7 @@
var/obj/item/photo/pic = attacking_item
saved_image = pic.picture
ProcessPhoto()
user.balloon_alert(user, "photo uploaded")
return TRUE
/datum/computer_file/program/messenger/proc/ScrubMessengerList()
@@ -195,6 +197,19 @@
sending_virus = !sending_virus
return UI_UPDATE
if("PDA_selectPhoto")
if(!issilicon(usr))
return
var/mob/living/silicon/user = usr
if(!user.aicamera)
return
var/datum/picture/selected_photo = user.aicamera.selectpicture(user)
if(!selected_photo)
return
saved_image = selected_photo
ProcessPhoto()
return TRUE
/datum/computer_file/program/messenger/ui_static_data(mob/user)
var/list/data = ..()
@@ -283,6 +298,9 @@
if (prob(1))
message += " Sent from my PDA"
// SKYRAT EDIT BEGIN - PDA messages show a visible message; again!
user.visible_message(span_notice("[user]'s PDA rings out with the soft sound of keypresses."), vision_distance = COMBAT_MESSAGE_RANGE)
//SKYRAT EDIT END
var/datum/signal/subspace/messaging/tablet_msg/signal = new(computer, list(
"name" = fake_name || computer.saved_identification,
@@ -291,7 +309,8 @@
"ref" = REF(computer),
"targets" = targets,
"rigged" = rigged,
"photo" = photo_path,
"photo" = saved_image,
"photo_path" = photo_path,
"automated" = FALSE,
))
if(rigged) //Will skip the message server and go straight to the hub so it can't be cheesed by disabling the message server machine
@@ -318,7 +337,9 @@
message_data["contents"] = html_decode(signal.format_message())
message_data["outgoing"] = TRUE
message_data["ref"] = signal.data["ref"]
message_data["photo_path"] = signal.data["photo_path"]
message_data["photo"] = signal.data["photo"]
message_data["target_details"] = signal.format_target()
// Show it to ghosts
var/ghost_message = span_name("[message_data["name"]] </span><span class='game say'>[rigged ? "Rigged" : ""] PDA Message</span> --> [span_name("[signal.format_target()]")]: <span class='message'>[signal.format_message()]")
@@ -346,6 +367,8 @@
last_text_everyone = world.time
messages += list(message_data)
saved_image = null
photo_path = null
return TRUE
/datum/computer_file/program/messenger/proc/receive_message(datum/signal/subspace/messaging/tablet_msg/signal)
@@ -356,6 +379,7 @@
message_data["outgoing"] = FALSE
message_data["ref"] = signal.data["ref"]
message_data["automated"] = signal.data["automated"]
message_data["photo_path"] = signal.data["photo_path"]
message_data["photo"] = signal.data["photo"]
messages += list(message_data)
@@ -380,9 +404,9 @@
var/inbound_message = signal.format_message()
inbound_message = emoji_parse(inbound_message)
if(ringer_status && L.is_literate())
to_chat(L, "<span class='infoplain'>[icon2html(src)] <b>PDA message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message] [reply]</span>")
if(L.is_literate())
var/photo_message = message_data["photo"] ? " (<a href='byond://?src=[REF(signal.logged)];photo=1'>Photo</a>)" : ""
to_chat(L, span_infoplain("[icon2html(computer)] <b>PDA message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message][photo_message] [reply]"))
if (ringer_status)
computer.ring(ringtone)
@@ -1,93 +0,0 @@
#define TABLET_MEDICAL_MODE (1<<0)
#define TABLET_CHEMISTRY_MODE (1<<1)
/datum/computer_file/program/phys_scanner
filename = "phys_scanner"
filedesc = "Physical Scanner"
category = PROGRAM_CATEGORY_MISC
extended_desc = "This program allows the tablet to scan physical objects and display a data output."
size = 8
usage_flags = PROGRAM_TABLET
available_on_ntnet = FALSE
tgui_id = "NtosPhysScanner"
program_icon = "barcode"
var/current_mode = 0
var/available_modes = NONE
var/last_record = ""
/datum/computer_file/program/phys_scanner/proc/ReadModes()
var/reads = list()
if(available_modes & TABLET_CHEMISTRY_MODE)
reads += "Reagent"
if(available_modes & TABLET_MEDICAL_MODE)
reads += "Health"
return reads
/datum/computer_file/program/phys_scanner/proc/ReadCurrent()
if(current_mode & TABLET_CHEMISTRY_MODE)
return "Reagent"
if(current_mode & TABLET_MEDICAL_MODE)
return "Health"
/datum/computer_file/program/phys_scanner/tap(atom/A, mob/living/user, params)
. = ..()
switch(current_mode)
if(TABLET_CHEMISTRY_MODE)
if(!isnull(A.reagents))
if(A.reagents.reagent_list.len > 0)
var/reagents_length = A.reagents.reagent_list.len
last_record = "[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found."
for (var/re in A.reagents.reagent_list)
last_record += "\t [re]"
else
last_record = "No active chemical agents found in [A]."
else
last_record = "No significant chemical agents found in [A]."
if(TABLET_MEDICAL_MODE)
var/mob/living/carbon/carbon = A
if(istype(carbon))
carbon.visible_message(span_notice("[user] analyzes [A]'s vitals."))
last_record = healthscan(user, carbon, 1, tochat = FALSE)
/datum/computer_file/program/phys_scanner/ui_act(action, list/params, datum/tgui/ui)
. = ..()
if(.)
return
switch(action)
if("selectMode")
switch(params["newMode"])
if("Reagent")
current_mode = TABLET_CHEMISTRY_MODE
if("Health")
current_mode = TABLET_MEDICAL_MODE
return UI_UPDATE
/datum/computer_file/program/phys_scanner/ui_data(mob/user)
var/list/data = get_header_data()
data["set_mode"] = ReadCurrent()
data["last_record"] = last_record
data["available_modes"] = ReadModes()
return data
/datum/computer_file/program/phys_scanner/medical
available_modes = TABLET_MEDICAL_MODE
/datum/computer_file/program/phys_scanner/chemistry
available_modes = TABLET_CHEMISTRY_MODE
/datum/computer_file/program/phys_scanner/all
available_modes = TABLET_MEDICAL_MODE | TABLET_CHEMISTRY_MODE
#undef TABLET_MEDICAL_MODE
#undef TABLET_CHEMISTRY_MODE
@@ -35,32 +35,27 @@
switch(mode)
if("security")
for(var/datum/data/record/person in GLOB.data_core.general)
var/datum/data/record/security_person = find_record("id", person.fields["id"], GLOB.data_core.security)
for(var/datum/record/crew/person in GLOB.manifest.general)
var/list/current_record = list()
if(security_person)
current_record["wanted"] = security_person.fields["criminal"]
current_record["id"] = person.fields["id"]
current_record["name"] = person.fields["name"]
current_record["rank"] = person.fields["rank"]
current_record["gender"] = person.fields["gender"]
current_record["age"] = person.fields["age"]
current_record["species"] = person.fields["species"]
current_record["fingerprint"] = person.fields["fingerprint"]
current_record["age"] = person.age
current_record["fingerprint"] = person.fingerprint
current_record["gender"] = person.gender
current_record["name"] = person.name
current_record["rank"] = person.rank
current_record["species"] = person.species
current_record["wanted"] = person.wanted_status
all_records += list(current_record)
if("medical")
for(var/datum/data/record/person in GLOB.data_core.medical)
for(var/datum/record/crew/person in GLOB.manifest.general)
var/list/current_record = list()
current_record["name"] = person.fields["name"]
current_record["bloodtype"] = person.fields["blood_type"]
current_record["mi_dis"] = person.fields["mi_dis"]
current_record["ma_dis"] = person.fields["ma_dis"]
current_record["notes"] = person.fields["notes"]
current_record["cnotes"] = person.fields["notes_d"]
current_record["bloodtype"] = person.blood_type
current_record["ma_dis"] = person.major_disabilities_desc
current_record["minor_disabilities"] = person.minor_disabilities_desc
current_record["name"] = person.name
current_record["notes"] = person.medical_notes
all_records += list(current_record)
@@ -121,7 +121,7 @@
if(!computer || !computer.computer_id_slot)
return
if(id_card)
GLOB.data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.get_trim_assignment())
GLOB.manifest.modify(id_card.registered_name, id_card.assignment, id_card.get_trim_assignment())
computer.RemoveID(usr)
else
playsound(get_turf(ui_host()) , 'sound/machines/buzz-sigh.ogg', 25, FALSE)
@@ -20,7 +20,7 @@
. = ..()
if(.)
var/obj/item/modular_computer/pda/silicon/tablet = computer
if(tablet.device_theme == "syndicate")
if(tablet.device_theme == PDA_THEME_SYNDICATE)
program_icon_state = "command-syndicate"
return TRUE
return FALSE
@@ -45,6 +45,7 @@
*/
/datum/computer_file/program/status/proc/post_message(upper, lower)
post_status("message", upper, lower)
log_game("[key_name(usr)] has changed the station status display message to \"[upper] [lower]\" [loc_name(usr)]")
/**
* Post a picture to status displays
@@ -59,6 +60,8 @@
else
post_status("alert", picture)
log_game("[key_name(usr)] has changed the station status display message to \"[picture]\" [loc_name(usr)]")
/datum/computer_file/program/status/ui_act(action, list/params, datum/tgui/ui)
. = ..()
if(.)
@@ -23,7 +23,7 @@
/datum/computer_file/program/science/on_start(mob/living/user)
. = ..()
if(!CONFIG_GET(flag/no_default_techweb_link))
if(!CONFIG_GET(flag/no_default_techweb_link) && !stored_research)
stored_research = SSresearch.science_tech
/datum/computer_file/program/science/application_attackby(obj/item/attacking_item, mob/living/user)
@@ -0,0 +1,38 @@
/datum/computer_file/program/themeify
filename = "themeify"
filedesc = "Themeify"
extended_desc = "This program allows configuration of your device's theme."
program_icon_state = "generic"
undeletable = TRUE
size = 0
header_program = TRUE
available_on_ntnet = TRUE
requires_ntnet = FALSE
tgui_id = "NtosThemeConfigure"
program_icon = "paint-roller"
///List of all themes imported from maintenance apps.
var/list/imported_themes = list()
/datum/computer_file/program/themeify/ui_data(mob/user)
var/list/data = get_header_data()
if(computer.obj_flags & EMAGGED)
data["themes"] += list(list("theme_name" = SYNDICATE_THEME_NAME, "theme_ref" = GLOB.pda_name_to_theme[SYNDICATE_THEME_NAME]))
for(var/theme_key in GLOB.default_pda_themes + imported_themes)
data["themes"] += list(list("theme_name" = theme_key, "theme_ref" = GLOB.pda_name_to_theme[theme_key]))
return data
/datum/computer_file/program/themeify/ui_act(action, params)
. = ..()
if(.)
return
switch(action)
if("PRG_change_theme")
var/selected_theme = params["selected_theme"]
if(!GLOB.default_pda_themes.Find(selected_theme) && !imported_themes.Find(selected_theme) && !(computer.obj_flags & EMAGGED))
return FALSE
computer.device_theme = GLOB.pda_name_to_theme[selected_theme]
return TRUE