[MIRROR] PDA general maintenance (NTNet downloader rework) [MDB IGNORE] (#25133)

* PDA general maintenance (NTNet downloader rework)

* Update modular_computer.dm

* e

* weh

* Update archive_viewer.dm

* Update three_layer_hats.json

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-24 23:28:40 +01:00
committed by GitHub
parent a26f32aef5
commit d34aab9be3
52 changed files with 222 additions and 187 deletions
@@ -1,8 +1,8 @@
/datum/computer_file/program/ai_restorer
filename = "ai_restore"
filedesc = "AI Manager & Restorer"
category = PROGRAM_CATEGORY_SCI
program_icon_state = "generic"
downloader_category = PROGRAM_CATEGORY_SCIENCE
program_open_overlay = "generic"
extended_desc = "Firmware Restoration Kit, capable of reconstructing damaged AI systems. Requires direct AI connection via intellicard slot."
size = 12
requires_ntnet = FALSE
@@ -1,9 +1,9 @@
/datum/computer_file/program/alarm_monitor
filename = "alarmmonitor"
filedesc = "Canary"
category = PROGRAM_CATEGORY_ENGI
downloader_category = PROGRAM_CATEGORY_ENGINEERING
ui_header = "alarm_green.gif"
program_icon_state = "alert-green"
program_open_overlay = "alert-green"
extended_desc = "This program provides visual interface for a station's alarm system."
requires_ntnet = 1
size = 4
@@ -37,12 +37,12 @@
has_alert = (length(alert_control.listener.alarms) > 0)
if(!has_alert)
program_icon_state = "alert-green"
program_open_overlay = "alert-green"
ui_header = "alarm_green.gif"
else
// If we don't know the status, assume the worst.
// Technically we should never have anything other than a truthy or falsy value
// but this will allow for unknown values to fall through to be an actual alert.
program_icon_state = "alert-red"
program_open_overlay = "alert-red"
ui_header = "alarm_red.gif"
update_computer_icon() // Always update the icon after we check our conditional because we might've changed it
@@ -2,16 +2,10 @@
filename = "contractor uplink"
filedesc = "Syndicate Contractor Uplink"
extended_desc = "A standard, Syndicate issued system for handling important contracts while on the field."
category = PROGRAM_CATEGORY_MISC
program_icon_state = "contractor-assign"
program_open_overlay = "contractor-assign"
program_icon = "tasks"
size = 10
requires_ntnet = FALSE
available_on_ntnet = FALSE
available_on_syndinet = FALSE
usage_flags = PROGRAM_PDA //this is all we've got sprites for :sob:
unique_copy = TRUE
undeletable = TRUE
tgui_id = "SyndicateContractor"
@@ -45,7 +39,7 @@
var/contract_id = text2num(params["contract_id"])
traitor_data.uplink_handler.contractor_hub.assigned_contracts[contract_id].status = CONTRACT_STATUS_ACTIVE
traitor_data.uplink_handler.contractor_hub.current_contract = traitor_data.uplink_handler.contractor_hub.assigned_contracts[contract_id]
program_icon_state = "contractor-contract"
program_open_overlay = "contractor-contract"
return TRUE
if("PRG_login")
@@ -59,7 +53,7 @@
traitor_data.uplink_handler.contractor_hub = new
traitor_data.uplink_handler.contractor_hub.create_contracts(traitor_user.owner)
user.playsound_local(user, 'sound/effects/contractstartup.ogg', 100, FALSE)
program_icon_state = "contractor-contractlist"
program_open_overlay = "contractor-contractlist"
return TRUE
if("PRG_call_extraction")
@@ -68,7 +62,7 @@
user.playsound_local(user, 'sound/effects/confirmdropoff.ogg', 100, TRUE)
traitor_data.uplink_handler.contractor_hub.current_contract.status = CONTRACT_STATUS_EXTRACTING
program_icon_state = "contractor-extracted"
program_open_overlay = "contractor-extracted"
else
user.playsound_local(user, 'sound/machines/uplinkerror.ogg', 50)
error = "Either both you or your target aren't at the dropoff location, or the pod hasn't got a valid place to land. Clear space, or make sure you're both inside."
@@ -83,7 +77,7 @@
traitor_data.uplink_handler.contractor_hub.current_contract = null
traitor_data.uplink_handler.contractor_hub.assigned_contracts[contract_id].status = CONTRACT_STATUS_ABORTED
program_icon_state = "contractor-contractlist"
program_open_overlay = "contractor-contractlist"
return TRUE
if("PRG_redeem_TC")
@@ -129,10 +123,10 @@
data["ongoing_contract"] = !!traitor_data.uplink_handler.contractor_hub.current_contract
if(traitor_data.uplink_handler.contractor_hub.current_contract)
program_icon_state = "contractor-contract"
program_open_overlay = "contractor-contract"
if (traitor_data.uplink_handler.contractor_hub.current_contract.status == CONTRACT_STATUS_EXTRACTING)
data["extraction_enroute"] = TRUE
program_icon_state = "contractor-extracted"
program_open_overlay = "contractor-extracted"
else
data["extraction_enroute"] = FALSE
var/turf/curr = get_turf(user)
@@ -1,8 +1,8 @@
/datum/computer_file/program/ntnet_dos
filename = "ntn_dos"
filedesc = "DoS Traffic Generator"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "hostile"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "hostile"
extended_desc = "This advanced script can perform denial of service attacks against NTNet quantum relays. The system administrator will probably notice this. Multiple devices can run this program together against same relay for increased effect"
size = 20
requires_ntnet = TRUE
@@ -1,8 +1,8 @@
/datum/computer_file/program/revelation
filename = "revelation"
filedesc = "Revelation"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "hostile"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "hostile"
extended_desc = "This virus can destroy hard drive of system it is executed on. It may be obfuscated to look like another non-malicious program. Once armed, it will destroy the system upon next execution."
size = 13
requires_ntnet = FALSE
@@ -1,9 +1,10 @@
/datum/computer_file/program/arcade
filename = "dsarcade"
filedesc = "Donksoft Micro Arcade"
program_icon_state = "arcade"
program_open_overlay = "arcade"
extended_desc = "This port of the classic game 'Outbomb Cuban Pete', redesigned to run on tablets, with thrilling graphics and chilling storytelling."
requires_ntnet = FALSE
downloader_category = PROGRAM_CATEGORY_GAMES
size = 6
tgui_id = "NtosArcade"
program_icon = "gamepad"
@@ -30,7 +31,7 @@
heads_up = "You have crushed [boss_name]! Rejoice!"
playsound(computer.loc, 'sound/arcade/win.ogg', 50)
game_active = FALSE
program_icon_state = "arcade_off"
program_open_overlay = "arcade_off"
if(istype(computer))
computer.update_appearance()
ticket_count += 1
@@ -41,7 +42,7 @@
heads_up = "You have been defeated... how will the station survive?"
playsound(computer.loc, 'sound/arcade/lose.ogg', 50)
game_active = FALSE
program_icon_state = "arcade_off"
program_open_overlay = "arcade_off"
if(istype(computer))
computer.update_appearance()
user?.mind?.adjust_experience(/datum/skill/gaming, 10)
@@ -163,7 +164,7 @@
player_hp = 30
player_mp = 10
heads_up = "You stand before [boss_name]! Prepare for battle!"
program_icon_state = "arcade"
program_open_overlay = "arcade"
boss_id = rand(1,6)
pause_state = FALSE
if(istype(computer))
@@ -6,8 +6,8 @@
/datum/computer_file/program/atmosscan
filename = "atmosscan"
filedesc = "AtmoZphere"
category = PROGRAM_CATEGORY_ENGI
program_icon_state = "air"
downloader_category = PROGRAM_CATEGORY_ENGINEERING
program_open_overlay = "air"
extended_desc = "A small built-in sensor reads out the atmospheric conditions around the device."
size = 4
tgui_id = "NtosGasAnalyzer"
@@ -1,9 +1,9 @@
/datum/computer_file/program/borg_monitor
filename = "siliconnect"
filedesc = "SiliConnect"
category = PROGRAM_CATEGORY_SCI
downloader_category = PROGRAM_CATEGORY_SCIENCE
ui_header = "borg_mon.gif"
program_icon_state = "generic"
program_open_overlay = "generic"
extended_desc = "This program allows for remote monitoring of station cyborgs."
requires_ntnet = TRUE
download_access = list(ACCESS_ROBOTICS)
@@ -148,9 +148,9 @@
/datum/computer_file/program/borg_monitor/syndicate
filename = "roboverlord"
filedesc = "Roboverlord"
category = PROGRAM_CATEGORY_SCI
downloader_category = PROGRAM_CATEGORY_SCIENCE
ui_header = "borg_mon.gif"
program_icon_state = "generic"
program_open_overlay = "generic"
extended_desc = "This program allows for remote monitoring of mission-assigned cyborgs."
requires_ntnet = FALSE
available_on_ntnet = FALSE
@@ -1,8 +1,8 @@
/datum/computer_file/program/bounty_board
filename = "bountyboard"
filedesc = "Bounty Board Request Network"
category = PROGRAM_CATEGORY_SUPL
program_icon_state = "bountyboard"
downloader_category = PROGRAM_CATEGORY_SUPPLY
program_open_overlay = "bountyboard"
extended_desc = "A multi-platform network for placing requests across the station, with payment across the network being possible.."
requires_ntnet = TRUE
size = 10
@@ -1,8 +1,8 @@
/datum/computer_file/program/budgetorders
filename = "orderapp"
filedesc = "NT IRN"
category = PROGRAM_CATEGORY_SUPL
program_icon_state = "request"
downloader_category = PROGRAM_CATEGORY_SUPPLY
program_open_overlay = "request"
extended_desc = "Nanotrasen Internal Requisition Network interface for supply purchasing using a department budget account."
requires_ntnet = TRUE
usage_flags = PROGRAM_LAPTOP | PROGRAM_PDA
@@ -1,8 +1,8 @@
/datum/computer_file/program/card_mod
filename = "plexagonidwriter"
filedesc = "Plexagon Access Management"
category = PROGRAM_CATEGORY_CREW
program_icon_state = "id"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
program_open_overlay = "id"
extended_desc = "Program for programming employee ID cards to access parts of the station."
download_access = list(ACCESS_COMMAND)
requires_ntnet = 0
@@ -1,8 +1,8 @@
/datum/computer_file/program/shipping
filename = "shipping"
filedesc = "GrandArk Exporter"
category = PROGRAM_CATEGORY_SUPL
program_icon_state = "shipping"
downloader_category = PROGRAM_CATEGORY_SUPPLY
program_open_overlay = "shipping"
extended_desc = "A combination printer/scanner app that enables modular computers to print barcodes for easy scanning and shipping."
size = 6
tgui_id = "NtosShipping"
@@ -0,0 +1,127 @@
#define MAX_CHANNELS 1000
/datum/ntnet_conversation
///The title of the conversation, seen in the UI.
var/title = "Untitled Conversation"
//If a channel is strong, it cannot be renamed or deleted.
var/strong = FALSE
///The password to join a channel, set by an Administrator.
var/password
///A static UID to ensure no conversations are the same.
var/static/ntnrc_uid = 0
///ID using the UID.
var/id
///List of all messages sent in the conversation.
var/list/messages = list()
///The "Administrator" of the channel, the creator starts as channel's operator by default.
var/datum/computer_file/program/chatclient/channel_operator
///Chat clients who are active or minimized.
var/list/datum/computer_file/program/chatclient/active_clients = list()
///Chat clients who have exited out of the program.
var/list/datum/computer_file/program/chatclient/offline_clients = list()
///Chat clients currently muted by the operator, rendering them unable to ping other people.
var/list/datum/computer_file/program/chatclient/muted_clients = list()
/datum/ntnet_conversation/New(title, strong = FALSE)
src.title = title
src.strong = strong
id = ntnrc_uid
ntnrc_uid++
if(id > MAX_CHANNELS)
qdel(src)
return
SSmodular_computers.chat_channels.Add(src)
return ..()
/datum/ntnet_conversation/Destroy()
SSmodular_computers.chat_channels.Remove(src)
for(var/datum/computer_file/program/chatclient/chatterbox as anything in (active_clients | offline_clients))
purge_client(chatterbox)
return ..()
/datum/ntnet_conversation/proc/add_message(message, username)
message = "[station_time_timestamp(format = "hh:mm")] [username]: [message]"
messages.Add(message)
trim_message_list()
/datum/ntnet_conversation/proc/add_status_message(message)
messages.Add("[station_time_timestamp(format = "hh:mm")] -!- [message]")
trim_message_list()
/datum/ntnet_conversation/proc/trim_message_list()
if(messages.len <= 50)
return
messages = messages.Copy(messages.len-50 ,0)
/datum/ntnet_conversation/proc/add_client(datum/computer_file/program/chatclient/new_user, silent = FALSE)
if(!istype(new_user))
return
new_user.conversations |= src
active_clients.Add(new_user)
if(!silent)
add_status_message("[new_user.username] has joined the channel.")
// No operator, so we assume the channel was empty. Assign this user as operator, without the message, since you're the creator.
if(!channel_operator)
changeop(new_user, silent = TRUE)
//Clear all of our references to a client, used for client deletion
/datum/ntnet_conversation/proc/purge_client(datum/computer_file/program/chatclient/forget)
remove_client(forget)
forget.conversations -= src
/datum/ntnet_conversation/proc/remove_client(datum/computer_file/program/chatclient/leaving)
if(!istype(leaving))
return
if(leaving in active_clients)
active_clients.Remove(leaving)
add_status_message("[leaving.username] has left the channel.")
muted_clients -= leaving
offline_clients -= leaving
// Channel operator left, pick new operator
if(leaving == channel_operator)
channel_operator = null
if(active_clients.len)
var/datum/computer_file/program/chatclient/newop = pick(active_clients)
changeop(newop)
/datum/ntnet_conversation/proc/go_offline(datum/computer_file/program/chatclient/offline)
if(!istype(offline) || !(offline in active_clients))
return
active_clients.Remove(offline)
offline_clients.Add(offline)
/datum/ntnet_conversation/proc/mute_user(datum/computer_file/program/chatclient/op, datum/computer_file/program/chatclient/muted)
if(!op.netadmin_mode && (channel_operator != op)) //sanity even if the person shouldn't be able to see the mute button
return
if(muted in muted_clients)
muted_clients.Remove(muted)
muted.computer.alert_call(muted, "You have been unmuted from [title]!", 'sound/machines/ping.ogg')
else
muted_clients.Add(muted)
muted.computer.alert_call(muted, "You have been muted from [title]!")
/datum/ntnet_conversation/proc/ping_user(datum/computer_file/program/chatclient/pinger, datum/computer_file/program/chatclient/pinged)
if(pinger in muted_clients) //oh my god fuck off
return
add_status_message("[pinger.username] pinged [pinged.username].")
pinged.computer.alert_call(pinged, "You have been pinged in [title] by [pinger.username]!", 'sound/machines/ping.ogg')
/datum/ntnet_conversation/proc/changeop(datum/computer_file/program/chatclient/newop, silent = FALSE)
if(!istype(newop))
CRASH("[src] is attempting to add [newop] as the operator, but it isn't a chat client.")
channel_operator = newop
if(!silent)
add_status_message("Channel operator status transferred to [newop.username].")
/datum/ntnet_conversation/proc/change_title(newtitle, datum/computer_file/program/chatclient/renamer)
if((channel_operator != renamer) || strong) // Not Authorised or channel cannot be editted
return FALSE
add_status_message("[renamer.username] has changed channel title from [title] to [newtitle]")
title = newtitle
#undef MAX_CHANNELS
@@ -7,8 +7,8 @@
/datum/computer_file/program/chatclient
filename = "ntnrc_client"
filedesc = "Chat Client"
category = PROGRAM_CATEGORY_CREW
program_icon_state = "command"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "command"
extended_desc = "This program allows communication over NTNRC network"
size = 8
requires_ntnet = TRUE
@@ -1,8 +1,8 @@
/datum/computer_file/program/crew_manifest
filename = "plexagoncrew"
filedesc = "Plexagon Crew List"
category = PROGRAM_CATEGORY_CREW
program_icon_state = "id"
downloader_category = PROGRAM_CATEGORY_SECURITY
program_open_overlay = "id"
extended_desc = "Program for viewing and printing the current crew manifest"
download_access = list(ACCESS_SECURITY, ACCESS_COMMAND)
requires_ntnet = TRUE
@@ -2,8 +2,8 @@
/datum/computer_file/program/emojipedia
filename = "emojipedia"
filedesc = "EmojiPedia"
category = PROGRAM_CATEGORY_CREW // we want everyone to be able to access this application, since everyone can send emoji via PDA messages
program_icon_state = "generic"
downloader_category = PROGRAM_CATEGORY_DEVICE // we want everyone to be able to access this application, since everyone can send emoji via PDA messages
program_open_overlay = "generic"
extended_desc = "This program allows you to view all the emojis you can send via PDA messages."
size = 3
tgui_id = "NtosEmojipedia"
@@ -2,7 +2,7 @@
filename = "filemanager"
filedesc = "File Manager"
extended_desc = "This program allows management of files."
program_icon_state = "generic"
program_open_overlay = "generic"
size = 8
requires_ntnet = FALSE
available_on_ntnet = FALSE
@@ -1,11 +1,11 @@
/datum/computer_file/program/scipaper_program
filename = "ntfrontier"
filedesc = "NT Frontier"
category = PROGRAM_CATEGORY_SCI
downloader_category = PROGRAM_CATEGORY_SCIENCE
extended_desc = "Scientific paper publication and navigation software."
requires_ntnet = TRUE
size = 12
program_icon_state = "research"
program_open_overlay = "research"
tgui_id = "NtosScipaper"
program_icon = "paper-plane"
download_access = list(ACCESS_ORDNANCE)
@@ -4,8 +4,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/datum/computer_file/program/job_management
filename = "plexagoncore"
filedesc = "Plexagon HR Core"
category = PROGRAM_CATEGORY_CREW
program_icon_state = "id"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
program_open_overlay = "id"
extended_desc = "Program for viewing and changing job slot availability."
download_access = list(ACCESS_COMMAND)
requires_ntnet = TRUE
@@ -1,9 +1,10 @@
/datum/computer_file/program/mafia
filename = "mafia"
filedesc = "Mafia"
program_icon_state = "mafia"
program_open_overlay = "mafia"
extended_desc = "A program that allows you to play the infamous Mafia game, straight from your Modular PC."
requires_ntnet = FALSE
downloader_category = PROGRAM_CATEGORY_GAMES
size = 6
tgui_id = "NtosMafiaPanel"
program_icon = "user-secret"
@@ -1,8 +1,8 @@
/datum/computer_file/program/maintenance/camera
filename = "camera_app"
filedesc = "Camera"
program_icon_state = "camera"
category = PROGRAM_CATEGORY_MISC
program_open_overlay = "camera"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
extended_desc = "This program allows the taking of pictures."
size = 4
usage_flags = PROGRAM_PDA
@@ -1,8 +1,8 @@
/datum/computer_file/program/maintenance/modsuit_control
filename = "modsuit_control"
filedesc = "MODsuit Control"
program_icon_state = "modsuit_control"
category = PROGRAM_CATEGORY_SCI
program_open_overlay = "modsuit_control"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
extended_desc = "This program allows people to connect a MODsuit to it, allowing remote control."
size = 2
tgui_id = "NtosMODsuit"
@@ -1,7 +1,7 @@
/datum/computer_file/program/maintenance/phys_scanner
filename = "phys_scanner"
filedesc = "Physical Scanner"
category = PROGRAM_CATEGORY_MISC
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
extended_desc = "This program allows the tablet to scan physical objects and display a data output."
size = 2
usage_flags = PROGRAM_PDA
@@ -8,8 +8,8 @@
/datum/computer_file/program/messenger
filename = "nt_messenger"
filedesc = "Direct Messenger"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "command"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "command"
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.
@@ -2,8 +2,8 @@
filename = "newscasterapp"
filedesc = "Newscaster"
download_access = list(ACCESS_LIBRARY)
category = PROGRAM_CATEGORY_CREW
program_icon_state = "bountyboard"
downloader_category = PROGRAM_CATEGORY_GAMES
program_open_overlay = "bountyboard"
extended_desc = "This program allows any user to access the Newscaster network from anywhere."
size = 2
requires_ntnet = TRUE
@@ -1,8 +1,8 @@
/datum/computer_file/program/notepad
filename = "notepad"
filedesc = "Notepad"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "generic"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "generic"
extended_desc = "Jot down your work-safe thoughts and what not."
size = 2
tgui_id = "NtosNotepad"
@@ -1,8 +1,8 @@
/datum/computer_file/program/nt_pay
filename = "ntpay"
filedesc = "Nanotrasen Pay System"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "generic"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "generic"
extended_desc = "An application that locally (in your sector) helps to transfer money or track your expenses and profits."
size = 2
tgui_id = "NtosPay"
@@ -1,7 +1,7 @@
/datum/computer_file/program/ntnetdownload
filename = "ntsoftwarehub"
filedesc = "NT Software Hub"
program_icon_state = "generic"
program_open_overlay = "generic"
extended_desc = "This program allows downloads of software from official NT repositories"
undeletable = TRUE
size = 4
@@ -10,23 +10,31 @@
tgui_id = "NtosNetDownloader"
program_icon = "download"
///The program currently being downloaded.
var/datum/computer_file/program/downloaded_file
///Boolean on whether the `downloaded_file` is being downloaded from the Syndicate store,
///in which case it will appear as 'ENCRYPTED' in logs, rather than display file name.
var/hacked_download = FALSE
var/download_completion = FALSE //GQ of downloaded data.
var/download_netspeed = 0
var/downloaderror = ""
///How much of the data has been downloaded.
var/download_completion
///The error message being displayed to the user, if necessary. Null if there isn't one.
var/downloaderror
///The list of categories to display in the UI, in order of which they appear.
var/static/list/show_categories = list(
PROGRAM_CATEGORY_CREW,
PROGRAM_CATEGORY_ENGI,
PROGRAM_CATEGORY_SCI,
PROGRAM_CATEGORY_SUPL,
PROGRAM_CATEGORY_MISC,
PROGRAM_CATEGORY_DEVICE,
PROGRAM_CATEGORY_EQUIPMENT,
PROGRAM_CATEGORY_GAMES,
PROGRAM_CATEGORY_SECURITY,
PROGRAM_CATEGORY_ENGINEERING,
PROGRAM_CATEGORY_SUPPLY,
PROGRAM_CATEGORY_SCIENCE,
)
/datum/computer_file/program/ntnetdownload/kill_program(mob/user)
. = ..()
abort_file_download()
ui_header = null
. = ..()
/datum/computer_file/program/ntnetdownload/proc/begin_file_download(filename)
if(downloaded_file)
@@ -83,7 +91,7 @@
if(download_completion >= downloaded_file.size)
complete_file_download()
// Download speed according to connectivity state. NTNet server is assumed to be on unlimited speed so we're limited by our local connectivity
download_netspeed = 0
var/download_netspeed
// Speed defines are found in misc.dm
switch(ntnet_status)
if(NTNET_LOW_SIGNAL)
@@ -92,7 +100,8 @@
download_netspeed = NTNETSPEED_HIGHSIGNAL
if(NTNET_ETHERNET_SIGNAL)
download_netspeed = NTNETSPEED_ETHERNET
download_completion += download_netspeed
if(download_netspeed)
download_completion += download_netspeed
/datum/computer_file/program/ntnetdownload/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
switch(action)
@@ -103,7 +112,6 @@
if("PRG_reseterror")
if(downloaderror)
download_completion = FALSE
download_netspeed = FALSE
downloaded_file = null
downloaderror = ""
return TRUE
@@ -121,7 +129,6 @@
data["downloadname"] = downloaded_file.filename
data["downloaddesc"] = downloaded_file.filedesc
data["downloadsize"] = downloaded_file.size
data["downloadspeed"] = download_netspeed
data["downloadcompletion"] = round(download_completion, 0.1)
data["disk_size"] = computer.max_capacity
@@ -132,14 +139,14 @@
var/list/program_categories = list()
for(var/datum/computer_file/program/programs as anything in repo)
if(!(programs.category in program_categories))
program_categories.Add(programs.category)
if(!(programs.downloader_category in program_categories))
program_categories.Add(programs.downloader_category)
data["programs"] += list(list(
"icon" = programs.program_icon,
"filename" = programs.filename,
"filedesc" = programs.filedesc,
"fileinfo" = programs.extended_desc,
"category" = programs.category,
"category" = programs.downloader_category,
"installed" = !!computer.find_file_by_name(programs.filename),
"compatible" = check_compatibility(programs),
"size" = programs.size,
@@ -151,13 +158,8 @@
return data
/datum/computer_file/program/ntnetdownload/proc/check_compatibility(datum/computer_file/program/P)
var/hardflag = computer.hardware_flag
if(P?.is_supported_by_hardware(hardware_flag = hardflag, loud = FALSE))
return TRUE
return FALSE
/datum/computer_file/program/ntnetdownload/kill_program(mob/user)
abort_file_download()
return ..()
///Checks if a provided `program_to_check` is compatible to be downloaded on our computer.
/datum/computer_file/program/ntnetdownload/proc/check_compatibility(datum/computer_file/program/program_to_check)
if(!program_to_check || !program_to_check.is_supported_by_hardware(hardware_flag = computer.hardware_flag, loud = FALSE))
return FALSE
return TRUE
@@ -12,8 +12,8 @@
/datum/computer_file/program/portrait_printer
filename = "PortraitPrinter"
filedesc = "Marlowe Treeby's Art Galaxy"
category = PROGRAM_CATEGORY_CREW
program_icon_state = "dummy"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
program_open_overlay = "dummy"
extended_desc = "This program connects to a Spinward Sector community art site for viewing and printing art."
download_access = list(ACCESS_LIBRARY)
usage_flags = PROGRAM_CONSOLE
@@ -3,8 +3,8 @@
/datum/computer_file/program/power_monitor
filename = "ampcheck"
filedesc = "AmpCheck"
category = PROGRAM_CATEGORY_ENGI
program_icon_state = "power_monitor"
downloader_category = PROGRAM_CATEGORY_ENGINEERING
program_open_overlay = "power_monitor"
extended_desc = "This program connects to sensors around the station to provide information about electrical systems"
ui_header = "power_norm.gif"
download_access = list(ACCESS_ENGINEERING)
@@ -1,9 +1,9 @@
/datum/computer_file/program/radar //generic parent that handles most of the process
filename = "genericfinder"
filedesc = "debug_finder"
category = PROGRAM_CATEGORY_CREW
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
ui_header = "borg_mon.gif" //DEBUG -- new icon before PR
program_icon_state = "radarntos"
program_open_overlay = "radarntos"
requires_ntnet = TRUE
available_on_ntnet = FALSE
usage_flags = PROGRAM_LAPTOP | PROGRAM_PDA
@@ -15,7 +15,7 @@
var/selected
///Used to store when the next scan is available.
COOLDOWN_DECLARE(next_scan)
///Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance() calls
///Used to keep track of the last value program_open_overlay was set to, to prevent constant unnecessary update_appearance() calls
var/last_icon_state = ""
///Used by the tgui interface, themed NT or Syndicate.
var/arrowstyle = "ntosradarpointer.png"
@@ -181,10 +181,10 @@
var/atom/movable/signal = find_atom()
if(!trackable(signal))
program_icon_state = "[initial(program_icon_state)]lost"
if(last_icon_state != program_icon_state)
program_open_overlay = "[initial(program_open_overlay)]lost"
if(last_icon_state != program_open_overlay)
computer.update_appearance()
last_icon_state = program_icon_state
last_icon_state = program_open_overlay
return
var/here_turf = get_turf(computer)
@@ -192,17 +192,17 @@
var/trackdistance = get_dist_euclidian(here_turf, target_turf)
switch(trackdistance)
if(0)
program_icon_state = "[initial(program_icon_state)]direct"
program_open_overlay = "[initial(program_open_overlay)]direct"
if(1 to 12)
program_icon_state = "[initial(program_icon_state)]close"
program_open_overlay = "[initial(program_open_overlay)]close"
if(13 to 24)
program_icon_state = "[initial(program_icon_state)]medium"
program_open_overlay = "[initial(program_open_overlay)]medium"
if(25 to INFINITY)
program_icon_state = "[initial(program_icon_state)]far"
program_open_overlay = "[initial(program_open_overlay)]far"
if(last_icon_state != program_icon_state)
if(last_icon_state != program_open_overlay)
computer.update_appearance()
last_icon_state = program_icon_state
last_icon_state = program_open_overlay
computer.setDir(get_dir(here_turf, target_turf))
//We can use process_tick to restart fast processing, since the computer will be running this constantly either way.
@@ -302,8 +302,7 @@
/datum/computer_file/program/radar/fission360
filename = "fission360"
filedesc = "Fission360"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "radarsyndicate"
program_open_overlay = "radarsyndicate"
extended_desc = "This program allows for tracking of nuclear authorization disks and warheads."
requires_ntnet = FALSE
available_on_ntnet = FALSE
@@ -2,9 +2,9 @@
filename = "ntrecords"
filedesc = "Records"
extended_desc = "Allows the user to view several basic records from the crew."
category = PROGRAM_CATEGORY_MISC
downloader_category = PROGRAM_CATEGORY_SECURITY
program_icon = "clipboard"
program_icon_state = "crew"
program_open_overlay = "crew"
tgui_id = "NtosRecords"
size = 4
usage_flags = PROGRAM_PDA | PROGRAM_LAPTOP
@@ -2,8 +2,8 @@
/datum/computer_file/program/robocontrol
filename = "botkeeper"
filedesc = "BotKeeper"
category = PROGRAM_CATEGORY_SCI
program_icon_state = "robot"
downloader_category = PROGRAM_CATEGORY_SCIENCE
program_open_overlay = "robot"
extended_desc = "A remote controller used for giving basic commands to non-sentient robots."
requires_ntnet = TRUE
size = 6
@@ -1,10 +1,10 @@
/datum/computer_file/program/robotact
filename = "robotact"
filedesc = "RoboTact"
category = PROGRAM_CATEGORY_SCI
downloader_category = PROGRAM_CATEGORY_SCIENCE
extended_desc = "A built-in app for cyborg self-management and diagnostics."
ui_header = "robotact.gif" //DEBUG -- new icon before PR
program_icon_state = "command"
program_open_overlay = "command"
requires_ntnet = FALSE
available_on_ntnet = FALSE
undeletable = TRUE
@@ -21,7 +21,7 @@
if(.)
var/obj/item/modular_computer/pda/silicon/tablet = computer
if(tablet.device_theme == PDA_THEME_SYNDICATE)
program_icon_state = "command-syndicate"
program_open_overlay = "command-syndicate"
return TRUE
return FALSE
@@ -3,9 +3,9 @@
/datum/computer_file/program/secureye
filename = "secureye"
filedesc = "SecurEye"
category = PROGRAM_CATEGORY_MISC
downloader_category = PROGRAM_CATEGORY_SECURITY
ui_header = "borg_mon.gif"
program_icon_state = "generic"
program_open_overlay = "generic"
extended_desc = "This program allows access to standard security camera networks."
requires_ntnet = TRUE
download_access = list(ACCESS_SECURITY)
@@ -1,8 +1,8 @@
/datum/computer_file/program/signal_commander
filename = "signaler"
filedesc = "SignalCommander"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "signal"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
program_open_overlay = "signal"
extended_desc = "A small built-in frequency app that sends out signaller signals with the appropriate hardware."
size = 2
tgui_id = "NtosSignaler"
@@ -1,8 +1,8 @@
/datum/computer_file/program/skill_tracker
filename = "skilltracker"
filedesc = "ExperTrak Skill Tracker"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "generic"
downloader_category = PROGRAM_CATEGORY_DEVICE
program_open_overlay = "generic"
extended_desc = "Scan and view your current marketable job skills."
size = 2
tgui_id = "NtosSkillTracker"
@@ -1,9 +1,9 @@
/datum/computer_file/program/supermatter_monitor
filename = "ntcims"
filedesc = "NT CIMS"
category = PROGRAM_CATEGORY_ENGI
downloader_category = PROGRAM_CATEGORY_ENGINEERING
ui_header = "smmon_0.gif"
program_icon_state = "smmon_0"
program_open_overlay = "smmon_0"
extended_desc = "Crystal Integrity Monitoring System, connects to specially calibrated supermatter sensors to provide information on the status of supermatter-based engines."
requires_ntnet = TRUE
download_access = list(ACCESS_CONSTRUCTION)
@@ -109,6 +109,6 @@
if(last_status != new_status)
last_status = new_status
ui_header = "smmon_[last_status].gif"
program_icon_state = "smmon_[last_status]"
program_open_overlay = "smmon_[last_status]"
if(istype(computer))
computer.update_appearance()
@@ -2,7 +2,7 @@
filename = "statusdisplay"
filedesc = "Status Display"
program_icon = "signal"
program_icon_state = "generic"
program_open_overlay = "generic"
requires_ntnet = TRUE
size = 1
@@ -1,8 +1,8 @@
/datum/computer_file/program/science
filename = "experi_track"
filedesc = "Nanotrasen Science Hub"
category = PROGRAM_CATEGORY_SCI
program_icon_state = "research"
downloader_category = PROGRAM_CATEGORY_SCIENCE
program_open_overlay = "research"
extended_desc = "Connect to the internal science server in order to assist in station research efforts."
requires_ntnet = TRUE
size = 10
@@ -2,7 +2,7 @@
filename = "themeify"
filedesc = "Themeify"
extended_desc = "This program allows configuration of your device's theme."
program_icon_state = "generic"
program_open_overlay = "generic"
undeletable = TRUE
size = 0
header_program = TRUE
@@ -1,8 +1,8 @@
/datum/computer_file/program/ntnetmonitor
filename = "wirecarp"
filedesc = "WireCarp"
category = PROGRAM_CATEGORY_MISC
program_icon_state = "comm_monitor"
downloader_category = PROGRAM_CATEGORY_SECURITY
program_open_overlay = "comm_monitor"
extended_desc = "This program monitors stationwide NTNet network, provides access to logging systems, and allows for configuration changes"
size = 12
requires_ntnet = TRUE
@@ -51,7 +51,7 @@
data["idsalarm"] = SSmodular_computers.intrusion_detection_alarm
data["ntnetlogs"] = list()
for(var/i in SSmodular_computers.logs)
for(var/i in SSmodular_computers.modpc_logs)
data["ntnetlogs"] += list(list("entry" = i))
data["tablets"] = list()