Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM button: toggle AI xeno weeding #340

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
if(CLIENT_HAS_RIGHTS(src, R_SERVER))
add_verb(src, admin_verbs_server)
Expand Down Expand Up @@ -371,6 +372,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,
admin_verbs_admin,
admin_verbs_ban,
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 @@ -1392,6 +1392,7 @@
#include "code\modules\admin\game_master\sound_panel.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
Loading