Adds a TGUI warning for the bottle of mayhem (#89365)

## About The Pull Request

Adds a TGUI warning for the bottle of mayhem if you try to break it so
that you know what you are about to do
## Why It's Good For The Game

Having a confirmation warning allows the player to know what the mayhem
in a bottle will do (drives people into a killing frenzy) and give them
one more chance before actually breaking the bottle, especially for
nonantags who may not know what it actually does.
## Changelog
🆑
qol: Gives a confirmation box describing the mayhem in a bottle's effect
when a player tries to break the bottle. Player must confirm before
bottle takes effect.
/🆑
This commit is contained in:
Archie700
2025-02-17 00:27:50 +01:00
committed by GitHub
parent 44d991b526
commit 437cd9943d
@@ -249,6 +249,10 @@
icon_state = "vial"
/obj/item/mayhem/attack_self(mob/user)
if(tgui_alert(user, "Breaking the bottle will cause nearby crewmembers to go into a murderous frenzy. Be sure you know what you are doing...","Break the bottle?",list("Break it!","DON'T")) != "Break it!")
return
if(QDELETED(src) || !user.is_holding(src) || user.incapacitated)
return
for(var/mob/living/carbon/human/target in range(7,user))
target.apply_status_effect(/datum/status_effect/mayhem)
to_chat(user, span_notice("You shatter the bottle!"))