mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
5540632705
* Reworks transformation sting to be temporarily in living mobs, forever in dead mobs * Modular updates * Recaches the icons generated in the `changeling` unit test * Pain * More tweaks * Disable unit test * Let's see if we can pass test temporarily * Makes transformation sting unobtainable more cleanly * Unit test * Cursed proc * Kill the unholy copy pasta Seriously this stuff is just awful. This is not maintainable. * test this * Update comments * Fixing the screenshot test, maybe? * grrr * Update changeling.dm * Attempt to fix this nonsense * Update changeling.dm * Update changeling.dm * Update changeling.dm * Update dna.dm * Fixes it? * Screenshot test * Update _traits.dm * Update _traits.dm * Fix this * Update dna.dm * Update dna.dm * Hmm * This proc needs a new name * I want to scream but I have no mutant parts * Fix * Update species.dm * Update species.dm * Update species.dm * Update species.dm * Some touch ups --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Jolly <70232195+Jolly-66@users.noreply.github.com>
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
/datum/status_effect/drowsiness
|
|
id = "drowsiness"
|
|
tick_interval = 2 SECONDS
|
|
alert_type = null
|
|
remove_on_fullheal = TRUE
|
|
|
|
/datum/status_effect/drowsiness/on_creation(mob/living/new_owner, duration = 10 SECONDS)
|
|
src.duration = duration
|
|
return ..()
|
|
|
|
/datum/status_effect/drowsiness/on_apply()
|
|
if(HAS_TRAIT(owner, TRAIT_SLEEPIMMUNE) || !(owner.status_flags & CANUNCONSCIOUS))
|
|
return FALSE
|
|
// Do robots dream of electric sheep?
|
|
if(issilicon(owner))
|
|
return FALSE
|
|
|
|
RegisterSignal(owner, COMSIG_COMPONENT_CLEAN_FACE_ACT, PROC_REF(on_face_clean))
|
|
return TRUE
|
|
|
|
/datum/status_effect/drowsiness/on_remove()
|
|
UnregisterSignal(owner, COMSIG_COMPONENT_CLEAN_FACE_ACT)
|
|
|
|
/// Signal proc for [COMSIG_COMPONENT_CLEAN_FACE_ACT]. When we wash our face, reduce drowsiness by a bit.
|
|
/datum/status_effect/drowsiness/proc/on_face_clean(datum/source)
|
|
SIGNAL_HANDLER
|
|
|
|
remove_duration(rand(4 SECONDS, 6 SECONDS))
|
|
|
|
/datum/status_effect/drowsiness/tick(seconds_between_ticks)
|
|
// You do not feel drowsy while unconscious or in stasis
|
|
if(owner.stat >= UNCONSCIOUS || HAS_TRAIT(owner, TRAIT_STASIS))
|
|
return
|
|
|
|
// Resting helps against drowsiness
|
|
// While resting, we lose 4 seconds of duration (2 additional ticks) per tick
|
|
if(owner.resting && remove_duration(2 * seconds_between_ticks))
|
|
return
|
|
|
|
owner.set_eye_blur_if_lower(4 SECONDS)
|
|
if(prob(5))
|
|
owner.AdjustSleeping(10 SECONDS)
|