Drunk alert

This commit is contained in:
SabreML
2020-11-11 03:08:45 +00:00
parent 3476bb6a64
commit 57d5d12599
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -269,9 +269,9 @@ or something covering your eyes."
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
icon_state = "high"
/obj/screen/alert/drunk //Not implemented
/obj/screen/alert/drunk
name = "Drunk"
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it."
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition."
icon_state = "drunk"
/obj/screen/alert/embeddedobject
+5
View File
@@ -364,6 +364,11 @@
/mob/living/SetSlur(amount)
slurring = max(amount, 0)
if(slurring && drunk)
throw_alert("drunk", /obj/screen/alert/drunk)
else
clear_alert("drunk")
/mob/living/AdjustSlur(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(slurring, amount, bound_lower, bound_upper)
SetSlur(new_value)