mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 17:43:35 +01:00
Adds Ghost HUD and refactors some ghost verbs
This commit is contained in:
@@ -384,7 +384,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(usr, "AntagHud Toggled OFF")
|
||||
M.antagHUD = 0
|
||||
|
||||
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport to a location"
|
||||
@@ -397,6 +397,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
spawn(30)
|
||||
usr.verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
var/area/A = input("Area to jump to", "BOOYEA") as null|anything in ghostteleportlocs
|
||||
var/area/thearea = ghostteleportlocs[A]
|
||||
if(!thearea) return
|
||||
|
||||
@@ -410,13 +411,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
usr.forceMove(pick(L))
|
||||
following = null
|
||||
|
||||
/mob/dead/observer/verb/follow(input in getmobs())
|
||||
/mob/dead/observer/verb/follow()
|
||||
set category = "Ghost"
|
||||
set name = "Orbit" // "Haunt"
|
||||
set desc = "Follow and orbit a mob."
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target) return
|
||||
var/list/mobs = getpois(skip_mindless=1)
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
var/mob/target = mobs[input]
|
||||
ManualFollow(target)
|
||||
|
||||
// This is the ghost's follow verb with an argument
|
||||
@@ -484,24 +486,29 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
update_following()
|
||||
return ..()
|
||||
|
||||
/mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
/mob/dead/observer/verb/jumptomob() //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!
|
||||
if(isobserver(usr)) //Make sure they're an observer!
|
||||
var/list/dest = list() //List of possible destinations (mobs)
|
||||
var/target = null //Chosen target.
|
||||
|
||||
if(!target)//Make sure we actually have a target
|
||||
dest += getpois(mobs_only=1) //Fill list, prompt user with list
|
||||
target = input("Please, select a mob!", "Jump to Mob", null, null) as null|anything in dest
|
||||
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = getmobs()[target] //Destination mob
|
||||
var/mob/M = dest[target] //Destination mob
|
||||
var/mob/A = src //Source 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.
|
||||
forceMove(T)
|
||||
following = null
|
||||
A.forceMove(T)
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
|
||||
|
||||
/* Now a spell. See spells.dm
|
||||
|
||||
Reference in New Issue
Block a user