mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Readds ghost verbs. Makes the ghost HUD togglable
This commit is contained in:
@@ -125,11 +125,7 @@
|
||||
|
||||
// Ghosts
|
||||
|
||||
#define ui_ghost_jumptomob "SOUTH:6,WEST"
|
||||
#define ui_ghost_orbit "SOUTH:6,WEST+1"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,WEST+2"
|
||||
#define ui_ghost_teleport "SOUTH:6,WEST+3"
|
||||
#define ui_ghost_toggle_darkness "SOUTH:6,WEST+11"
|
||||
#define ui_ghost_toggle_ghostsee "SOUTH:6,WEST+12"
|
||||
#define ui_ghost_toggle_inquisition "SOUTH:6,WEST+13"
|
||||
#define ui_ghost_view_manifest "SOUTH:6,WEST+14"
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:16"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:16"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:16"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:16"
|
||||
|
||||
@@ -35,39 +35,12 @@
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/toggle_darkness
|
||||
name = "Toggle Darkness"
|
||||
icon_state = "toggle_darkness"
|
||||
|
||||
/obj/screen/ghost/toggle_darkness/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.toggle_darkness()
|
||||
|
||||
/obj/screen/ghost/toggle_ghostsee
|
||||
name = "Toggle Ghost Vision"
|
||||
icon_state = "toggle_ghostsee"
|
||||
|
||||
/obj/screen/ghost/toggle_ghostsee/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.toggle_ghostsee()
|
||||
|
||||
/obj/screen/ghost/toggle_inquisition
|
||||
name = "Toggle Inquisitiveness"
|
||||
icon_state = "toggle_inquisition"
|
||||
|
||||
/obj/screen/ghost/toggle_inquisition/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.toggle_inquisition()
|
||||
|
||||
/obj/screen/ghost/view_manifest
|
||||
name = "View Manifest"
|
||||
icon_state = "view_manifest"
|
||||
|
||||
/obj/screen/ghost/view_manifest/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.view_manifest()
|
||||
|
||||
/datum/hud/proc/ghost_hud()
|
||||
var/mob/dead/observer/G = mymob
|
||||
if(!G.ghost_hud_enabled)
|
||||
mymob.client.screen -= adding
|
||||
return
|
||||
|
||||
adding = list()
|
||||
|
||||
var/obj/screen/using
|
||||
@@ -88,21 +61,5 @@
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/toggle_darkness()
|
||||
using.screen_loc = ui_ghost_toggle_darkness
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/toggle_ghostsee()
|
||||
using.screen_loc = ui_ghost_toggle_ghostsee
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/toggle_inquisition()
|
||||
using.screen_loc = ui_ghost_toggle_inquisition
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/view_manifest()
|
||||
using.screen_loc = ui_ghost_view_manifest
|
||||
adding += using
|
||||
|
||||
mymob.client.screen += adding
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/client/var/inquisitive_ghost = 1
|
||||
/mob/dead/observer/proc/toggle_inquisition() // warning: unexpected inquisition
|
||||
/mob/dead/observer/verb/toggle_inquisition() // warning: unexpected inquisition
|
||||
set name = "Toggle Inquisitiveness"
|
||||
set desc = "Sets whether your ghost examines everything on click by default"
|
||||
set category = "Ghost"
|
||||
if(!client) return
|
||||
client.inquisitive_ghost = !client.inquisitive_ghost
|
||||
if(client.inquisitive_ghost)
|
||||
|
||||
@@ -22,11 +22,13 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
|
||||
var/ghostvision = 1 //is the ghost able to see things humans can't?
|
||||
var/seedarkness = 1
|
||||
var/ghost_hud_enabled = 1 //did this ghost disable the on-screen HUD?
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
stat = DEAD
|
||||
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
@@ -146,7 +148,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(isnum(G.dom_timer))
|
||||
stat(null, "[G.name] Gang Takeover: [max(G.dom_timer, 0)]")
|
||||
|
||||
/mob/dead/observer/proc/reenter_corpse()
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
set name = "Re-enter Corpse"
|
||||
if(!client) return
|
||||
if(!(mind && mind.current))
|
||||
src << "<span class='warning'>You have no body.</span>"
|
||||
return
|
||||
@@ -167,10 +172,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
src << sound(sound)
|
||||
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport to a location"
|
||||
if(!istype(usr, /mob/dead/observer))
|
||||
usr << "Not when you're not dead!"
|
||||
return
|
||||
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 sortedAreas
|
||||
if(!istype(src, /mob/dead/observer))
|
||||
return
|
||||
var/area/thearea = A
|
||||
if(!thearea) return
|
||||
|
||||
@@ -179,15 +191,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
L+=T
|
||||
|
||||
if(!L || !L.len)
|
||||
src << "No area available."
|
||||
usr << "No area available."
|
||||
|
||||
loc = pick(L)
|
||||
usr.loc = pick(L)
|
||||
|
||||
/mob/dead/observer/verb/follow()
|
||||
set category = "Ghost"
|
||||
set name = "Orbit" // "Haunt"
|
||||
set desc = "Follow and orbit a mob."
|
||||
|
||||
/mob/dead/observer/proc/follow()
|
||||
var/list/mobs = getmobs()
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
if(!istype(src, /mob/dead/observer))
|
||||
return
|
||||
var/mob/target = mobs[input]
|
||||
ManualFollow(target)
|
||||
|
||||
@@ -214,25 +228,31 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
pixel_y = 0
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
/mob/dead/observer/proc/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
var/list/dest = list() //List of possible destinations (mobs)
|
||||
var/target = null //Chosen target.
|
||||
/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"
|
||||
|
||||
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(!istype(src, /mob/dead/observer))
|
||||
return
|
||||
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/turf/T = get_turf(M) //Turf of the destination mob
|
||||
if(istype(usr, /mob/dead/observer)) //Make sure they're an observer!
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
A.loc = T
|
||||
|
||||
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
|
||||
A << "This mob is not located in the game world."
|
||||
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.
|
||||
A.loc = T
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
|
||||
/mob/dead/observer/verb/boo()
|
||||
set category = "Ghost"
|
||||
@@ -257,12 +277,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = 1
|
||||
src << "<span class='danger'>You are dead! You have no mind to store memory!</span>"
|
||||
|
||||
/mob/dead/observer/proc/toggle_ghostsee()
|
||||
/mob/dead/observer/verb/toggle_ghostsee()
|
||||
set name = "Toggle Ghost Vision"
|
||||
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
|
||||
set category = "Ghost"
|
||||
ghostvision = !(ghostvision)
|
||||
updateghostsight()
|
||||
src << "You [(ghostvision?"now":"no longer")] have ghost vision."
|
||||
usr << "You [(ghostvision?"now":"no longer")] have ghost vision."
|
||||
|
||||
/mob/dead/observer/proc/toggle_darkness()
|
||||
/mob/dead/observer/verb/toggle_darkness()
|
||||
set name = "Toggle Darkness"
|
||||
set category = "Ghost"
|
||||
seedarkness = !(seedarkness)
|
||||
updateghostsight()
|
||||
|
||||
@@ -324,7 +349,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A].</span>")
|
||||
return 1
|
||||
|
||||
/mob/dead/observer/proc/view_manifest()
|
||||
/mob/dead/observer/verb/view_manifest()
|
||||
set name = "View Crew Manifest"
|
||||
set category = "Ghost"
|
||||
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
dat += data_core.get_manifest()
|
||||
@@ -349,3 +377,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
ManualFollow(target)
|
||||
if(href_list["reenter"])
|
||||
reenter_corpse()
|
||||
|
||||
/mob/dead/observer/verb/toggle_ghosthud()
|
||||
set name = "Toggle Ghost HUD"
|
||||
set desc = "Toggles your ghost's on-screen HUD"
|
||||
set category = "Ghost"
|
||||
ghost_hud_enabled = !ghost_hud_enabled
|
||||
hud_used.ghost_hud()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 428 B |
Reference in New Issue
Block a user