diff --git a/code/game/objects/items/devices/communicator/integrated.dm b/code/game/objects/items/devices/communicator/integrated.dm index 78066c5d17..a7171f9e5d 100644 --- a/code/game/objects/items/devices/communicator/integrated.dm +++ b/code/game/objects/items/devices/communicator/integrated.dm @@ -30,3 +30,9 @@ return src.attack_self(usr) + +/obj/item/communicator/integrated/tgui_static_data(mob/user) + . = ..() + if(isrobot(loc)) + var/mob/living/silicon/robot/robot_owner = loc + .["theme"] = robot_owner.get_ui_theme() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 3636f6b201..134d572ca9 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -143,6 +143,12 @@ ui = new(user, src, "Radio", name, parent_ui) ui.open() +/obj/item/radio/tgui_static_data(mob/user) + . = ..() + if(isrobot(loc)) + var/mob/living/silicon/robot/robot_owner = loc + .["theme"] = robot_owner.get_ui_theme() + /obj/item/radio/tgui_data(mob/user) var/data = list() @@ -163,9 +169,9 @@ data["chan_list"] = null if(syndie) - data["useSyndMode"] = 1 + data["useSyndMode"] = TRUE else - data["useSyndMode"] = 0 + data["useSyndMode"] = FALSE data["minFrequency"] = PUBLIC_LOW_FREQ diff --git a/code/modules/admin/modify_robot.dm b/code/modules/admin/modify_robot.dm index 9a88aa2413..1b2fd57ced 100644 --- a/code/modules/admin/modify_robot.dm +++ b/code/modules/admin/modify_robot.dm @@ -57,9 +57,7 @@ var/datum/asset/spritesheet_batched/robot_icons/spritesheet = GLOB.robot_sprite_sheets[target.modtype] if(target) - var/ui_theme = target.get_ui_theme() - if(ui_theme) - .["theme"] = ui_theme + .["theme"] = target.get_ui_theme() .["target"] = list() .["target"]["name"] = target.name .["target"]["ckey"] = target.ckey diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm index 0aaff63eb5..93d67cbe1c 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm @@ -310,7 +310,7 @@ "deliveryslot_3" = deliveryslot_3, "items_preserved" = items_preserved, "has_destructive_analyzer" = analyzer, - "techweb_name" = handler?.linked_web ? "[handler.linked_web.id] / [handler.linked_web.organization]" : "Disconnected", + "techweb_name" = handler?.linked_web ? "[handler.linked_web.id] / [handler.linked_web.organization]" : null ) return data /obj/item/dogborg/sleeper/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 72ff747b3a..1532ceeda5 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,7 +50,7 @@ var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not var/atom/movable/screen/robot_modules_background - var/ui_theme + var/ui_theme = "ntos" var/selecting_module = FALSE //3 Modules can be activated at any one time. diff --git a/code/modules/mob/living/silicon/robot/sprites/command.dm b/code/modules/mob/living/silicon/robot/sprites/command.dm index 2b283083bb..9802d54a10 100644 --- a/code/modules/mob/living/silicon/robot/sprites/command.dm +++ b/code/modules/mob/living/silicon/robot/sprites/command.dm @@ -52,6 +52,7 @@ ..() /datum/robot_sprite/dogborg/command + sprite_hud_icon_state = "clerical" name = "Commandhound V2" sprite_icon_state = "kcom" has_eye_light_sprites = TRUE diff --git a/code/modules/pda/ai.dm b/code/modules/pda/ai.dm index f1e703ffde..7ef6b223cc 100644 --- a/code/modules/pda/ai.dm +++ b/code/modules/pda/ai.dm @@ -34,6 +34,12 @@ /obj/item/pda/ai/can_use() return 1 +/obj/item/pda/ai/tgui_static_data(mob/user) + . = ..() + if(isrobot(loc)) + var/mob/living/silicon/robot/robot_owner = loc + .["theme"] = robot_owner.get_ui_theme() + /obj/item/pda/ai/attack_self(mob/user) . = ..(user) if(.) diff --git a/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm b/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm index 343970a1d9..2fd9be27cb 100644 --- a/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm +++ b/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm @@ -314,6 +314,13 @@ ui = new(user, src, "ExperimentConfigure", "[parent_atom ? "[parent_atom.name] | " : ""]Experiment Configuration") ui.open() +/datum/component/experiment_handler/tgui_static_data(mob/user) + . = ..() + var/atom/parent_atom = parent + if(isrobot(parent_atom.loc)) + var/mob/living/silicon/robot/owner_robot = parent_atom.loc + .["theme"] = owner_robot.get_ui_theme() + /datum/component/experiment_handler/tgui_data(mob/user) . = list( "always_active" = (config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE), diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index 7e87bb7dbb..cc085af092 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -172,6 +172,12 @@ ui = new(user, src, "XenoarchDepthScanner", name) ui.open() +/obj/item/depth_scanner/tgui_static_data(mob/user) + . = ..() + if(isrobot(loc)) + var/mob/living/silicon/robot/robot_owner = loc + .["theme"] = robot_owner.get_ui_theme() + /obj/item/depth_scanner/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() diff --git a/tgui/packages/tgui/interfaces/BorgHypo/index.tsx b/tgui/packages/tgui/interfaces/BorgHypo/index.tsx index 120f5024ad..8fc0be7c34 100644 --- a/tgui/packages/tgui/interfaces/BorgHypo/index.tsx +++ b/tgui/packages/tgui/interfaces/BorgHypo/index.tsx @@ -11,11 +11,7 @@ export const BorgHypo = (props) => { const { data } = useBackend(); const { isDispensingDrinks, theme } = data; return ( - + diff --git a/tgui/packages/tgui/interfaces/BorgHypo/types.ts b/tgui/packages/tgui/interfaces/BorgHypo/types.ts index a5a011586a..8d30813e0a 100644 --- a/tgui/packages/tgui/interfaces/BorgHypo/types.ts +++ b/tgui/packages/tgui/interfaces/BorgHypo/types.ts @@ -14,5 +14,5 @@ export type Data = { selectedRecipeId: string; uiChemicalSearch: string; isDispensingDrinks: BooleanLike; - theme: string | null; + theme: string; }; diff --git a/tgui/packages/tgui/interfaces/Communicator/index.tsx b/tgui/packages/tgui/interfaces/Communicator/index.tsx index e795beba33..6af4549b56 100644 --- a/tgui/packages/tgui/interfaces/Communicator/index.tsx +++ b/tgui/packages/tgui/interfaces/Communicator/index.tsx @@ -25,7 +25,7 @@ import type { Data } from './types'; export const Communicator = () => { const { act, data } = useBackend(); - const { currentTab, video_comm } = data; + const { theme, currentTab, video_comm } = data; const tab: React.JSX.Element[] = []; @@ -49,7 +49,7 @@ export const Communicator = () => { tab[tabs[9]] = ; return ( - + {video_comm && ( (); - const { always_active, has_start_callback } = data; + const { theme, always_active, has_start_callback } = data; const techwebs = data.techwebs ?? []; @@ -205,7 +206,7 @@ export function ExperimentConfigure(props) { } return ( - +
diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx index 8e3714e21f..86a509bebb 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx @@ -147,11 +147,7 @@ export const ModifyRobot = (props) => { ); return ( - + diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/types.ts b/tgui/packages/tgui/interfaces/ModifyRobot/types.ts index 65fc3af5ef..483ed35c20 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/types.ts +++ b/tgui/packages/tgui/interfaces/ModifyRobot/types.ts @@ -38,7 +38,7 @@ export type Data = { law_sets: law_pack[]; active_ais: DropdownEntry[]; selected_ai: string | null; - theme: string | null; + theme: string; }; export type DropdownEntry = { diff --git a/tgui/packages/tgui/interfaces/Pda/index.tsx b/tgui/packages/tgui/interfaces/Pda/index.tsx index 8fb241bace..c394d39011 100644 --- a/tgui/packages/tgui/interfaces/Pda/index.tsx +++ b/tgui/packages/tgui/interfaces/Pda/index.tsx @@ -14,6 +14,7 @@ import { import type { BooleanLike } from 'tgui-core/react'; type Data = { + theme?: string; owner: string; ownjob: string; idInserted: BooleanLike; @@ -57,13 +58,13 @@ function getPdaApp(name: string): () => React.JSX.Element { export const Pda = (props) => { const { data } = useBackend(); - const { app, owner, useRetro } = data; + const { theme, app, owner, useRetro } = data; const [settingsMode, setSettingsMode] = useState(false); if (!owner) { return ( - +
Warning: No ID information found! Please swipe ID! @@ -76,7 +77,7 @@ export const Pda = (props) => { const App = getPdaApp(app.template); return ( - + { const { act, data } = useBackend(); const { + theme, rawfreq, minFrequency, maxFrequency, @@ -66,7 +68,11 @@ export const Radio = (props) => { height += 38; } return ( - +
diff --git a/tgui/packages/tgui/interfaces/RobotChoose/index.tsx b/tgui/packages/tgui/interfaces/RobotChoose/index.tsx index 9934ee835c..9810ba788e 100644 --- a/tgui/packages/tgui/interfaces/RobotChoose/index.tsx +++ b/tgui/packages/tgui/interfaces/RobotChoose/index.tsx @@ -24,7 +24,7 @@ export const RobotChoose = (props) => { } = data; return ( - + diff --git a/tgui/packages/tgui/interfaces/RobotChoose/types.ts b/tgui/packages/tgui/interfaces/RobotChoose/types.ts index 4655e977fe..adfe7cd320 100644 --- a/tgui/packages/tgui/interfaces/RobotChoose/types.ts +++ b/tgui/packages/tgui/interfaces/RobotChoose/types.ts @@ -4,7 +4,7 @@ export type Data = { possible_sprites?: spriteOption[]; currentName: string; isDefaultName: boolean; - theme: string | null; + theme: string; selected_module?: string; sprite_datum?: string | null; sprite_datum_class?: string | null; diff --git a/tgui/packages/tgui/interfaces/RobotDecals.tsx b/tgui/packages/tgui/interfaces/RobotDecals.tsx index 8cddea6498..2eb42dae3f 100644 --- a/tgui/packages/tgui/interfaces/RobotDecals.tsx +++ b/tgui/packages/tgui/interfaces/RobotDecals.tsx @@ -5,7 +5,7 @@ import { Box, Button, Input, Section, Stack } from 'tgui-core/components'; import { createSearch } from 'tgui-core/string'; type Data = { - theme: string | null; + theme: string; all_decals?: string[] | null; all_animations?: string[] | null; active_decals: string[]; @@ -28,7 +28,7 @@ export const RobotDecals = () => { const filteredAnimations = all_animations?.filter(animationSearcher) ?? []; return ( - + diff --git a/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperButtons.tsx b/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperButtons.tsx index 3963e52941..7418bf7455 100644 --- a/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperButtons.tsx +++ b/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperButtons.tsx @@ -5,22 +5,10 @@ import type { Data } from '../../types'; export const SleeperButtons = (props) => { const { act, data } = useBackend(); - const { - eject_port, - cleaning, - medsensor, - name, - has_destructive_analyzer, - techweb_name, - } = data; + const { eject_port, cleaning, medsensor, name } = data; return ( <> - {has_destructive_analyzer && ( - - Tech Web: {techweb_name} - - )} diff --git a/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperStatusPanel.tsx b/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperStatusPanel.tsx index f41f9009d7..1264e05952 100644 --- a/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperStatusPanel.tsx +++ b/tgui/packages/tgui/interfaces/RobotSleeper/SubElements/SleeperStatusElements/SleeperStatusPanel.tsx @@ -16,12 +16,27 @@ export const SleeperStatusPanel = (props: { name: string }) => { ore_storage, current_capacity, max_ore_storage, + has_destructive_analyzer, + techweb_name, } = data; const { name } = props; return (
+ {!!has_destructive_analyzer && ( + <> + + + Tech Web: + + + {` ${techweb_name || 'Disconnected'}`} + + + + + )} {(!!delivery || !!compactor) && !!contents.length && ( <> diff --git a/tgui/packages/tgui/interfaces/RobotSleeper/index.tsx b/tgui/packages/tgui/interfaces/RobotSleeper/index.tsx index 3fcb3be84c..abd84d83fb 100644 --- a/tgui/packages/tgui/interfaces/RobotSleeper/index.tsx +++ b/tgui/packages/tgui/interfaces/RobotSleeper/index.tsx @@ -11,7 +11,7 @@ export const RobotSleeper = (props) => { const { theme, chems, delivery, name } = data; return ( - + {!!chems && ( diff --git a/tgui/packages/tgui/interfaces/RobotSleeper/types.ts b/tgui/packages/tgui/interfaces/RobotSleeper/types.ts index 737d212b70..5b248dd4eb 100644 --- a/tgui/packages/tgui/interfaces/RobotSleeper/types.ts +++ b/tgui/packages/tgui/interfaces/RobotSleeper/types.ts @@ -2,7 +2,7 @@ import type { BooleanLike } from 'tgui-core/react'; export type Data = { name?: string; - theme: string | null; + theme: string; chems?: RobotChem[]; our_patient: Patient | null; @@ -23,7 +23,7 @@ export type Data = { deliveryslot_3: string[]; items_preserved: string[]; has_destructive_analyzer: BooleanLike; - techweb_name: string; + techweb_name: string | null; }; export type RobotChem = { id: string; name: string }; diff --git a/tgui/packages/tgui/interfaces/Robotact/index.tsx b/tgui/packages/tgui/interfaces/Robotact/index.tsx index b4f2ea8ec3..ffd9f36a32 100644 --- a/tgui/packages/tgui/interfaces/Robotact/index.tsx +++ b/tgui/packages/tgui/interfaces/Robotact/index.tsx @@ -18,7 +18,7 @@ export const Robotact = (props) => { } return ( - + {content} ); diff --git a/tgui/packages/tgui/interfaces/Robotact/types.ts b/tgui/packages/tgui/interfaces/Robotact/types.ts index 57ff18c583..b5f9a7e87c 100644 --- a/tgui/packages/tgui/interfaces/Robotact/types.ts +++ b/tgui/packages/tgui/interfaces/Robotact/types.ts @@ -31,7 +31,7 @@ export type Data = { max_health: number; light_color: string; - theme: string | null; + theme: string; // Modules modules_static: Module[]; diff --git a/tgui/packages/tgui/interfaces/XenoarchDepthScanner.tsx b/tgui/packages/tgui/interfaces/XenoarchDepthScanner.tsx index d1074f3ab5..b186f99247 100644 --- a/tgui/packages/tgui/interfaces/XenoarchDepthScanner.tsx +++ b/tgui/packages/tgui/interfaces/XenoarchDepthScanner.tsx @@ -3,6 +3,7 @@ import { Window } from 'tgui/layouts'; import { Box, Button, LabeledList, Section } from 'tgui-core/components'; type Data = { + theme?: string; current: { index: string; time: string; @@ -16,10 +17,10 @@ type Data = { export const XenoarchDepthScanner = (props) => { const { act, data } = useBackend(); - const { current, positive_locations } = data; + const { theme, current, positive_locations } = data; return ( - + {(Object.keys(current).length && (