[Ready] Refactors stuns and status effects. (#17579)

* Fixes reviver runtime

* Confusion status effect

* Dizzy status effect

* Drowsiness status effect

* decaying -> transient

* Drunkenness status effect

* why use timer when SSfastprocessing work good

* stuns (mostly)

* weaken and immobalise

* stun/weaken times

* update_flags redundancies.

* Slowed()

* Silence + fixes transient decay

* Jittery

* sleeping

* Paralyze -> weaken

* Cult sluring

* paralyse

* Stammer

* slurring + projectile cleanups

* losebreath

* Hallucination

* forgor this

* eyeblurry

* eye blind

* Druggy

* affected didn't like my spacing

* review pass

* second review pass

* some cleanups

* documentation and signal framework

* confusion fix

* Fixes spec_stun

* rejuv fix

* removes a TODO

* conflicted myself

* fixes

* self review

* review

* removes TODOs

* adminfreeze

* TM fixes

* hallucination fix + others

* tones down alchol and runtime fixes

* confusion overlay suggestion

* more fixes

* runtime fix

* losebreath fix

* clamp => directional bounded sum

* steel review

* oops

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* reduces the dizziness cycle rate

* borg hotfix

* sanctified decursening

Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Charlie
2022-05-24 16:35:26 +01:00
committed by GitHub
co-authored by SteelSlayer mochi
parent b32fb92770
commit 0f7a8707ef
311 changed files with 2268 additions and 2155 deletions
+6
View File
@@ -142,3 +142,9 @@
#define EMP_HEAVY 1
#define EMP_LIGHT 2
/*
* converts life cycle values into deciseconds. try and avoid usage of this.
* this is needed as many functions for stun durations used to output cycles as values, but we now track stun times in deciseconds.
*/
#define STATUS_EFFECT_CONSTANT * 20
+11 -9
View File
@@ -374,18 +374,20 @@
#define COMSIG_LIVING_AHEAL "living_aheal"
//ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS!
///from base of mob/living/Stun() (amount, update, ignore)
// none of these are called as of right now, as there is nothing listening for them.
///from base of mob/living/Stun() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_STUN "living_stun"
///from base of mob/living/Knockdown() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown"
///from base of mob/living/Paralyze() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze"
///from base of mob/living/Immobilize() (amount, update, ignore)
///from base of mob/living/Stun() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_WEAKEN "living_weaken"
///from base of mob/living/Knockdown() (amount, ignore_canstun)
///#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" // one day
///from base of mob/living/Paralyse() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_PARALYSE "living_paralyse"
///from base of mob/living/Immobilize() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize"
///from base of mob/living/Unconscious() (amount, update, ignore)
///from base of mob/living/Unconscious() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious"
///from base of mob/living/Sleeping() (amount, update, ignore)
///from base of mob/living/Sleeping() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping"
#define COMPONENT_NO_STUN (1<<0) //For all of them
///from base of /mob/living/can_track(): (mob/user)
+1 -4
View File
@@ -196,12 +196,9 @@
#define STATUS_UPDATE_HEALTH 1
#define STATUS_UPDATE_STAT 2
#define STATUS_UPDATE_CANMOVE 4
#define STATUS_UPDATE_STAMINA 8
#define STATUS_UPDATE_BLIND 16
#define STATUS_UPDATE_BLURRY 32
#define STATUS_UPDATE_NEARSIGHTED 64
#define STATUS_UPDATE_DRUGGY 128
#define STATUS_UPDATE_NONE 0
#define STATUS_UPDATE_ALL (~0)
@@ -300,4 +297,4 @@
#define FLASH_PROTECTION_WELDER 2
#define MAX_EYE_BLURRY_FILTER_SIZE 2
#define EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER 0.1
#define EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER 0.005
+1 -1
View File
@@ -33,7 +33,7 @@ Ask ninjanomnom if they're around
#define RAD_MOB_KNOCKDOWN 2000 // How much stored radiation to check for stunning
#define RAD_MOB_KNOCKDOWN_PROB 1 // Chance of knockdown per tick when over threshold
#define RAD_MOB_KNOCKDOWN_AMOUNT 3 // Amount of knockdown when it occurs
#define RAD_MOB_KNOCKDOWN_AMOUNT 6 SECONDS // Amount of knockdown when it occurs
#define RAD_NO_INSULATION 1.0 // For things that shouldn't become irradiated for whatever reason
#define RAD_VERY_LIGHT_INSULATION 0.9 // What girders have
+25 -6
View File
@@ -46,14 +46,8 @@
// DEBUFFS //
/////////////
//#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is stunned
//#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is knocked down
//#define STATUS_EFFECT_UNCONSCIOUS /datum/status_effect/incapacitating/unconscious //the affected is unconscious
//#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping //the affected is asleep
//#define STATUS_EFFECT_BELLIGERENT /datum/status_effect/belligerent //forces the affected to walk, doing damage if they try to run
//#define STATUS_EFFECT_GEISTRACKER /datum/status_effect/geis_tracker //if you're using geis, this tracks that and keeps you from using scripture
@@ -87,6 +81,31 @@
/// If a moth is in a cocoon
#define STATUS_EFFECT_COCOONED /datum/status_effect/cocooned
//human status effects
// incapacitating
#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun
#define STATUS_EFFECT_WEAKENED /datum/status_effect/incapacitating/weakened
#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping
#define STATUS_EFFECT_SLOWED /datum/status_effect/incapacitating/slowed
#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed
// transient
#define STATUS_EFFECT_CONFUSION /datum/status_effect/transient/confusion
#define STATUS_EFFECT_DIZZINESS /datum/status_effect/transient/dizziness
#define STATUS_EFFECT_DROWSINESS /datum/status_effect/transient/drowsiness
#define STATUS_EFFECT_DRUNKENNESS /datum/status_effect/transient/drunkenness
#define STATUS_EFFECT_SILENCED /datum/status_effect/transient/silence
#define STATUS_EFFECT_JITTER /datum/status_effect/transient/jittery
#define STATUS_EFFECT_CULT_SLUR /datum/status_effect/transient/cult_slurring
#define STATUS_EFFECT_STAMMER /datum/status_effect/transient/stammering
#define STATUS_EFFECT_SLURRING /datum/status_effect/transient/slurring
#define STATUS_EFFECT_LOSE_BREATH /datum/status_effect/transient/lose_breath
#define STATUS_EFFECT_HALLUCINATION /datum/status_effect/transient/hallucination
#define STATUS_EFFECT_BLURRY_EYES /datum/status_effect/transient/eye_blurry
#define STATUS_EFFECT_BLINDED /datum/status_effect/transient/blindness
#define STATUS_EFFECT_DRUGGED /datum/status_effect/transient/drugged
/////////////
// NEUTRAL //
/////////////