Merge pull request #323 from SkyMarshal/master

Adds admin alerts to suicides, sends adminhelps to IRC.
This commit is contained in:
Hawk-v3
2012-01-28 16:09:01 -08:00
5 changed files with 40 additions and 11 deletions
+7 -7
View File
@@ -576,13 +576,13 @@
//G = null
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(locate(/obj/machinery/computer/cloning, get_step(src, EAST)))
if (!M.client)
for(var/mob/dead/observer/ghost in world)
if(ghost.corpse == M && ghost.client)
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be ressurected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
// if(locate(/obj/machinery/computer/cloning, get_step(src, EAST)))
//
// if (!M.client)
// for(var/mob/dead/observer/ghost in world)
// if(ghost.corpse == M && ghost.client)
// ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be ressurected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
// break
del(G)
return
+11 -4
View File
@@ -285,7 +285,9 @@
//Look for that player! They better be dead!
if(C)
var/mob/selected = find_dead_player("[C.fields["ckey"]]")
var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No")
if(answer == "No")
selected = null
//Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs.
if ((!selected) || (!src.pod1) || (src.pod1.occupant) || (src.pod1.mess) || !config.revival_cloning)
src.temp = "Unable to initiate cloning cycle." // most helpful error message in THE HISTORY OF THE WORLD
@@ -309,9 +311,9 @@
if (subject.brain_op_stage == 4.0)
src.temp = "Error: No signs of intelligence detected."
return
if (subject.suiciding == 1)
src.temp = "Error: Subject's brain is not responding to scanning stimuli."
return
// if (subject.suiciding == 1)
// src.temp = "Error: Subject's brain is not responding to scanning stimuli."
// return
if ((!subject.ckey) || (!subject.client))
src.temp = "Error: Mental interface failure."
return
@@ -394,6 +396,11 @@
if (M.ckey == find_key)
selected = M
break
if(!selected) //Search for a ghost if dead body with client isn't found.
for(var/mob/dead/observer/ghost in world)
if (ghost.corpse.mind.key == find_key)
selected = ghost
break
return selected
//Disk stuff.
@@ -788,6 +788,12 @@ CIRCULAR SAW
var/datum/organ/external/S = H.organs["head"]
if(S.destroyed)
return
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1)
if(!do_after(rand(50,70)))
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [user] tried to cut [H]'s [S.display_name] off with [src], but failed."), 1)
return
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed off with [src] by [user]."), 1)
S.destroyed = 1
@@ -873,6 +879,12 @@ CIRCULAR SAW
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
return
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1)
if(!do_after(rand(20,80)))
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [user] tried to cut [H]'s [S.display_name] off with [src], but failed."), 1)
return
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed off with [src] by [user]."), 1)
S.destroyed = 1
+9
View File
@@ -12,6 +12,7 @@
return
if (mind.special_role != "Syndicate")
message_admins("[ckey] has tried to suicide, but they were not permitted due to not being antagonist as human.", 1)
src << "No. Adminhelp if there is a legitimate reason."
return
@@ -26,6 +27,7 @@
return
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
@@ -50,6 +52,7 @@
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
viewers(loc) << "\red <b>[src]'s brain is growing dull and lifeless. It looks like it's trying to commit suicide. Somehow.</b>"
oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
@@ -75,6 +78,7 @@
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
@@ -95,6 +99,7 @@
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>"
//put em at -175
@@ -115,6 +120,7 @@
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>"
//put em at -175
@@ -127,6 +133,7 @@
set name = "pAI Suicide"
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
if(answer == "Yes")
message_admins("[ckey] has suicided.", 1)
var/obj/item/device/paicard/card = loc
card.pai = null
var/turf/T = get_turf_or_move(card.loc)
@@ -150,6 +157,7 @@
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
viewers(src) << "\red <b>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</b>"
//put em at -175
@@ -170,6 +178,7 @@
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
message_admins("[ckey] has suicided.", 1)
suiciding = 1
setOxyLoss(100)
adjustBruteLoss(100 - getBruteLoss())
+1
View File
@@ -17,6 +17,7 @@
M << "\blue <b><font color=red>HELP: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
usr << "Your message has been broadcast to administrators."
send2adminirc("#bs12admin","HELP: [src.key]: [msg]")
log_admin("HELP: [key_name(src)]: [msg]")
if(tension_master)
tension_master.new_adminhelp()