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

[DNM] Add: Admin Call Mob To Coordinate Verb #2585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/SpawnAbno,
/client/proc/ClearAbno,
/client/proc/FullUnderstandAbno,
/client/proc/BreachAbno
/client/proc/BreachAbno,
// Event stuff
/client/proc/admin_ai_move_to_coordinate,
)
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/ban_panel, /client/proc/stickybanpanel))
GLOBAL_PROTECT(admin_verbs_ban)
Expand Down
28 changes: 28 additions & 0 deletions code/modules/admin/verbs/randomverbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1351,3 +1351,31 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!source)
return
REMOVE_TRAIT(D,chosen_trait,source)

/client/proc/admin_ai_move_to_coordinate()
set category = "Admin.Events"
set name = "Call Mob to Coordinate"
set desc = "Calls a mob to a specific coordinate."

if(!check_rights(R_ADMIN))
return

var/look_range = input(usr, "Which mobs to select", "Selection Range", 1) as null|num
if(isnull(look_range)) return
look_range = floor(look_range)
if(look_range <= 0) return

var/x = input(usr, "X coordinate", "X", 1) as null|num
var/y = input(usr, "Y coordinate", "Y", 1) as null|num

if(isnull(x)) return
if(isnull(y)) return
x = floor(x)
y = floor(y)
if(x <= 0) return
if(y <= 0) return

var/z = usr.z

for(var/mob/living/simple_animal/hostile/L in view(look_range, usr))
L.patrol_to(locate(x,y,z))
Loading