Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions code/game/machinery/rechargestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,17 @@
current_organ.rejuvenate()
to_chat(occupant, "Internal component repaired.")

if(!doing_stuff && humanoid_occupant.is_revivable() && (humanoid_occupant.stat == DEAD))
if(check_revive(humanoid_occupant))
doing_stuff = TRUE
do_revive(humanoid_occupant)

if(!doing_stuff)
to_chat(occupant, "Maintenance cycle completed. All systems nominal.")
go_out()



/obj/structure/machinery/recharge_station/proc/go_out()
if(!occupant)
return
Expand Down Expand Up @@ -300,3 +306,58 @@
else
..(sourcemob, message, verb, language, italics)
#endif // ifdef OBJECTS_PROXY_SPEECH


/obj/structure/machinery/recharge_station/proc/check_revive(mob/living/carbon/human/revive_target)
if(!revive_target)
return FALSE

if(!issynth(revive_target))
visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Non-synthetic target detected."))
return FALSE

if(revive_target.stat != DEAD)
return FALSE

if(!revive_target.is_revivable())
visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Synthetic's general condition does not allow reviving."))
return FALSE

if(!revive_target.check_tod())
visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Synthetic has sustained irrecoverable core damage."))
return FALSE
return TRUE

/obj/structure/machinery/recharge_station/proc/do_revive(mob/living/carbon/human/revived_target)
if(!revived_target)
return

var/mob/dead/observer/ghost = revived_target.get_ghost()
if(istype(ghost) && ghost.client)
playsound_client(ghost.client, 'sound/effects/adminhelp_new.ogg')
to_chat(ghost, SPAN_BOLDNOTICE(FONT_SIZE_LARGE("Someone is trying to revive your body. Return to it if you want to be resurrected! \
(Verbs -> Ghost -> Re-enter corpse, or <a href='byond://?src=\ref[ghost];reentercorpse=1'>click here!</a>)")))

playsound(get_turf(src), 'sound/mecha/powerup.ogg' , 25, 0)
sleep(3 SECONDS)

if(!revived_target.is_revivable())
visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Synthetic's general condition does not allow reviving."))

if(!revived_target.client && !(revived_target.status_flags & FAKESOUL)) //Freak case, no client at all. This is a braindead mob (like a colonist)
visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Non-specific core damage detected, Attempting to re-activate..."))

if(isobserver(revived_target.mind?.current) && !revived_target.client) //Let's call up the correct ghost! Also, bodies with clients only, thank you.
revived_target.mind.transfer_to(revived_target, TRUE)

if(revived_target.health > revived_target.health_threshold_dead)
visible_message(SPAN_NOTICE("[icon2html(src, viewers(src))] \The [src] beeps: Synthetic reset complete."))
msg_admin_niche("[key_name_admin(revived_target)] was revived by [src] at [get_area_name(src)].")
playsound(get_turf(src), 'sound/items/synth_reset_key/boot_on.ogg', 25, 0)
revived_target.handle_revive()
to_chat(revived_target, SPAN_NOTICE("You suddenly awaken, reactivated."))
if(revived_target.client?.prefs.toggles_flashing & FLASH_CORPSEREVIVE)
window_flash(revived_target.client)
else
visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Reactivation failed. chassis too damaged, repair damage and try again.")) //Freak case
playsound(get_turf(src), 'sound/items/synth_reset_key/shortbeep.ogg', 25, 0)
1 change: 1 addition & 0 deletions strings/marinetips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ If you push crates out of a dropship when paradropping, it will land near the pa
When paradropping, you can toss any large item (such as a backpack, pouch, or gun) into hyperspace, and it will land near the paradrop drop point. However, smaller items such as flares will not survive the fall.
Medbay cryotubes will process chemicals in the dead if Cryoxadone and or Clonexadone is present. In a mass-casualty situation or when a patient has severe injuries, consider injecting the dead with chemicals and putting them in the tubes.
A synthetic's head can be reattached to their body by a skilled doctor. Save your synth!
You can repair a deactivated synth by placing them in a maintenance station, or healing them with welder and coil and then using a synthetic reset key.
Switching to your sidearm is not faster than reloading.
You can refill extinguishers from canteens, flasks, water bottles, and water tanks.
You can middle mouse click to open containers, even if your hands are full, and you can open nested inventories this way.
Expand Down
Loading