mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Fixes ghost teleport menu (#16858)
* fixes ghost jumping * use SSmapping.ghostteleportlocs
This commit is contained in:
@@ -389,23 +389,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!isobserver(usr))
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
var/target = input("Area to teleport to", "Teleport to a location") as null|anything in SSmapping.ghostteleportlocs
|
||||
var/area/A = SSmapping.teleportlocs[target]
|
||||
teleport(A)
|
||||
|
||||
var/datum/async_input/A = input_autocomplete_async(usr, "Area to jump to: ", SSmapping.ghostteleportlocs)
|
||||
A.on_close(CALLBACK(src, .proc/teleport))
|
||||
|
||||
/mob/dead/observer/proc/teleport(area/thearea)
|
||||
if(!thearea || !isobserver(usr))
|
||||
/mob/dead/observer/proc/teleport(area/A)
|
||||
if(!A || !isobserver(usr))
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L += T
|
||||
var/list/turfs = list()
|
||||
for(var/turf/T in get_area_turfs(A.type))
|
||||
turfs += T
|
||||
|
||||
if(!L || !L.len)
|
||||
to_chat(usr, "<span class='warning'>No area available.</span>")
|
||||
if(!length(turfs))
|
||||
to_chat(src, "<span class='warning'>Nowhere to jump to!</span>")
|
||||
return
|
||||
|
||||
forceMove(pick(L))
|
||||
forceMove(pick(turfs))
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/dead/observer/verb/follow()
|
||||
|
||||
Reference in New Issue
Block a user