mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 19:11:51 +00:00
Tablet UI update (mostly fixes) (#74844)
## About The Pull Request Tablet UIs are now changed when opening/closing an app, instead of constantly checking for a UI change every ui update. Program UI acts no longer call parent, as it was unnecessary, Computers are the ones that should be calling it. Fixes a ton of problems with static data not updating, such as in Messenger, ID management, Siliconnect, and Chat client Chat Client's Admin mode also works again, which was broken when accesses to check was turned into a list. Turns a few lists in Robocontrol into static ones when we aren't changing anything, and makes it actually scan your ID's access. Fixes budget ordering being unable to show the cart/call the cargo shuttle. ## Why It's Good For The Game While I can't seem to find a single issue report on any of the above, these are still problems that should be fixed. ## Changelog 🆑 fix: SiliConnect can download borg logs again. fix: The RD can once again enable Admin mode on Wirecarp fix: NT IRN can once again see the shopping cart and call the cargo shuttle. fix: Chat Client, ID Management and Messenger should now update their UIs properly. code: PDAs will hopefully not lag as much when clicking on buttons (such as in ID management). /🆑
This commit is contained in:
@@ -53,6 +53,10 @@
|
||||
temp.usage_flags = usage_flags
|
||||
return temp
|
||||
|
||||
///We are not calling parent as it's handled by the computer itself, this is only called after.
|
||||
/datum/computer_file/program/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
|
||||
// Relays icon update to the computer.
|
||||
/datum/computer_file/program/proc/update_computer_icon()
|
||||
if(computer)
|
||||
|
||||
@@ -98,11 +98,7 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/computer_file/program/ai_restorer/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
/datum/computer_file/program/ai_restorer/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_beginReconstruction")
|
||||
if(!stored_card || !stored_card.AI)
|
||||
|
||||
@@ -40,10 +40,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/datum/computer_file/program/ntnet_dos/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/ntnet_dos/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_target_relay")
|
||||
for(var/obj/machinery/ntnet_relay/relays as anything in GLOB.ntnet_relays)
|
||||
|
||||
@@ -39,10 +39,7 @@
|
||||
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(.)
|
||||
return
|
||||
/datum/computer_file/program/revelation/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_arm")
|
||||
armed = !armed
|
||||
|
||||
@@ -94,11 +94,7 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/arcade/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
usr.played_game()
|
||||
|
||||
var/gamerSkillLevel = 0
|
||||
var/gamerSkill = 0
|
||||
if(usr?.mind)
|
||||
|
||||
@@ -68,9 +68,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/atmosscan/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("scantoggle")
|
||||
if(atmozphere_mode == ATMOZPHERE_SCAN_CLICK)
|
||||
|
||||
@@ -62,8 +62,7 @@
|
||||
loglist.Insert(1,"System log of unit [DL_source.name]")
|
||||
DL_progress = -1
|
||||
DL_source = null
|
||||
for(var/datum/tgui/window in SStgui.open_uis_by_src[REF(src)])
|
||||
window.send_full_update()
|
||||
update_static_data_for_all_viewers()
|
||||
return
|
||||
|
||||
DL_progress += 25
|
||||
@@ -108,10 +107,7 @@
|
||||
data["borglog"] = loglist
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/borg_monitor/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/borg_monitor/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("messagebot")
|
||||
var/mob/living/silicon/robot/R = locate(params["ref"]) in GLOB.silicon_mobs
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/bounty_board/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/current_ref_num = params["request"]
|
||||
var/current_app_num = params["applicant"]
|
||||
var/datum/bank_account/request_target
|
||||
|
||||
@@ -121,18 +121,31 @@
|
||||
if(SSshuttle.supply_blocked)
|
||||
message = blockade_warning
|
||||
data["message"] = message
|
||||
data["cart"] = list()
|
||||
for(var/datum/supply_order/SO in SSshuttle.shopping_list)
|
||||
data["cart"] += list(list(
|
||||
"cost_type" = SO.cost_type,
|
||||
"object" = SO.pack.name,
|
||||
"cost" = SO.pack.get_cost(),
|
||||
"id" = SO.id,
|
||||
"orderer" = SO.orderer,
|
||||
"paid" = !isnull(SO.paying_account), //paid by requester
|
||||
"dep_order" = !!SO.department_destination,
|
||||
"can_be_cancelled" = SO.can_be_cancelled,
|
||||
var/cart_list = list()
|
||||
for(var/datum/supply_order/order in SSshuttle.shopping_list)
|
||||
if(cart_list[order.pack.name])
|
||||
cart_list[order.pack.name][1]["amount"]++
|
||||
cart_list[order.pack.name][1]["cost"] += order.get_final_cost()
|
||||
if(order.department_destination)
|
||||
cart_list[order.pack.name][1]["dep_order"]++
|
||||
if(!isnull(order.paying_account))
|
||||
cart_list[order.pack.name][1]["paid"]++
|
||||
continue
|
||||
|
||||
cart_list[order.pack.name] = list(list(
|
||||
"cost_type" = order.cost_type,
|
||||
"object" = order.pack.name,
|
||||
"cost" = order.get_final_cost(),
|
||||
"id" = order.id,
|
||||
"amount" = 1,
|
||||
"orderer" = order.orderer,
|
||||
"paid" = !isnull(order.paying_account) ? 1 : 0, //number of orders purchased privatly
|
||||
"dep_order" = order.department_destination ? 1 : 0, //number of orders purchased by a department
|
||||
"can_be_cancelled" = order.can_be_cancelled,
|
||||
))
|
||||
data["cart"] = list()
|
||||
for(var/item_id in cart_list)
|
||||
data["cart"] += cart_list[item_id]
|
||||
|
||||
data["requests"] = list()
|
||||
for(var/datum/supply_order/SO in SSshuttle.request_list)
|
||||
@@ -147,9 +160,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/budgetorders/ui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("send")
|
||||
if(!SSshuttle.supply.canMove())
|
||||
|
||||
@@ -87,10 +87,7 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/computer_file/program/card_mod/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/card_mod/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
var/mob/user = usr
|
||||
var/obj/item/card/id/inserted_auth_card = computer.computer_id_slot
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/shipping/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!computer.computer_id_slot) //We need an ID to successfully run
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/crew_manifest/ui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PRG_print")
|
||||
if(computer) //This option should never be called if there is no printer
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
var/open_file
|
||||
var/error
|
||||
|
||||
/datum/computer_file/program/filemanager/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/filemanager/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_deletefile")
|
||||
var/datum/computer_file/file = computer.find_file_by_name(params["name"])
|
||||
|
||||
@@ -164,10 +164,7 @@
|
||||
data["purchaseableBoosts"][partner.type] += node_id
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/scipaper_program/ui_act(action, params)
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
/datum/computer_file/program/scipaper_program/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("et_alia")
|
||||
paper_to_be.et_alia = !paper_to_be.et_alia
|
||||
|
||||
@@ -15,7 +15,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
var/change_position_cooldown = 30
|
||||
///Jobs blacklisted from having their slots edited.
|
||||
var/list/blacklisted = list(
|
||||
var/static/list/blacklisted = list(
|
||||
JOB_CAPTAIN,
|
||||
JOB_HEAD_OF_PERSONNEL,
|
||||
JOB_HEAD_OF_SECURITY,
|
||||
@@ -36,7 +36,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/list/opened_positions = list()
|
||||
|
||||
/datum/computer_file/program/job_management/New()
|
||||
..()
|
||||
. = ..()
|
||||
change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay)
|
||||
|
||||
|
||||
@@ -67,9 +67,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
|
||||
/datum/computer_file/program/job_management/ui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/obj/item/card/id/user_id = computer.computer_id_slot
|
||||
if(!user_id || !(ACCESS_CHANGE_IDS in user_id.access))
|
||||
return TRUE
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
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")
|
||||
|
||||
@@ -42,7 +42,4 @@
|
||||
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, state)
|
||||
return controlled_suit?.ui_act(action, params, ui, state)
|
||||
|
||||
@@ -18,9 +18,11 @@
|
||||
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)
|
||||
var/datum/tgui/active_ui = SStgui.get_open_ui(user, computer)
|
||||
if(active_ui)
|
||||
active_ui.send_full_update(force = TRUE)
|
||||
|
||||
/datum/computer_file/program/maintenance/phys_scanner/ui_data(mob/user)
|
||||
/datum/computer_file/program/maintenance/phys_scanner/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["last_record"] = last_record
|
||||
return data
|
||||
|
||||
@@ -22,16 +22,10 @@
|
||||
return ..()
|
||||
|
||||
/datum/computer_file/program/newscaster/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data += newscaster_ui.ui_data(user)
|
||||
return data
|
||||
return newscaster_ui.ui_data(user)
|
||||
|
||||
/datum/computer_file/program/newscaster/ui_static_data(mob/user)
|
||||
var/list/data = newscaster_ui.ui_static_data(user)
|
||||
return data
|
||||
return newscaster_ui.ui_static_data(user)
|
||||
|
||||
/datum/computer_file/program/newscaster/ui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
return newscaster_ui.ui_act(action, params, ui)
|
||||
/datum/computer_file/program/newscaster/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
return newscaster_ui.ui_act(action, params, ui, state)
|
||||
|
||||
@@ -13,13 +13,10 @@
|
||||
bringing you the best in electronics and software since 2467!"
|
||||
|
||||
/datum/computer_file/program/notepad/ui_act(action, list/params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("UpdateNote")
|
||||
written_note = params["newnote"]
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/notepad/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
var/wanted_token
|
||||
|
||||
/datum/computer_file/program/nt_pay/ui_act(action, list/params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("Transaction")
|
||||
token = params["token"]
|
||||
|
||||
@@ -98,10 +98,7 @@
|
||||
download_netspeed = NTNETSPEED_ETHERNET
|
||||
download_completion += download_netspeed
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/ntnetdownload/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_downloadfile")
|
||||
if(!downloaded_file)
|
||||
@@ -150,7 +147,7 @@
|
||||
"installed" = !!computer.find_file_by_name(programs.filename),
|
||||
"compatible" = check_compatibility(programs),
|
||||
"size" = programs.size,
|
||||
"access" = (computer.obj_flags & 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,
|
||||
))
|
||||
|
||||
|
||||
@@ -105,9 +105,6 @@
|
||||
return GLOB.default_state
|
||||
|
||||
/datum/computer_file/program/messenger/ui_act(action, list/params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PDA_ringSet")
|
||||
var/new_ringtone = tgui_input_text(usr, "Enter a new ringtone", "Ringtone", ringtone, MESSENGER_RINGTONE_MAX_LENGTH)
|
||||
@@ -119,27 +116,27 @@
|
||||
return
|
||||
|
||||
ringtone = new_ringtone
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_ringer_status")
|
||||
ringer_status = !ringer_status
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_sAndR")
|
||||
sending_and_receiving = !sending_and_receiving
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_viewMessages")
|
||||
viewing_messages = !viewing_messages
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_clearMessages")
|
||||
messages = list()
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_changeSortStyle")
|
||||
sort_by_job = !sort_by_job
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_sendEveryone")
|
||||
if(!sending_and_receiving)
|
||||
@@ -158,7 +155,7 @@
|
||||
if(targets.len > 0)
|
||||
send_message(usr, targets, TRUE)
|
||||
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_sendMessage")
|
||||
if(!sending_and_receiving)
|
||||
@@ -182,19 +179,20 @@
|
||||
var/obj/item/computer_disk/virus/disk = computer.inserted_disk
|
||||
if(istype(disk))
|
||||
disk.send_virus(computer, target, usr)
|
||||
return UI_UPDATE
|
||||
update_static_data(usr, ui)
|
||||
return TRUE
|
||||
|
||||
send_message(usr, list(target))
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_clearPhoto")
|
||||
saved_image = null
|
||||
photo_path = null
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_toggleVirus")
|
||||
sending_virus = !sending_virus
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
|
||||
if("PDA_selectPhoto")
|
||||
if(!issilicon(usr))
|
||||
@@ -210,18 +208,15 @@
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/messenger/ui_static_data(mob/user)
|
||||
var/list/data = ..()
|
||||
|
||||
var/list/data = list()
|
||||
data["owner"] = computer.saved_identification
|
||||
data["sortByJob"] = sort_by_job
|
||||
data["isSilicon"] = issilicon(user)
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/messenger/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["messages"] = messages
|
||||
data["sortByJob"] = sort_by_job
|
||||
data["isSilicon"] = issilicon(user)
|
||||
data["messengers"] = ScrubMessengerList()
|
||||
data["ringer_status"] = ringer_status
|
||||
data["sending_and_receiving"] = sending_and_receiving
|
||||
@@ -233,7 +228,6 @@
|
||||
if(disk && istype(disk))
|
||||
data["virus_attach"] = TRUE
|
||||
data["sending_virus"] = sending_virus
|
||||
|
||||
return data
|
||||
|
||||
//////////////////////
|
||||
|
||||
@@ -47,10 +47,7 @@
|
||||
active_channel = new_converstaion.id
|
||||
return new_converstaion
|
||||
|
||||
/datum/computer_file/program/chatclient/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/chatclient/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
var/datum/ntnet_conversation/channel = SSmodular_computers.get_chat_channel_by_id(active_channel)
|
||||
var/authed = FALSE
|
||||
if(channel && ((channel.channel_operator == src) || netadmin_mode))
|
||||
@@ -101,13 +98,13 @@
|
||||
if(netadmin_mode)
|
||||
netadmin_mode = FALSE
|
||||
channel?.add_client(src)
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
var/mob/living/user = usr
|
||||
if(can_run(user, TRUE, ACCESS_NETWORK))
|
||||
if(can_run(user, TRUE, list(ACCESS_NETWORK)))
|
||||
for(var/datum/ntnet_conversation/channels as anything in SSmodular_computers.chat_channels)
|
||||
channels.remove_client(src)
|
||||
netadmin_mode = TRUE
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
if("PRG_changename")
|
||||
var/newname = reject_bad_chattext(params["new_name"], USERNAME_SIZE)
|
||||
newname = replacetext(newname, " ", "_")
|
||||
@@ -117,7 +114,7 @@
|
||||
if(src in anychannel.active_clients)
|
||||
anychannel.add_status_message("[username] is now known as [newname].")
|
||||
username = newname
|
||||
return UI_UPDATE
|
||||
return TRUE
|
||||
if("PRG_savelog")
|
||||
if(!channel)
|
||||
return
|
||||
@@ -209,16 +206,11 @@
|
||||
|
||||
/datum/computer_file/program/chatclient/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["can_admin"] = can_run(user, FALSE, ACCESS_NETWORK)
|
||||
data["selfref"] = REF(src) //used to verify who is you, as usernames can be copied.
|
||||
data["username"] = username
|
||||
data["adminmode"] = netadmin_mode
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/chatclient/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
if(!SSmodular_computers.chat_channels)
|
||||
return data
|
||||
|
||||
var/list/all_channels = list()
|
||||
for(var/datum/ntnet_conversation/conversations as anything in SSmodular_computers.chat_channels)
|
||||
@@ -261,6 +253,9 @@
|
||||
data["messages"] = messages
|
||||
data["is_operator"] = (channel.channel_operator == src) || netadmin_mode
|
||||
|
||||
data["username"] = username
|
||||
data["adminmode"] = netadmin_mode
|
||||
data["can_admin"] = can_run(user, FALSE, list(ACCESS_NETWORK))
|
||||
data["authed"] = authed
|
||||
return data
|
||||
|
||||
|
||||
@@ -43,10 +43,7 @@
|
||||
get_asset_datum(/datum/asset/simple/portraits)
|
||||
)
|
||||
|
||||
/datum/computer_file/program/portrait_printer/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/portrait_printer/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("search")
|
||||
if(search_string != params["to_search"])
|
||||
|
||||
@@ -62,10 +62,7 @@
|
||||
data["target"] = trackinfo
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/radar/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/radar/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("selecttarget")
|
||||
selected = params["ref"]
|
||||
|
||||
@@ -63,9 +63,7 @@
|
||||
|
||||
return all_records
|
||||
|
||||
|
||||
|
||||
/datum/computer_file/program/records/ui_data(mob/user)
|
||||
/datum/computer_file/program/records/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["records"] = GetRecordsReadable()
|
||||
data["mode"] = mode
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
///Access granted by the used to summon robots.
|
||||
var/list/current_access = list()
|
||||
///List of all ping types you can annoy drones with.
|
||||
var/list/drone_ping_types = list(
|
||||
var/static/list/drone_ping_types = list(
|
||||
"Low",
|
||||
"Medium",
|
||||
"High",
|
||||
@@ -84,18 +84,15 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/robocontrol/ui_act(action, list/params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
var/mob/current_user = ui.user
|
||||
var/obj/item/card/id/id_card = computer?.computer_id_slot
|
||||
|
||||
var/list/standard_actions = list(
|
||||
var/static/list/standard_actions = list(
|
||||
"patroloff",
|
||||
"patrolon",
|
||||
"ejectpai",
|
||||
)
|
||||
var/list/MULE_actions = list(
|
||||
var/static/list/MULE_actions = list(
|
||||
"stop",
|
||||
"go",
|
||||
"home",
|
||||
@@ -110,13 +107,13 @@
|
||||
)
|
||||
var/mob/living/simple_animal/bot/simple_bot = locate(params["robot"]) in GLOB.bots_list
|
||||
if (action in standard_actions)
|
||||
simple_bot.bot_control(action, current_user, current_access)
|
||||
simple_bot.bot_control(action, current_user, id_card?.GetAccess())
|
||||
if (action in MULE_actions)
|
||||
simple_bot.bot_control(action, current_user, current_access, TRUE)
|
||||
simple_bot.bot_control(action, current_user, id_card?.GetAccess(), TRUE)
|
||||
|
||||
switch(action)
|
||||
if("summon")
|
||||
simple_bot.bot_control(action, current_user, id_card ? id_card.access : current_access)
|
||||
simple_bot.bot_control(action, current_user, id_card ? id_card.access : id_card?.GetAccess())
|
||||
if("ejectcard")
|
||||
if(!computer || !computer.computer_id_slot)
|
||||
return
|
||||
|
||||
@@ -84,10 +84,7 @@
|
||||
data["borgUpgrades"] = cyborg.upgrades
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/robotact/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/robotact/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
//Implied type, memes
|
||||
var/obj/item/modular_computer/pda/silicon/tablet = computer
|
||||
var/mob/living/silicon/robot/cyborg = tablet.silicon_owner
|
||||
@@ -140,17 +137,3 @@
|
||||
return
|
||||
if(cyborg.emagged || istype(cyborg, /mob/living/silicon/robot/model/syndicate)) //This option shouldn't even be showing otherwise
|
||||
cyborg.self_destruct(cyborg)
|
||||
|
||||
/**
|
||||
* Forces a full update of the UI, if currently open.
|
||||
*
|
||||
* Forces an update that includes refreshing ui_static_data. Called by
|
||||
* law changes and borg log additions.
|
||||
*/
|
||||
/datum/computer_file/program/robotact/proc/force_full_update()
|
||||
if(!istype(computer, /obj/item/modular_computer/pda/silicon))
|
||||
return
|
||||
var/obj/item/modular_computer/pda/silicon/tablet = computer
|
||||
var/datum/tgui/active_ui = SStgui.get_open_ui(tablet.silicon_owner, src)
|
||||
if(active_ui)
|
||||
active_ui.send_full_update()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
)
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/secureye/ui_static_data()
|
||||
/datum/computer_file/program/secureye/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["mapRef"] = cam_screen.assigned_map
|
||||
var/list/cameras = get_available_cameras()
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/secureye/ui_act(action, params)
|
||||
/datum/computer_file/program/secureye/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/signal_commander/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("signal")
|
||||
INVOKE_ASYNC(src, PROC_REF(signal))
|
||||
|
||||
@@ -51,9 +51,6 @@
|
||||
return null
|
||||
|
||||
/datum/computer_file/program/skill_tracker/ui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PRG_reward")
|
||||
var/skill_type = find_skilltype(params["skill"])
|
||||
|
||||
@@ -54,10 +54,7 @@
|
||||
data["focus_uid"] = focused_supermatter?.uid
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/supermatter_monitor/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/supermatter_monitor/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_refresh")
|
||||
refresh()
|
||||
|
||||
@@ -63,9 +63,6 @@
|
||||
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(.)
|
||||
return
|
||||
switch(action)
|
||||
if("setStatusMessage")
|
||||
upper_text = reject_bad_text(params["upperText"] || "", MAX_STATUS_LINE_LENGTH)
|
||||
@@ -78,7 +75,6 @@
|
||||
/datum/computer_file/program/status/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["maxStatusLineLength"] = MAX_STATUS_LINE_LENGTH
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/status/ui_data(mob/user)
|
||||
|
||||
@@ -89,9 +89,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/science/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
// Check if the console is locked to block any actions occuring
|
||||
if (locked && action != "toggleLock")
|
||||
computer.say("Console is locked, cannot perform further actions.")
|
||||
|
||||
@@ -24,10 +24,7 @@
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/themeify/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/datum/computer_file/program/themeify/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("PRG_change_theme")
|
||||
var/selected_theme = params["selected_theme"]
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
program_icon = "network-wired"
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_act(action, list/params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("resetIDS")
|
||||
SSmodular_computers.intrusion_detection_alarm = FALSE
|
||||
|
||||
Reference in New Issue
Block a user