mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Drowsiness refactor [MDB IGNORE] (#8836)
* Drowsiness refactor (#62104) Creates two procs in /mob/status_procs for handling drowsiness changes (with check for negative values), and refactors all code to use these procs instead of assigning values to the mob's drowsiness themselves. * Drowsiness refactor * Fixing more stuff in our code Co-authored-by: thatoneplebeian <67017991+thatoneplebeian@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
thatoneplebeian
GoldenAlpharex
parent
1fc674a3d8
commit
d5cc576efb
@@ -138,7 +138,7 @@
|
||||
owner.Sleeping(60)
|
||||
else if(!owner.drowsyness && DT_PROB(sleep_chance, delta_time))
|
||||
to_chat(owner, span_warning("You feel tired..."))
|
||||
owner.drowsyness += 10
|
||||
owner.adjust_drowsyness(10)
|
||||
|
||||
/datum/brain_trauma/severe/monophobia
|
||||
name = "Monophobia"
|
||||
|
||||
@@ -52,7 +52,7 @@ Bonus
|
||||
if(prob(50))
|
||||
to_chat(M, span_warning("You try to focus on staying awake."))
|
||||
if(M.drowsyness < 70)
|
||||
M.drowsyness += 5
|
||||
M.adjust_drowsyness(5)
|
||||
if(4)
|
||||
if(prob(50))
|
||||
if(yawning)
|
||||
@@ -60,7 +60,7 @@ Bonus
|
||||
else
|
||||
to_chat(M, span_warning("You nod off for a moment.")) //you can't really yawn while nodding off, can you?
|
||||
if(M.drowsyness < 70)
|
||||
M.drowsyness += 10
|
||||
M.adjust_drowsyness(10)
|
||||
if(yawning)
|
||||
M.emote("yawn")
|
||||
if(M.CanSpreadAirborneDisease())
|
||||
@@ -69,7 +69,7 @@ Bonus
|
||||
if(prob(50))
|
||||
to_chat(M, span_warning("[pick("So tired...","You feel very sleepy.","You have a hard time keeping your eyes open.","You try to stay awake.")]"))
|
||||
if(M.drowsyness < 70)
|
||||
M.drowsyness += 40
|
||||
M.adjust_drowsyness(40)
|
||||
if(yawning)
|
||||
M.emote("yawn")
|
||||
if(M.CanSpreadAirborneDisease())
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
if(A.stage >= 3)
|
||||
M.dizziness = max(0, M.dizziness - 2)
|
||||
M.drowsyness = max(0, M.drowsyness - 2)
|
||||
M.adjust_drowsyness(-2)
|
||||
M.slurring = max(0, M.slurring - 2)
|
||||
M.set_confusion(max(0, M.get_confusion() - 2))
|
||||
if(purge_alcohol)
|
||||
@@ -47,7 +47,7 @@
|
||||
H.drunkenness = max(H.drunkenness - 5, 0)
|
||||
|
||||
if(A.stage >= 4)
|
||||
M.drowsyness = max(0, M.drowsyness - 2)
|
||||
M.adjust_drowsyness(-2)
|
||||
if(M.reagents.has_reagent(/datum/reagent/toxin/mindbreaker))
|
||||
M.reagents.remove_reagent(/datum/reagent/toxin/mindbreaker, 5)
|
||||
if(M.reagents.has_reagent(/datum/reagent/toxin/histamine))
|
||||
|
||||
Reference in New Issue
Block a user