Skip to content

Commit

Permalink
GM button: toggle AI xeno weeding (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc authored Aug 9, 2024
1 parent c4565b3 commit 2152f93
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.")
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2152f93

Please sign in to comment.