diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index d1fbf26616d5..97e1ac7c574d 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -1,138 +1,93 @@ - -//These are all the different status effects. Use the paths for each effect in the defines. - -#define STATUS_EFFECT_MULTIPLE 0 //if it allows multiple instances of the effect - -#define STATUS_EFFECT_UNIQUE 1 //if it allows only one, preventing new instances - -#define STATUS_EFFECT_REPLACE 2 //if it allows only one, but new instances replace - -#define STATUS_EFFECT_REFRESH 3 // if it only allows one, and new instances just instead refresh the timer - -/////////// -// BUFFS // -/////////// - -#define STATUS_EFFECT_SHADOW_MEND /datum/status_effect/shadow_mend //Quick, powerful heal that deals damage afterwards. Heals 15 brute/burn every second for 3 seconds. -#define STATUS_EFFECT_VOID_PRICE /datum/status_effect/void_price //The price of healing yourself with void energy. Deals 3 brute damage every 3 seconds for 30 seconds. - -#define STATUS_EFFECT_POWERREGEN /datum/status_effect/cyborg_power_regen //Regenerates power on a given cyborg over time - -#define STATUS_EFFECT_WISH_GRANTERS_GIFT /datum/status_effect/wish_granters_gift //If you're currently resurrecting with the Wish Granter - -#define STATUS_EFFECT_BLOODDRUNK /datum/status_effect/blooddrunk //Stun immunity and greatly reduced damage taken - -#define STATUS_EFFECT_FLESHMEND /datum/status_effect/fleshmend //Very fast healing; suppressed by fire, and heals less fire damage - -#define STATUS_EFFECT_EXERCISED /datum/status_effect/exercised //Prevents heart disease - -#define STATUS_EFFECT_HIPPOCRATIC_OATH /datum/status_effect/hippocraticOath //Gives you an aura of healing as well as regrowing the Rod of Asclepius if lost - -#define STATUS_EFFECT_GOOD_MUSIC /datum/status_effect/good_music - -#define STATUS_EFFECT_REGENERATIVE_CORE /datum/status_effect/regenerative_core - -#define STATUS_EFFECT_ANTIMAGIC /datum/status_effect/antimagic //grants antimagic (and reapplies if lost) for the duration - -///////////// -// DEBUFFS // -///////////// - -#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is unable to move or use items - -#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is unable to stand up - -#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized //the affected is unable to move - -#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed //the affected is unable to move, use items, or stand up. - -#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_PACIFY /datum/status_effect/pacify //the affected is pacified, preventing direct hostile actions - -#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 - -#define STATUS_EFFECT_MANIAMOTOR /datum/status_effect/maniamotor //disrupts, damages, and confuses the affected as long as they're in range of the motor -#define MAX_MANIA_SEVERITY 100 //how high the mania severity can go -#define MANIA_DAMAGE_TO_CONVERT 90 //how much damage is required before it'll convert affected targets - -#define STATUS_EFFECT_CHOKINGSTRAND /datum/status_effect/strandling //Choking Strand - -#define STATUS_EFFECT_HISWRATH /datum/status_effect/his_wrath //His Wrath. - -#define STATUS_EFFECT_SUMMONEDGHOST /datum/status_effect/cultghost //is a cult ghost and can't use manifest runes - -#define STATUS_EFFECT_CRUSHERMARK /datum/status_effect/crusher_mark //if struck with a proto-kinetic crusher, takes a ton of damage - -#define STATUS_EFFECT_SAWBLEED /datum/status_effect/stacking/saw_bleed //if the bleed builds up enough, takes a ton of damage - -#define STATUS_EFFECT_NECKSLICE /datum/status_effect/neck_slice //Creates the flavor messages for the neck-slice - -#define STATUS_EFFECT_CONVULSING /datum/status_effect/convulsing - -#define STATUS_EFFECT_NECROPOLIS_CURSE /datum/status_effect/necropolis_curse -#define STATUS_EFFECT_HIVEMIND_CURSE /datum/status_effect/necropolis_curse/hivemind -#define CURSE_BLINDING 1 //makes the edges of the target's screen obscured -#define CURSE_SPAWNING 2 //spawns creatures that attack the target only -#define CURSE_WASTING 4 //causes gradual damage -#define CURSE_GRASPING 8 //hands reach out from the sides of the screen, doing damage and stunning if they hit the target - -#define STATUS_EFFECT_KINDLE /datum/status_effect/kindle //A knockdown reduced by 1 second for every 3 points of damage the target takes. - -#define STATUS_EFFECT_ICHORIAL_STAIN /datum/status_effect/ichorial_stain //Prevents a servant from being revived by vitality matrices for one minute. - -#define STATUS_EFFECT_GONBOLAPACIFY /datum/status_effect/gonbolaPacify //Gives the user gondola traits while the gonbola is attached to them. - -#define STATUS_EFFECT_SPASMS /datum/status_effect/spasms //causes random muscle spasms - -#define STATUS_EFFECT_DNA_MELT /datum/status_effect/dna_melt //usually does something horrible to you when you hit 100 genetic instability - -#define STATUS_EFFECT_GO_AWAY /datum/status_effect/go_away //makes you launch through walls in a single direction for a while - -#define STATUS_EFFECT_STASIS /datum/status_effect/grouped/stasis //Halts biological functions like bleeding, chemical processing, blood regeneration, walking, etc - -#define STATUS_EFFECT_FAKE_VIRUS /datum/status_effect/fake_virus //gives you fluff messages for cough, sneeze, headache, etc but without an actual virus - -#define STATUS_EFFECT_METAB_FROZEN /datum/status_effect/metab_frozen // Affected cannot process chems - -///////////// -// NEUTRAL // -///////////// - -#define STATUS_EFFECT_SIGILMARK /datum/status_effect/sigil_mark - -#define STATUS_EFFECT_CRUSHERDAMAGETRACKING /datum/status_effect/crusher_damage //tracks total kinetic crusher damage on a target - -#define STATUS_EFFECT_SYPHONMARK /datum/status_effect/syphon_mark //tracks kills for the KA death syphon module - -#define STATUS_EFFECT_INLOVE /datum/status_effect/in_love //Displays you as being in love with someone else, and makes hearts appear around them. - -#define STATUS_EFFECT_BUGGED /datum/status_effect/bugged //Lets other mobs listen in on what it hears - -#define STATUS_EFFECT_BOUNTY /datum/status_effect/bounty //rewards the person who added this to the target with refreshed spells and a fair heal - -#define STATUS_EFFECT_HELDUP /datum/status_effect/heldup // someone is currently pointing a gun at you - -#define STATUS_EFFECT_HOLDUP /datum/status_effect/holdup // you are currently pointing a gun at someone - -#define STATUS_EFFECT_OFFERING /datum/status_effect/offering // you are offering up an item to people - -#define STATUS_EFFECT_SURRENDER /datum/status_effect/surrender // gives an alert to quickly surrender -///////////// -// SLIME // -///////////// - -#define STATUS_EFFECT_RAINBOWPROTECTION /datum/status_effect/rainbow_protection //Invulnerable and pacifistic -#define STATUS_EFFECT_SLIMESKIN /datum/status_effect/slimeskin //Increased armor +///if it allows multiple instances of the effect +#define STATUS_EFFECT_MULTIPLE 0 +///if it allows only one, preventing new instances +#define STATUS_EFFECT_UNIQUE 1 +///if it allows only one, but new instances replace +#define STATUS_EFFECT_REPLACE 2 +/// if it only allows one, and new instances just instead refresh the timer +#define STATUS_EFFECT_REFRESH 3 + +///Processing flags - used to define the speed at which the status will work +///This is fast - 0.2s between ticks (I believe!) +#define STATUS_EFFECT_FAST_PROCESS 0 +///This is slower and better for more intensive status effects - 1s between ticks +#define STATUS_EFFECT_NORMAL_PROCESS 1 + +//several flags for the Necropolis curse status effect +///makes the edges of the target's screen obscured +#define CURSE_BLINDING (1<<0) +///spawns creatures that attack the target only +#define CURSE_SPAWNING (1<<1) +///causes gradual damage +#define CURSE_WASTING (1<<2) +///hands reach out from the sides of the screen, doing damage and stunning if they hit the target +#define CURSE_GRASPING (1<<3) // Grouped effect sources, see also code/__DEFINES/traits.dm #define STASIS_MACHINE_EFFECT "stasis_machine" -// Stasis helpers - -#define IS_IN_STASIS(mob) (mob.has_status_effect(STATUS_EFFECT_STASIS)) +// Status effect application helpers. +// These are macros for easier use of adjust_timed_status_effect and set_timed_status_effect. +// +// adjust_x: +// - Adds duration to a status effect +// - Removes duration if a negative duration is passed. +// - Ex: adjust_stutter(10 SECONDS) adds ten seconds of stuttering. +// - Ex: adjust_jitter(-5 SECONDS) removes five seconds of jittering, or just removes jittering if less than five seconds exist. +// +// adjust_x_up_to: +// - Will only add (or remove) duration of a status effect up to the second parameter +// - If the duration will result in going beyond the second parameter, it will stop exactly at that parameter +// - The second parameter cannot be negative. +// - Ex: adjust_stutter_up_to(20 SECONDS, 10 SECONDS) adds ten seconds of stuttering. +// +// set_x: +// - Set the duration of a status effect to the exact number. +// - Setting duration to zero seconds is effectively the same as just using remove_status_effect, or qdelling the effect. +// - Ex: set_stutter(10 SECONDS) sets the stuttering to ten seconds, regardless of whether they had more or less existing stutter. +// +// set_x_if_lower: +// - Will only set the duration of that effect IF any existing duration is lower than what was passed. +// - Ex: set_stutter_if_lower(10 SECONDS) will set stuttering to ten seconds if no stuttering or less than ten seconds of stuttering exists +// - Ex: set_jitter_if_lower(20 SECONDS) will do nothing if more than twenty seconds of jittering already exists + +#define adjust_stutter(duration) adjust_timed_status_effect(duration, /datum/status_effect/speech/stutter) +#define adjust_stutter_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/speech/stutter, up_to) +#define set_stutter(duration) set_timed_status_effect(duration, /datum/status_effect/speech/stutter) +#define set_stutter_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/speech/stutter, TRUE) + +#define adjust_derpspeech(duration) adjust_timed_status_effect(duration, /datum/status_effect/speech/stutter/derpspeech) +#define adjust_derpspeech_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/speech/stutter/derpspeech, up_to) +#define set_derpspeech(duration) set_timed_status_effect(duration, /datum/status_effect/speech/stutter/derpspeech) +#define set_derpspeech_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/speech/stutter/derpspeech, TRUE) + +#define adjust_slurring(duration) adjust_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk) +#define adjust_slurring_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk, up_to) +#define set_slurring(duration) set_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk) +#define set_slurring_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk, TRUE) + +#define adjust_dizzy(duration) adjust_timed_status_effect(duration, /datum/status_effect/dizziness) +#define adjust_dizzy_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/dizziness, up_to) +#define set_dizzy(duration) set_timed_status_effect(duration, /datum/status_effect/dizziness) +#define set_dizzy_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/dizziness, TRUE) + +#define adjust_jitter(duration) adjust_timed_status_effect(duration, /datum/status_effect/jitter) +#define adjust_jitter_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/jitter, up_to) +#define set_jitter(duration) set_timed_status_effect(duration, /datum/status_effect/jitter) +#define set_jitter_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/jitter, TRUE) + +#define adjust_confusion(duration) adjust_timed_status_effect(duration, /datum/status_effect/confusion) +#define adjust_confusion_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/confusion, up_to) +#define set_confusion(duration) set_timed_status_effect(duration, /datum/status_effect/confusion) +#define set_confusion_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/confusion, TRUE) +/* Drugginess is not a status effect (yet) +#define adjust_drugginess(duration) adjust_timed_status_effect(duration, /datum/status_effect/drugginess) +#define adjust_drugginess_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/drugginess, up_to) +#define set_drugginess(duration) set_timed_status_effect(duration, /datum/status_effect/drugginess) +#define set_drugginess_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/drugginess, TRUE) +*/ +#define adjust_hallucinations(duration) adjust_timed_status_effect(duration, /datum/status_effect/hallucination) +#define adjust_hallucinations_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/hallucination, up_to) +#define set_hallucinations(duration) set_timed_status_effect(duration, /datum/status_effect/hallucination) +#define set_hallucinations_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/hallucination, TRUE) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 8838ba324530..14a2399f1f2e 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -687,6 +687,8 @@ GLOBAL_LIST_EMPTY(species_list) . = pick(ais) return . +#define IS_IN_STASIS(mob) (mob.has_status_effect(/datum/status_effect/grouped/stasis)) + /// Gets the client of the mob, allowing for mocking of the client. /// You only need to use this if you know you're going to be mocking clients somewhere else. #define GET_CLIENT(mob) (##mob.client || ##mob.mock_client) diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index 069d89f0e7e7..b7f4a0f6515a 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -158,11 +158,11 @@ lose_text = "You feel in control of your muscles again." /datum/brain_trauma/mild/muscle_spasms/on_gain() - owner.apply_status_effect(STATUS_EFFECT_SPASMS) + owner.apply_status_effect(/datum/status_effect/spasms) ..() /datum/brain_trauma/mild/muscle_spasms/on_lose() - owner.remove_status_effect(STATUS_EFFECT_SPASMS) + owner.remove_status_effect(/datum/status_effect/spasms) ..() /datum/brain_trauma/mild/nervous_cough diff --git a/code/datums/components/gunpoint.dm b/code/datums/components/gunpoint.dm index 2865865c98ab..05809b5d2dd5 100644 --- a/code/datums/components/gunpoint.dm +++ b/code/datums/components/gunpoint.dm @@ -33,8 +33,8 @@ "You aim [weapon] point blank at [target]!", target) to_chat(target, "[shooter] aims [weapon] point blank at you!") - shooter.apply_status_effect(STATUS_EFFECT_HOLDUP) - target.apply_status_effect(STATUS_EFFECT_HELDUP) + shooter.apply_status_effect(/datum/status_effect/holdup, shooter) + target.apply_status_effect(/datum/status_effect/grouped/heldup, shooter) if(target.job == "Captain" && target.stat == CONSCIOUS && is_nuclear_operative(shooter)) if(istype(weapon, /obj/item/gun/ballistic/rocketlauncher) && weapon.chambered) @@ -48,8 +48,9 @@ /datum/component/gunpoint/Destroy(force, silent) var/mob/living/shooter = parent - shooter.remove_status_effect(STATUS_EFFECT_HOLDUP) - target.remove_status_effect(STATUS_EFFECT_HELDUP) + shooter.remove_status_effect(/datum/status_effect/holdup) + target.remove_status_effect(/datum/status_effect/grouped/heldup, shooter) + SEND_SIGNAL(target, COMSIG_CLEAR_MOOD_EVENT, "gunpoint") return ..() /datum/component/gunpoint/RegisterWithParent() @@ -108,14 +109,14 @@ INVOKE_ASYNC(src, PROC_REF(async_trigger_reaction)) /datum/component/gunpoint/proc/async_trigger_reaction() - + var/mob/living/shooter = parent + shooter.remove_status_effect(/datum/status_effect/holdup) // try doing these before the trigger gets pulled since the target (or shooter even) may not exist after pulling the trigger, dig? + target.remove_status_effect(/datum/status_effect/grouped/heldup, shooter) SEND_SIGNAL(target, COMSIG_CLEAR_MOOD_EVENT, "gunpoint") if(point_of_no_return) return point_of_no_return = TRUE - var/mob/living/shooter = parent - if(!weapon.can_shoot() || !weapon.can_trigger_gun(shooter) || (weapon.weapon_weight == WEAPON_HEAVY && shooter.get_inactive_held_item())) shooter.visible_message("[shooter] fumbles [weapon]!", \ "You fumble [weapon] and fail to fire at [target]!", target) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index dde90dd5dbe8..7faf2a315e42 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -255,7 +255,7 @@ if(-INFINITY to 0) message = "You can feel your DNA exploding, we need to do something fast!" if(stability <= 0) - holder.apply_status_effect(STATUS_EFFECT_DNA_MELT) + holder.apply_status_effect(/datum/status_effect/dna_melt) if(message) to_chat(holder, message) @@ -645,7 +645,7 @@ to_chat(src, "Oh, I actually feel quite alright!") reagents.add_reagent(/datum/reagent/aslimetoxin, 10) if(6) - apply_status_effect(STATUS_EFFECT_GO_AWAY) + apply_status_effect(/datum/status_effect/go_away) if(7) to_chat(src, "Oh, I actually feel quite alright!") ForceContractDisease(new/datum/disease/decloning()) //slow acting, non-viral clone damage based GBS diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index 4b885412165a..97e488fcdf5a 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -376,12 +376,12 @@ /datum/mutation/human/spastic/on_acquiring() if(..()) return - owner.apply_status_effect(STATUS_EFFECT_SPASMS) + owner.apply_status_effect(/datum/status_effect/spasms) /datum/mutation/human/spastic/on_losing() if(..()) return - owner.remove_status_effect(STATUS_EFFECT_SPASMS) + owner.remove_status_effect(/datum/status_effect/spasms) /datum/mutation/human/extrastun name = "Two Left Feet" diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 43c7bd3ab2ec..af8de572b991 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -22,7 +22,7 @@ /datum/status_effect/shadow_mend/on_remove() owner.visible_message("The violet light around [owner] glows black!", "The tendrils around you cinch tightly and reap their toll...") playsound(owner, 'sound/magic/teleport_diss.ogg', 50, TRUE) - owner.apply_status_effect(STATUS_EFFECT_VOID_PRICE) + owner.apply_status_effect(/datum/status_effect/void_price) /datum/status_effect/void_price @@ -308,7 +308,7 @@ STOP_PROCESSING(SSprocessing, src) //Hippocratic Oath: Applied when the Rod of Asclepius is activated. -/datum/status_effect/hippocraticOath +/datum/status_effect/hippocratic_oath id = "Hippocratic Oath" status_type = STATUS_EFFECT_UNIQUE duration = -1 @@ -318,19 +318,19 @@ var/hand var/deathTick = 0 -/datum/status_effect/hippocraticOath/on_apply() +/datum/status_effect/hippocratic_oath/on_apply() //Makes the user passive, it's in their oath not to harm! - ADD_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath") + ADD_TRAIT(owner, TRAIT_PACIFISM, "hippocratic_oath") var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] H.add_hud_to(owner) return ..() -/datum/status_effect/hippocraticOath/on_remove() - REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath") +/datum/status_effect/hippocratic_oath/on_remove() + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocratic_oath") var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] H.remove_hud_from(owner) -/datum/status_effect/hippocraticOath/tick() +/datum/status_effect/hippocratic_oath/tick() if(owner.stat == DEAD) if(deathTick < 4) deathTick += 1 @@ -395,7 +395,7 @@ var/mob/living/simple_animal/SM = L SM.adjustHealth(-3.5, forced = TRUE) -/datum/status_effect/hippocraticOath/proc/consume_owner() +/datum/status_effect/hippocratic_oath/proc/consume_owner() owner.visible_message("[owner]'s soul is absorbed into the rod, relieving the previous snake of its duty.") var/mob/living/simple_animal/hostile/retaliate/poison/snake/healSnake = new(owner.loc) var/list/chems = list(/datum/reagent/medicine/sal_acid, /datum/reagent/medicine/c2/convermol, /datum/reagent/medicine/oxandrolone) diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 52087f03174c..66b69f0403e5 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -219,18 +219,6 @@ desc = "Your biological functions have halted. You could live forever this way, but it's pretty boring." icon_state = "stasis" -/datum/status_effect/pacify/on_creation(mob/living/new_owner, set_duration) - if(isnum(set_duration)) - duration = set_duration - . = ..() - -/datum/status_effect/pacify/on_apply() - ADD_TRAIT(owner, TRAIT_PACIFISM, "status_effect") - return ..() - -/datum/status_effect/pacify/on_remove() - REMOVE_TRAIT(owner, TRAIT_PACIFISM, "status_effect") - //OTHER DEBUFFS /datum/status_effect/pacify id = "pacify" @@ -340,11 +328,11 @@ H.emote(pick("gasp", "gag", "choke")) /mob/living/proc/apply_necropolis_curse(set_curse) - var/datum/status_effect/necropolis_curse/C = has_status_effect(STATUS_EFFECT_NECROPOLIS_CURSE) + var/datum/status_effect/necropolis_curse/C = has_status_effect(/datum/status_effect/necropolis_curse) if(!set_curse) set_curse = pick(CURSE_BLINDING, CURSE_SPAWNING, CURSE_WASTING, CURSE_GRASPING) if(QDELETED(C)) - apply_status_effect(STATUS_EFFECT_NECROPOLIS_CURSE, set_curse) + apply_status_effect(/datum/status_effect/necropolis_curse, set_curse) else C.apply_curse(set_curse) C.duration += 3000 //time added by additional curses @@ -434,7 +422,7 @@ deltimer(timerid) -/datum/status_effect/gonbolaPacify +/datum/status_effect/gonbola_pacify id = "gonbolaPacify" status_type = STATUS_EFFECT_MULTIPLE tick_interval = -1 diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index 76a33319631f..18480d302cdc 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -158,12 +158,12 @@ desc = "Making any sudden moves would probably be a bad idea!" icon_state = "aimed" -/datum/status_effect/heldup/on_apply() - owner.apply_status_effect(STATUS_EFFECT_SURRENDER) +/datum/status_effect/grouped/heldup/on_apply() + owner.apply_status_effect(/datum/status_effect/surrender, src) return ..() -/datum/status_effect/heldup/on_remove() - owner.remove_status_effect(STATUS_EFFECT_SURRENDER) +/datum/status_effect/grouped/heldup/on_remove() + owner.remove_status_effect(/datum/status_effect/surrender, src) return ..() // holdup is for the person aiming diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index f0a1c403cfa4..4b97379ab030 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -98,13 +98,13 @@ if(target != occupant || !can_stasis) return playsound(src, 'sound/machines/synth_yes.ogg', 50, TRUE, frequency = rand(5120, 8800)) - target.apply_status_effect(STATUS_EFFECT_STASIS, STASIS_MACHINE_EFFECT) + target.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) target.ExtinguishMob() use_power = ACTIVE_POWER_USE /obj/machinery/sleeper/proc/thaw_them(mob/living/target) if(IS_IN_STASIS(target)) - target.remove_status_effect(STATUS_EFFECT_STASIS, STASIS_MACHINE_EFFECT) + target.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) playsound(src, 'sound/machines/synth_no.ogg', 50, TRUE, frequency = rand(5120, 8800)) /obj/machinery/sleeper/process() diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 37e079715dcd..d354e8c776e0 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -110,12 +110,12 @@ return var/freq = rand(24750, 26550) playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 2, frequency = freq) - target.apply_status_effect(STATUS_EFFECT_STASIS, STASIS_MACHINE_EFFECT) + target.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) target.ExtinguishMob() use_power = ACTIVE_POWER_USE /obj/machinery/stasis/proc/thaw_them(mob/living/target) - target.remove_status_effect(STATUS_EFFECT_STASIS, STASIS_MACHINE_EFFECT) + target.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) if(target == occupant) use_power = IDLE_POWER_USE diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 32a62880d69c..577cfb5a62d4 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -468,7 +468,7 @@ M.adjustStaminaLoss(60) M.Knockdown(75) M.Jitter(50) - M.apply_status_effect(STATUS_EFFECT_CONVULSING) + M.apply_status_effect(/datum/status_effect/convulsing) playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1) if(HAS_TRAIT(M,MOB_ORGANIC)) M.emote("gasp") diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 01f147a1b1d0..eb7422257d24 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -404,18 +404,18 @@ item_state = "bola_r" breakouttime = 300 slowdown = 0 - var/datum/status_effect/gonbolaPacify/effectReference + var/datum/status_effect/gonbola_pacify/effect_reference /obj/item/restraints/legcuffs/bola/gonbola/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) . = ..() if(iscarbon(hit_atom)) var/mob/living/carbon/C = hit_atom - effectReference = C.apply_status_effect(STATUS_EFFECT_GONBOLAPACIFY) + effect_reference = C.apply_status_effect(/datum/status_effect/gonbola_pacify) /obj/item/restraints/legcuffs/bola/gonbola/dropped(mob/user) . = ..() - if(effectReference) - QDEL_NULL(effectReference) + if(effect_reference) + QDEL_NULL(effect_reference) /obj/item/restraints/legcuffs/bola/watcher //tribal bola for tribal lizards name = "watcher Bola" diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index a9f9e792c962..3ffcca22bf11 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -521,9 +521,9 @@ /obj/item/nullrod/scythe/talking/necro/attack(mob/living/target) ..() - var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED) + var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(/datum/status_effect/stacking/saw_bleed) if(!B) - target.apply_status_effect(STATUS_EFFECT_SAWBLEED,bleed_stacks_per_hit) + target.apply_status_effect(/datum/status_effect/stacking/saw_bleed,bleed_stacks_per_hit) else B.add_stacks(bleed_stacks_per_hit) diff --git a/code/modules/antagonists/changeling/powers/fleshmend.dm b/code/modules/antagonists/changeling/powers/fleshmend.dm index efb1960e378c..73a4dda5cfd5 100644 --- a/code/modules/antagonists/changeling/powers/fleshmend.dm +++ b/code/modules/antagonists/changeling/powers/fleshmend.dm @@ -10,12 +10,12 @@ //Starts healing you every second for 10 seconds. //Can be used whilst unconscious. /datum/action/changeling/fleshmend/sting_action(mob/living/user) - if(user.has_status_effect(STATUS_EFFECT_FLESHMEND)) - to_chat(user, "We are already fleshmending!") + if(user.has_status_effect(/datum/status_effect/fleshmend)) + to_chat(user, span_warning("We are already fleshmending!")) return ..() - to_chat(user, "We begin to heal rapidly.") - user.apply_status_effect(STATUS_EFFECT_FLESHMEND) + to_chat(user, span_notice("We begin to heal rapidly.")) + user.apply_status_effect(/datum/status_effect/fleshmend) return TRUE //Check buffs.dm for the fleshmend status effect code diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 35e6f7172d8f..6d191b112103 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -816,7 +816,7 @@ structure_check() searches for nearby cultist structures required for the invoca fail_invoke() log_game("Manifest rune failed - user not standing on rune") return list() - if(user.has_status_effect(STATUS_EFFECT_SUMMONEDGHOST)) + if(user.has_status_effect(/datum/status_effect/cultghost)) to_chat(user, "Ghosts can't summon more ghosts!") fail_invoke() log_game("Manifest rune failed - user is a ghost") @@ -849,7 +849,7 @@ structure_check() searches for nearby cultist structures required for the invoca new_human.real_name = ghost_to_spawn.real_name new_human.alpha = 150 //Makes them translucent new_human.equipOutfit(/datum/outfit/ghost_cultist) //give them armor - new_human.apply_status_effect(STATUS_EFFECT_SUMMONEDGHOST) //ghosts can't summon more ghosts + new_human.apply_status_effect(/datum/status_effect/cultghost) //ghosts can't summon more ghosts new_human.see_invisible = SEE_INVISIBLE_OBSERVER ghosts++ playsound(src, 'sound/magic/exit_blood.ogg', 50, TRUE) diff --git a/code/modules/antagonists/valentines/valentine.dm b/code/modules/antagonists/valentines/valentine.dm index c12885fc3ab8..7616a7888d4f 100644 --- a/code/modules/antagonists/valentines/valentine.dm +++ b/code/modules/antagonists/valentines/valentine.dm @@ -18,13 +18,13 @@ forge_objectives() if(isliving(owner.current)) var/mob/living/L = owner.current - L.apply_status_effect(STATUS_EFFECT_INLOVE, date.current) + L.apply_status_effect(/datum/status_effect/in_love, date.current) . = ..() /datum/antagonist/valentine/on_removal() if(isliving(owner.current)) var/mob/living/L = owner.current - L.remove_status_effect(STATUS_EFFECT_INLOVE) + L.remove_status_effect(/datum/status_effect/in_love) . = ..() /datum/antagonist/valentine/greet() diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 8fe788f79ca7..3646370827a4 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -268,7 +268,7 @@ M.confused += min(M.confused + 10, 20) M.dizziness += min(M.dizziness + 10, 20) M.drowsyness += min(M.drowsyness + 10, 20) - M.apply_status_effect(STATUS_EFFECT_PACIFY, 100) + M.apply_status_effect(/datum/status_effect/pacify, 100) else M.apply_status_effect(/datum/status_effect/trance, 200, TRUE) @@ -282,4 +282,4 @@ M.confused += min(M.confused + 4, 20) M.dizziness += min(M.dizziness + 4, 20) M.drowsyness += min(M.drowsyness + 4, 20) - M.apply_status_effect(STATUS_EFFECT_PACIFY, 40) + M.apply_status_effect(/datum/status_effect/pacify, 40) diff --git a/code/modules/events/fake_virus.dm b/code/modules/events/fake_virus.dm index 9e4ac8f570a0..990370ba64ee 100644 --- a/code/modules/events/fake_virus.dm +++ b/code/modules/events/fake_virus.dm @@ -15,7 +15,7 @@ if(defacto_min)// event will hit 1-3 people by default, but will do 1-2 or just 1 if only those many candidates are available for(var/i=1; i<=rand(1,defacto_min); i++) var/mob/living/carbon/human/hypochondriac = pick(fake_virus_victims) - hypochondriac.apply_status_effect(STATUS_EFFECT_FAKE_VIRUS) + hypochondriac.apply_status_effect(/datum/status_effect/fake_virus) fake_virus_victims -= hypochondriac announce_to_ghosts(hypochondriac) diff --git a/code/modules/events/heart_attack.dm b/code/modules/events/heart_attack.dm index 35d8c4b141e1..dfe89062ec3f 100644 --- a/code/modules/events/heart_attack.dm +++ b/code/modules/events/heart_attack.dm @@ -8,7 +8,7 @@ /datum/round_event/heart_attack/start() var/list/heart_attack_contestants = list() for(var/mob/living/carbon/human/victim as anything in shuffle(GLOB.human_list)) - if(!victim.client || victim.stat == DEAD || HAS_TRAIT(victim, TRAIT_CRITICAL_CONDITION) || !victim.can_heartattack() || victim.has_status_effect(STATUS_EFFECT_EXERCISED) || (/datum/disease/heart_failure in victim.diseases) || victim.undergoing_cardiac_arrest()) + if(!victim.client || victim.stat == DEAD || HAS_TRAIT(victim, TRAIT_CRITICAL_CONDITION) || !victim.can_heartattack() || victim.has_status_effect(/datum/status_effect/exercised) || (/datum/disease/heart_failure in victim.diseases) || victim.undergoing_cardiac_arrest()) continue if(victim.mind.assigned_role in GLOB.nonhuman_positions) continue diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm index 1b6b58139dcc..aa98c26c5a32 100644 --- a/code/modules/instruments/songs/play_legacy.dm +++ b/code/modules/instruments/songs/play_legacy.dm @@ -84,7 +84,7 @@ var/mob/M = i if(user && HAS_TRAIT(user, TRAIT_MUSICIAN) && isliving(M)) var/mob/living/L = M - L.apply_status_effect(STATUS_EFFECT_GOOD_MUSIC) + L.apply_status_effect(/datum/status_effect/good_music) if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS)) continue M.playsound_local(source, null, volume * using_instrument.volume_multiplier, S = music_played) diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm index fbe146bd793f..3f7bb2542103 100644 --- a/code/modules/instruments/songs/play_synthesized.dm +++ b/code/modules/instruments/songs/play_synthesized.dm @@ -64,7 +64,7 @@ var/mob/M = i if(user && HAS_TRAIT(user, TRAIT_MUSICIAN) && isliving(M)) var/mob/living/L = M - L.apply_status_effect(STATUS_EFFECT_GOOD_MUSIC) + L.apply_status_effect(/datum/status_effect/good_music) if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS)) continue M.playsound_local(get_turf(parent), null, volume, FALSE, K.frequency, null, channel, null, copy) diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index debdb2e2ea02..ca20f8035a62 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -87,7 +87,9 @@ to_chat(user, "[src] is too heavy to use with one hand! You fumble and drop everything.") user.drop_all_held_items() return - var/datum/status_effect/crusher_damage/C = target.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + var/datum/status_effect/crusher_damage/C = target.has_status_effect(/datum/status_effect/crusher_damage) + if(!C) + C = target.apply_status_effect(/datum/status_effect/crusher_damage) var/target_health = target.health ..() for(var/t in trophies) @@ -120,10 +122,12 @@ return if(proximity_flag && isliving(target)) var/mob/living/L = target - var/datum/status_effect/crusher_mark/CM = L.has_status_effect(STATUS_EFFECT_CRUSHERMARK) - if(!CM || CM.hammer_synced != src || !L.remove_status_effect(STATUS_EFFECT_CRUSHERMARK)) + var/datum/status_effect/crusher_mark/CM = L.has_status_effect(/datum/status_effect/crusher_mark) + if(!CM || CM.hammer_synced != src || !L.remove_status_effect(/datum/status_effect/crusher_mark)) return - var/datum/status_effect/crusher_damage/C = L.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + var/datum/status_effect/crusher_damage/C = L.has_status_effect(/datum/status_effect/crusher_damage) + if(!C) + C = L.apply_status_effect(/datum/status_effect/crusher_damage) var/target_health = L.health for(var/t in trophies) var/obj/item/crusher_trophy/T = t @@ -186,8 +190,8 @@ /obj/projectile/destabilizer/on_hit(atom/target, blocked = FALSE) if(isliving(target)) var/mob/living/L = target - var/had_effect = (L.has_status_effect(STATUS_EFFECT_CRUSHERMARK)) //used as a boolean - var/datum/status_effect/crusher_mark/CM = L.apply_status_effect(STATUS_EFFECT_CRUSHERMARK, hammer_synced) + var/had_effect = (L.has_status_effect(/datum/status_effect/crusher_mark)) //used as a boolean + var/datum/status_effect/crusher_mark/CM = L.apply_status_effect(/datum/status_effect/crusher_mark, hammer_synced) if(hammer_synced) for(var/t in hammer_synced.trophies) var/obj/item/crusher_trophy/T = t @@ -520,7 +524,7 @@ return "waveform collapse to grant stun immunity and 90% damage reduction for 1 second" /obj/item/crusher_trophy/miner_eye/on_mark_detonation(mob/living/target, mob/living/user) - user.apply_status_effect(STATUS_EFFECT_BLOODDRUNK) + user.apply_status_effect(/datum/status_effect/blooddrunk) //whelp /obj/item/crusher_trophy/tail_spike diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index 87736c3438e4..49cd95f80c97 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -92,7 +92,7 @@ else to_chat(user, "You start to smear [src] on yourself. Disgusting tendrils hold you together and allow you to keep moving, but for how long?") SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) - H.apply_status_effect(STATUS_EFFECT_REGENERATIVE_CORE) + H.apply_status_effect(/datum/status_effect/regenerative_core) SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "core", /datum/mood_event/healsbadman) //Now THIS is a miner buff (fixed - nerf) qdel(src) @@ -191,7 +191,7 @@ else to_chat(user, "You start to apply [src] on yourself. Cancer like crystals hold you together and add something to you to keep yourself moving, but for how long?") SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) - H.apply_status_effect(STATUS_EFFECT_REGENERATIVE_CORE) + H.apply_status_effect(/datum/status_effect/regenerative_core) H.reagents.add_reagent(/datum/reagent/determination, 4) SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "core", /datum/mood_event/healsbadman) //Now THIS is a miner buff (fixed - nerf) qdel(src) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index fe446513c521..d078910881ed 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -243,7 +243,7 @@ return var/mob/living/carbon/itemUser = user usedHand = itemUser.get_held_index_of_item(src) - if(itemUser.has_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH)) + if(itemUser.has_status_effect(/datum/status_effect/hippocratic_oath)) to_chat(user, "You can't possibly handle the responsibility of more than one rod!") return var/failText = "The snake seems unsatisfied with your incomplete oath and returns to its previous place on the rod, returning to its dormant, wooden state. You must stand still while completing your oath!" @@ -269,7 +269,7 @@ to_chat(itemUser, failText) return to_chat(itemUser, "The snake, satisfied with your oath, attaches itself and the rod to your forearm with an inseparable grip. Your thoughts seem to only revolve around the core idea of helping others, and harm is nothing more than a distant, wicked memory...") - var/datum/status_effect/hippocraticOath/effect = itemUser.apply_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH) + var/datum/status_effect/hippocratic_oath/effect = itemUser.apply_status_effect(/datum/status_effect/hippocratic_oath) effect.hand = usedHand activated() @@ -1233,9 +1233,9 @@ user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly /obj/item/melee/transforming/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target) - var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED) + var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(/datum/status_effect/stacking/saw_bleed) if(!B) - target.apply_status_effect(STATUS_EFFECT_SAWBLEED,bleed_stacks_per_hit) + target.apply_status_effect(/datum/status_effect/stacking/saw_bleed,bleed_stacks_per_hit) else B.add_stacks(bleed_stacks_per_hit) diff --git a/code/modules/mining/lavaland/ruins/gym.dm b/code/modules/mining/lavaland/ruins/gym.dm index 8a73aff51a69..a7f2f8e59d29 100644 --- a/code/modules/mining/lavaland/ruins/gym.dm +++ b/code/modules/mining/lavaland/ruins/gym.dm @@ -17,7 +17,7 @@ if(isliving(user)) var/mob/living/L = user SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise) - L.apply_status_effect(STATUS_EFFECT_EXERCISED) + L.apply_status_effect(/datum/status_effect/exercised) /obj/structure/weightmachine name = "weight machine" @@ -63,7 +63,7 @@ var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!") SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise) to_chat(user, finishmessage) - user.apply_status_effect(STATUS_EFFECT_EXERCISED) + user.apply_status_effect(/datum/status_effect/exercised) /obj/structure/weightmachine/stacklifter name = "chest press machine" diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index 55b01d4200e2..a0fb24d4b622 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -292,7 +292,7 @@ user.do_attack_animation(M) var/slap_volume = 50 - var/datum/status_effect/offering/kiss_check = M.has_status_effect(STATUS_EFFECT_OFFERING) + var/datum/status_effect/offering/kiss_check = M.has_status_effect(/datum/status_effect/offering) if(kiss_check && istype(kiss_check.offered_item, /obj/item/kisser) && (user in kiss_check.possible_takers)) user.visible_message(span_danger("[user] scoffs at [M]'s advance, winds up, and smacks [M.p_them()] hard to the ground!"), span_notice("The nerve! You wind back your hand and smack [M] hard enough to knock [M.p_them()] over!"), @@ -325,7 +325,7 @@ offerer.visible_message(span_notice("[offerer] raises [offerer.p_their()] arm, looking for a high-five!"), \ span_notice("You post up, looking for a high-five!"), null, 2) - offerer.apply_status_effect(STATUS_EFFECT_OFFERING, src, /atom/movable/screen/alert/give/highfive) + offerer.apply_status_effect(/datum/status_effect/offering, src, /atom/movable/screen/alert/give/highfive) /// Yeah broh! This is where we do the high-fiving (or high-tenning :o) /obj/item/slapper/on_offer_taken(mob/living/carbon/offerer, mob/living/carbon/taker) @@ -397,7 +397,7 @@ cheek_kiss = (offerer.zone_selected != BODY_ZONE_PRECISE_MOUTH) offerer.visible_message(span_notice("[offerer] leans in slightly, offering a kiss[cheek_kiss ? " on the cheek" : ""]!"), span_notice("You lean in slightly, indicating you'd like to offer a kiss[cheek_kiss ? " on the cheek" : ""]!"), null, 2) - offerer.apply_status_effect(STATUS_EFFECT_OFFERING, src) + offerer.apply_status_effect(/datum/status_effect/offering, src) return TRUE /obj/item/kisser/on_offer_taken(mob/living/carbon/offerer, mob/living/carbon/taker) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 7a995dea28da..1363f30e2a62 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -174,7 +174,7 @@ to_chat(src, "You're not holding anything to give!") return - if(has_status_effect(STATUS_EFFECT_OFFERING)) + if(has_status_effect(/datum/status_effect/offering)) to_chat(src, span_warning("You're already offering up something!")) return @@ -184,7 +184,7 @@ //WS End visible_message(span_notice("[src] is offering [offered_item]."), \ span_notice("You offer [offered_item]."), null, 2) - apply_status_effect(STATUS_EFFECT_OFFERING, offered_item) + apply_status_effect(/datum/status_effect/offering, offered_item) /** * Proc called when the player clicks the give alert diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 56ae0db795e5..7b57e5798dec 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -453,7 +453,7 @@ if(. && isliving(user)) var/mob/living/L = user L.Paralyze(200) - L.remove_status_effect(STATUS_EFFECT_SURRENDER) + L.remove_status_effect(/datum/status_effect/surrender) /datum/emote/living/sway key = "sway" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 120b850cf428..297d6ad49160 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -46,7 +46,7 @@ . = ..() if(gps_name && true_spawn) AddComponent(/datum/component/gps, gps_name) - apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + apply_status_effect(/datum/status_effect/crusher_damage) ADD_TRAIT(src, TRAIT_NO_TELEPORT, MEGAFAUNA_TRAIT) ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT) for(var/action_type in attack_action_types) @@ -71,7 +71,7 @@ if(health > 0) return else - var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + var/datum/status_effect/crusher_damage/C = has_status_effect(/datum/status_effect/crusher_damage) var/crusher_kill = FALSE if(C && crusher_loot && C.total_damage >= maxHealth * 0.6) spawn_crusher_loot() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm index b66c71fd58b2..e91641bb3688 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm @@ -32,7 +32,7 @@ stack_trace("Invalid type [armor.type] found in .armor during [src.type] Initialize()") //WS edit begin - Whitesands . = ..() - apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + apply_status_effect(/datum/status_effect/crusher_damage) /mob/living/simple_animal/hostile/asteroid/Aggro() ..() @@ -70,7 +70,7 @@ /mob/living/simple_animal/hostile/asteroid/death(gibbed) SSblackbox.record_feedback("tally", "mobs_killed_mining", 1, type) - var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + var/datum/status_effect/crusher_damage/C = has_status_effect(/datum/status_effect/crusher_damage) if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 4 creatures before getting the item spawn_crusher_loot() ..(gibbed) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 8eb5bc620722..8e4364aa1486 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -6,7 +6,7 @@ ////////////////////////////// STUN //////////////////////////////////// /mob/living/proc/IsStun() //If we're stunned - return has_status_effect(STATUS_EFFECT_STUN) + return has_status_effect(/datum/status_effect/incapacitating/stun) /mob/living/proc/AmountStun() //How many deciseconds remain in our stun var/datum/status_effect/incapacitating/stun/S = IsStun() @@ -24,7 +24,7 @@ if(S) S.duration = max(world.time + amount, S.duration) else if(amount > 0) - S = apply_status_effect(STATUS_EFFECT_STUN, amount) + S = apply_status_effect(/datum/status_effect/incapacitating/stun, amount) return S /mob/living/proc/SetStun(amount, ignore_canstun = FALSE) //Sets remaining duration @@ -41,7 +41,7 @@ if(S) S.duration = world.time + amount else - S = apply_status_effect(STATUS_EFFECT_STUN, amount) + S = apply_status_effect(/datum/status_effect/incapacitating/stun, amount) return S /mob/living/proc/AdjustStun(amount, ignore_canstun = FALSE) //Adds to remaining duration @@ -54,13 +54,13 @@ if(S) S.duration += amount else if(amount > 0) - S = apply_status_effect(STATUS_EFFECT_STUN, amount) + S = apply_status_effect(/datum/status_effect/incapacitating/stun, amount) return S ///////////////////////////////// KNOCKDOWN ///////////////////////////////////// /mob/living/proc/IsKnockdown() //If we're knocked down - return has_status_effect(STATUS_EFFECT_KNOCKDOWN) + return has_status_effect(/datum/status_effect/incapacitating/knockdown) /mob/living/proc/AmountKnockdown() //How many deciseconds remain in our knockdown var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown() @@ -69,7 +69,7 @@ return 0 /mob/living/proc/Knockdown(amount, ignore_canstun = FALSE) //Can't go below remaining duration - if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, ignore_canstun) & COMPONENT_NO_STUN) + if(SEND_SIGNAL(src, /datum/status_effect/incapacitating/knockdown, amount, ignore_canstun) & COMPONENT_NO_STUN) return if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(absorb_stun(amount, ignore_canstun)) @@ -78,7 +78,7 @@ if(K) K.duration = max(world.time + amount, K.duration) else if(amount > 0) - K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount) + K = apply_status_effect(/datum/status_effect/incapacitating/knockdown, amount) return K /mob/living/proc/SetKnockdown(amount, ignore_canstun = FALSE) //Sets remaining duration @@ -95,7 +95,7 @@ if(K) K.duration = world.time + amount else - K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount) + K = apply_status_effect(/datum/status_effect/incapacitating/knockdown, amount) return K /mob/living/proc/AdjustKnockdown(amount, ignore_canstun = FALSE) //Adds to remaining duration @@ -108,12 +108,12 @@ if(K) K.duration += amount else if(amount > 0) - K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount) + K = apply_status_effect(/datum/status_effect/incapacitating/knockdown, amount) return K ///////////////////////////////// IMMOBILIZED //////////////////////////////////// /mob/living/proc/IsImmobilized() //If we're immobilized - return has_status_effect(STATUS_EFFECT_IMMOBILIZED) + return has_status_effect(/datum/status_effect/incapacitating/immobilized) /mob/living/proc/AmountImmobilized() //How many deciseconds remain in our Immobilized status effect var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized() @@ -131,7 +131,7 @@ if(I) I.duration = max(world.time + amount, I.duration) else if(amount > 0) - I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount) + I = apply_status_effect(/datum/status_effect/incapacitating/immobilized, amount) return I /mob/living/proc/SetImmobilized(amount, ignore_canstun = FALSE) //Sets remaining duration @@ -148,7 +148,7 @@ if(I) I.duration = world.time + amount else - I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount) + I = apply_status_effect(/datum/status_effect/incapacitating/immobilized, amount) return I /mob/living/proc/AdjustImmobilized(amount, ignore_canstun = FALSE) //Adds to remaining duration @@ -161,12 +161,12 @@ if(I) I.duration += amount else if(amount > 0) - I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount) + I = apply_status_effect(/datum/status_effect/incapacitating/immobilized, amount) return I ///////////////////////////////// PARALYZED ////////////////////////////////// /mob/living/proc/IsParalyzed() //If we're immobilized - return has_status_effect(STATUS_EFFECT_PARALYZED) + return has_status_effect(/datum/status_effect/incapacitating/paralyzed) /mob/living/proc/AmountParalyzed() //How many deciseconds remain in our Paralyzed status effect var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE) @@ -184,7 +184,7 @@ if(P) P.duration = max(world.time + amount, P.duration) else if(amount > 0) - P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount) + P = apply_status_effect(/datum/status_effect/incapacitating/paralyzed, amount) return P /mob/living/proc/SetParalyzed(amount, ignore_canstun = FALSE) //Sets remaining duration @@ -201,7 +201,7 @@ if(P) P.duration = world.time + amount else - P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount) + P = apply_status_effect(/datum/status_effect/incapacitating/paralyzed, amount) return P /mob/living/proc/AdjustParalyzed(amount, ignore_canstun = FALSE) //Adds to remaining duration @@ -214,7 +214,7 @@ if(P) P.duration += amount else if(amount > 0) - P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount) + P = apply_status_effect(/datum/status_effect/incapacitating/paralyzed, amount) return P //Blanket @@ -241,7 +241,7 @@ //////////////////UNCONSCIOUS /mob/living/proc/IsUnconscious() //If we're unconscious - return has_status_effect(STATUS_EFFECT_UNCONSCIOUS) + return has_status_effect(/datum/status_effect/incapacitating/unconscious) /mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() @@ -257,7 +257,7 @@ if(U) U.duration = max(world.time + amount, U.duration) else if(amount > 0) - U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount) + U = apply_status_effect(/datum/status_effect/incapacitating/unconscious, amount) return U /mob/living/proc/SetUnconscious(amount, ignore_canstun = FALSE) //Sets remaining duration @@ -271,7 +271,7 @@ else if(U) U.duration = world.time + amount else - U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount) + U = apply_status_effect(/datum/status_effect/incapacitating/unconscious, amount) return U /mob/living/proc/AdjustUnconscious(amount, ignore_canstun = FALSE) //Adds to remaining duration @@ -282,13 +282,13 @@ if(U) U.duration += amount else if(amount > 0) - U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount) + U = apply_status_effect(/datum/status_effect/incapacitating/unconscious, amount) return U /////////////////////////////////// SLEEPING //////////////////////////////////// /mob/living/proc/IsSleeping() //If we're asleep - return has_status_effect(STATUS_EFFECT_SLEEPING) + return has_status_effect(/datum/status_effect/incapacitating/sleeping) /mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() @@ -303,7 +303,7 @@ if(S) S.duration = max(world.time + amount, S.duration) else if(amount > 0) - S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount) + S = apply_status_effect(/datum/status_effect/incapacitating/sleeping, amount) return S /mob/living/proc/SetSleeping(amount) //Sets remaining duration @@ -316,7 +316,7 @@ else if(S) S.duration = world.time + amount else - S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount) + S = apply_status_effect(/datum/status_effect/incapacitating/sleeping, amount) return S /mob/living/proc/AdjustSleeping(amount) //Adds to remaining duration @@ -326,7 +326,7 @@ if(S) S.duration += amount else if(amount > 0) - S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount) + S = apply_status_effect(/datum/status_effect/incapacitating/sleeping, amount) return S ///Allows us to set a permanent sleep on a player (use with caution and remember to unset it with SetSleeping() after the effect is over) @@ -337,7 +337,7 @@ if(S) S.duration = -1 else - S = apply_status_effect(STATUS_EFFECT_SLEEPING, -1) + S = apply_status_effect(/datum/status_effect/incapacitating/sleeping, -1) return S ///////////////////////////////// FROZEN ///////////////////////////////////// diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 5f39d407d749..75f72dd9e595 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -531,13 +531,13 @@ /obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) if(isliving(target)) var/mob/living/L = target - var/list/existing_marks = L.has_status_effect_list(STATUS_EFFECT_SYPHONMARK) + var/list/existing_marks = L.has_status_effect_list(/datum/status_effect/syphon_mark) for(var/i in existing_marks) var/datum/status_effect/syphon_mark/SM = i if(SM.reward_target == src) //we want to allow multiple people with bounty modkits to use them, but we need to replace our own marks so we don't multi-reward SM.reward_target = null qdel(SM) - L.apply_status_effect(STATUS_EFFECT_SYPHONMARK, src) + L.apply_status_effect(/datum/status_effect/syphon_mark, src) /obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) if(isliving(target)) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 458c19d053da..e60ce5a73c02 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -494,7 +494,7 @@ if(L.anti_magic_check() || !firer) L.visible_message("[src] vanishes on contact with [target]!") return BULLET_ACT_BLOCK - L.apply_status_effect(STATUS_EFFECT_BOUNTY, firer) + L.apply_status_effect(/datum/status_effect/bounty, firer) /obj/projectile/magic/antimagic name = "bolt of antimagic" @@ -507,7 +507,7 @@ if(L.anti_magic_check()) L.visible_message("[src] vanishes on contact with [target]!") return BULLET_ACT_BLOCK - L.apply_status_effect(STATUS_EFFECT_ANTIMAGIC) + L.apply_status_effect(/datum/status_effect/antimagic) /obj/projectile/magic/fetch name = "bolt of fetching" diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm index f781313bf582..aca407f9b476 100644 --- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm @@ -76,7 +76,7 @@ /datum/reagent/medicine/c2/helbital/on_mob_delete(mob/living/L) if(helbent) - L.remove_status_effect(STATUS_EFFECT_NECROPOLIS_CURSE) + L.remove_status_effect(/datum/status_effect/necropolis_curse) ..() /datum/reagent/medicine/c2/libital //messes with your liber diff --git a/code/modules/research/xenobiology/crossbreeding/_potions.dm b/code/modules/research/xenobiology/crossbreeding/_potions.dm index 1fb17ea4d1fd..aeb34840028f 100644 --- a/code/modules/research/xenobiology/crossbreeding/_potions.dm +++ b/code/modules/research/xenobiology/crossbreeding/_potions.dm @@ -83,8 +83,8 @@ Slimecrossing Potions if(user == M) to_chat(user, "You can't drink the love potion. What are you, a narcissist?") return ..() - if(M.has_status_effect(STATUS_EFFECT_INLOVE)) - to_chat(user, "[M] is already lovestruck!") + if(M.has_status_effect(/datum/status_effect/in_love)) + to_chat(user, span_warning("[M] is already lovestruck!")) return ..() M.visible_message("[user] starts to feed [M] a love potion!", @@ -97,7 +97,7 @@ Slimecrossing Potions if(M.mind) M.mind.store_memory("You are in love with [user].") M.faction |= "[REF(user)]" - M.apply_status_effect(STATUS_EFFECT_INLOVE, user) + M.apply_status_effect(/datum/status_effect/in_love, user) qdel(src) //Pressure potion - Charged Dark Blue diff --git a/code/modules/research/xenobiology/crossbreeding/regenerative.dm b/code/modules/research/xenobiology/crossbreeding/regenerative.dm index 8e71efc3177d..f73b9b74f173 100644 --- a/code/modules/research/xenobiology/crossbreeding/regenerative.dm +++ b/code/modules/research/xenobiology/crossbreeding/regenerative.dm @@ -344,7 +344,7 @@ Regenerative extracts: slime_heal_modifier = 0.3 /obj/item/slimecross/regenerative/adamantine/core_effect(mob/living/target, mob/user) //WIP - Find out why this doesn't work. - target.apply_status_effect(STATUS_EFFECT_SLIMESKIN) + target.apply_status_effect(/datum/status_effect/slimeskin) brute_loss = (10 + (target.getBruteLoss() * 0.65)) //most common damage type, let's not go overboard jelly_amount *= 0.5 @@ -353,4 +353,4 @@ Regenerative extracts: effect_desc = "Partially heals the target and temporarily makes them immortal, but pacifistic." /obj/item/slimecross/regenerative/rainbow/core_effect(mob/living/target, mob/user) - target.apply_status_effect(STATUS_EFFECT_RAINBOWPROTECTION) + target.apply_status_effect(/datum/status_effect/rainbow_protection) diff --git a/code/modules/unit_tests/combat.dm b/code/modules/unit_tests/combat.dm index 0ad01c2cb9f8..9e2c7ed8a38c 100644 --- a/code/modules/unit_tests/combat.dm +++ b/code/modules/unit_tests/combat.dm @@ -85,7 +85,7 @@ victim.attack_hand(attacker) TEST_ASSERT_EQUAL(victim.loc.x, run_loc_bottom_left.x + 2, "Victim wasn't moved back after being pushed") - TEST_ASSERT(!victim.has_status_effect(STATUS_EFFECT_KNOCKDOWN), "Victim was knocked down despite not being against a wall") + TEST_ASSERT(!victim.has_status_effect(/datum/status_effect/incapacitating/knockdown), "Victim was knocked down despite not being against a wall") TEST_ASSERT_EQUAL(victim.get_active_held_item(), toolbox, "Victim dropped toolbox despite not being against a wall") attacker.forceMove(get_step(attacker, EAST)) @@ -94,5 +94,5 @@ victim.attack_hand(attacker) TEST_ASSERT_EQUAL(victim.loc.x, run_loc_bottom_left.x + 2, "Victim was moved after being pushed against a wall") - TEST_ASSERT(victim.has_status_effect(STATUS_EFFECT_KNOCKDOWN), "Victim was not knocked down after being pushed against a wall") + TEST_ASSERT(victim.has_status_effect(/datum/status_effect/incapacitating/knockdown), "Victim was not knocked down after being pushed against a wall") TEST_ASSERT_EQUAL(victim.get_active_held_item(), null, "Victim didn't drop toolbox after being pushed against a wall")