mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Merge pull request #12770 from Runa-Dacino/posibrain_transcore_notify
Adds transcore ping to brainmobs
This commit is contained in:
@@ -70,3 +70,31 @@
|
|||||||
typing = FALSE
|
typing = FALSE
|
||||||
|
|
||||||
return state
|
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