mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
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.
This commit is contained in:
@@ -330,7 +330,7 @@
|
||||
begin_reclamation()
|
||||
if(washing_face)
|
||||
SEND_SIGNAL(user, COMSIG_COMPONENT_CLEAN_FACE_ACT, CLEAN_WASH)
|
||||
user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep
|
||||
user.adjust_drowsyness(rand(-2, -3)) //Washing your face wakes you up if you're falling asleep
|
||||
else if(ishuman(user))
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
if(!human_user.wash_hands(CLEAN_WASH))
|
||||
@@ -544,7 +544,7 @@
|
||||
|
||||
if(washing_face)
|
||||
SEND_SIGNAL(user, COMSIG_COMPONENT_CLEAN_FACE_ACT, CLEAN_WASH)
|
||||
user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep
|
||||
user.adjust_drowsyness(rand(-2, -3)) //Washing your face wakes you up if you're falling asleep
|
||||
else if(ishuman(user))
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
if(!human_user.wash_hands(CLEAN_WASH))
|
||||
|
||||
Reference in New Issue
Block a user