mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 10:57:19 +01:00
Modular PDAs: The End of an Era (#10319)
PDAs are dead, long live PDAs. All trace of old PDAs has been scoured from the codebase, and in its place are modular computer PDAs that are feature-equivalent. Essentially every PDA function except the Syndicate detonation feature and Notepad has been ported over, and battery life for handheld computers has been boosted alongside the addition of charging cables to make things easier.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
color = LIGHT_COLOR_GREEN
|
||||
unsendable = TRUE
|
||||
undeletable = TRUE
|
||||
size = 4
|
||||
size = 2
|
||||
available_on_ntnet = FALSE
|
||||
requires_ntnet = FALSE
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
color = LIGHT_COLOR_GREEN
|
||||
unsendable = TRUE
|
||||
undeletable = TRUE
|
||||
size = 4
|
||||
size = 2
|
||||
available_on_ntnet = FALSE
|
||||
requires_ntnet = FALSE
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
var/list/hardware = computer.get_all_components()
|
||||
VUEUI_SET_CHECK(data["disk_size"], computer.hard_drive.max_capacity, ., data)
|
||||
VUEUI_SET_CHECK(data["disk_used"], computer.hard_drive.used_capacity, ., data)
|
||||
VUEUI_SET_CHECK(data["power_usage"], computer.last_power_usage, ., data)
|
||||
VUEUI_SET_CHECK(data["power_usage"], computer.last_power_usage * (CELLRATE / 2), ., data)
|
||||
VUEUI_SET_CHECK(data["card_slot"], computer.card_slot, ., data)
|
||||
if(computer.registered_id)
|
||||
VUEUI_SET_CHECK(data["registered"], computer.registered_id.registered_name, ., data)
|
||||
if(!computer.battery_module)
|
||||
VUEUI_SET_CHECK(data["battery"], 0, ., data)
|
||||
else
|
||||
@@ -52,4 +55,8 @@
|
||||
for(var/obj/item/computer_hardware/H in hardware)
|
||||
LAZYINITLIST(data["hardware"][H.name])
|
||||
for(var/v in list("name", "desc", "enabled", "critical", "power_usage"))
|
||||
VUEUI_SET_CHECK(data["hardware"][H.name][v], H.vars[v], ., data)
|
||||
if(v == "power_usage")
|
||||
var/watt_usage = H.vars[v] * (CELLRATE / 2)
|
||||
VUEUI_SET_CHECK(data["hardware"][H.name][v], watt_usage, ., data)
|
||||
else
|
||||
VUEUI_SET_CHECK(data["hardware"][H.name][v], H.vars[v], ., data)
|
||||
@@ -5,7 +5,7 @@
|
||||
extended_desc = "This program allows management of files."
|
||||
program_icon_state = "generic"
|
||||
color = LIGHT_COLOR_GREEN
|
||||
size = 4
|
||||
size = 2
|
||||
requires_ntnet = FALSE
|
||||
available_on_ntnet = FALSE
|
||||
undeletable = TRUE
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
color = LIGHT_COLOR_GREEN
|
||||
unsendable = TRUE
|
||||
undeletable = TRUE
|
||||
size = 4
|
||||
size = 2
|
||||
requires_ntnet = TRUE
|
||||
requires_ntnet_feature = NTNET_SOFTWAREDOWNLOAD
|
||||
available_on_ntnet = 0
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
if(href_list["download"])
|
||||
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(href_list["download"])
|
||||
|
||||
|
||||
if(!istype(PRG))
|
||||
return 1
|
||||
return add_to_queue(PRG, ui.user)
|
||||
@@ -126,7 +126,7 @@
|
||||
generate_network_log("Began downloading file [PRG.filename].[PRG.filetype] from unspecified server.")
|
||||
|
||||
|
||||
download_files[PRG.filename] = PRG.clone()
|
||||
download_files[PRG.filename] = PRG.clone(FALSE, computer)
|
||||
queue_size += PRG.size
|
||||
download_queue[PRG.filename] = 0
|
||||
for(var/i in SSvueui.get_open_uis(src))
|
||||
@@ -224,9 +224,8 @@
|
||||
|
||||
if(download_queue[active_download] >= active_download_file.size)
|
||||
finish_from_queue(active_download)
|
||||
active_download = null
|
||||
playsound(get_turf(computer), 'sound/machines/ping.ogg', 40, 0)
|
||||
computer.output_message("[icon2html(computer, viewers(get_turf(computer)))] <b>[capitalize_first_letters(computer)]</b> pings, \"Software download completed successfully!\"", 1)
|
||||
computer.output_message("[icon2html(computer, viewers(get_turf(computer)), computer.icon_state)] <b>[capitalize_first_letters(computer.name)]</b> pings: \"[active_download_file.filedesc ? active_download_file.filedesc : active_download_file.filename] downloaded successfully!\"", 1)
|
||||
active_download = null
|
||||
|
||||
SSvueui.check_uis_for_change(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user