Quick webedit fixing an issue with the split personality.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
..()
|
||||
make_backseats()
|
||||
get_ghost()
|
||||
RegisterSignal(M, COMSIG_MOB_DEATH, .proc/revert_to_normal)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/make_backseats()
|
||||
stranger_backseat = new(owner, src)
|
||||
@@ -37,23 +38,23 @@
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/on_life()
|
||||
if(owner.stat == DEAD)
|
||||
if(current_controller != OWNER)
|
||||
switch_personalities()
|
||||
qdel(src)
|
||||
else if(prob(3))
|
||||
if(prob(3))
|
||||
switch_personalities()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/on_lose()
|
||||
if(current_controller != OWNER) //it would be funny to cure a guy only to be left with the other personality, but it seems too cruel
|
||||
switch_personalities()
|
||||
switch_personalities(TRUE)
|
||||
QDEL_NULL(stranger_backseat)
|
||||
QDEL_NULL(owner_backseat)
|
||||
UnregisterSignal(M, COMSIG_MOB_DEATH)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/switch_personalities()
|
||||
if(QDELETED(owner) || owner.stat == DEAD || QDELETED(stranger_backseat) || QDELETED(owner_backseat))
|
||||
/datum/brain_trauma/severe/split_personality/proc/revert_to_normal()
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/switch_personalities(forced = FALSE)
|
||||
if(QDELETED(owner) || (owner.stat == DEAD && !forced) || QDELETED(stranger_backseat) || QDELETED(owner_backseat))
|
||||
return
|
||||
|
||||
var/mob/living/split_personality/current_backseat
|
||||
@@ -126,10 +127,6 @@
|
||||
if(QDELETED(body))
|
||||
qdel(src) //in case trauma deletion doesn't already do it
|
||||
|
||||
if((body.stat == DEAD && trauma.owner_backseat == src))
|
||||
trauma.switch_personalities()
|
||||
qdel(trauma)
|
||||
|
||||
//if one of the two ghosts, the other one stays permanently
|
||||
if(!body.client && trauma.initialized)
|
||||
trauma.switch_personalities()
|
||||
|
||||
Reference in New Issue
Block a user