Allow ghosts to type the parameters to Jump-to-Mob, Follow, and Teleport verbs

This commit is contained in:
GinjaNinja32
2014-11-26 22:39:48 +00:00
parent 8baf19d21d
commit 21768e4ef1

View File

@@ -280,7 +280,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
M.antagHUD = 1
src << "\blue <B>AntagHUD Enabled</B>"
/mob/dead/observer/proc/dead_tele()
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
set category = "Ghost"
set name = "Teleport"
set desc= "Teleport to a location"
@@ -290,8 +290,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(30)
usr.verbs += /mob/dead/observer/proc/dead_tele
var/A
A = input("Area to jump to", "BOOYEA", A) as null|anything in ghostteleportlocs
var/area/thearea = ghostteleportlocs[A]
if(!thearea) return
@@ -305,14 +303,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
usr.loc = pick(L)
following = null
/mob/dead/observer/verb/follow()
/mob/dead/observer/verb/follow(input in getmobs())
set category = "Ghost"
set name = "Follow" // "Haunt"
set desc = "Follow and haunt a mob."
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
var/target = getmobs()[input]
if(!target) return
ManualFollow(target)
// This is the ghost's follow verb with an argument
@@ -332,32 +329,24 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
loc = T
sleep(15)
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
/mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
set name = "Jump to Mob"
set desc = "Teleport to a mob"
if(istype(usr, /mob/dead/observer)) //Make sure they're an observer!
var/list/dest = list() //List of possible destinations (mobs)
var/target = null //Chosen target.
dest += getmobs() //Fill list, prompt user with list
target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest
if (!target)//Make sure we actually have a target
return
else
var/mob/M = dest[target] //Destination mob
var/mob/A = src //Source mob
var/mob/M = getmobs()[target] //Destination mob
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
A.loc = T
src.loc = T
following = null
else
A << "This mob is not located in the game world."
src << "This mob is not located in the game world."
/*
/mob/dead/observer/verb/boo()
set category = "Ghost"