mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
Ghostspawner Conversion 2 (#10970)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
/datum/brain_trauma/special/imaginary_friend/on_gain()
|
||||
..()
|
||||
make_friend()
|
||||
get_ghost()
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/on_life()
|
||||
if(get_dist(owner, friend) > 9)
|
||||
@@ -24,12 +23,7 @@
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/proc/make_friend()
|
||||
friend = new(get_turf(src), src)
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/proc/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/datum/ghosttrap/G = get_ghost_trap("friend")
|
||||
G.request_player(friend, "Would you like to play as [owner]'s imaginary friend?", 60 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/reset_search), 60 SECONDS)
|
||||
SSghostroles.add_spawn_atom("imaginary_friend", friend)
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/proc/reset_search()
|
||||
if(src.friend && src.friend.key)
|
||||
@@ -91,6 +85,7 @@
|
||||
owner.client.images.Remove(human_image)
|
||||
if(client)
|
||||
client.images.Remove(human_image)
|
||||
SSghostroles.remove_spawn_atom("imaginary_friend", src)
|
||||
return ..()
|
||||
|
||||
/mob/abstract/mental/friend/proc/yank()
|
||||
|
||||
@@ -16,24 +16,12 @@
|
||||
/datum/brain_trauma/severe/split_personality/on_gain()
|
||||
..()
|
||||
make_backseats()
|
||||
get_ghost()
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/make_backseats()
|
||||
stranger_backseat = new(owner, src)
|
||||
SSghostroles.add_spawn_atom("split_personality", stranger_backseat)
|
||||
owner_backseat = new(owner, src)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/datum/ghosttrap/G = get_ghost_trap("split personality")
|
||||
G.request_player(stranger_backseat, "Would you like to play as [owner]'s split personality?", 60 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/reset_search), 60 SECONDS)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/reset_search()
|
||||
if(src.stranger_backseat && src.stranger_backseat.key)
|
||||
return
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/on_life()
|
||||
if(owner.stat == DEAD)
|
||||
if(current_controller != OWNER)
|
||||
@@ -63,7 +51,7 @@
|
||||
current_backseat = owner_backseat
|
||||
free_backseat = stranger_backseat
|
||||
|
||||
log_game("[current_backseat]/([current_backseat.ckey]) assumed control of [owner]/([owner.ckey] due to [src]. (Original owner: [current_controller == OWNER ? owner.ckey : current_backseat.ckey])")
|
||||
log_game("[current_backseat]/([current_backseat.ckey]) assumed control of [owner]/([owner.ckey]) due to [src]. (Original owner: [current_controller == OWNER ? owner.ckey : current_backseat.ckey])")
|
||||
to_chat(owner, "<span class='danger'>You feel your control being taken away... your other personality is in charge now!</span>")
|
||||
to_chat(current_backseat, "<span class='danger'>You manage to take control of your body!</span>")
|
||||
|
||||
@@ -146,6 +134,10 @@
|
||||
/mob/living/mental/split_personality/emote(message)
|
||||
return
|
||||
|
||||
/mob/living/mental/split_personality/Destroy()
|
||||
SSghostroles.remove_spawn_atom("split_personality", src)
|
||||
return ..()
|
||||
|
||||
///////////////BRAINWASHING////////////////////
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing
|
||||
@@ -180,13 +172,6 @@
|
||||
stranger_backseat = new /mob/living/mental/split_personality/traitor(owner, src, codeword, objective)
|
||||
owner_backseat = new(owner, src)
|
||||
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/datum/ghosttrap/G = get_ghost_trap("split personality")
|
||||
G.request_player(stranger_backseat, "Would you like to play as [owner]'s split personality?", 60 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/reset_search), 60 SECONDS)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/on_life()
|
||||
return //no random switching
|
||||
|
||||
|
||||
Reference in New Issue
Block a user