Adds ghost alerts.

Adds ghost alerts for revival (cloning, MMIs, nar-sie, drones, etc).
This commit is contained in:
Tkdrg
2015-10-27 23:07:41 -03:00
parent a87af40beb
commit dd20530f0e
19 changed files with 93 additions and 16 deletions
+28
View File
@@ -257,6 +257,34 @@ so as to remain in compliance with the most up-to-date laws."
icon_state = "low_mech_integrity"
//GHOSTS
//TODO: expand this system to replace the pollCandidates Yes/No messages
/obj/screen/alert/notify_cloning
name = "Revival"
desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!"
icon_state = "ghost_frame"
timeout = 300
/obj/screen/alert/notify_cloning/Click()
if(!usr || !usr.client) return
var/mob/dead/observer/G = usr
G.reenter_corpse()
/obj/screen/alert/notify_jump
name = "Body created"
desc = "A body was created. You can enter it."
icon_state = "ghost_frame"
timeout = 300
var/jump_target = null
/obj/screen/alert/notify_jump/Click()
if(!usr || !usr.client) return
if(!jump_target) return
var/mob/dead/observer/G = usr
var/turf/T = get_turf(jump_target)
if(T && isturf(T))
G.loc = T
//OBJECT-BASED
/obj/screen/alert/buckled
-2
View File
@@ -1,5 +1,3 @@
//TODO: add sec/med huds to ghosts
//TODO: pop-up buttons for cloning,defib,drones,holoparasites,slimes,etcetc
/obj/screen/ghost
icon = 'icons/mob/screen_ghost.dmi'
@@ -583,7 +583,7 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
return
usr.visible_message("<span class='danger'>[usr] kneels over [thrallToRevive], placing their hands on \his chest.</span>", \
"<span class='shadowling'>You crouch over the body of your thrall and begin gathering energy...</span>")
thrallToRevive.notify_ghost_cloning("Your masters are resuscitating you! Re-enter your corpse if you wish to be brought to life.")
thrallToRevive.notify_ghost_cloning("Your masters are resuscitating you! Re-enter your corpse if you wish to be brought to life.", source = thrallToRevive)
if(!do_mob(usr, thrallToRevive, 30))
usr << "<span class='warning'>Your concentration snaps. The flow of energy ebbs.</span>"
charge_counter = charge_max
+1 -1
View File
@@ -109,7 +109,7 @@
|| locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!")
occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!", source = src)
return 1
/obj/machinery/dna_scannernew/open_machine()
+1 -1
View File
@@ -450,7 +450,7 @@
busy = 0
update_icon()
return
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!")
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!", source = src)
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest...</span>")
busy = 1
+1 -1
View File
@@ -30,7 +30,7 @@
if(virgin)
virgin = 0
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!")
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src)
planchette = input("Choose the letter.", "Seance!") in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
add_logs(M, src, "picked a letter on", " which was \"[planchette]\".")
+9 -1
View File
@@ -165,9 +165,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
mind.current.key = key
return 1
/mob/dead/observer/proc/notify_cloning(var/message, var/sound)
/mob/dead/observer/proc/notify_cloning(var/message, var/sound, var/atom/source)
if(message)
src << "<span class='ghostalert'>[message]</span>"
if(source)
var/obj/screen/alert/A = throw_alert("\ref[source]_notify_cloning", /obj/screen/alert/notify_cloning)
if(A)
A.desc = message
var/old_layer = source.layer
source.layer = FLOAT_LAYER
A.overlays += source
source.layer = old_layer
src << "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>"
if(sound)
src << sound(sound)
+1 -1
View File
@@ -41,7 +41,7 @@
return
var/mob/living/carbon/brain/B = newbrain.brainmob
if(!B.key)
B.notify_ghost_cloning("Someone has put your brain in a MMI!")
B.notify_ghost_cloning("Someone has put your brain in a MMI!", source = src)
visible_message("[user] sticks \a [newbrain] into \the [src].")
brainmob = newbrain.brainmob
@@ -22,7 +22,7 @@ var/global/posibrain_notif_cooldown = 0
/obj/item/device/mmi/posibrain/proc/ping_ghosts(msg)
if(!posibrain_notif_cooldown)
notify_ghosts("Positronic brain [msg] in [get_area(src)]! <a href=?src=\ref[src];activate=1>(Click to enter)</a>", 'sound/effects/ghost2.ogg')
notify_ghosts("Positronic brain [msg] in [get_area(src)]! <a href=?src=\ref[src];activate=1>(Click to enter)</a>", 'sound/effects/ghost2.ogg', source = src)
posibrain_notif_cooldown = 1
spawn(askDelay) //Global one minute cooldown to avoid spam.
posibrain_notif_cooldown = 0
@@ -6,7 +6,7 @@
icon_state = "swarmer_unactivated"
/obj/item/unactivated_swarmer/New()
notify_ghosts("An unactivated swarmer has been created in [get_area(src)]! <a href=?src=\ref[src];ghostjoin=1>(Click to enter)</a>")
notify_ghosts("An unactivated swarmer has been created in [get_area(src)]! <a href=?src=\ref[src];ghostjoin=1>(Click to enter)</a>", source = src)
..()
/obj/item/unactivated_swarmer/Topic(href, href_list)
@@ -15,6 +15,12 @@
origin_tech = "programming=2;biotech=4"
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
/obj/item/drone_shell/New()
..()
var/area/A = get_area(src)
if(A)
notify_ghosts("A drone shell has been created in \the [A.name].", source = src)
/obj/item/drone_shell/attack_ghost(mob/user)
if(jobban_isbanned(user,"drone"))
return
+2 -2
View File
@@ -949,10 +949,10 @@ var/list/slot_equipment_priority = list( \
return G
break
/mob/proc/notify_ghost_cloning(var/message = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!", var/sound = 'sound/effects/genetics.ogg')
/mob/proc/notify_ghost_cloning(var/message = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!", var/sound = 'sound/effects/genetics.ogg', var/atom/source = null)
var/mob/dead/observer/ghost = get_ghost()
if(ghost)
ghost.notify_cloning(message, sound)
ghost.notify_cloning(message, sound, source)
return ghost
+14 -1
View File
@@ -460,12 +460,25 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/mob/proc/reagent_check(datum/reagent/R) // utilized in the species code
return 1
/proc/notify_ghosts(var/message, var/ghost_sound = null) //Easy notification of ghosts.
/proc/notify_ghosts(var/message, var/ghost_sound = null, var/atom/source = null, var/image/alert_overlay = null) //Easy notification of ghosts.
for(var/mob/dead/observer/O in player_list)
if(O.client)
O << "<span class='ghostalert'>[message]<span>"
if(ghost_sound)
O << sound(ghost_sound)
if(source)
var/obj/screen/alert/notify_jump/A = O.throw_alert("\ref[source]_notify_jump", /obj/screen/alert/notify_jump)
if(A)
A.desc = message
A.jump_target = get_turf(source)
if(!alert_overlay)
var/old_layer = source.layer
source.layer = FLOAT_LAYER
A.overlays += source
source.layer = old_layer
else
alert_overlay.layer = FLOAT_LAYER
A.overlays += alert_overlay
/proc/item_heal_robotic(mob/living/carbon/human/H, mob/user, brute, burn)
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
+2 -1
View File
@@ -29,7 +29,8 @@
var/area/A = get_area(src)
if(A)
notify_ghosts("Nar-Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.")
var/image/alert_overlay = image('icons/mob/mob.dmi', "harvester")
notify_ghosts("Nar-Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.", source = src, alert_overlay = alert_overlay)
narsie_spawn_animation()
@@ -693,7 +693,7 @@
if(!M.suiciding && !(M.disabilities & NOCLONE))
if(!M)
return
if(M.notify_ghost_cloning())
if(M.notify_ghost_cloning(source = M))
spawn (100) //so the ghost has time to re-enter
return
else
@@ -501,7 +501,7 @@
feedback_add_details("slime_cores_used","[type]")
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
Z.loc = get_turf(holder.my_atom)
notify_ghosts("Golem rune created in [get_area(Z)].", 'sound/effects/ghost2.ogg')
notify_ghosts("Golem rune created in [get_area(Z)].", 'sound/effects/ghost2.ogg', source = Z)
//Bluespace
/datum/chemical_reaction/slimefloor2
+23
View File
@@ -0,0 +1,23 @@
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# spellcheck (typo fixes)
# experiment
# tgs (TG-ported fixes?)
#################################
author: Tkdrg
delete-after: True
changes:
- rscadd: "Added a Ghost On-screen HUD. It can be toggled using the \"Toggle Ghost HUD\" verb. Thank you Razharas for the sprites!"
- rscadd: "Ghosts can now use the \"Toggle med/sec HUD\" verb to see the basic secHUD (jobs only) or the medHUD of humans."
- rscadd: "Ghost will now get clickable icon alerts from events such as being put in a cloner, drones being created, Nar-sie being summoned, among others. The older chat messages were kept. These alerts can not be toggled."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB