From c7d4807fb12b40c3a988b643fb0d356646405a6c Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Sep 2024 14:51:45 -0700 Subject: [PATCH] let's just leave this on tbh --- code/_compile_options.dm | 2 +- .../carbon/human/ai/ai_management_menu.dm | 22 +++--- .../tgui/interfaces/HumanAIManager.tsx | 74 +++++++++++-------- 3 files changed, 56 insertions(+), 42 deletions(-) diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 7545d04b30..1c3f335a57 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -38,6 +38,6 @@ //#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between -//#define TESTING +#define TESTING // #define REFERENCE_TRACKING // #define GC_FAILURE_HARD_LOOKUP diff --git a/code/modules/mob/living/carbon/human/ai/ai_management_menu.dm b/code/modules/mob/living/carbon/human/ai/ai_management_menu.dm index 587784c358..b11b4f070b 100644 --- a/code/modules/mob/living/carbon/human/ai/ai_management_menu.dm +++ b/code/modules/mob/living/carbon/human/ai/ai_management_menu.dm @@ -14,13 +14,6 @@ /datum/human_ai_management_menu/ui_data(mob/user) var/list/data = list() - //data["on_cooldown"] = !COOLDOWN_FINISHED(src, panel_emote_cooldown) - - return data - -/datum/human_ai_management_menu/ui_static_data(mob/user) - var/list/data = list() - data["orders"] = list() for(var/datum/ongoing_action/order as anything in SShuman_ai.existing_orders) data["orders"] += list(list( @@ -62,6 +55,11 @@ return data +/datum/human_ai_management_menu/ui_static_data(mob/user) + var/list/data = list() + + return data + /datum/human_ai_management_menu/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if(.) @@ -81,7 +79,7 @@ if("create_squad") SShuman_ai.create_new_squad() - update_static_data(usr, ui) + //update_static_data(usr, ui) return TRUE if("assign_to_squad") @@ -90,7 +88,7 @@ var/datum/brain = locate(params["ai"]) brain:add_to_squad(params["squad"]) - update_static_data(usr, ui) + //update_static_data(usr, ui) return TRUE if("assign_order") @@ -99,7 +97,7 @@ var/datum/human_ai_squad/squad = SShuman_ai.get_squad("[params["squad"]]") squad.set_order(locate(params["order"])) - update_static_data(usr, ui) + //update_static_data(usr, ui) return TRUE if("assign_sl") @@ -109,11 +107,11 @@ var/datum/brain = locate(params["ai"]) var/datum/human_ai_squad/squad = SShuman_ai.get_squad("[params["squad"]]") squad.set_squad_leader(brain) - update_static_data(usr, ui) + //update_static_data(usr, ui) return TRUE if("refresh") - update_static_data(usr, ui) + //update_static_data(usr, ui) return TRUE /client/proc/open_human_ai_management_panel() diff --git a/tgui/packages/tgui/interfaces/HumanAIManager.tsx b/tgui/packages/tgui/interfaces/HumanAIManager.tsx index 1e7798006a..0ca920697e 100644 --- a/tgui/packages/tgui/interfaces/HumanAIManager.tsx +++ b/tgui/packages/tgui/interfaces/HumanAIManager.tsx @@ -1,5 +1,16 @@ import { useBackend, useLocalState } from '../backend'; -import { Box, Button, LabeledList, NoticeBox, ProgressBar, Section, Dimmer, Stack, Tabs, Divider } from '../components'; +import { + Box, + Button, + LabeledList, + NoticeBox, + ProgressBar, + Section, + Dimmer, + Stack, + Tabs, + Divider, +} from '../components'; import { Window } from '../layouts'; import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; import { classes, BooleanLike } from 'common/react'; @@ -41,12 +52,10 @@ const AIContext = (props, context) => { const { data, act } = useBackend(context); const [squadAssignmentMode, setSquadAssignmentMode] = useLocalState( context, - 'squad_assignment_mode', false ); const [orderAssignmentMode, setOrderAssignmentMode] = useLocalState( context, - 'order_assignment_mode', false ); return ( @@ -54,26 +63,29 @@ const AIContext = (props, context) => {
+ }} + >
+ }} + >
+ }} + >
+ }} + >