diff --git a/code/modules/mob/living/carbon/human/damage_menu.dm b/code/modules/mob/living/carbon/human/damage_menu.dm index 6f3f68dda05..03ad0221b27 100644 --- a/code/modules/mob/living/carbon/human/damage_menu.dm +++ b/code/modules/mob/living/carbon/human/damage_menu.dm @@ -144,6 +144,13 @@ if("misc") log_and_message_admins("used the Damage Menu to deploy [params["action"]] on [H]", usr, get_turf(H)) switch(params["action"]) + // Minor actions() + if("seizure") + H.seizure() + if("heart attack") + if(!H.trigger_heart_attack()) + to_chat(usr, SPAN_WARNING("Unable to trigger a heart attack on [H].")) + // Major actions if("wind") toggle_wind_paralysis(H, usr) if("gigashatter") diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 05bfb478c95..3ccd396e42e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1353,6 +1353,26 @@ if(shock_stage >= 150) Weaken(20) +/mob/living/carbon/human/proc/trigger_heart_attack() + if(status_flags & GODMODE) + return FALSE + if(stat == DEAD || !should_have_organ(BP_HEART)) + return FALSE + + var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART] + if(!istype(heart) || BP_IS_ROBOTIC(heart) || (heart.status & ORGAN_DEAD)) + return FALSE + + shock_stage = max(shock_stage, 120) + heart.pulse = PULSE_NONE + heart.handle_pulse() + BITSET(hud_updateflag, HEALTH_HUD) + + to_chat(src, SPAN_DANGER("Your heart has stopped!")) + visible_message("[src] suddenly collapses, clutching at [get_pronoun("his")] chest!") + Paralyse(15) + return TRUE + /* Called by life(), instead of having the individual hud items update icons each tick and check for status changes diff --git a/html/changelogs/Bat-DmgMenu.yml b/html/changelogs/Bat-DmgMenu.yml new file mode 100644 index 00000000000..d156e07eb49 --- /dev/null +++ b/html/changelogs/Bat-DmgMenu.yml @@ -0,0 +1,5 @@ +author: Batrachophrenoboocosmomachia +delete-after: True +changes: + - rscadd: "Adds Seizure and Heart Attack buttons to the Damage Menu." + - rscadd: "Adds tooltips to several buttons in the Damage Menu." diff --git a/tgui/packages/tgui/interfaces/DamageMenu.tsx b/tgui/packages/tgui/interfaces/DamageMenu.tsx index 7cb801e73ea..c996bef93e9 100644 --- a/tgui/packages/tgui/interfaces/DamageMenu.tsx +++ b/tgui/packages/tgui/interfaces/DamageMenu.tsx @@ -123,35 +123,54 @@ export const DamageMenu = (props) => { )} -
+
+
+