Skip to content

Commit

Permalink
Fix jump-to-area runtime (#4946)
Browse files Browse the repository at this point in the history
# About the pull request
Title.

# Changelog
:cl:
fix: Jump-to-area verb will now warn you if there aren't any turfs in
the given area.
/:cl:
  • Loading branch information
Zonespace27 authored Nov 19, 2023
1 parent 2fe0665 commit 5eb0335
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/modules/admin/verbs/adminjump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
if(!src.mob)
return

var/list/area_turfs = get_area_turfs(A)

if(!length(area_turfs))
to_chat(src, "There aren't any turfs in this area!")
return

if(!isobserver(mob))
src.admin_ghost()

src.mob.on_mob_jump()
src.mob.forceMove(pick(get_area_turfs(A)))
src.mob.forceMove(pick(area_turfs))

message_admins(WRAP_STAFF_LOG(usr, "jumped to area [get_area(usr)] ([usr.loc.x],[usr.loc.y],[usr.loc.z])."), usr.loc.x, usr.loc.y, usr.loc.z)

Expand Down

0 comments on commit 5eb0335

Please sign in to comment.