Dead chat will get announcements when someone joins or leaves it.

This is mainly for wizard and cult rounds, where it is important to know that a wizard/cultist is watching. The announcement was added for most other types of leaving/joining the ghost realm. Admin ghost doesn't get announced for obvious reasons.
This commit is contained in:
Amunak
2014-11-28 13:05:26 +01:00
parent 93b195d78d
commit 93859e9652
9 changed files with 50 additions and 8 deletions

View File

@@ -355,7 +355,7 @@ var/list/sacrificed = list()
usr.visible_message("\red [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.", \
"\red The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry...", \
"\red You hear only complete silence for a moment.")
usr.ghostize(1)
announce_ghost_joinleave(usr.ghostize(1), 1, "You feel that they had to use some [pick("dark", "black", "blood", "forgotten", "forbidden")] magic to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place!")
L.ajourn = 1
while(L)
if(L.key)

View File

@@ -56,5 +56,5 @@
/obj/item/weapon/scrying/attack_self(mob/user as mob)
user << "<span class='info'>You can see... everything!</span>"
visible_message("<span class='danger'>[usr] stares into [src], their eyes glazing over.</span>")
user.ghostize(1)
announce_ghost_joinleave(user.ghostize(1), 1, "You feel that they used a powerful artifact to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place with their presence.")
return

View File

@@ -377,7 +377,8 @@ var/list/admin_verbs_mentor = list(
else
//ghostize
var/mob/body = mob
body.ghostize(1)
var/mob/dead/observer/ghost = body.ghostize(1)
ghost.admin_ghosted = 1
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -21,6 +21,7 @@
var/antagHUD = 0
universal_speak = 1
var/atom/movable/following = null
var/admin_ghosted = 0
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -165,17 +166,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc = "Relinquish your life and enter the land of the dead."
if(stat == DEAD)
ghostize(1)
announce_ghost_joinleave(ghostize(1))
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
if(response != "Ghost")
return
resting = 1
var/turf/location = get_turf(src)
message_admins("[key_name_admin(usr)] has ghosted. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(usr)] has ghosted.")
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
return
announce_ghost_joinleave(ghost)
/mob/dead/observer/Move(NewLoc, direct)
@@ -237,6 +239,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
mind.current.ajourn=0
mind.current.key = key
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1
/mob/dead/observer/verb/toggle_medHUD()
@@ -460,6 +464,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
host.universal_understand = 0
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
announce_ghost_joinleave(host, 0, "They are now a mouse.")
/mob/dead/observer/verb/view_manfiest()
set name = "View Crew Manifest"

View File

@@ -67,7 +67,7 @@
return
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
announce_ghost_joinleave(candidate, 0, "They are occupying a positronic brain now.")
src.searching = 0
src.brainmob.mind = candidate.mind
src.brainmob.ckey = candidate.ckey

View File

@@ -66,6 +66,7 @@
if(!player || !istype(player.mob,/mob/dead))
return
announce_ghost_joinleave(player, 0, "They have taken control over a maintenance drone.")
visible_message("\The [src] churns and grinds as it lurches into motion, disgorging a shiny new drone after a few moments.")
flick("h_lathe_leave",src)

View File

@@ -437,6 +437,8 @@ var/list/slot_equipment_priority = list( \
log_game("[usr.key] AM failed due to disconnect.")
return
announce_ghost_joinleave(client, 0)
var/mob/new_player/M = new /mob/new_player()
if(!client)
log_game("[usr.key] AM failed due to disconnect.")

View File

@@ -496,3 +496,35 @@ proc/is_blind(A)
if(M.stat != DEAD && M.client.holder)
follow = "(<a href='?src=\ref[M.client.holder];adminplayerobservejump=\ref[subject]'>JMP</a>) "
M << "<span class='deadsay'>" + create_text_tag("dead", "DEAD:", M.client) + " [name][follow][message]</span>"
//Announces that a ghost has joined/left, mainly for use with wizards
/proc/announce_ghost_joinleave(O, var/joined_ghosts = 1, var/message = "")
var/client/C
//Accept any type, sort what we want here
if(istype(O, /mob))
var/mob/M = O
if(M.client)
C = M.client
else if(istype(O, /client))
C = O
else if(istype(O, /datum/mind))
var/datum/mind/M = O
if(M.current && M.current.client)
C = M.current.client
else if(M.original && M.original.client)
C = M.original.client
if(C)
var/name
if(C.mob)
var/mob/M = C.mob
if(M.mind && M.mind.name)
name = M.mind.name
if(M.real_name && M.real_name != name)
name += " ([M.real_name])"
if(!name)
name = (C.holder && C.holder.fakekey) ? C.holder.fakekey : C.key
if(joined_ghosts)
say_dead_direct("The ghost of <span class='name'>[name]</span> now [pick("skulks","lurks","prowls","creeps","stalks")] among the dead. [message]")
else
say_dead_direct("<span class='name'>[name]</span> no longer [pick("skulks","lurks","prowls","creeps","stalks")] in the realm of the dead. [message]")

View File

@@ -124,6 +124,7 @@
observer.loc = O.loc
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
announce_ghost_joinleave(src)
client.prefs.update_preview_icon()
observer.icon = client.prefs.preview_icon
observer.alpha = 127