mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Modular Computer Multitasking + Fixes
- Modular computers now support multitasking. - New hardware type added. Basic CPUs may be obtained when purchasing a laptop or tablet, Photonic CPUs can be printed at research at imprinter. This hardware piece determines how many programs can be on background. - Programs can now have an icon that is rendered in main UI's header (along with the power icons, etc.) when the program is on background. As an example, these icons have been added to NTNRC client (Dark icon when no messages have been received, blinking when new message is waiting), Alarm monitor (Blinking red when an alarm is active, green otherwise) and downloader program (Animated arrow when downloading, stationary when finished.) - Adds missing crew monitor icon to tablets. Fixes #11937
This commit is contained in:
@@ -15,18 +15,37 @@
|
||||
filename = "alarmmonitor"
|
||||
filedesc = "Alarm Monitoring"
|
||||
nanomodule_path = /datum/nano_module/alarm_monitor/engineering
|
||||
program_icon_state = "alarm_monitor"
|
||||
ui_header = "alarm_green.gif"
|
||||
program_icon_state = "alert-green"
|
||||
extended_desc = "This program provides visual interface for station's alarm system."
|
||||
requires_ntnet = 1
|
||||
network_destination = "alarm monitoring network"
|
||||
size = 5
|
||||
var/has_alert = 0
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/process_tick()
|
||||
..()
|
||||
var/datum/nano_module/alarm_monitor/NMA = NM
|
||||
if(istype(NMA) && NMA.has_major_alarms())
|
||||
if(!has_alert)
|
||||
program_icon_state = "alert-red"
|
||||
ui_header = "alarm_red.gif"
|
||||
update_computer_icon()
|
||||
has_alert = 1
|
||||
else
|
||||
if(has_alert)
|
||||
program_icon_state = "alert-green"
|
||||
ui_header = "alarm_green.gif"
|
||||
update_computer_icon()
|
||||
has_alert = 0
|
||||
return 1
|
||||
|
||||
/datum/computer_file/program/atmos_control
|
||||
filename = "atmoscontrol"
|
||||
filedesc = "Atmosphere Control"
|
||||
nanomodule_path = /datum/nano_module/atmos_control
|
||||
program_icon_state = "atmos_control"
|
||||
extended_desc = "This program allows remote control of air alarms around the station"
|
||||
extended_desc = "This program allows remote control of air alarms around the station. This program can not be run on tablet computers."
|
||||
required_access = access_atmospherics
|
||||
requires_ntnet = 1
|
||||
network_destination = "atmospheric control system"
|
||||
@@ -39,7 +58,7 @@
|
||||
filedesc = "RCON Remote Control"
|
||||
nanomodule_path = /datum/nano_module/rcon
|
||||
program_icon_state = "generic"
|
||||
extended_desc = "This program allows remote control of power distribution systems around the station."
|
||||
extended_desc = "This program allows remote control of power distribution systems around the station. This program can not be run on tablet computers."
|
||||
required_access = access_engine
|
||||
requires_ntnet = 1
|
||||
network_destination = "RCON remote control system"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
requires_ntnet_feature = NTNET_SOFTWAREDOWNLOAD
|
||||
available_on_ntnet = 0
|
||||
nanomodule_path = /datum/nano_module/computer_ntnetdownload/
|
||||
ui_header = "downloader_finished.gif"
|
||||
var/datum/computer_file/program/downloaded_file = null
|
||||
var/hacked_download = 0
|
||||
var/download_completion = 0 //GQ of downloaded data.
|
||||
@@ -32,6 +33,8 @@
|
||||
if(!computer || !computer.hard_drive || !computer.hard_drive.try_store_file(PRG))
|
||||
return 0
|
||||
|
||||
ui_header = "downloader_running.gif"
|
||||
|
||||
if(PRG in ntnet_global.available_station_software)
|
||||
generate_network_log("Began downloading file [PRG.filename].[PRG.filetype] from NTNet Software Repository.")
|
||||
hacked_download = 0
|
||||
@@ -50,6 +53,7 @@
|
||||
generate_network_log("Aborted download of file [hacked_download ? "**ENCRYPTED**" : downloaded_file.filename].[downloaded_file.filetype].")
|
||||
downloaded_file = null
|
||||
download_completion = 0
|
||||
ui_header = "downloader_finished.gif"
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/proc/complete_file_download()
|
||||
if(!downloaded_file)
|
||||
@@ -60,6 +64,7 @@
|
||||
downloaderror = "I/O ERROR - Unable to save file. Check whether you have enough free space on your hard drive and whether your hard drive is properly connected. If the issue persists contact your system administrator for assistance."
|
||||
downloaded_file = null
|
||||
download_completion = 0
|
||||
ui_header = "downloader_finished.gif"
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/process_tick()
|
||||
if(!downloaded_file)
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
requires_ntnet = 1
|
||||
requires_ntnet_feature = NTNET_COMMUNICATION
|
||||
network_destination = "NTNRC server"
|
||||
ui_header = "ntnrc_idle.gif"
|
||||
available_on_ntnet = 1
|
||||
nanomodule_path = /datum/nano_module/computer_chatclient/
|
||||
var/last_message = null // Used to generate the toolbar icon
|
||||
var/username
|
||||
var/datum/ntnet_conversation/channel = null
|
||||
var/operator_mode = 0 // Channel operator mode
|
||||
@@ -30,6 +32,7 @@
|
||||
if(href_list["PRG_joinchannel"])
|
||||
var/datum/ntnet_conversation/C
|
||||
for(var/datum/ntnet_conversation/chan in ntnet_global.chat_channels)
|
||||
world << "DEBUG L35/NTNRC_CLIENT.DM: \"[href_list["PRG_joinchannel"]]\" / \"[chan.title]\""
|
||||
if(chan.title == href_list["PRG_joinchannel"])
|
||||
C = chan
|
||||
break
|
||||
@@ -143,6 +146,20 @@
|
||||
|
||||
..(href, href_list)
|
||||
|
||||
/datum/computer_file/program/chatclient/process_tick()
|
||||
..()
|
||||
if(running)
|
||||
ui_header = "ntnrc_idle.gif"
|
||||
if(channel)
|
||||
// Remember the last message. If there is no message in the channel remember null.
|
||||
last_message = channel.messages.len ? channel.messages[channel.messages.len - 1] : null
|
||||
else
|
||||
last_message = null
|
||||
return 1
|
||||
if(channel && channel.messages && channel.messages.len)
|
||||
ui_header = last_message == channel.messages[channel.messages.len - 1] ? "ntnrc_idle.gif" : "ntnrc_new.gif"
|
||||
else
|
||||
ui_header = "ntnrc_idle.gif"
|
||||
|
||||
/datum/computer_file/program/chatclient/kill_program(var/forced = 0)
|
||||
if(channel)
|
||||
|
||||
Reference in New Issue
Block a user