[MIRROR] Tablets don't close their UI when changing program (and some fixes) [MDB IGNORE] (#19600)

* Tablets don't close their UI when changing program (and some fixes) (#73635)

## About The Pull Request

- Tablets now refresh their page when changing programs, this means the
UI will no longer close and reopen itself several times (or even have
several UIs open if shit broke hard enough).
- Removed tablet's attack self because interact already does everything
it had to do.
- Header programs now close when minimized (as there's no button to
close them in the main menu.
- Removed a lot of program UI stuff, it's now handled by the PC itself,
such as header data and ui host.
- Cut off asset sending from TGUI into it's own proc so I can re-send
assets when changing programs
- Added an ejection button for machine computers
- Fixed ID not ejecting into the user's hand when using 'Eject ID'
- Fixes a minor runtime when opening the MODsuit application without a
MODsuit already connected.

## Why It's Good For The Game

Fixes some bugs that I found with tablets

UIS now won't be flickering as bad in front of them, or have
inconsistent placement (like when you move your main menu UI, go to
Messenger, then it's back to the center of the screen).

Video of it in action

https://user-images.githubusercontent.com/53777086/221301417-78321149-0c10-475e-bd29-79f5a4ba0597.mp4

## Changelog

🆑
fix: Being in an application now properly uses the tablet's battery.
fix: Messenger and Themify apps now close when minimized, so don't count
towards the running app limit.
fix: Tablet UIs will now no longer spam open/close the UI when changing
applications
fix: Using the Eject ID button on tablets now ejects into your hand.
fix: Computers now have an Eject ID button
refactor: Cut down a lot of copy paste in tablet & program code, now
it's mostly done by the tablet.
/🆑

* Tablets don't close their UI when changing program (and some fixes)

* Update contractor_tablet.dm

* wew

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-10 07:09:10 +01:00
committed by GitHub
parent d240a2a0af
commit cb3b675bae
46 changed files with 135 additions and 220 deletions

View File

@@ -420,13 +420,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
update_appearance(UPDATE_ICON) update_appearance(UPDATE_ICON)
return ..() return ..()
// On-click handling. Turns on the computer if it's off and opens the GUI.
/obj/item/modular_computer/interact(mob/user)
if(enabled)
ui_interact(user)
else
turn_on(user)
/obj/item/modular_computer/CtrlShiftClick(mob/user) /obj/item/modular_computer/CtrlShiftClick(mob/user)
. = ..() . = ..()
if(.) if(.)
@@ -605,7 +598,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
program.alert_pending = FALSE program.alert_pending = FALSE
idle_threads.Remove(program) idle_threads.Remove(program)
update_appearance() update_appearance()
updateUsrDialog()
return TRUE return TRUE
if(!program.is_supported_by_hardware(hardware_flag, 1, user)) if(!program.is_supported_by_hardware(hardware_flag, 1, user))
@@ -625,7 +617,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
active_program = program active_program = program
program.alert_pending = FALSE program.alert_pending = FALSE
update_appearance() update_appearance()
updateUsrDialog() ui_interact(user)
return TRUE return TRUE
// Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on) // Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on)

View File

@@ -1,20 +1,15 @@
/obj/item/modular_computer/attack_self(mob/user) /obj/item/modular_computer/interact(mob/user)
. = ..() if(enabled)
ui_interact(user) ui_interact(user)
else
turn_on(user)
// Operates TGUI // Operates TGUI
/obj/item/modular_computer/ui_interact(mob/user, datum/tgui/ui) /obj/item/modular_computer/ui_interact(mob/user, datum/tgui/ui)
if(!enabled) if(!enabled || !user.can_read(src, READING_CHECK_LITERACY) || !use_power())
if(ui) if(ui)
ui.close() ui.close()
return return
if(!use_power())
if(ui)
ui.close()
return
if(!user.can_read(src, READING_CHECK_LITERACY))
return
// Robots don't really need to see the screen, their wireless connection works as long as computer is on. // Robots don't really need to see the screen, their wireless connection works as long as computer is on.
if(!screen_on && !issilicon(user)) if(!screen_on && !issilicon(user))
@@ -22,27 +17,43 @@
ui.close() ui.close()
return return
// If we have an active program switch to it now.
if(active_program)
if(ui) // This is the main laptop screen. Since we are switching to program's UI close it for now.
ui.close()
active_program.ui_interact(user)
return
if(honkvirus_amount > 0) // EXTRA annoying, huh! if(honkvirus_amount > 0) // EXTRA annoying, huh!
honkvirus_amount-- honkvirus_amount--
playsound(src, 'sound/items/bikehorn.ogg', 30, TRUE) playsound(src, 'sound/items/bikehorn.ogg', 30, TRUE)
ui = SStgui.try_update_ui(user, src, ui) ui = SStgui.try_update_ui(user, src, ui)
if (!ui) if(!ui)
ui = new(user, src, "NtosMain") if(active_program)
ui.set_autoupdate(TRUE) ui = new(user, src, active_program.tgui_id, active_program.filedesc)
if(ui.open()) else
ui.send_asset(get_asset_datum(/datum/asset/simple/headers)) ui = new(user, src, "NtosMain")
ui.open()
return
var/old_open_ui = ui.interface
if(active_program)
ui.interface = active_program.tgui_id
ui.title = active_program.filedesc
else
ui.interface = "NtosMain"
//opened a new UI
if(old_open_ui != ui.interface)
update_static_data(user, ui)
ui.send_assets()
/obj/item/modular_computer/ui_assets(mob/user)
var/list/data = list()
data += get_asset_datum(/datum/asset/simple/headers)
if(active_program)
data += active_program.ui_assets(user)
return data
/obj/item/modular_computer/ui_static_data(mob/user) /obj/item/modular_computer/ui_static_data(mob/user)
. = ..() . = ..()
var/list/data = list() var/list/data = list()
if(active_program)
data += active_program.ui_static_data(user)
return data
data["show_imprint"] = istype(src, /obj/item/modular_computer/pda) data["show_imprint"] = istype(src, /obj/item/modular_computer/pda)
@@ -50,6 +61,9 @@
/obj/item/modular_computer/ui_data(mob/user) /obj/item/modular_computer/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = get_header_data()
if(active_program)
data += active_program.ui_data(user)
return data
data["login"] = list( data["login"] = list(
IDName = saved_identification || "Unknown", IDName = saved_identification || "Unknown",
@@ -61,7 +75,6 @@
IDJob = computer_id_slot?.assignment, IDJob = computer_id_slot?.assignment,
) )
data["removable_media"] = list() data["removable_media"] = list()
if(inserted_disk) if(inserted_disk)
data["removable_media"] += "Eject Disk" data["removable_media"] += "Eject Disk"
@@ -86,9 +99,8 @@
data["pai"] = inserted_pai data["pai"] = inserted_pai
return data return data
// Handles user's GUI input // Handles user's GUI input
/obj/item/modular_computer/ui_act(action, params) /obj/item/modular_computer/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..() . = ..()
if(.) if(.)
return return
@@ -99,6 +111,9 @@
balloon_alert(human_user, "fingers are too big!") balloon_alert(human_user, "fingers are too big!")
return TRUE return TRUE
if(active_program)
active_program.ui_act(action, params, ui, state)
switch(action) switch(action)
if("PC_exit") if("PC_exit")
kill_program() kill_program()
@@ -107,29 +122,28 @@
shutdown_computer() shutdown_computer()
return TRUE return TRUE
if("PC_minimize") if("PC_minimize")
var/mob/user = usr
if(!active_program) if(!active_program)
return return
//header programs can't be minimized.
if(active_program.header_program)
kill_program()
return TRUE
idle_threads.Add(active_program) idle_threads.Add(active_program)
active_program.program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs active_program.program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs
active_program = null active_program = null
update_appearance() update_appearance()
if(user && istype(user))
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
if("PC_killprogram") if("PC_killprogram")
var/prog = params["name"] var/prog = params["name"]
var/datum/computer_file/program/P = null var/datum/computer_file/program/killed_program = find_file_by_name(prog)
var/mob/user = usr
P = find_file_by_name(prog)
if(!istype(P) || P.program_state == PROGRAM_STATE_KILLED) if(!istype(killed_program) || killed_program.program_state == PROGRAM_STATE_KILLED)
return return
P.kill_program(forced = TRUE) killed_program.kill_program(forced = TRUE)
to_chat(user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.")) to_chat(usr, span_notice("Program [killed_program.filename].[killed_program.filetype] with PID [rand(100,999)] has been killed."))
if("PC_runprogram") if("PC_runprogram")
open_program(usr, find_file_by_name(params["name"])) open_program(usr, find_file_by_name(params["name"]))
@@ -172,7 +186,7 @@
return TRUE return TRUE
if("ID") if("ID")
if(RemoveID()) if(RemoveID(user))
playsound(src, 'sound/machines/card_slide.ogg', 50) playsound(src, 'sound/machines/card_slide.ogg', 50)
return TRUE return TRUE
@@ -192,8 +206,6 @@
if("interact") if("interact")
inserted_pai.attack_self(usr) inserted_pai.attack_self(usr)
return UI_UPDATE return UI_UPDATE
else
return
/obj/item/modular_computer/ui_host() /obj/item/modular_computer/ui_host()
if(physical) if(physical)

View File

@@ -143,17 +143,6 @@
to_chat(user, span_danger("\The [computer] flashes an \"Access Denied\" warning.")) to_chat(user, span_danger("\The [computer] flashes an \"Access Denied\" warning."))
return FALSE return FALSE
/**
* This attempts to retrieve header data for UIs.
*
* If implementing completely new device of different type than existing ones
* always include the device here in this proc. This proc basically relays the request to whatever is running the program.
**/
/datum/computer_file/program/proc/get_header_data()
if(computer)
return computer.get_header_data()
return list()
/** /**
* Called on program startup. * Called on program startup.
* *
@@ -188,62 +177,3 @@
var/obj/item/card/id/ID = computer.computer_id_slot?.GetID() var/obj/item/card/id/ID = computer.computer_id_slot?.GetID()
generate_network_log("Connection closed -- Program ID: [filename] User:[ID ? "[ID.registered_name]" : "None"]") generate_network_log("Connection closed -- Program ID: [filename] User:[ID ? "[ID.registered_name]" : "None"]")
return TRUE return TRUE
/datum/computer_file/program/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui && tgui_id)
ui = new(user, src, tgui_id, filedesc)
if(ui.open())
ui.send_asset(get_asset_datum(/datum/asset/simple/headers))
// CONVENTIONS, READ THIS WHEN CREATING NEW PROGRAM AND OVERRIDING THIS PROC:
// Topic calls are automagically forwarded from NanoModule this program contains.
// Calls beginning with "PRG_" are reserved for programs handling.
// Calls beginning with "PC_" are reserved for computer handling (by whatever runs the program)
// ALWAYS INCLUDE PARENT CALL ..() OR DIE IN FIRE.
/datum/computer_file/program/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
if(ishuman(usr) && !computer.allow_chunky) //in /obj/item/modular_computer/ui_act() too
var/mob/living/carbon/human/human_user = usr
if(human_user.check_chunky_fingers())
computer.balloon_alert(human_user, "fingers are too big!")
return TRUE
if(computer)
switch(action)
if("PC_exit")
computer.kill_program()
ui.close()
return TRUE
if("PC_shutdown")
computer.shutdown_computer()
ui.close()
return TRUE
if("PC_minimize")
var/mob/user = usr
if(!computer.active_program)
return
computer.idle_threads.Add(computer.active_program)
program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs
computer.active_program = null
computer.update_appearance()
ui.close()
if(user && istype(user))
computer.ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
/datum/computer_file/program/ui_host()
if(computer.physical)
return computer.physical
else
return computer
/datum/computer_file/program/ui_status(mob/user)
if(program_state != PROGRAM_STATE_ACTIVE) // Our program was closed. Close the ui if it exists.
return UI_CLOSE
return ..()

View File

@@ -118,7 +118,7 @@
return TRUE return TRUE
/datum/computer_file/program/ai_restorer/ui_data(mob/user) /datum/computer_file/program/ai_restorer/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["ejectable"] = TRUE data["ejectable"] = TRUE
data["AI_present"] = !!stored_card?.AI data["AI_present"] = !!stored_card?.AI

View File

@@ -41,7 +41,7 @@
return 1 return 1
/datum/computer_file/program/alarm_monitor/ui_data(mob/user) /datum/computer_file/program/alarm_monitor/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data += alert_control.ui_data(user) data += alert_control.ui_data(user)
return data return data

View File

@@ -68,7 +68,7 @@
return TRUE return TRUE
/datum/computer_file/program/ntnet_dos/ui_data(mob/user) /datum/computer_file/program/ntnet_dos/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["error"] = error data["error"] = error
if(target && executed) if(target && executed)

View File

@@ -64,7 +64,7 @@
return temp return temp
/datum/computer_file/program/revelation/ui_data(mob/user) /datum/computer_file/program/revelation/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["armed"] = armed data["armed"] = armed

View File

@@ -82,7 +82,7 @@
) )
/datum/computer_file/program/arcade/ui_data(mob/user) /datum/computer_file/program/arcade/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["Hitpoints"] = boss_hp data["Hitpoints"] = boss_hp
data["PlayerHitpoints"] = player_hp data["PlayerHitpoints"] = player_hp
data["PlayerMP"] = player_mp data["PlayerMP"] = player_mp
@@ -97,7 +97,6 @@
. = ..() . = ..()
if(.) if(.)
return return
usr.played_game() usr.played_game()
var/gamerSkillLevel = 0 var/gamerSkillLevel = 0

View File

@@ -54,7 +54,7 @@
return return_atmos_handbooks() return return_atmos_handbooks()
/datum/computer_file/program/atmosscan/ui_data(mob/user) /datum/computer_file/program/atmosscan/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/turf/turf = get_turf(computer) var/turf/turf = get_turf(computer)
data["atmozphereMode"] = atmozphere_mode data["atmozphereMode"] = atmozphere_mode
data["clickAtmozphereCompatible"] = (computer.hardware_flag & PROGRAM_TABLET) data["clickAtmozphereCompatible"] = (computer.hardware_flag & PROGRAM_TABLET)

View File

@@ -69,7 +69,7 @@
DL_progress += 25 DL_progress += 25
/datum/computer_file/program/borg_monitor/ui_data(mob/user) /datum/computer_file/program/borg_monitor/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["card"] = FALSE data["card"] = FALSE
if(checkID()) if(checkID())
@@ -112,20 +112,19 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("messagebot") if("messagebot")
var/mob/living/silicon/robot/R = locate(params["ref"]) in GLOB.silicon_mobs var/mob/living/silicon/robot/R = locate(params["ref"]) in GLOB.silicon_mobs
if(!istype(R)) if(!istype(R))
return return TRUE
var/ID = checkID() var/ID = checkID()
if(!ID) if(!ID)
return return TRUE
if(R.stat == DEAD) //Dead borgs will listen to you no longer if(R.stat == DEAD) //Dead borgs will listen to you no longer
to_chat(usr, span_warning("Error -- Could not open a connection to unit:[R]")) to_chat(usr, span_warning("Error -- Could not open a connection to unit:[R]"))
var/message = tgui_input_text(usr, "Message to be sent to remote cyborg", "Send Message") var/message = tgui_input_text(usr, "Message to be sent to remote cyborg", "Send Message")
if(!message) if(!message)
return return TRUE
to_chat(R, "<br><br>[span_notice("Message from [ID] -- \"[message]\"")]<br>") to_chat(R, "<br><br>[span_notice("Message from [ID] -- \"[message]\"")]<br>")
to_chat(usr, "Message sent to [R]: [message]") to_chat(usr, "Message sent to [R]: [message]")
R.logevent("Message from [ID] -- \"[message]\"") R.logevent("Message from [ID] -- \"[message]\"")
@@ -134,6 +133,7 @@
to_chat(R.connected_ai, "<br><br>[span_notice("Message from [ID] to [R] -- \"[message]\"")]<br>") to_chat(R.connected_ai, "<br><br>[span_notice("Message from [ID] to [R] -- \"[message]\"")]<br>")
SEND_SOUND(R.connected_ai, 'sound/machines/twobeep_high.ogg') SEND_SOUND(R.connected_ai, 'sound/machines/twobeep_high.ogg')
usr.log_talk(message, LOG_PDA, tag="Cyborg Monitor Program: ID name \"[ID]\" to [R]") usr.log_talk(message, LOG_PDA, tag="Cyborg Monitor Program: ID name \"[ID]\" to [R]")
return TRUE
///This proc is used to determin if a borg should be shown in the list (based on the borg's scrambledcodes var). Syndicate version overrides this to show only syndicate borgs. ///This proc is used to determin if a borg should be shown in the list (based on the borg's scrambledcodes var). Syndicate version overrides this to show only syndicate borgs.
/datum/computer_file/program/borg_monitor/proc/evaluate_borg(mob/living/silicon/robot/R) /datum/computer_file/program/borg_monitor/proc/evaluate_borg(mob/living/silicon/robot/R)

View File

@@ -19,7 +19,7 @@
var/networked = FALSE var/networked = FALSE
/datum/computer_file/program/bounty_board/ui_data(mob/user) /datum/computer_file/program/bounty_board/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/list/formatted_requests = list() var/list/formatted_requests = list()
var/list/formatted_applicants = list() var/list/formatted_applicants = list()
if(current_user) if(current_user)
@@ -82,7 +82,7 @@
for(var/datum/station_request/i in GLOB.request_list) for(var/datum/station_request/i in GLOB.request_list)
if("[i.req_number]" == "[current_user.account_id]") if("[i.req_number]" == "[current_user.account_id]")
computer.say("Account already has active bounty.") computer.say("Account already has active bounty.")
return return TRUE
var/datum/station_request/curr_request = new /datum/station_request(current_user.account_holder, bounty_value,bounty_text,current_user.account_id, current_user) var/datum/station_request/curr_request = new /datum/station_request(current_user.account_holder, bounty_value,bounty_text,current_user.account_id, current_user)
GLOB.request_list += list(curr_request) GLOB.request_list += list(curr_request)
for(var/obj/i in GLOB.allbountyboards) for(var/obj/i in GLOB.allbountyboards)
@@ -126,9 +126,10 @@
bounty_value = text2num(params["bountyval"]) bounty_value = text2num(params["bountyval"])
if(!bounty_value) if(!bounty_value)
bounty_value = 1 bounty_value = 1
return TRUE
if("bountyText") if("bountyText")
bounty_text = (params["bountytext"]) bounty_text = (params["bountytext"])
. = TRUE return TRUE
/datum/computer_file/program/bounty_board/Destroy() /datum/computer_file/program/bounty_board/Destroy()
GLOB.allbountyboards -= computer GLOB.allbountyboards -= computer

View File

@@ -61,8 +61,7 @@
return FALSE return FALSE
/datum/computer_file/program/budgetorders/ui_data() /datum/computer_file/program/budgetorders/ui_data()
. = ..() var/list/data = list()
var/list/data = get_header_data()
data["location"] = SSshuttle.supply.getStatusText() data["location"] = SSshuttle.supply.getStatusText()
data["department"] = "Cargo" data["department"] = "Cargo"
var/datum/bank_account/buyer = SSeconomy.get_dep_account(cargo_account) var/datum/bank_account/buyer = SSeconomy.get_dep_account(cargo_account)

View File

@@ -77,7 +77,6 @@
. = ..() . = ..()
if(.) if(.)
return return
var/mob/user = usr var/mob/user = usr
var/obj/item/card/id/inserted_auth_card = computer.computer_id_slot var/obj/item/card/id/inserted_auth_card = computer.computer_id_slot
@@ -287,7 +286,7 @@
return data return data
/datum/computer_file/program/card_mod/ui_data(mob/user) /datum/computer_file/program/card_mod/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/obj/item/card/id/inserted_id = computer.computer_id_slot var/obj/item/card/id/inserted_id = computer.computer_id_slot
data["authIDName"] = inserted_id ? inserted_id.name : "-----" data["authIDName"] = inserted_id ? inserted_id.name : "-----"

View File

@@ -17,7 +17,7 @@
var/cut_min = 0.01 var/cut_min = 0.01
/datum/computer_file/program/shipping/ui_data(mob/user) /datum/computer_file/program/shipping/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["has_id_slot"] = !!computer.computer_id_slot data["has_id_slot"] = !!computer.computer_id_slot
data["paperamt"] = "[computer.stored_paper] / [computer.max_paper]" data["paperamt"] = "[computer.stored_paper] / [computer.max_paper]"
@@ -30,21 +30,18 @@
. = ..() . = ..()
if(.) if(.)
return return
if(!computer)
return
if(!computer.computer_id_slot) //We need an ID to successfully run if(!computer.computer_id_slot) //We need an ID to successfully run
return return FALSE
switch(action) switch(action)
if("ejectid") if("ejectid")
computer.RemoveID(usr) computer.RemoveID(usr)
if("selectid") if("selectid")
if(!computer.computer_id_slot.registered_account) if(!computer.computer_id_slot.registered_account)
playsound(get_turf(ui_host()), 'sound/machines/buzz-sigh.ogg', 50, TRUE, -1) playsound(get_turf(computer.ui_host()), 'sound/machines/buzz-sigh.ogg', 50, TRUE, -1)
return return TRUE
payments_acc = computer.computer_id_slot.registered_account payments_acc = computer.computer_id_slot.registered_account
playsound(get_turf(ui_host()), 'sound/machines/ping.ogg', 50, TRUE, -1) playsound(get_turf(computer.ui_host()), 'sound/machines/ping.ogg', 50, TRUE, -1)
if("resetid") if("resetid")
payments_acc = null payments_acc = null
if("setsplit") if("setsplit")
@@ -53,11 +50,11 @@
if("print") if("print")
if(computer.stored_paper <= 0) if(computer.stored_paper <= 0)
to_chat(usr, span_notice("Printer is out of paper.")) to_chat(usr, span_notice("Printer is out of paper."))
return return TRUE
if(!payments_acc) if(!payments_acc)
to_chat(usr, span_notice("Software error: Please set a current user first.")) to_chat(usr, span_notice("Software error: Please set a current user first."))
return return TRUE
var/obj/item/barcode/barcode = new /obj/item/barcode(get_turf(ui_host())) var/obj/item/barcode/barcode = new /obj/item/barcode(get_turf(computer.ui_host()))
barcode.payments_acc = payments_acc barcode.payments_acc = payments_acc
barcode.cut_multiplier = cut_multiplier barcode.cut_multiplier = cut_multiplier
computer.stored_paper-- computer.stored_paper--

View File

@@ -12,7 +12,7 @@
detomatix_resistance = DETOMATIX_RESIST_MAJOR detomatix_resistance = DETOMATIX_RESIST_MAJOR
/datum/computer_file/program/crew_manifest/ui_static_data(mob/user) /datum/computer_file/program/crew_manifest/ui_static_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["manifest"] = GLOB.manifest.get_manifest() data["manifest"] = GLOB.manifest.get_manifest()
return data return data
@@ -20,7 +20,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("PRG_print") if("PRG_print")
if(computer) //This option should never be called if there is no printer if(computer) //This option should never be called if there is no printer

View File

@@ -17,7 +17,7 @@
emoji_list = sortTim(emoji_list, GLOBAL_PROC_REF(cmp_text_asc)) emoji_list = sortTim(emoji_list, GLOBAL_PROC_REF(cmp_text_asc))
/datum/computer_file/program/emojipedia/ui_static_data(mob_user) /datum/computer_file/program/emojipedia/ui_static_data(mob_user)
var/list/data = get_header_data() var/list/data = list()
for(var/emoji in emoji_list) for(var/emoji in emoji_list)
data["emoji_list"] += list(list( data["emoji_list"] += list(list(
"name" = emoji, "name" = emoji,

View File

@@ -17,7 +17,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("PRG_deletefile") if("PRG_deletefile")
var/datum/computer_file/file = computer.find_file_by_name(params["name"]) var/datum/computer_file/file = computer.find_file_by_name(params["name"])
@@ -82,7 +81,7 @@
binary.alert_silenced = !binary.alert_silenced binary.alert_silenced = !binary.alert_silenced
/datum/computer_file/program/filemanager/ui_data(mob/user) /datum/computer_file/program/filemanager/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
if(error) if(error)
data["error"] = error data["error"] = error
if(!computer) if(!computer)

View File

@@ -83,7 +83,7 @@
/datum/computer_file/program/scipaper_program/ui_data() /datum/computer_file/program/scipaper_program/ui_data()
// Program Headers: // Program Headers:
var/list/data = get_header_data() var/list/data = list()
data["currentTab"] = current_tab data["currentTab"] = current_tab
data["has_techweb"] = !!linked_techweb data["has_techweb"] = !!linked_techweb
@@ -168,7 +168,6 @@
. = ..() . = ..()
if (.) if (.)
return return
switch(action) switch(action)
if("et_alia") if("et_alia")
paper_to_be.et_alia = !paper_to_be.et_alia paper_to_be.et_alia = !paper_to_be.et_alia
@@ -226,7 +225,7 @@
playsound(computer, 'sound/machines/ping.ogg', 25) playsound(computer, 'sound/machines/ping.ogg', 25)
return TRUE return TRUE
playsound(computer, 'sound/machines/terminal_error.ogg', 25) playsound(computer, 'sound/machines/terminal_error.ogg', 25)
return FALSE return TRUE
/// Publication and adding points. /// Publication and adding points.
/datum/computer_file/program/scipaper_program/proc/publish() /datum/computer_file/program/scipaper_program/proc/publish()

View File

@@ -73,17 +73,16 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
. = ..() . = ..()
if(.) if(.)
return return
var/obj/item/card/id/user_id = computer.computer_id_slot var/obj/item/card/id/user_id = computer.computer_id_slot
if(!user_id || !(ACCESS_CHANGE_IDS in user_id.access)) if(!user_id || !(ACCESS_CHANGE_IDS in user_id.access))
return return TRUE
switch(action) switch(action)
if("PRG_open_job") if("PRG_open_job")
var/edit_job_target = params["target"] var/edit_job_target = params["target"]
var/datum/job/j = SSjob.GetJob(edit_job_target) var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j || !can_open_job(j)) if(!j || !can_open_job(j))
return return TRUE
if(opened_positions[edit_job_target] >= 0) if(opened_positions[edit_job_target] >= 0)
GLOB.time_last_changed_position = world.time / 10 GLOB.time_last_changed_position = world.time / 10
j.total_positions++ j.total_positions++
@@ -95,7 +94,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/edit_job_target = params["target"] var/edit_job_target = params["target"]
var/datum/job/j = SSjob.GetJob(edit_job_target) var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j || !can_close_job(j)) if(!j || !can_close_job(j))
return return TRUE
//Allow instant closing without cooldown if a position has been opened before //Allow instant closing without cooldown if a position has been opened before
if(opened_positions[edit_job_target] <= 0) if(opened_positions[edit_job_target] <= 0)
GLOB.time_last_changed_position = world.time / 10 GLOB.time_last_changed_position = world.time / 10
@@ -108,9 +107,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/priority_target = params["target"] var/priority_target = params["target"]
var/datum/job/j = SSjob.GetJob(priority_target) var/datum/job/j = SSjob.GetJob(priority_target)
if(!j || !can_edit_job(j)) if(!j || !can_edit_job(j))
return return TRUE
if(j.total_positions <= j.current_positions) if(j.total_positions <= j.current_positions)
return return TRUE
if(j in SSjob.prioritized_jobs) if(j in SSjob.prioritized_jobs)
SSjob.prioritized_jobs -= j SSjob.prioritized_jobs -= j
else else
@@ -123,7 +122,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/datum/computer_file/program/job_management/ui_data(mob/user) /datum/computer_file/program/job_management/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/authed = FALSE var/authed = FALSE
var/obj/item/card/id/user_id = computer.computer_id_slot var/obj/item/card/id/user_id = computer.computer_id_slot

View File

@@ -38,7 +38,7 @@
computer.save_photo(internal_picture.picture_image) computer.save_photo(internal_picture.picture_image)
/datum/computer_file/program/maintenance/camera/ui_data(mob/user) /datum/computer_file/program/maintenance/camera/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
if(!isnull(internal_picture)) if(!isnull(internal_picture))
user << browse_rsc(internal_picture.picture_image, "tmp_photo[picture_number].png") user << browse_rsc(internal_picture.picture_image, "tmp_photo[picture_number].png")
@@ -52,7 +52,6 @@
. = ..() . = ..()
if(.) if(.)
return return
var/mob/living/user = usr var/mob/living/user = usr
switch(action) switch(action)
if("print_photo") if("print_photo")

View File

@@ -32,18 +32,17 @@
controlled_suit = null controlled_suit = null
/datum/computer_file/program/maintenance/modsuit_control/ui_data(mob/user) /datum/computer_file/program/maintenance/modsuit_control/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["has_suit"] = !!controlled_suit data["has_suit"] = !!controlled_suit
if(controlled_suit) if(controlled_suit)
data += controlled_suit.ui_data() data += controlled_suit.ui_data()
return data return data
/datum/computer_file/program/maintenance/modsuit_control/ui_static_data(mob/user) /datum/computer_file/program/maintenance/modsuit_control/ui_static_data(mob/user)
return controlled_suit.ui_static_data() 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) /datum/computer_file/program/maintenance/modsuit_control/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..() . = ..()
if(.) if(.)
return return
controlled_suit.ui_act(action, params, ui, state)
controlled_suit.ui_act(action, params, ui)

View File

@@ -20,7 +20,7 @@
last_record = healthscan(user, carbon, 1, tochat = FALSE) last_record = healthscan(user, carbon, 1, tochat = FALSE)
/datum/computer_file/program/maintenance/phys_scanner/ui_data(mob/user) /datum/computer_file/program/maintenance/phys_scanner/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["last_record"] = last_record data["last_record"] = last_record
return data return data

View File

@@ -22,7 +22,7 @@
return ..() return ..()
/datum/computer_file/program/newscaster/ui_data(mob/user) /datum/computer_file/program/newscaster/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data += newscaster_ui.ui_data(user) data += newscaster_ui.ui_data(user)
return data return data

View File

@@ -16,14 +16,13 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("UpdateNote") if("UpdateNote")
written_note = params["newnote"] written_note = params["newnote"]
return UI_UPDATE return UI_UPDATE
/datum/computer_file/program/notepad/ui_data(mob/user) /datum/computer_file/program/notepad/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["note"] = written_note data["note"] = written_note

View File

@@ -21,7 +21,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("Transaction") if("Transaction")
token = params["token"] token = params["token"]
@@ -62,7 +61,7 @@
/datum/computer_file/program/nt_pay/ui_data(mob/user) /datum/computer_file/program/nt_pay/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
current_user = computer.computer_id_slot?.registered_account || null current_user = computer.computer_id_slot?.registered_account || null
if(!current_user) if(!current_user)

View File

@@ -118,7 +118,7 @@
return FALSE return FALSE
/datum/computer_file/program/ntnetdownload/ui_data(mob/user) /datum/computer_file/program/ntnetdownload/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/list/access = computer.GetAccess() var/list/access = computer.GetAccess()
data["downloading"] = !!downloaded_file data["downloading"] = !!downloaded_file

View File

@@ -108,7 +108,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("PDA_ringSet") if("PDA_ringSet")
var/new_ringtone = tgui_input_text(usr, "Enter a new ringtone", "Ringtone", ringtone, MESSENGER_RINGTONE_MAX_LENGTH) var/new_ringtone = tgui_input_text(usr, "Enter a new ringtone", "Ringtone", ringtone, MESSENGER_RINGTONE_MAX_LENGTH)
@@ -220,7 +219,7 @@
return data return data
/datum/computer_file/program/messenger/ui_data(mob/user) /datum/computer_file/program/messenger/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["messages"] = messages data["messages"] = messages
data["messengers"] = ScrubMessengerList() data["messengers"] = ScrubMessengerList()

View File

@@ -52,7 +52,6 @@
. = ..() . = ..()
if(.) if(.)
return return
var/datum/ntnet_conversation/channel = SSmodular_computers.get_chat_channel_by_id(active_channel) var/datum/ntnet_conversation/channel = SSmodular_computers.get_chat_channel_by_id(active_channel)
var/authed = FALSE var/authed = FALSE
if(channel && ((channel.channel_operator == src) || netadmin_mode)) if(channel && ((channel.channel_operator == src) || netadmin_mode))
@@ -218,7 +217,7 @@
return data return data
/datum/computer_file/program/chatclient/ui_data(mob/user) /datum/computer_file/program/chatclient/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
if(!SSmodular_computers.chat_channels) if(!SSmodular_computers.chat_channels)
return data return data

View File

@@ -78,8 +78,8 @@
demand.Cut(1, 2) demand.Cut(1, 2)
/datum/computer_file/program/power_monitor/ui_data() /datum/computer_file/program/power_monitor/ui_data()
var/list/data = list()
var/datum/powernet/connected_powernet = get_powernet() var/datum/powernet/connected_powernet = get_powernet()
var/list/data = get_header_data()
data["stored"] = record_size data["stored"] = record_size
data["interval"] = record_interval / 10 data["interval"] = record_interval / 10
data["attached"] = connected_powernet ? TRUE : FALSE data["attached"] = connected_powernet ? TRUE : FALSE

View File

@@ -45,7 +45,7 @@
) )
/datum/computer_file/program/radar/ui_data(mob/user) /datum/computer_file/program/radar/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["selected"] = selected data["selected"] = selected
data["objects"] = list() data["objects"] = list()
data["scanning"] = (world.time < next_scan) data["scanning"] = (world.time < next_scan)
@@ -66,7 +66,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("selecttarget") if("selecttarget")
selected = params["ref"] selected = params["ref"]

View File

@@ -64,7 +64,7 @@
/datum/computer_file/program/records/ui_data(mob/user) /datum/computer_file/program/records/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["records"] = GetRecordsReadable() data["records"] = GetRecordsReadable()
data["mode"] = mode data["mode"] = mode
return data return data

View File

@@ -22,8 +22,8 @@
) )
/datum/computer_file/program/robocontrol/ui_data(mob/user) /datum/computer_file/program/robocontrol/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/turf/current_turf = get_turf(ui_host()) var/turf/current_turf = get_turf(computer.ui_host())
var/list/botlist = list() var/list/botlist = list()
var/list/mulelist = list() var/list/mulelist = list()
@@ -85,7 +85,7 @@
/datum/computer_file/program/robocontrol/ui_act(action, list/params, datum/tgui/ui) /datum/computer_file/program/robocontrol/ui_act(action, list/params, datum/tgui/ui)
. = ..() . = ..()
if(.) if (.)
return return
var/mob/current_user = ui.user var/mob/current_user = ui.user
var/obj/item/card/id/id_card = computer?.computer_id_slot var/obj/item/card/id/id_card = computer?.computer_id_slot
@@ -124,7 +124,7 @@
GLOB.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) computer.RemoveID(usr)
else else
playsound(get_turf(ui_host()) , 'sound/machines/buzz-sigh.ogg', 25, FALSE) playsound(get_turf(computer.ui_host()) , 'sound/machines/buzz-sigh.ogg', 25, FALSE)
if("changedroneaccess") if("changedroneaccess")
if(!computer || !computer.computer_id_slot || !id_card) if(!computer || !computer.computer_id_slot || !id_card)
to_chat(current_user, span_notice("No ID found, authorization failed.")) to_chat(current_user, span_notice("No ID found, authorization failed."))

View File

@@ -26,7 +26,7 @@
return FALSE return FALSE
/datum/computer_file/program/robotact/ui_data(mob/user) /datum/computer_file/program/robotact/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
if(!iscyborg(user)) if(!iscyborg(user))
return data return data

View File

@@ -72,7 +72,7 @@
return . return .
/datum/computer_file/program/secureye/ui_data() /datum/computer_file/program/secureye/ui_data()
var/list/data = get_header_data() var/list/data = list()
data["network"] = network data["network"] = network
data["activeCamera"] = null data["activeCamera"] = null
var/obj/machinery/camera/active_camera = camera_ref?.resolve() var/obj/machinery/camera/active_camera = camera_ref?.resolve()
@@ -100,7 +100,6 @@
. = ..() . = ..()
if(.) if(.)
return return
if(action == "switch_camera") if(action == "switch_camera")
var/c_tag = format_text(params["name"]) var/c_tag = format_text(params["name"])
var/list/cameras = get_available_cameras() var/list/cameras = get_available_cameras()

View File

@@ -24,7 +24,7 @@
SSradio.remove_object(computer, signal_frequency) SSradio.remove_object(computer, signal_frequency)
/datum/computer_file/program/signal_commander/ui_data(mob/user) /datum/computer_file/program/signal_commander/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["frequency"] = signal_frequency data["frequency"] = signal_frequency
data["code"] = signal_code data["code"] = signal_code
data["minFrequency"] = MIN_FREE_FREQ data["minFrequency"] = MIN_FREE_FREQ

View File

@@ -10,7 +10,7 @@
usage_flags = PROGRAM_TABLET // Must be a handheld device to read read your chakras or whatever usage_flags = PROGRAM_TABLET // Must be a handheld device to read read your chakras or whatever
/datum/computer_file/program/skill_tracker/ui_data(mob/user) /datum/computer_file/program/skill_tracker/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/list/skills = list() var/list/skills = list()
data["skills"] = skills data["skills"] = skills
@@ -54,7 +54,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("PRG_reward") if("PRG_reward")
var/skill_type = find_skilltype(params["skill"]) var/skill_type = find_skilltype(params["skill"])

View File

@@ -31,7 +31,7 @@
/datum/computer_file/program/supermatter_monitor/proc/refresh() /datum/computer_file/program/supermatter_monitor/proc/refresh()
for(var/supermatter in supermatters) for(var/supermatter in supermatters)
clear_supermatter(supermatter) clear_supermatter(supermatter)
var/turf/user_turf = get_turf(ui_host()) var/turf/user_turf = get_turf(computer.ui_host())
if(!user_turf) if(!user_turf)
return return
for(var/obj/machinery/power/supermatter_crystal/sm in GLOB.machines) for(var/obj/machinery/power/supermatter_crystal/sm in GLOB.machines)
@@ -47,7 +47,7 @@
return data return data
/datum/computer_file/program/supermatter_monitor/ui_data(mob/user) /datum/computer_file/program/supermatter_monitor/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["sm_data"] = list() data["sm_data"] = list()
for (var/obj/machinery/power/supermatter_crystal/sm as anything in supermatters) for (var/obj/machinery/power/supermatter_crystal/sm as anything in supermatters)
data["sm_data"] += list(sm.sm_ui_data()) data["sm_data"] += list(sm.sm_ui_data())
@@ -58,7 +58,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("PRG_refresh") if("PRG_refresh")
refresh() refresh()

View File

@@ -66,7 +66,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("setStatusMessage") if("setStatusMessage")
upper_text = reject_bad_text(params["upperText"] || "", MAX_STATUS_LINE_LENGTH) upper_text = reject_bad_text(params["upperText"] || "", MAX_STATUS_LINE_LENGTH)
@@ -83,7 +82,7 @@
return data return data
/datum/computer_file/program/status/ui_data(mob/user) /datum/computer_file/program/status/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["upperText"] = upper_text data["upperText"] = upper_text
data["lowerText"] = lower_text data["lowerText"] = lower_text

View File

@@ -41,7 +41,7 @@
// heavy data from this proc should be moved to static data when possible // heavy data from this proc should be moved to static data when possible
/datum/computer_file/program/science/ui_data(mob/user) /datum/computer_file/program/science/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["stored_research"] = !!stored_research data["stored_research"] = !!stored_research
if(!stored_research) //lack of a research node is all we care about. if(!stored_research) //lack of a research node is all we care about.
return data return data
@@ -92,7 +92,6 @@
. = ..() . = ..()
if (.) if (.)
return return
// Check if the console is locked to block any actions occuring // Check if the console is locked to block any actions occuring
if (locked && action != "toggleLock") if (locked && action != "toggleLock")
computer.say("Console is locked, cannot perform further actions.") computer.say("Console is locked, cannot perform further actions.")

View File

@@ -15,7 +15,7 @@
var/list/imported_themes = list() var/list/imported_themes = list()
/datum/computer_file/program/themeify/ui_data(mob/user) /datum/computer_file/program/themeify/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
if(computer.obj_flags & EMAGGED) if(computer.obj_flags & EMAGGED)
data["themes"] += list(list("theme_name" = SYNDICATE_THEME_NAME, "theme_ref" = GLOB.pda_name_to_theme[SYNDICATE_THEME_NAME])) data["themes"] += list(list("theme_name" = SYNDICATE_THEME_NAME, "theme_ref" = GLOB.pda_name_to_theme[SYNDICATE_THEME_NAME]))
@@ -28,7 +28,6 @@
. = ..() . = ..()
if(.) if(.)
return return
switch(action) switch(action)
if("PRG_change_theme") if("PRG_change_theme")
var/selected_theme = params["selected_theme"] var/selected_theme = params["selected_theme"]

View File

@@ -40,7 +40,7 @@
messenger_app.spam_mode = !messenger_app.spam_mode messenger_app.spam_mode = !messenger_app.spam_mode
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user) /datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
data["ntnetstatus"] = SSmodular_computers.check_function() data["ntnetstatus"] = SSmodular_computers.check_function()
data["ntnetrelays"] = SSmodular_computers.ntnet_relays.len data["ntnetrelays"] = SSmodular_computers.ntnet_relays.len

View File

@@ -103,14 +103,7 @@
)) ))
else else
window.send_message("ping") window.send_message("ping")
var/flush_queue = window.send_asset(get_asset_datum( send_assets()
/datum/asset/simple/namespaced/fontawesome))
flush_queue |= window.send_asset(get_asset_datum(
/datum/asset/simple/namespaced/tgfont))
for(var/datum/asset/asset in src_object.ui_assets(user))
flush_queue |= window.send_asset(asset)
if (flush_queue)
user.client.browse_queue_flush()
window.send_message("update", get_payload( window.send_message("update", get_payload(
with_data = TRUE, with_data = TRUE,
with_static_data = TRUE)) with_static_data = TRUE))
@@ -120,6 +113,16 @@
return TRUE return TRUE
/datum/tgui/proc/send_assets()
var/flush_queue = window.send_asset(get_asset_datum(
/datum/asset/simple/namespaced/fontawesome))
flush_queue |= window.send_asset(get_asset_datum(
/datum/asset/simple/namespaced/tgfont))
for(var/datum/asset/asset in src_object.ui_assets(user))
flush_queue |= window.send_asset(asset)
if (flush_queue)
user.client.browse_queue_flush()
/** /**
* public * public
* *

View File

@@ -136,7 +136,7 @@
if (uplink_computer?.opfor_data) if (uplink_computer?.opfor_data)
var/datum/opposing_force/opfor_data = uplink_computer.opfor_data var/datum/opposing_force/opfor_data = uplink_computer.opfor_data
data += get_header_data() data += list()
if (opfor_data.contractor_hub.current_contract) if (opfor_data.contractor_hub.current_contract)
data["ongoing_contract"] = TRUE data["ongoing_contract"] = TRUE

View File

@@ -18,7 +18,7 @@
story_list = generate_stories() story_list = generate_stories()
/datum/computer_file/program/news_archive/ui_data(mob/user) /datum/computer_file/program/news_archive/ui_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
return data return data
/datum/computer_file/program/news_archive/ui_static_data(mob/user) /datum/computer_file/program/news_archive/ui_static_data(mob/user)

View File

@@ -36,7 +36,7 @@ GLOBAL_LIST_INIT(purchasable_nifsofts, list(
return data return data
/datum/computer_file/program/nifsoft_downloader/ui_static_data(mob/user) /datum/computer_file/program/nifsoft_downloader/ui_static_data(mob/user)
var/list/data = get_header_data() var/list/data = list()
var/list/product_list = list() var/list/product_list = list()
var/mob/living/carbon/human/nif_user = user var/mob/living/carbon/human/nif_user = user

View File

@@ -78,14 +78,14 @@ export const NtosMain = (props, context) => {
selected={light_on} selected={light_on}
onClick={() => act('PC_toggle_light')} onClick={() => act('PC_toggle_light')}
/> />
<Button
icon="eject"
content="Eject ID"
disabled={!proposed_login.IDName}
onClick={() => act('PC_Eject_Disk', { name: 'ID' })}
/>
</> </>
)} )}
<Button
icon="eject"
content="Eject ID"
disabled={!proposed_login.IDName}
onClick={() => act('PC_Eject_Disk', { name: 'ID' })}
/>
{!!show_imprint && ( {!!show_imprint && (
<Button <Button
icon="dna" icon="dna"