Merge pull request #11712 from MrStonedOne/patch-37

Ghost follow is now an orbit!
This commit is contained in:
Remie Richards
2015-09-13 16:42:05 +01:00
2 changed files with 14 additions and 19 deletions

View File

@@ -106,6 +106,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/Move(NewLoc, direct)
if (orbiting)
stop_orbit()
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)
@@ -200,8 +202,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/verb/follow()
set category = "Ghost"
set name = "Follow" // "Haunt"
set desc = "Follow and haunt a mob."
set name = "Orbit" // "Haunt"
set desc = "Follow and orbit a mob."
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
@@ -211,22 +213,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(atom/movable/target)
if(target && target != src)
if(following && following == target)
if(orbiting && orbiting == target)
return
following = target
src << "<span class='notice'>Now following [target].</span>"
spawn(0)
var/turf/pos = get_turf(src)
while(loc == pos && target && following == target && client)
var/turf/T = get_turf(target)
if(!T)
break
// To stop the ghost flickering.
if(loc != T)
loc = T
pos = loc
sleep(15)
if (target == following) following = null
src << "<span class='notice'>Now orbiting [target].</span>"
orbit(target,24,0)
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
@@ -377,4 +367,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(istype(target) && (target != src))
ManualFollow(target)
if(href_list["reenter"])
reenter_corpse()
reenter_corpse()