mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
This adds throw_alert() and /obj/screen/alert, a system that allows you to do custom hud alerts for any variety of things from "You're too cold!" to mecha status indicators for the pilot. There's quite a few things that actually got replaced; the fire/oxy/tox/co2 alerts are all now just alerts, as is nutrition. The xenochimera feral indicator would probably be a good candidate for conversion, but I didn't touch it in this PR. There's also a number of new alerts, such as blindness, highness, legcuffed, buckled, handcuffed, and probably some more I missed; read code/_onclick/hud/alert.dm and see for yourself! Additionally, a number of tweaks have been done to resisting code, to make it so that there's an indicator when you're buckled or handcuffed, and can just click the alert to start resisting. This includes a refactor that combines the logic for lockers, holders, micros escaping from shoes, and struggling in a gut all into one proc, called container_resist(). This means that vore bellies actually no longer need the resist override, but it's been left in place just in case someone finds something else they want to use it for. Also, the health and internals indicator got moved down one tile each. Needed room for the alerts. If we add the oxygen tank action buttons from /tg/ and remove the internals indicator, the health indicator can go back where it was originally.
65 lines
2.7 KiB
Plaintext
65 lines
2.7 KiB
Plaintext
/datum/technomancer/spell/resurrect
|
|
name = "Resurrect"
|
|
desc = "This function injects various regenetive medical compounds and nanomachines, in an effort to restart the body, \
|
|
however this must be done soon after they die, as this will have no effect on people who have died long ago. It also doesn't \
|
|
resolve whatever caused them to die originally."
|
|
cost = 100
|
|
obj_path = /obj/item/weapon/spell/resurrect
|
|
ability_icon_state = "tech_resurrect"
|
|
category = SUPPORT_SPELLS
|
|
|
|
/obj/item/weapon/spell/resurrect
|
|
name = "resurrect"
|
|
icon_state = "radiance"
|
|
desc = "Perhaps this can save a trip to cloning?"
|
|
cast_methods = CAST_MELEE
|
|
aspect = ASPECT_BIOMED
|
|
|
|
/obj/item/weapon/spell/resurrect/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
|
|
if(isliving(hit_atom))
|
|
var/mob/living/L = hit_atom
|
|
if(L == user)
|
|
to_chat(user, "<span class='warning'>Clever as you may seem, this won't work on yourself while alive.</span>")
|
|
return 0
|
|
if(L.stat != DEAD)
|
|
to_chat(user, "<span class='warning'>\The [L] isn't dead!</span>")
|
|
return 0
|
|
if(pay_energy(5000))
|
|
if(L.tod > world.time + 30 MINUTES)
|
|
to_chat(user, "<span class='danger'>\The [L]'s been dead for too long, even this function cannot replace cloning at this point.</span>")
|
|
return 0
|
|
to_chat(user, "<span class='notice'>You stab \the [L] with a hidden integrated hypo, attempting to bring them back...</span>")
|
|
if(istype(L, /mob/living/simple_mob))
|
|
var/mob/living/simple_mob/SM = L
|
|
SM.health = SM.getMaxHealth() / 3
|
|
SM.set_stat(CONSCIOUS)
|
|
dead_mob_list -= SM
|
|
living_mob_list += SM
|
|
SM.update_icon()
|
|
adjust_instability(15)
|
|
else if(ishuman(L))
|
|
var/mob/living/carbon/human/H = L
|
|
|
|
if(!H.client && H.mind) //Don't force the dead person to come back if they don't want to.
|
|
for(var/mob/observer/dead/ghost in player_list)
|
|
if(ghost.mind == H.mind)
|
|
ghost.notify_revive("The Technomancer [user.real_name] is trying to revive you. \
|
|
Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg', source = user)
|
|
break
|
|
|
|
H.adjustBruteLoss(-40)
|
|
H.adjustFireLoss(-40)
|
|
|
|
sleep(10 SECONDS)
|
|
if(H.client)
|
|
L.set_stat(CONSCIOUS) //Note that if whatever killed them in the first place wasn't fixed, they're likely to die again.
|
|
dead_mob_list -= H
|
|
living_mob_list += H
|
|
H.timeofdeath = null
|
|
visible_message("<span class='danger'>\The [H]'s eyes open!</span>")
|
|
to_chat(user, "<span class='notice'>It's alive!</span>")
|
|
adjust_instability(50)
|
|
log_and_message_admins("has resurrected [H].")
|
|
else
|
|
to_chat(user, "<span class='warning'>The body of \the [H] doesn't seem to respond, perhaps you could try again?</span>")
|
|
adjust_instability(10) |