mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-28 02:53:11 +00:00
Merge pull request #4107 from CHOMPStation2/upstream-merge-12770
[MIRROR] Adds transcore ping to brainmobs
This commit is contained in:
@@ -70,3 +70,31 @@
|
||||
typing = FALSE
|
||||
|
||||
return state
|
||||
|
||||
// Vorestation edit start
|
||||
|
||||
/mob/living/carbon/brain/verb/backup_ping()
|
||||
set category = "IC"
|
||||
set name = "Notify Transcore"
|
||||
set desc = "Your body is gone. Notify robotics to be resleeved!"
|
||||
var/datum/transcore_db/db = SStranscore.db_by_mind_name(mind.name)
|
||||
if(db)
|
||||
var/datum/transhuman/mind_record/record = db.backed_up[src.mind.name]
|
||||
if(!(record.dead_state == MR_DEAD))
|
||||
if((world.time - timeofhostdeath ) > 5 MINUTES) //Allows notify transcore to be used if you have an entry but for some reason weren't marked as dead
|
||||
record.dead_state = MR_DEAD //Such as if you got scanned but didn't take an implant. It's a little funky, but I mean, you got scanned
|
||||
db.notify(record) //So you probably will want to let someone know if you die.
|
||||
record.last_notification = world.time
|
||||
to_chat(src, "<span class='notice'>New notification has been sent.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Your backup is not past-due yet.</span>")
|
||||
else if((world.time - record.last_notification) < 5 MINUTES)
|
||||
to_chat(src, "<span class='warning'>Too little time has passed since your last notification.</span>")
|
||||
else
|
||||
db.notify(record)
|
||||
record.last_notification = world.time
|
||||
to_chat(src, "<span class='notice'>New notification has been sent.</span>")
|
||||
else
|
||||
to_chat(src,"<span class='warning'>No backup record could be found, sorry.</span>")
|
||||
|
||||
// VS edit ends
|
||||
|
||||
Reference in New Issue
Block a user