Skip to content

Commit

Permalink
lets people know they are disconnected from mind and recovery is likely
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasint committed Sep 24, 2023
1 parent 8932aaa commit 84bb482
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
26 changes: 18 additions & 8 deletions _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2989,6 +2989,17 @@
},
/turf/open/floor/iron/grimy,
/area/centcom/central_command_areas/courtroom)
"lX" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
},
/obj/machinery/door/poddoor/shutters{
id = "XCCsec1";
name = "XCC Checkpoint 1 Shutters";
max_integrity = 3000000
},
/turf/open/floor/iron,
/area/centcom/central_command_areas/control)
"md" = (
/obj/machinery/computer/shuttle/labor,
/obj/effect/turf_decal/stripes/line{
Expand Down Expand Up @@ -5393,7 +5404,8 @@
"vG" = (
/obj/machinery/door/poddoor/shutters{
id = "XCCsec1";
name = "XCC Checkpoint 1 Shutters"
name = "XCC Checkpoint 1 Shutters";
max_integrity = 3000000
},
/obj/effect/turf_decal/stripes/line{
dir = 8
Expand Down Expand Up @@ -10910,12 +10922,10 @@
/turf/open/floor/iron/dark,
/area/centcom/central_command_areas/admin/storage)
"Ud" = (
/obj/machinery/sleeper{
dir = 1
},
/obj/effect/turf_decal/stripes/line{
dir = 5
},
/obj/structure/organ_creator,
/turf/open/floor/iron/dark/textured,
/area/centcom/central_command_areas/control)
"Uf" = (
Expand Down Expand Up @@ -53663,10 +53673,10 @@ iF
rK
mQ
io
vG
vG
vG
vG
lX
lX
lX
lX
vG
io
rK
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@
if(HAS_TRAIT(src, TRAIT_DUMB))
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(get_organ_by_type(/obj/item/organ/internal/brain))
if(!key)
var/obj/item/organ/internal/brain/brain = get_organ_by_type(/obj/item/organ/internal/brain)
if(!key && !brain.temporary_sleep)
msg += "[span_deadsay("[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.")]\n"
else if(brain.temporary_sleep)
msg += "[span_deadsay("[t_He] [t_is] temporarly disconnected from their mind. Recovery is likely.")]\n"
else if(!client)
if(round(((world.time - lastclienttime) / (1 MINUTES)),1) >= 15)
msg += "[t_He] [t_has] a blank, absent-minded stare and [t_has] been completely unresponsive to anything for [round(((world.time - lastclienttime) / (1 MINUTES)),1)] minutes. [t_He] may snap out of it soon. They are able to be put into a cryopod by you.\n"
Expand Down
22 changes: 19 additions & 3 deletions monkestation/code/modules/ghost_players/ghost_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
var/old_key
var/datum/mind/old_mind
var/old_reenter
var/obj/item/organ/internal/brain/old_human

///the button we are tied to for dueling
var/obj/structure/fight_button/linked_button
Expand All @@ -23,12 +24,12 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
fully_heal()
move_to_ghostspawn()

/mob/living/carbon/human/ghost/New(_old_key, datum/mind/_old_mind, _old_reenter)
/mob/living/carbon/human/ghost/New(_old_key, datum/mind/_old_mind, _old_reenter, obj/item/organ/internal/brain/_old_human)
. = ..()
old_key = _old_key
old_mind = _old_mind
old_reenter = _old_reenter

old_human = _old_human

/mob/living/carbon/human/ghost/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -59,6 +60,10 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
new_ghost.key = old_key
new_ghost.mind = old_mind
new_ghost.can_reenter_corpse = old_reenter

if(old_human)
old_human.temporary_sleep = FALSE

qdel(src)

/datum/action/cooldown/mob_cooldown/return_to_ghost
Expand Down Expand Up @@ -119,7 +124,14 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)


/mob/dead/observer/proc/create_ghost_body()
var/mob/living/carbon/human/ghost/new_existance = new(key, mind, can_reenter_corpse)
var/mob/living/carbon/human/old_mob = mind.current
var/obj/item/organ/internal/brain/brain
if(istype(old_mob))
brain = old_mob.get_organ_by_type(/obj/item/organ/internal/brain)
if(brain)
brain.temporary_sleep = TRUE

var/mob/living/carbon/human/ghost/new_existance = new(key, mind, can_reenter_corpse, brain)
client?.prefs.safe_transfer_prefs_to(new_existance, TRUE, FALSE)
new_existance.move_to_ghostspawn()
new_existance.key = key
Expand All @@ -139,3 +151,7 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
if(!turf.density)
target_turf = turf
forceMove(target_turf)


/obj/item/organ/internal/brain
var/temporary_sleep = FALSE

0 comments on commit 84bb482

Please sign in to comment.