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:
John Willard
2023-04-27 01:29:20 -04:00
committed by GitHub
parent 3c0d6a3897
commit 1c4166c81c
42 changed files with 145 additions and 234 deletions

View File

@@ -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