diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index f84bac20b1..74f3149610 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -53,3 +53,5 @@ GLOBAL_VAR(xeno_queue_candidate_count) GLOBAL_VAR(obfs_x) /// A number between -500 and 500. GLOBAL_VAR(obfs_y) + +GLOBAL_VAR_INIT(ai_xeno_weeding, TRUE) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index fec4ae80f5..4d1f4ba083 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -335,6 +335,7 @@ var/list/roundstart_mod_verbs = list( add_verb(src, /client/proc/toggle_join_xeno) add_verb(src, /client/proc/game_master_rename_platoon) add_verb(src, /client/proc/toggle_vehicle_blockers) + add_verb(src, /client/proc/toggle_ai_xeno_weeding) add_verb(src, /client/proc/toggle_rappel_menu) add_verb(src, /client/proc/toggle_fire_support_menu) if(CLIENT_HAS_RIGHTS(src, R_SERVER)) @@ -372,6 +373,7 @@ var/list/roundstart_mod_verbs = list( /client/proc/toggle_join_xeno, /client/proc/game_master_rename_platoon, /client/proc/toggle_vehicle_blockers, + /client/proc/toggle_ai_xeno_weeding, /client/proc/toggle_rappel_menu, /client/proc/toggle_fire_support_menu, admin_verbs_admin, diff --git a/code/modules/admin/game_master/extra_buttons/toggle_ai_xeno_weeding.dm b/code/modules/admin/game_master/extra_buttons/toggle_ai_xeno_weeding.dm new file mode 100644 index 0000000000..6cf536564a --- /dev/null +++ b/code/modules/admin/game_master/extra_buttons/toggle_ai_xeno_weeding.dm @@ -0,0 +1,10 @@ +/// For PvE CM a convenient button to enable/disable AI xenos weeding. +/client/proc/toggle_ai_xeno_weeding() + set name = "Toggle AI Xeno Weeding" + set category = "Game Master.Flags" + + if(!admin_holder || !check_rights(R_MOD, FALSE)) + return + + GLOB.ai_xeno_weeding = !GLOB.ai_xeno_weeding + message_admins("[src] has [GLOB.ai_xeno_weeding ? "enabled" : "disabled"] AI xeno weeding.") diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm index 263f354c78..cc330966f2 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm @@ -10,6 +10,9 @@ //drones expand the hive /datum/xeno_ai_movement/drone/ai_move_idle(delta_time) + if(!GLOB.ai_xeno_weeding) + return ..() + var/mob/living/carbon/xenomorph/idle_xeno = parent if(idle_xeno.throwing) diff --git a/colonialmarines.dme b/colonialmarines.dme index dce3fa8b9a..d15bdb9653 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1406,6 +1406,7 @@ #include "code\modules\admin\game_master\extra_buttons\fire_support_menu.dm" #include "code\modules\admin\game_master\extra_buttons\rappel_menu.dm" #include "code\modules\admin\game_master\extra_buttons\rename_platoon.dm" +#include "code\modules\admin\game_master\extra_buttons\toggle_ai_xeno_weeding.dm" #include "code\modules\admin\game_master\extra_buttons\toggle_join_xeno.dm" #include "code\modules\admin\game_master\extra_buttons\toggle_vehicle_blockers.dm" #include "code\modules\admin\game_master\game_master_submenu\ambush.dm"