mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Allows ghosts with backups to ping medical again
This commit is contained in:
@@ -56,7 +56,7 @@ SUBSYSTEM_DEF(transcore)
|
|||||||
implants -= imp
|
implants -= imp
|
||||||
continue
|
continue
|
||||||
|
|
||||||
//In a human
|
//In a human
|
||||||
BITSET(H.hud_updateflag, BACKUP_HUD)
|
BITSET(H.hud_updateflag, BACKUP_HUD)
|
||||||
|
|
||||||
if(H == imp.imp_in && H.mind && H.stat < DEAD)
|
if(H == imp.imp_in && H.mind && H.stat < DEAD)
|
||||||
@@ -93,6 +93,7 @@ SUBSYSTEM_DEF(transcore)
|
|||||||
else
|
else
|
||||||
if(curr_MR.dead_state != MR_DEAD) //First time switching to dead
|
if(curr_MR.dead_state != MR_DEAD) //First time switching to dead
|
||||||
notify(name)
|
notify(name)
|
||||||
|
curr_MR.last_notification = world.time
|
||||||
curr_MR.dead_state = MR_DEAD
|
curr_MR.dead_state = MR_DEAD
|
||||||
|
|
||||||
if(MC_TICK_CHECK)
|
if(MC_TICK_CHECK)
|
||||||
@@ -158,9 +159,12 @@ SUBSYSTEM_DEF(transcore)
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
// Send a past-due notification to the medical radio channel.
|
// Send a past-due notification to the medical radio channel.
|
||||||
/datum/controller/subsystem/transcore/proc/notify(var/name)
|
/datum/controller/subsystem/transcore/proc/notify(var/name, var/repeated = FALSE)
|
||||||
ASSERT(name)
|
ASSERT(name)
|
||||||
global_announcer.autosay("[name] is past-due for a mind backup. This will be the only notification.", "TransCore Oversight", "Medical")
|
if(repeated)
|
||||||
|
global_announcer.autosay("This is a repeat notification that [name] is past-due for a mind backup.", "TransCore Oversight", "Medical")
|
||||||
|
else
|
||||||
|
global_announcer.autosay("[name] is past-due for a mind backup.", "TransCore Oversight", "Medical")
|
||||||
|
|
||||||
// Called from mind_record to add itself to the transcore.
|
// Called from mind_record to add itself to the transcore.
|
||||||
/datum/controller/subsystem/transcore/proc/add_backup(var/datum/transhuman/mind_record/MR)
|
/datum/controller/subsystem/transcore/proc/add_backup(var/datum/transhuman/mind_record/MR)
|
||||||
|
|||||||
@@ -56,3 +56,23 @@
|
|||||||
mind.active = TRUE
|
mind.active = TRUE
|
||||||
|
|
||||||
SC.catch_mob(src) //This will result in us being deleted so...
|
SC.catch_mob(src) //This will result in us being deleted so...
|
||||||
|
|
||||||
|
/mob/observer/dead/verb/backup_ping()
|
||||||
|
set category = "Ghost"
|
||||||
|
set name = "Notify Transcore"
|
||||||
|
set desc = "If your past-due backup notification was missed or ignored, you can use this to send a new one."
|
||||||
|
|
||||||
|
var/record_found = FALSE
|
||||||
|
for(var/datum/transhuman/mind_record/record in SStranscore.backed_up)
|
||||||
|
if(record.ckey == ckey)
|
||||||
|
record_found = TRUE
|
||||||
|
if(!(record.dead_state == MR_DEAD))
|
||||||
|
to_chat(src, "<span class='warning'>Your backup is not past-due yet.</span>")
|
||||||
|
else if((world.time - record.last_notification) < 10 MINUTES)
|
||||||
|
to_chat(src, "<span class='warning'>Too little time has passed since your last notification.</span>")
|
||||||
|
else
|
||||||
|
SStranscore.notify(record.mindname, TRUE)
|
||||||
|
to_chat(src, "<span class='notice'>New notification has been sent.</span>")
|
||||||
|
|
||||||
|
if(!record_found)
|
||||||
|
to_chat(src, "<span class='warning'>No mind record found!</span>")
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
//0: Normal, 1: Might be dead, 2: Definitely dead, show on console
|
//0: Normal, 1: Might be dead, 2: Definitely dead, show on console
|
||||||
var/dead_state = 0
|
var/dead_state = 0
|
||||||
var/last_update = 0
|
var/last_update = 0
|
||||||
|
var/last_notification
|
||||||
|
|
||||||
//Backend
|
//Backend
|
||||||
var/ckey = ""
|
var/ckey = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user