Skip to content

Commit

Permalink
Fix adminjump.dm to handle empty area_turfs list
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Nov 17, 2023
1 parent c05a9cb commit 8378cbe
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 8378cbe

Please sign in to comment.