diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index d4923d1446f..4e92395f4cc 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -1,3 +1,7 @@ +/mob/dead/observer/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/ghost(src) + /obj/screen/ghost icon = 'icons/mob/screen_ghost.dmi' @@ -21,7 +25,7 @@ G.follow() /obj/screen/ghost/reenter_corpse - name = "Reenter corpse" + name = "Re-enter corpse" icon_state = "reenter_corpse" /obj/screen/ghost/reenter_corpse/Click() @@ -36,14 +40,7 @@ var/mob/dead/observer/G = usr G.dead_tele() -/obj/screen/ghost/pai - name = "pAI Candidate" - icon_state = "pai" - -///obj/screen/ghost/pai/Click() -// var/mob/dead/observer/G = usr - -/datum/hud/ghost/New(mob/owner, var/ui_style = 'icons/mob/screen_white.dmi') +/datum/hud/ghost/New(mob/owner) ..() var/obj/screen/using @@ -62,23 +59,3 @@ using = new /obj/screen/ghost/teleport() using.screen_loc = ui_ghost_teleport static_inventory += using - - using = new /obj/screen/ghost/pai() - using.screen_loc = ui_ghost_pai - static_inventory += using - - using = new /obj/screen/language_menu - using.icon = ui_style - static_inventory += using - -/datum/hud/ghost/show_hud(version = 0, mob/viewmob) - // don't show this HUD if observing; show the HUD of the observee - var/mob/dead/observer/O = mymob - if (istype(O)) - return FALSE - - . = ..() - if(!.) - return - var/mob/screenmob = viewmob || mymob - screenmob.client.screen += static_inventory diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index dfd4e1e3332..c4a1bb438ad 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -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