Merge pull request #10646 from mwerezak/aghost

Aghosted mobs no longer act as SSD
This commit is contained in:
Chinsky
2015-08-15 06:10:49 +03:00
7 changed files with 15 additions and 17 deletions

View File

@@ -398,8 +398,10 @@ var/list/admin_verbs_mentor = list(
var/mob/body = mob
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
if(body)
body.aghosted = ghost
if(!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

@@ -216,6 +216,7 @@ 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
mind.current.aghosted = null
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1

View File

@@ -260,7 +260,7 @@
var/show_ssd
var/mob/living/carbon/human/H = src
if(istype(H)) show_ssd = H.species.show_ssd
if(show_ssd && (!client || !key || player_logged))
if(show_ssd && !client && !aghosted)
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
else if(lying || src.sleeping)

View File

@@ -941,8 +941,8 @@
if(status_flags & GODMODE) return 0
//SSD check, if a logged player is awake put them back to sleep!
if(sleeping < 2 && species.show_ssd && (!client || !key || player_logged))
sleeping = 2
if(species.show_ssd && !client && !aghosted)
Sleeping(2)
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
@@ -1002,10 +1002,8 @@
adjustHalLoss(-3)
if (mind)
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
if(player_logged)
sleeping = max(sleeping-1, 2)
else
sleeping = max(sleeping-1, 0)
if(client || sleeping > 3)
AdjustSleeping(-1)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()

View File

@@ -5,6 +5,5 @@
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
mind.active = 1 //indicates that the mind is currently synced with a client
//If they're SSD, remove it so they can wake back up.
player_logged = 0
update_antag_icons(mind)
return .

View File

@@ -1,8 +1,6 @@
/mob/living/Logout()
..()
if (mind)
if(!key) //key and mind have become seperated. I believe this is for when a staff member aghosts.
if (mind)
//Per BYOND docs key remains set if the player DCs, becomes null if switching bodies.
if(!key) //key and mind have become seperated.
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
//This tags a player as SSD. See appropriate life.dm files for furthering SSD effects such as falling asleep.
if(mind.active)
player_logged = 1

View File

@@ -214,8 +214,8 @@
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
//SSD var, changed it up some so people can have special things happen for different mobs when SSD.
var/player_logged = 0
//Indicates if a clientless mob is actually an admin aghosting
var/mob/dead/observer/aghosted = null
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes