From dcb02d590c0e25645f8980bb0662d6efbc13fbb5 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 1 Apr 2024 23:01:30 +0300 Subject: [PATCH] Tweaks and fixes --- code/_onclick/drag_drop.dm | 2 +- .../xeno/ai_behavior_overrides/base_override_behavior.dm | 7 ++++--- code/modules/admin/game_master/game_master.dm | 6 ++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index 14c4822e1e..b1a0aa8618 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -9,7 +9,7 @@ if(!usr || !over) return spawn(0) - if(over && usr.client) + if(usr.client) usr.client.select_box_wrapper(src, over) if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows diff --git a/code/datums/components/xeno/ai_behavior_overrides/base_override_behavior.dm b/code/datums/components/xeno/ai_behavior_overrides/base_override_behavior.dm index baa04af3bb..463ceef44d 100644 --- a/code/datums/components/xeno/ai_behavior_overrides/base_override_behavior.dm +++ b/code/datums/components/xeno/ai_behavior_overrides/base_override_behavior.dm @@ -67,11 +67,12 @@ GLOBAL_LIST_EMPTY(all_ai_behavior_overrides) RegisterSignal(processing_xeno, COMSIG_PARENT_QDELETING, PROC_REF(remove_from_queue), TRUE) currently_assigned |= processing_xeno + else if(!LAZYLEN(currently_assigned)) + qdel(component_to_remove) + return TRUE /datum/component/ai_behavior_override/proc/remove_from_queue(mob/removed_xeno) SIGNAL_HANDLER - if(currently_assigned) - currently_assigned -= removed_xeno - + LAZYREMOVE(currently_assigned, removed_xeno) UnregisterSignal(removed_xeno, COMSIG_PARENT_QDELETING) diff --git a/code/modules/admin/game_master/game_master.dm b/code/modules/admin/game_master/game_master.dm index fe558ec431..10f750bbe6 100644 --- a/code/modules/admin/game_master/game_master.dm +++ b/code/modules/admin/game_master/game_master.dm @@ -250,6 +250,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100) reset_click_overrides() behavior_click_intercept = TRUE current_click_intercept_action = BEHAVIOR_CLICK_INTERCEPT_ACTION + game_master_client.show_popup_menus = FALSE return //Objective Section @@ -314,6 +315,8 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100) if(user_client?.click_intercept == src) user_client.click_intercept = null + game_master_client.show_popup_menus = TRUE + spawn_click_intercept = FALSE objective_click_intercept = FALSE behavior_click_intercept = FALSE @@ -387,6 +390,8 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100) for(var/mob/living/carbon/xenomorph/assigned_xeno as anything in controlled_xenos) if(LAZYLEN(currently_assigned) >= behavior.max_assigned) break + + deselect_xeno(deselected_xeno) currently_assigned |= assigned_xeno assigned_xeno.patrol_points = list(object) @@ -487,6 +492,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100) return TRUE /datum/game_master/proc/reset_click_overrides() + game_master_client.show_popup_menus = TRUE spawn_click_intercept = FALSE objective_click_intercept = FALSE behavior_click_intercept = FALSE