mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Add observer HUD from /tg/, refactor HUDs
This commit is contained in:
@@ -129,6 +129,7 @@
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
..()
|
||||
|
||||
/mob/observer/dead/Topic(href, href_list)
|
||||
@@ -318,6 +319,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
|
||||
if(!A)
|
||||
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in return_sorted_areas()
|
||||
if(!A)
|
||||
return
|
||||
|
||||
usr.forceMove(pick(get_area_turfs(A)))
|
||||
usr.on_mob_jump()
|
||||
|
||||
@@ -326,6 +332,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Follow" // "Haunt"
|
||||
set desc = "Follow and haunt a mob."
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target) return
|
||||
ManualFollow(target)
|
||||
@@ -359,6 +370,45 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
forceMove(T)
|
||||
sleep(15)
|
||||
|
||||
var/icon/I = icon(target.icon,target.icon_state,target.dir)
|
||||
|
||||
var/orbitsize = (I.Width()+I.Height())*0.5
|
||||
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
|
||||
|
||||
var/rot_seg
|
||||
|
||||
/* We don't have this pref yet
|
||||
switch(ghost_orbit)
|
||||
if(GHOST_ORBIT_TRIANGLE)
|
||||
rot_seg = 3
|
||||
if(GHOST_ORBIT_SQUARE)
|
||||
rot_seg = 4
|
||||
if(GHOST_ORBIT_PENTAGON)
|
||||
rot_seg = 5
|
||||
if(GHOST_ORBIT_HEXAGON)
|
||||
rot_seg = 6
|
||||
else //Circular
|
||||
rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle
|
||||
*/
|
||||
|
||||
orbit(target, orbitsize, FALSE, 20, rot_seg)
|
||||
|
||||
/mob/observer/dead/orbit()
|
||||
set_dir(2) //reset dir so the right directional sprites show up
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/stop_orbit(datum/component/orbiter/orbits)
|
||||
. = ..()
|
||||
//restart our floating animation after orbit is done.
|
||||
pixel_y = 0
|
||||
pixel_x = 0
|
||||
transform = null
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
/mob/observer/dead/proc/stop_following()
|
||||
following = null
|
||||
stop_orbit()
|
||||
|
||||
/mob/proc/update_following()
|
||||
. = get_turf(src)
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
@@ -373,7 +423,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/Destroy()
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
M.following = null
|
||||
M.stop_following()
|
||||
following_mobs = null
|
||||
return ..()
|
||||
|
||||
@@ -381,7 +431,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(ismob(following))
|
||||
var/mob/M = following
|
||||
M.following_mobs -= src
|
||||
following = null
|
||||
stop_following()
|
||||
return ..()
|
||||
|
||||
/mob/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
@@ -406,35 +456,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
set desc = "Teleport to a mob"
|
||||
set popup_menu = FALSE //VOREStation Edit - Declutter.
|
||||
if(istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = target //Destination mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
set popup_menu = FALSE
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
following = null
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
/*
|
||||
/mob/observer/dead/verb/boo()
|
||||
set category = "Ghost"
|
||||
set name = "Boo!"
|
||||
set desc= "Scare your crew members because of boredom!"
|
||||
|
||||
if(bootime > world.time) return
|
||||
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
|
||||
if(L)
|
||||
L.flicker()
|
||||
bootime = world.time + 600
|
||||
if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
return
|
||||
//Maybe in the future we can add more <i>spooky</i> code here!
|
||||
return
|
||||
*/
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = 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.
|
||||
forceMove(T)
|
||||
stop_following()
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
|
||||
/mob/observer/dead/memory()
|
||||
set hidden = 1
|
||||
@@ -445,7 +488,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
|
||||
|
||||
/mob/observer/dead/Post_Incorpmove()
|
||||
following = null
|
||||
stop_following()
|
||||
|
||||
/mob/observer/dead/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
@@ -813,14 +856,20 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
set category = "Ghost"
|
||||
set name = "Blank pAI alert"
|
||||
set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope."
|
||||
if(usr.client.prefs.be_special & BE_PAI)
|
||||
|
||||
if(usr.client.prefs?.be_special & BE_PAI)
|
||||
var/count = 0
|
||||
for(var/obj/item/device/paicard/p in all_pai_cards)
|
||||
var/obj/item/device/paicard/PP = p
|
||||
if(PP.pai == null)
|
||||
count++
|
||||
PP.icon = 'icons/obj/pda_vr.dmi' // VOREStation Edit
|
||||
PP.overlays += "pai-ghostalert"
|
||||
spawn(54)
|
||||
PP.overlays.Cut()
|
||||
to_chat(usr,"<span class='notice'>Flashing the displays of [count] unoccupied PAIs.</span>")
|
||||
else
|
||||
to_chat(usr,"<span class='warning'>You have 'Be pAI' disabled in your character prefs, so we can't help you.</span>")
|
||||
|
||||
/mob/observer/dead/speech_bubble_appearance()
|
||||
return "ghost"
|
||||
|
||||
Reference in New Issue
Block a user