This repository has been archived by the owner on Sep 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
status_procs.dm
85 lines (69 loc) · 3.21 KB
/
status_procs.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
//eye_blind, eye_blurry, druggy, TRAIT_BLIND trait, TRAIT_NEARSIGHT trait, and TRAIT_HUSK trait.
/mob/living/carbon/IsParalyzed(include_stamcrit = TRUE)
return ..() || (include_stamcrit && HAS_TRAIT_FROM(src, TRAIT_INCAPACITATED, STAMINA))
/mob/living/carbon/proc/enter_stamcrit()
if(!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE))
return
if(HAS_TRAIT_FROM(src, TRAIT_INCAPACITATED, STAMINA)) //Already in stamcrit
return
if(absorb_stun(0)) //continuous effect, so we don't want it to increment the stuns absorbed.
return
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
ADD_TRAIT(src, TRAIT_INCAPACITATED, STAMINA)
ADD_TRAIT(src, TRAIT_IMMOBILIZED, STAMINA)
ADD_TRAIT(src, TRAIT_FLOORED, STAMINA)
if((maxHealth - health + getStaminaLoss()) > 120) // Puts you a little further into the initial stamcrit, makes stamcrit harder to outright counter with chems. //WS Edit - Stamina stacks with health damage
adjustStaminaLoss(30, FALSE)
/mob/living/carbon/adjust_drugginess(amount)
druggy = max(druggy+amount, 0)
if(druggy)
overlay_fullscreen("high", /obj/screen/fullscreen/high)
throw_alert("high", /obj/screen/alert/high)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "high", /datum/mood_event/high)
else
clear_fullscreen("high")
clear_alert("high")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "high")
/mob/living/carbon/set_drugginess(amount)
druggy = max(amount, 0)
if(druggy)
overlay_fullscreen("high", /obj/screen/fullscreen/high)
throw_alert("high", /obj/screen/alert/high)
else
clear_fullscreen("high")
clear_alert("high")
/mob/living/carbon/adjust_disgust(amount)
disgust = clamp(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
/mob/living/carbon/set_disgust(amount)
disgust = clamp(amount, 0, DISGUST_LEVEL_MAXEDOUT)
////////////////////////////////////////TRAUMAS/////////////////////////////////////////
/mob/living/carbon/proc/get_traumas()
. = list()
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
. = B.traumas
/mob/living/carbon/proc/has_trauma_type(brain_trauma_type, resilience)
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
. = B.has_trauma_type(brain_trauma_type, resilience)
/mob/living/carbon/proc/gain_trauma(datum/brain_trauma/trauma, resilience, ...)
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
var/list/arguments = list()
if(args.len > 2)
arguments = args.Copy(3)
. = B.brain_gain_trauma(trauma, resilience, arguments)
/mob/living/carbon/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, resilience)
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
. = B.gain_trauma_type(brain_trauma_type, resilience)
/mob/living/carbon/proc/cure_trauma_type(brain_trauma_type = /datum/brain_trauma, resilience)
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
. = B.cure_trauma_type(brain_trauma_type, resilience)
/mob/living/carbon/proc/cure_all_traumas(resilience)
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
. = B.cure_all_traumas(resilience)