From aff49d174a286e3ee559443fbed84edd75fabfff Mon Sep 17 00:00:00 2001 From: TankTheBirb <96669534+TankTheBirb@users.noreply.github.com> Date: Fri, 28 Apr 2023 20:28:14 -0400 Subject: [PATCH] Make synth medicines tell medical you are dying I just stole the code from the organic ones tbh but somehow it works so I'm happy with that. Doesn't impact balance aside from letting medical know that they can do SAR things and to maybe make science get a roboticist from somewhere. --- code/modules/nifsoft/software/05_health.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/modules/nifsoft/software/05_health.dm b/code/modules/nifsoft/software/05_health.dm index f19e6c58cd2..3386d185cf4 100644 --- a/code/modules/nifsoft/software/05_health.dm +++ b/code/modules/nifsoft/software/05_health.dm @@ -86,6 +86,7 @@ var/mode = 0 health_flags = (NIF_H_SYNTHREPAIR) + //These self-activate on their own, these aren't user-settable to on/off. /datum/nifsoft/medichines_syn/activate() if((. = ..())) @@ -98,6 +99,8 @@ /datum/nifsoft/medichines_syn/life() if((. = ..())) //We're good! + var/mob/living/carbon/human/S = nif.human + var/HP_percent = S.health/S.getMaxHealth() if(!nif.human.bad_external_organs.len) if(mode || active) nif.notify("User Status: NORMAL. Medichines deactivating.") @@ -120,6 +123,15 @@ else if(mode == 1) mode = 2 nif.notify("Medichines unable to repair all damage. Perform manual repairs.",TRUE) + + if(mode == 2 && HP_percent < -0.4) //lets inform someone who might be able to help us that we got toasted and roasted + nif.notify("User Status: CRITICAL. Notifying medical!",TRUE) + mode = 3 //this does nothing except stop it from repeating over and over and over and over and over and over and over + if(!isbelly(S.loc)) //Not notified in case of vore, for gameplay purposes. + var/turf/T = get_turf(S) + var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) + a.autosay("[S.real_name] is in a critical condition, located at ([T.x],[T.y],[T.z])!", "[S.real_name]'s NIF", "Medical") + qdel(a) return TRUE