diff --git a/code/datums/actions/ability_actions.dm b/code/datums/actions/ability_actions.dm index 5c8c7fbb02c..92286cf6c5a 100644 --- a/code/datums/actions/ability_actions.dm +++ b/code/datums/actions/ability_actions.dm @@ -78,7 +78,7 @@ carbon_owner.balloon_alert(carbon_owner, "Cannot while buckled") return FALSE - if(!(flags_to_check & ABILITY_USE_STAGGERED) && carbon_owner.IsStaggered()) + if(!(flags_to_check & ABILITY_USE_STAGGERED) && carbon_owner.has_status_effect(STATUS_EFFECT_STAGGER)) if(!silent) carbon_owner.balloon_alert(carbon_owner, "Cannot while staggered") return FALSE diff --git a/code/datums/components/shield.dm b/code/datums/components/shield.dm index 07a1a89723b..50dfb265f76 100644 --- a/code/datums/components/shield.dm +++ b/code/datums/components/shield.dm @@ -149,15 +149,15 @@ if(parent_item.obj_integrity <= parent_item.integrity_failure) return incoming_damage - if(affected.IsSleeping() || affected.IsUnconscious() || affected.IsAdminSleeping()) //We don't do jack if we're literally KOed/sleeping/paralyzed. + if(affected.has_status_effect(STATUS_EFFECT_SLEEPING) || affected.has_status_effect(STATUS_EFFECT_UNCONSCIOUS) || affected.IsAdminSleeping()) //We don't do jack if we're literally KOed/sleeping/paralyzed. return incoming_damage - if(affected.IsStun() || affected.IsKnockdown() || affected.IsParalyzed()) //Halve shield cover if we're paralyzed or stunned + if(affected.has_status_effect(STATUS_EFFECT_STUN) || affected.has_status_effect(STATUS_EFFECT_KNOCKDOWN) || affected.has_status_effect(STATUS_EFFECT_PARALYZED)) //Halve shield cover if we're paralyzed or stunned status_cover_modifier *= 0.5 if(iscarbon(affected)) var/mob/living/carbon/C = affected - if(C.IsStaggered()) //Lesser penalty to shield cover for being staggered. + if(C.has_status_effect(STATUS_EFFECT_STAGGER)) //Lesser penalty to shield cover for being staggered. status_cover_modifier *= 0.75 switch(attack_type) diff --git a/code/datums/components/stun_mitigation.dm b/code/datums/components/stun_mitigation.dm index 3ae59d1e2f1..fc72d2f2053 100644 --- a/code/datums/components/stun_mitigation.dm +++ b/code/datums/components/stun_mitigation.dm @@ -117,15 +117,15 @@ if(parent_item.obj_integrity <= parent_item.integrity_failure) return FALSE - if(affected.IsSleeping() || affected.IsUnconscious() || affected.IsAdminSleeping()) + if(affected.has_status_effect(STATUS_EFFECT_SLEEPING) || affected.has_status_effect(STATUS_EFFECT_UNCONSCIOUS) || affected.IsAdminSleeping()) return FALSE - if(affected.IsStun() || affected.IsKnockdown() || affected.IsParalyzed()) + if(affected.has_status_effect(STATUS_EFFECT_STUN) || affected.has_status_effect(STATUS_EFFECT_KNOCKDOWN) || affected.has_status_effect(STATUS_EFFECT_PARALYZED)) mitigation_prob *= 0.5 if(iscarbon(affected)) var/mob/living/carbon/C = affected - if(C.IsStaggered()) + if(C.has_status_effect(STATUS_EFFECT_STAGGER)) mitigation_prob *= 0.4 if(!prob(mitigation_prob)) diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 1b6069c8113..43962e07db7 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -107,14 +107,17 @@ var/datum/status_effect/S1 = effect LAZYINITLIST(status_effects) for(var/datum/status_effect/S in status_effects) - if(S.id == initial(S1.id) && S.status_type) - if(S.status_type == STATUS_EFFECT_REPLACE) - qdel(S) - else if(S.status_type == STATUS_EFFECT_REFRESH) - S.refresh() - return - else - return + if(S.id != initial(S1.id)) + continue + if(!S.status_type) + continue + if(S.status_type == STATUS_EFFECT_REPLACE) + qdel(S) + else if(S.status_type == STATUS_EFFECT_REFRESH) + S.refresh() + return + else + return var/list/arguments = args.Copy() arguments[1] = src S1 = new effect(arguments) @@ -125,25 +128,28 @@ if(status_effects) var/datum/status_effect/S1 = effect for(var/datum/status_effect/S in status_effects) - if(initial(S1.id) == S.id) - qdel(S) - . = TRUE + if(initial(S1.id) != S.id) + continue + qdel(S) + . = TRUE /mob/living/proc/has_status_effect(effect) //returns the effect if the mob calling the proc owns the given status effect . = FALSE if(status_effects) var/datum/status_effect/S1 = effect for(var/datum/status_effect/S in status_effects) - if(initial(S1.id) == S.id) - return S + if(initial(S1.id) != S.id) + continue + return S /mob/living/proc/has_status_effect_list(effect) //returns a list of effects with matching IDs that the mod owns; use for effects there can be multiple of . = list() if(status_effects) var/datum/status_effect/S1 = effect for(var/datum/status_effect/S in status_effects) - if(initial(S1.id) == S.id) - . += S + if(initial(S1.id) != S.id) + continue + . += S /mob/living/proc/remove_all_status_effect() . = 0 diff --git a/code/game/data_huds/human.dm b/code/game/data_huds/human.dm index 01de9a221bf..7259e1c5ba5 100644 --- a/code/game/data_huds/human.dm +++ b/code/game/data_huds/human.dm @@ -92,7 +92,7 @@ if(!client) //Nobody home. status_hud.icon_state = "afk" return TRUE - if(IsUnconscious()) //Should hopefully get out of it soon. + if(has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) //Should hopefully get out of it soon. status_hud.icon_state = "knockout" return TRUE status_hud.icon_state = "sleep" //Regular sleep, else. @@ -101,13 +101,13 @@ if(!key) //Nobody home. Shouldn't affect aghosting. status_hud.icon_state = "afk" return TRUE - if(IsParalyzed()) //I've fallen and I can't get up. + if(has_status_effect(STATUS_EFFECT_PARALYZED)) //I've fallen and I can't get up. status_hud.icon_state = "knockdown" return TRUE - if(IsStun()) + if(has_status_effect(STATUS_EFFECT_STUN)) status_hud.icon_state = "stun" return TRUE - if(IsStaggered()) + if(has_status_effect(STATUS_EFFECT_STAGGER)) return TRUE if(slowdown) status_hud.icon_state = "slowdown" @@ -170,7 +170,7 @@ if(!client) //Nobody home. simple_status_hud.icon_state = "afk" return TRUE - if(IsUnconscious()) //Should hopefully get out of it soon. + if(has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) //Should hopefully get out of it soon. simple_status_hud.icon_state = "knockout" return TRUE simple_status_hud.icon_state = "sleep" @@ -179,13 +179,13 @@ if(!key) //Nobody home. Shouldn't affect aghosting. simple_status_hud.icon_state = "afk" return TRUE - if(IsParalyzed()) //I've fallen and I can't get up. + if(has_status_effect(STATUS_EFFECT_PARALYZED)) //I've fallen and I can't get up. simple_status_hud.icon_state = "knockdown" return TRUE - if(IsStun()) + if(has_status_effect(STATUS_EFFECT_STUN)) simple_status_hud.icon_state = "stun" return TRUE - if(IsStaggered()) + if(has_status_effect(STATUS_EFFECT_STAGGER)) simple_status_hud.icon_state = "stagger" return TRUE if(slowdown) @@ -287,7 +287,7 @@ xeno_debuff.overlays.Cut() xeno_debuff.icon_state = "" - if(stat != DEAD && IsMute()) + if(stat != DEAD && has_status_effect(STATUS_EFFECT_MUTED)) xeno_debuff.overlays += hunter_silence_image if(HAS_TRAIT(src, TRAIT_HIVE_TARGET)) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index c978f0e3c86..c141b71041e 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -592,7 +592,7 @@ else stun = knockback ? knockback_stun_amount : crush_stun_amount - if(!M.IsStun() && !M.IsParalyzed() && !isxenoqueen(M) && !isxenoking(M)) //Prevent chain stunning. Queen and King are protected. + if(!M.has_status_effect(STATUS_EFFECT_STUN) && !M.has_status_effect(STATUS_EFFECT_PARALYZED) && !isxenoqueen(M) && !isxenoking(M)) //Prevent chain stunning. Queen and King are protected. M.apply_effects(stun,weaken) return ..() diff --git a/code/game/objects/machinery/overwatch.dm b/code/game/objects/machinery/overwatch.dm index 9411f2a0039..00c4bc6f461 100644 --- a/code/game/objects/machinery/overwatch.dm +++ b/code/game/objects/machinery/overwatch.dm @@ -909,7 +909,7 @@ GLOBAL_LIST_EMPTY(active_cas_targets) to_chat(src, span_warning("You cannot give an order in your current state.")) return - if(IsMute()) + if(has_status_effect(STATUS_EFFECT_MUTED)) to_chat(src, span_warning("You cannot give an order while muted.")) return diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 30011df9edb..23bebb220de 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -431,7 +431,7 @@ /mob/living/proc/on_closet_dump(obj/structure/closet/origin) SetStun(origin.closet_stun_delay)//Action delay when going out of a closet - if(!lying_angle && IsStun()) + if(!lying_angle && has_status_effect(STATUS_EFFECT_STUN)) balloon_alert_to_viewers("Gets out of [origin]", ignored_mobs = src) balloon_alert(src, "You struggle to get your bearings") diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index fa571c809ad..7ca43d840f6 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -301,7 +301,7 @@ else visible_message(span_notice("[usr] climbs into [src]."), 3) M.forceMove(src) - if(M.health > -100 && (M.health < 0 || M.IsSleeping())) + if(M.health > -100 && (M.health < 0 || M.has_status_effect(STATUS_EFFECT_SLEEPING))) to_chat(M, span_boldnotice("You feel a cold liquid surround you. Your skin starts to freeze up.")) occupant = M occupant.time_entered_cryo = world.time diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index 1e6dd1d1076..0aa70b21888 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(dream_topics, list( /mob/living/carbon/proc/dream() if(!dream_amounts) dream_amounts = rand(1,5) - if(!IsUnconscious()) + if(!has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) dream_amounts = 0 return FALSE to_chat(src, span_notice("<i>... [pick(GLOB.dream_topics)] ...</i>")) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d1cf923526a..d1df5b0f13d 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -99,17 +99,17 @@ to_chat(shaker, span_highdanger("This player has been admin slept, do not interfere with them.")) return - if(lying_angle || IsSleeping()) + if(lying_angle || has_status_effect(STATUS_EFFECT_SLEEPING)) if(client) AdjustSleeping(-10 SECONDS) - if(!IsSleeping()) + if(!has_status_effect(STATUS_EFFECT_SLEEPING)) set_resting(FALSE) shaker.visible_message(span_notice("[shaker] shakes [src] trying to get [p_them()] up!"), span_notice("You shake [src] trying to get [p_them()] up!"), null, 4) AdjustUnconscious(-6 SECONDS) AdjustStun(-6 SECONDS) - if(IsParalyzed()) + if(has_status_effect(STATUS_EFFECT_PARALYZED)) if(staminaloss) adjustStaminaLoss(-20, FALSE) AdjustParalyzed(-6 SECONDS) @@ -234,7 +234,7 @@ if(species.species_flags & ROBOTIC_LIMBS) to_chat(src, span_warning("Your artificial body does not require sleep.")) return - if(IsSleeping()) + if(has_status_effect(STATUS_EFFECT_SLEEPING)) to_chat(src, span_warning("You are already sleeping")) return if(tgui_alert(src, "You sure you want to sleep for a while?", "Sleep", list("Yes","No")) == "Yes") diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 267107bda31..e39a9fc3660 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -97,7 +97,7 @@ if(staminaloss > -max_stamina) handle_staminaloss() - if(IsSleeping()) + if(has_status_effect(STATUS_EFFECT_SLEEPING)) handle_dreams() if(mind) if((mind.active && client != null) || immune_to_ssd) //This also checks whether a client is connected, if not, sleep is not reduced. diff --git a/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm b/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm index 49894ad7bb5..893808f8ee6 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm @@ -212,7 +212,7 @@ GLOBAL_LIST_INIT(boiler_glob_image_list, list( gas = new /datum/effect_system/smoke_spread/xeno/acid/light owner.add_movespeed_modifier(MOVESPEED_ID_BOILER_DUMP, TRUE, 0, NONE, TRUE, BOILER_DUMP_SPEED) - if(caster.IsStun() || caster.IsParalyzed()) + if(caster.has_status_effect(STATUS_EFFECT_STUN) || caster.has_status_effect(STATUS_EFFECT_PARALYZED)) to_chat(caster, span_xenohighdanger("We try to emit acid but are disabled!")) owner.remove_movespeed_modifier(MOVESPEED_ID_BOILER_DUMP) toggle_particles(FALSE) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/carrier/carrier.dm b/code/modules/mob/living/carbon/xenomorph/castes/carrier/carrier.dm index 7b7390f21c7..428b3ba7b46 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/carrier/carrier.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/carrier/carrier.dm @@ -52,7 +52,7 @@ if(stat == DEAD) hugger_overlays_icon.overlays += mutable_appearance(effects_icon, "clinger_[i] Knocked Down") else if(lying_angle) - if((resting || IsSleeping()) && (!IsParalyzed() && !IsUnconscious() && health > 0)) + if((resting || has_status_effect(STATUS_EFFECT_SLEEPING)) && (!has_status_effect(STATUS_EFFECT_PARALYZED) && !has_status_effect(STATUS_EFFECT_UNCONSCIOUS) && health > 0)) hugger_overlays_icon.overlays += mutable_appearance(effects_icon, "clinger_[i] Sleeping") else hugger_overlays_icon.overlays += mutable_appearance(effects_icon, "clinger_[i] Knocked Down") diff --git a/code/modules/mob/living/carbon/xenomorph/castes/defiler/abilities_defiler.dm b/code/modules/mob/living/carbon/xenomorph/castes/defiler/abilities_defiler.dm index 24817534501..7138d5ce902 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/defiler/abilities_defiler.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/defiler/abilities_defiler.dm @@ -204,7 +204,7 @@ add_cooldown() succeed_activate() - if(X.IsStaggered()) //If we got staggered, return + if(X.has_status_effect(STATUS_EFFECT_STAGGER)) //If we got staggered, return to_chat(X, span_xenowarning("We try to emit toxins but are staggered!")) return fail_activate() @@ -237,11 +237,11 @@ if(/datum/reagent/toxin/acid) emitted_gas = new /datum/effect_system/smoke_spread/xeno/acid/light(defiler_owner) - if(defiler_owner.IsStaggered()) //If we got staggered, return + if(defiler_owner.has_status_effect(STATUS_EFFECT_STAGGER)) //If we got staggered, return to_chat(defiler_owner, span_xenowarning("We try to emit toxins but are staggered!")) toggle_particles(FALSE) return - if(defiler_owner.IsStun() || defiler_owner.IsParalyzed()) + if(defiler_owner.has_status_effect(STATUS_EFFECT_STUN) || defiler_owner.has_status_effect(STATUS_EFFECT_PARALYZED)) to_chat(defiler_owner, span_xenowarning("We try to emit toxins but are disabled!")) toggle_particles(FALSE) return diff --git a/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm b/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm index e366c34f66d..e422061bc9d 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm @@ -81,7 +81,7 @@ icon_state = "[bloody][base_icon_state] Cuff" else if(lying_angle) - if((resting || IsSleeping()) && (!IsParalyzed() && !IsUnconscious() && health > 0)) + if((resting || has_status_effect(STATUS_EFFECT_SLEEPING)) && (!has_status_effect(STATUS_EFFECT_PARALYZED) && !has_status_effect(STATUS_EFFECT_UNCONSCIOUS) && health > 0)) icon_state = "[bloody][base_icon_state] Sleeping" else icon_state = "[bloody][base_icon_state] Stunned" @@ -195,7 +195,7 @@ icon_state = "[base_icon_state] Cuff" else if(lying_angle) - if((resting || IsSleeping()) && (!IsParalyzed() && !IsUnconscious() && health > 0)) + if((resting || has_status_effect(STATUS_EFFECT_SLEEPING)) && (!has_status_effect(STATUS_EFFECT_PARALYZED) && !has_status_effect(STATUS_EFFECT_UNCONSCIOUS) && health > 0)) icon_state = "[base_icon_state] Sleeping" else icon_state = "[base_icon_state] Stunned" diff --git a/code/modules/mob/living/carbon/xenomorph/embryo.dm b/code/modules/mob/living/carbon/xenomorph/embryo.dm index 01ceed82799..d057b92cba9 100644 --- a/code/modules/mob/living/carbon/xenomorph/embryo.dm +++ b/code/modules/mob/living/carbon/xenomorph/embryo.dm @@ -109,7 +109,7 @@ affected_mob.emote("[pick("sneeze", "cough")]") if(4) if(prob(1)) - if(!affected_mob.IsUnconscious()) + if(!affected_mob.has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) affected_mob.visible_message(span_danger("\The [affected_mob] starts shaking uncontrollably!"), \ span_danger("You start shaking uncontrollably!")) affected_mob.Unconscious(20 SECONDS) diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 55fc77ac05b..f598d50581f 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -28,7 +28,7 @@ else if(HAS_TRAIT(src, TRAIT_BURROWED)) icon_state = "[xeno_caste.caste_name] Burrowed" else if(lying_angle) - if((resting || IsSleeping()) && (!IsParalyzed() && !IsUnconscious() && health > 0)) + if((resting || has_status_effect(STATUS_EFFECT_SLEEPING)) && (!has_status_effect(STATUS_EFFECT_PARALYZED) && !has_status_effect(STATUS_EFFECT_UNCONSCIOUS) && health > 0)) icon_state = "[xeno_caste.caste_name] Sleeping" else icon_state = "[xeno_caste.caste_name] Knocked Down" @@ -119,7 +119,7 @@ health_thresholds = 3 var/overlay_to_show if(lying_angle) - if((resting || IsSleeping()) && (!IsParalyzed() && !IsUnconscious() && health > 0)) + if((resting || has_status_effect(STATUS_EFFECT_SLEEPING)) && (!has_status_effect(STATUS_EFFECT_PARALYZED) && !has_status_effect(STATUS_EFFECT_UNCONSCIOUS) && health > 0)) overlay_to_show = "wounded_resting_[health_thresholds]" else overlay_to_show = "wounded_stunned_[health_thresholds]" @@ -183,7 +183,7 @@ icon_state = "" return layer = layer + 0.4 - if((!owner.lying_angle && !owner.resting && !owner.IsSleeping())) + if((!owner.lying_angle && !owner.resting && !owner.has_status_effect(STATUS_EFFECT_SLEEPING))) icon_state = "alien_fire" else icon_state = "alien_fire_lying" diff --git a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm index 60ebf5a4e94..9d7fd1df2b0 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm @@ -553,7 +553,7 @@ playsound(C, SFX_ALIEN_DROOL, 15, TRUE) do face_atom(C) - if(IsStaggered()) + if(has_status_effect(STATUS_EFFECT_STAGGER)) return FALSE do_attack_animation(C) C.reagents.add_reagent(toxin, transfer_amount) diff --git a/code/modules/mob/living/status_procs/confused.dm b/code/modules/mob/living/status_procs/confused.dm index cdce00bff8c..2b73d986d2c 100644 --- a/code/modules/mob/living/status_procs/confused.dm +++ b/code/modules/mob/living/status_procs/confused.dm @@ -1,10 +1,6 @@ -///Returns if confused -/mob/living/proc/IsConfused() - return has_status_effect(STATUS_EFFECT_CONFUSED) - ///Returns remaining confused duration /mob/living/proc/AmountConfused() - var/datum/status_effect/incapacitating/confused/current_confused = IsConfused() + var/datum/status_effect/incapacitating/confused/current_confused = has_status_effect(STATUS_EFFECT_CONFUSED) return current_confused ? current_confused.duration - world.time : 0 ///Applies confused from current world time unless existing duration is higher @@ -18,7 +14,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/confused/current_confused = IsConfused() + var/datum/status_effect/incapacitating/confused/current_confused = has_status_effect(STATUS_EFFECT_CONFUSED) if(current_confused) current_confused.duration = max(world.time + amount, current_confused.duration) else if(amount > 0) @@ -28,7 +24,7 @@ ///Used to set confused to a set amount, commonly to remove it /mob/living/proc/SetConfused(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/confused/current_confused = IsConfused() + var/datum/status_effect/incapacitating/confused/current_confused = has_status_effect(STATUS_EFFECT_CONFUSED) if(amount <= 0) if(current_confused) qdel(current_confused) @@ -60,7 +56,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/confused/current_confused = IsConfused() + var/datum/status_effect/incapacitating/confused/current_confused = has_status_effect(STATUS_EFFECT_CONFUSED) if(current_confused) current_confused.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/immobilize.dm b/code/modules/mob/living/status_procs/immobilize.dm index 32e1c2cde5d..c461acb0c97 100644 --- a/code/modules/mob/living/status_procs/immobilize.dm +++ b/code/modules/mob/living/status_procs/immobilize.dm @@ -1,17 +1,13 @@ -///Returns if immobilized -/mob/living/proc/IsImmobilized() - return has_status_effect(STATUS_EFFECT_IMMOBILIZED) - ///Returns remaining immobilize duration /mob/living/proc/AmountImmobilized() - var/datum/status_effect/incapacitating/immobilized/current_immobilized = IsImmobilized() + var/datum/status_effect/incapacitating/immobilized/current_immobilized = has_status_effect(STATUS_EFFECT_IMMOBILIZED) return current_immobilized ? current_immobilized.duration - world.time : 0 ///Applies immobilize only if not currently applied /mob/living/proc/ImmobilizeNoChain(amount, ignore_canstun = FALSE) if(status_flags & GODMODE) return - if(IsImmobilized()) + if(has_status_effect(STATUS_EFFECT_IMMOBILIZED)) return 0 return Immobilize(amount, ignore_canstun) @@ -26,7 +22,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/immobilized/current_immobilized = IsImmobilized() + var/datum/status_effect/incapacitating/immobilized/current_immobilized = has_status_effect(STATUS_EFFECT_IMMOBILIZED) if(current_immobilized) current_immobilized.duration = max(world.time + amount, current_immobilized.duration) else if(amount > 0) @@ -36,7 +32,7 @@ ///Used to set immobilize to a set amount, commonly to remove it /mob/living/proc/SetImmobilized(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/immobilized/current_immobilized = IsImmobilized() + var/datum/status_effect/incapacitating/immobilized/current_immobilized = has_status_effect(STATUS_EFFECT_IMMOBILIZED) if(amount <= 0) if(current_immobilized) qdel(current_immobilized) @@ -68,7 +64,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/immobilized/current_immobilized = IsImmobilized() + var/datum/status_effect/incapacitating/immobilized/current_immobilized = has_status_effect(STATUS_EFFECT_IMMOBILIZED) if(current_immobilized) current_immobilized.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/irradiated.dm b/code/modules/mob/living/status_procs/irradiated.dm index c7d65f86cf1..8e304d17ddf 100644 --- a/code/modules/mob/living/status_procs/irradiated.dm +++ b/code/modules/mob/living/status_procs/irradiated.dm @@ -1,10 +1,6 @@ -///Returns whether the mob is irradiated or not -/mob/living/proc/is_irradiated() - return has_status_effect(STATUS_EFFECT_IRRADIATED) - ///How many deciseconds remain in our irradiated status effect /mob/living/proc/amount_irradiated() - var/datum/status_effect/incapacitating/irradiated/irradiated = is_irradiated(FALSE) + var/datum/status_effect/incapacitating/irradiated/irradiated = has_status_effect(STATUS_EFFECT_IRRADIATED) if(irradiated) return irradiated.duration - world.time return 0 @@ -13,7 +9,7 @@ /mob/living/proc/irradiate(amount, ignore_canstun = FALSE) //Can't go below remaining duration if(status_flags & GODMODE) return - var/datum/status_effect/incapacitating/irradiated/irradiated = is_irradiated(FALSE) + var/datum/status_effect/incapacitating/irradiated/irradiated = has_status_effect(STATUS_EFFECT_IRRADIATED) if(irradiated) irradiated.duration = max(world.time + amount, irradiated.duration) else if(amount > 0) @@ -24,7 +20,7 @@ /mob/living/proc/set_radiation(amount, ignore_canstun = FALSE) if(status_flags & GODMODE) return - var/datum/status_effect/incapacitating/irradiated/irradiated = is_irradiated(FALSE) + var/datum/status_effect/incapacitating/irradiated/irradiated = has_status_effect(STATUS_EFFECT_IRRADIATED) if(amount <= 0) if(irradiated) qdel(irradiated) @@ -39,7 +35,7 @@ /mob/living/proc/adjust_radiation(amount, ignore_canstun = FALSE) if(status_flags & GODMODE) return - var/datum/status_effect/incapacitating/irradiated/irradiated = is_irradiated(FALSE) + var/datum/status_effect/incapacitating/irradiated/irradiated = has_status_effect(STATUS_EFFECT_IRRADIATED) if(irradiated) irradiated.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/knockdown.dm b/code/modules/mob/living/status_procs/knockdown.dm index 38a406fe337..b154e6616eb 100644 --- a/code/modules/mob/living/status_procs/knockdown.dm +++ b/code/modules/mob/living/status_procs/knockdown.dm @@ -1,17 +1,13 @@ -///Returns if knockeddown -/mob/living/proc/IsKnockdown() - return has_status_effect(STATUS_EFFECT_KNOCKDOWN) - ///Returns remaining knockdown duration /mob/living/proc/AmountKnockdown() - var/datum/status_effect/incapacitating/knockdown/current_knockdown = IsKnockdown() + var/datum/status_effect/incapacitating/knockdown/current_knockdown = has_status_effect(STATUS_EFFECT_KNOCKDOWN) return current_knockdown ? current_knockdown.duration - world.time : 0 ///Applies knockdown only if not currently applied /mob/living/proc/KnockdownNoChain(amount, ignore_canstun = FALSE) if(status_flags & GODMODE) return - if(IsKnockdown()) + if(has_status_effect(STATUS_EFFECT_KNOCKDOWN)) return 0 return Knockdown(amount, ignore_canstun) @@ -26,7 +22,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/knockdown/current_knockdown = IsKnockdown() + var/datum/status_effect/incapacitating/knockdown/current_knockdown = has_status_effect(STATUS_EFFECT_KNOCKDOWN) if(current_knockdown) current_knockdown.duration = max(world.time + amount, current_knockdown.duration) else if(amount > 0) @@ -36,7 +32,7 @@ ///Used to set knockdown to a set amount, commonly to remove it /mob/living/proc/SetKnockdown(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/knockdown/current_knockdown = IsKnockdown() + var/datum/status_effect/incapacitating/knockdown/current_knockdown = has_status_effect(STATUS_EFFECT_KNOCKDOWN) if(amount <= 0) if(current_knockdown) qdel(current_knockdown) @@ -68,7 +64,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/knockdown/current_knockdown = IsKnockdown() + var/datum/status_effect/incapacitating/knockdown/current_knockdown = has_status_effect(STATUS_EFFECT_KNOCKDOWN) if(current_knockdown) current_knockdown.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/mute.dm b/code/modules/mob/living/status_procs/mute.dm index 2f0e1bff8c4..154aab00755 100644 --- a/code/modules/mob/living/status_procs/mute.dm +++ b/code/modules/mob/living/status_procs/mute.dm @@ -1,10 +1,6 @@ -///Checks to see if we're muted -/mob/living/proc/IsMute() - return has_status_effect(STATUS_EFFECT_MUTED) - ///Checks the duration left on our mute status effect /mob/living/proc/AmountMute() - var/datum/status_effect/mute/M = IsMute() + var/datum/status_effect/mute/M = has_status_effect(STATUS_EFFECT_MUTED) if(M) return M.duration - world.time return 0 @@ -15,7 +11,7 @@ return if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_MUTE, amount) & COMPONENT_NO_MUTE) return - var/datum/status_effect/mute/M = IsMute() + var/datum/status_effect/mute/M = has_status_effect(STATUS_EFFECT_MUTED) if(M) M.duration = max(world.time + amount, M.duration) else if(amount > 0) @@ -28,7 +24,7 @@ return if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_MUTE, amount) & COMPONENT_NO_MUTE) return - var/datum/status_effect/mute/M = IsMute() + var/datum/status_effect/mute/M = has_status_effect(STATUS_EFFECT_MUTED) if(M) if(amount <= 0) @@ -50,7 +46,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_MUTE, amount) & COMPONENT_NO_MUTE) return - var/datum/status_effect/mute/M = IsMute() + var/datum/status_effect/mute/M = has_status_effect(STATUS_EFFECT_MUTED) if(M) M.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/paralyze.dm b/code/modules/mob/living/status_procs/paralyze.dm index 4ce8d259902..a27951e4bfb 100644 --- a/code/modules/mob/living/status_procs/paralyze.dm +++ b/code/modules/mob/living/status_procs/paralyze.dm @@ -1,17 +1,13 @@ -///Returns if paralyzed -/mob/living/proc/IsParalyzed() - return has_status_effect(STATUS_EFFECT_PARALYZED) - ///Returns remaining paralyzed duration /mob/living/proc/AmountParalyzed() - var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = IsParalyzed() + var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = has_status_effect(STATUS_EFFECT_PARALYZED) return current_paralyzed ? current_paralyzed.duration - world.time : 0 ///Applies paralyze only if not currently applied /mob/living/proc/ParalyzeNoChain(amount, ignore_canstun = FALSE) if(status_flags & GODMODE) return - if(IsParalyzed()) + if(has_status_effect(STATUS_EFFECT_PARALYZED)) return 0 return Paralyze(amount, ignore_canstun) @@ -26,7 +22,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = IsParalyzed() + var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = has_status_effect(STATUS_EFFECT_PARALYZED) if(current_paralyzed) current_paralyzed.duration = max(world.time + amount, current_paralyzed.duration) else if(amount > 0) @@ -44,7 +40,7 @@ ///Used to set paralyzed to a set amount, commonly to remove it /mob/living/proc/SetParalyzed(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = IsParalyzed() + var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = has_status_effect(STATUS_EFFECT_PARALYZED) if(amount <= 0) if(current_paralyzed) qdel(current_paralyzed) @@ -76,7 +72,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = IsParalyzed() + var/datum/status_effect/incapacitating/paralyzed/current_paralyzed = has_status_effect(STATUS_EFFECT_PARALYZED) if(current_paralyzed) current_paralyzed.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/sleeping.dm b/code/modules/mob/living/status_procs/sleeping.dm index 799b9a6746d..a27b869d9f1 100644 --- a/code/modules/mob/living/status_procs/sleeping.dm +++ b/code/modules/mob/living/status_procs/sleeping.dm @@ -1,10 +1,6 @@ -///Returns if sleeping -/mob/living/proc/IsSleeping() - return has_status_effect(STATUS_EFFECT_SLEEPING) - ///Returns remaining sleeping duration /mob/living/proc/AmountSleeping() - var/datum/status_effect/incapacitating/sleeping/current_sleeping = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/current_sleeping = has_status_effect(STATUS_EFFECT_SLEEPING) return current_sleeping ? current_sleeping.duration - world.time : 0 ///Applies sleeping from current world time unless existing duration is higher @@ -18,7 +14,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/sleeping/current_sleeping = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/current_sleeping = has_status_effect(STATUS_EFFECT_SLEEPING) if(current_sleeping) current_sleeping.duration = max(world.time + amount, current_sleeping.duration) else if(amount > 0) @@ -28,7 +24,7 @@ ///Used to set sleeping to a set amount, commonly to remove it /mob/living/proc/SetSleeping(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/sleeping/current_sleeping = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/current_sleeping = has_status_effect(STATUS_EFFECT_SLEEPING) if(amount <= 0) if(current_sleeping) qdel(current_sleeping) @@ -60,7 +56,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/sleeping/current_sleeping = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/current_sleeping = has_status_effect(STATUS_EFFECT_SLEEPING) if(current_sleeping) current_sleeping.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/stagger.dm b/code/modules/mob/living/status_procs/stagger.dm index 2c1457d955f..11ebdffe291 100644 --- a/code/modules/mob/living/status_procs/stagger.dm +++ b/code/modules/mob/living/status_procs/stagger.dm @@ -1,10 +1,6 @@ -///Returns if staggered -/mob/living/proc/IsStaggered() - return has_status_effect(STATUS_EFFECT_STAGGER) - ///Returns remaining stagger duration /mob/living/proc/AmountStaggered() - var/datum/status_effect/incapacitating/stagger/current_stagger = IsStaggered() + var/datum/status_effect/incapacitating/stagger/current_stagger = has_status_effect(STATUS_EFFECT_STAGGER) return current_stagger ? current_stagger.duration - world.time : 0 ///Applies stagger from current world time unless existing duration is higher @@ -18,7 +14,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/stagger/current_stagger = IsStaggered() + var/datum/status_effect/incapacitating/stagger/current_stagger = has_status_effect(STATUS_EFFECT_STAGGER) if(current_stagger) current_stagger.duration = max(world.time + amount, current_stagger.duration) else if(amount > 0) @@ -28,7 +24,7 @@ ///Used to set stagger to a set amount, commonly to remove it /mob/living/proc/set_stagger(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/stagger/current_stagger = IsStaggered() + var/datum/status_effect/incapacitating/stagger/current_stagger = has_status_effect(STATUS_EFFECT_STAGGER) if(amount <= 0) if(current_stagger) qdel(current_stagger) @@ -60,7 +56,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/stagger/current_stagger = IsStaggered() + var/datum/status_effect/incapacitating/stagger/current_stagger = has_status_effect(STATUS_EFFECT_STAGGER) if(current_stagger) current_stagger.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/stun.dm b/code/modules/mob/living/status_procs/stun.dm index 843042dfce5..0c52a830158 100644 --- a/code/modules/mob/living/status_procs/stun.dm +++ b/code/modules/mob/living/status_procs/stun.dm @@ -1,10 +1,6 @@ -///Returns if stunned -/mob/living/proc/IsStun() - return has_status_effect(STATUS_EFFECT_STUN) - ///Returns remaining stun duration /mob/living/proc/AmountStun() - var/datum/status_effect/incapacitating/stun/current_stun = IsStun() + var/datum/status_effect/incapacitating/stun/current_stun = has_status_effect(STATUS_EFFECT_STUN) return current_stun ? current_stun.duration - world.time : 0 ///Applies stun from current world time unless existing duration is higher @@ -18,7 +14,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/stun/current_stun = IsStun() + var/datum/status_effect/incapacitating/stun/current_stun = has_status_effect(STATUS_EFFECT_STUN) if(current_stun) current_stun.duration = max(world.time + amount, current_stun.duration) else if(amount > 0) @@ -28,7 +24,7 @@ ///Used to set stun to a set amount, commonly to remove it /mob/living/proc/SetStun(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/stun/current_stun = IsStun() + var/datum/status_effect/incapacitating/stun/current_stun = has_status_effect(STATUS_EFFECT_STUN) if(amount <= 0) if(current_stun) qdel(current_stun) @@ -60,7 +56,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/stun/current_stun = IsStun() + var/datum/status_effect/incapacitating/stun/current_stun = has_status_effect(STATUS_EFFECT_STUN) if(current_stun) current_stun.duration += amount else if(amount > 0) diff --git a/code/modules/mob/living/status_procs/unconscious.dm b/code/modules/mob/living/status_procs/unconscious.dm index 4dd6bf1d056..790c6453b28 100644 --- a/code/modules/mob/living/status_procs/unconscious.dm +++ b/code/modules/mob/living/status_procs/unconscious.dm @@ -1,10 +1,6 @@ -///Returns if unconscious -/mob/living/proc/IsUnconscious() - return has_status_effect(STATUS_EFFECT_UNCONSCIOUS) - ///Returns remaining unconscious duration /mob/living/proc/AmountUnconscious() - var/datum/status_effect/incapacitating/unconscious/current_unconscious = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/current_unconscious = has_status_effect(STATUS_EFFECT_UNCONSCIOUS) return current_unconscious ? current_unconscious.duration - world.time : 0 ///Applies unconscious from current world time unless existing duration is higher @@ -18,7 +14,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/unconscious/current_unconscious = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/current_unconscious = has_status_effect(STATUS_EFFECT_UNCONSCIOUS) if(current_unconscious) current_unconscious.duration = max(world.time + amount, current_unconscious.duration) else if(amount > 0) @@ -28,7 +24,7 @@ ///Used to set unconscious to a set amount, commonly to remove it /mob/living/proc/SetUnconscious(amount, ignore_canstun = FALSE) - var/datum/status_effect/incapacitating/unconscious/current_unconscious = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/current_unconscious = has_status_effect(STATUS_EFFECT_UNCONSCIOUS) if(amount <= 0) if(current_unconscious) qdel(current_unconscious) @@ -60,7 +56,7 @@ if(absorb_stun(amount, ignore_canstun)) return - var/datum/status_effect/incapacitating/unconscious/current_unconscious = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/current_unconscious = has_status_effect(STATUS_EFFECT_UNCONSCIOUS) if(current_unconscious) current_unconscious.duration += amount else if(amount > 0) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 387fdd96485..09649588a16 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -133,7 +133,7 @@ L.last_move_intent = world.time + 1 SECONDS - if(L.IsConfused()) + if(L.has_status_effect(STATUS_EFFECT_CONFUSED)) var/newdir = 0 if(L.AmountConfused() > 40) newdir = pick(GLOB.alldirs) diff --git a/code/modules/predator/falcon.dm b/code/modules/predator/falcon.dm index be2db58f05a..0d541bb762e 100644 --- a/code/modules/predator/falcon.dm +++ b/code/modules/predator/falcon.dm @@ -23,7 +23,7 @@ set src in usr var/mob/living/mob = usr - if(mob.stat || (mob.lying_angle && !mob.resting && !mob.IsSleeping()) || (mob.IsParalyzed() || mob.IsUnconscious())) + if(mob.stat || (mob.lying_angle && !mob.resting && !mob.has_status_effect(STATUS_EFFECT_SLEEPING)) || (mob.has_status_effect(STATUS_EFFECT_PARALYZED) || mob.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return var/mob/living/carbon/human/H = usr diff --git a/code/modules/predator/predator_action.dm b/code/modules/predator/predator_action.dm index a45b04af1a6..44ced63785d 100644 --- a/code/modules/predator/predator_action.dm +++ b/code/modules/predator/predator_action.dm @@ -11,7 +11,7 @@ var/mob/living/carbon/human/human = owner if(!istype(human)) return FALSE - if(human.stat || (human.lying_angle && !human.resting && !human.IsSleeping()) || (human.IsParalyzed() || human.IsUnconscious())) + if(human.stat || (human.lying_angle && !human.resting && !human.has_status_effect(STATUS_EFFECT_SLEEPING)) || (human.has_status_effect(STATUS_EFFECT_PARALYZED) || human.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return FALSE return TRUE diff --git a/code/modules/predator/thrall/procs.dm b/code/modules/predator/thrall/procs.dm index 175762e31cd..b7abd69e280 100644 --- a/code/modules/predator/thrall/procs.dm +++ b/code/modules/predator/thrall/procs.dm @@ -8,7 +8,7 @@ to_chat(wearer, span_warning("You've already claimed your equipment.")) return - if(wearer.stat || (wearer.lying_angle && !wearer.resting && !wearer.IsSleeping()) || (wearer.IsParalyzed() || wearer.IsUnconscious()) || wearer.lying_angle || wearer.buckled) + if(wearer.stat || (wearer.lying_angle && !wearer.resting && !wearer.has_status_effect(STATUS_EFFECT_SLEEPING)) || (wearer.has_status_effect(STATUS_EFFECT_PARALYZED) || wearer.has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) || wearer.lying_angle || wearer.buckled) to_chat(wearer, span_warning("You're not able to do that right now.")) return diff --git a/code/modules/predator/yautja/bracers.dm b/code/modules/predator/yautja/bracers.dm index 81dba336a05..b666d88ae03 100644 --- a/code/modules/predator/yautja/bracers.dm +++ b/code/modules/predator/yautja/bracers.dm @@ -152,7 +152,7 @@ if(forced || HAS_TRAIT(user, TRAIT_YAUTJA_TECH)) return FALSE - if(user.stat || (user.lying_angle && !user.resting && !user.IsSleeping()) || (user.IsParalyzed() || user.IsUnconscious())) //let's do this here to avoid to_chats to dead guys + if(user.stat || (user.lying_angle && !user.resting && !user.has_status_effect(STATUS_EFFECT_SLEEPING)) || (user.has_status_effect(STATUS_EFFECT_PARALYZED) || user.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) //let's do this here to avoid to_chats to dead guys return TRUE var/workingProbability = 20 @@ -367,7 +367,7 @@ . = healing_capsule_internal(usr, FALSE) /obj/item/clothing/gloves/yautja/proc/healing_capsule_internal(mob/living/caller, forced = FALSE) - if(caller.stat || (caller.lying_angle && !caller.resting && !caller.IsSleeping()) || (caller.IsParalyzed() || caller.IsUnconscious())) + if(caller.stat || (caller.lying_angle && !caller.resting && !caller.has_status_effect(STATUS_EFFECT_SLEEPING)) || (caller.has_status_effect(STATUS_EFFECT_PARALYZED) || caller.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return FALSE . = check_random_function(caller, forced) @@ -470,7 +470,7 @@ var/mob/living/carbon/human/M = caller var/new_alpha = cloak_alpha - if(!istype(M) || caller.stat || (caller.lying_angle && !caller.resting && !caller.IsSleeping()) || (caller.IsParalyzed() || caller.IsUnconscious())) + if(!istype(M) || caller.stat || (caller.lying_angle && !caller.resting && !caller.has_status_effect(STATUS_EFFECT_SLEEPING)) || (caller.has_status_effect(STATUS_EFFECT_PARALYZED) || caller.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return FALSE if(cloaked) //Turn it off. @@ -896,7 +896,7 @@ to_chat(wearer, span_warning("You've already claimed your equipment.")) return - if(wearer.stat || (wearer.lying_angle && !wearer.resting && !wearer.IsSleeping()) || (wearer.IsParalyzed() || wearer.IsUnconscious()) || wearer.lying_angle || wearer.buckled) + if(wearer.stat || (wearer.lying_angle && !wearer.resting && !wearer.has_status_effect(STATUS_EFFECT_SLEEPING)) || (wearer.has_status_effect(STATUS_EFFECT_PARALYZED) || wearer.has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) || wearer.lying_angle || wearer.buckled) to_chat(wearer, span_warning("You're not able to do that right now.")) return @@ -1155,7 +1155,7 @@ . = remove_tracked_item_internal(usr, FALSE) /obj/item/clothing/gloves/yautja/hunter/proc/remove_tracked_item_internal(mob/living/caller, forced = FALSE) - if(caller.stat || (caller.lying_angle && !caller.resting && !caller.IsSleeping()) || (caller.IsParalyzed() || caller.IsUnconscious())) + if(caller.stat || (caller.lying_angle && !caller.resting && !caller.has_status_effect(STATUS_EFFECT_SLEEPING)) || (caller.has_status_effect(STATUS_EFFECT_PARALYZED) || caller.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return FALSE . = check_random_function(caller, forced) @@ -1183,7 +1183,7 @@ . = add_tracked_item_internal(usr, FALSE) /obj/item/clothing/gloves/yautja/hunter/proc/add_tracked_item_internal(mob/living/caller, forced = FALSE) - if(caller.stat || (caller.lying_angle && !caller.resting && !caller.IsSleeping()) || (caller.IsParalyzed() || caller.IsUnconscious())) + if(caller.stat || (caller.lying_angle && !caller.resting && !caller.has_status_effect(STATUS_EFFECT_SLEEPING)) || (caller.has_status_effect(STATUS_EFFECT_PARALYZED) || caller.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return FALSE . = check_random_function(caller, forced) @@ -1209,7 +1209,7 @@ set src in usr var/mob/living/mob = usr - if(mob.stat || (mob.lying_angle && !mob.resting && !mob.IsSleeping()) || (mob.IsParalyzed() || mob.IsUnconscious())) + if(mob.stat || (mob.lying_angle && !mob.resting && !mob.has_status_effect(STATUS_EFFECT_SLEEPING)) || (mob.has_status_effect(STATUS_EFFECT_PARALYZED) || mob.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return name_active = !name_active @@ -1222,7 +1222,7 @@ set src in usr var/mob/living/mob = usr - if(mob.stat || (mob.lying_angle && !mob.resting && !mob.IsSleeping()) || (mob.IsParalyzed() || mob.IsUnconscious())) + if(mob.stat || (mob.lying_angle && !mob.resting && !mob.has_status_effect(STATUS_EFFECT_SLEEPING)) || (mob.has_status_effect(STATUS_EFFECT_PARALYZED) || mob.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) return var/mob/living/carbon/human/H = usr diff --git a/code/modules/predator/yautja/hudprocs.dm b/code/modules/predator/yautja/hudprocs.dm index ef64534adfb..c3d6ffbaa4b 100644 --- a/code/modules/predator/yautja/hudprocs.dm +++ b/code/modules/predator/yautja/hudprocs.dm @@ -1,5 +1,5 @@ /mob/living/carbon/human/proc/mark_panel() - if(stat || (lying_angle && !resting && !IsSleeping()) || (IsParalyzed() || IsUnconscious())) + if(stat || (lying_angle && !resting && !has_status_effect(STATUS_EFFECT_SLEEPING)) || (has_status_effect(STATUS_EFFECT_PARALYZED) || has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) to_chat(src, span_danger("You're not able to do that right now.")) return diff --git a/code/modules/predator/yautja/items.dm b/code/modules/predator/yautja/items.dm index 3587c0e7811..ff01395dda0 100644 --- a/code/modules/predator/yautja/items.dm +++ b/code/modules/predator/yautja/items.dm @@ -660,7 +660,7 @@ return /obj/item/explosive/grenade/spawnergrenade/hellhound/check_eye(mob/living/user) - if(user.stat || (user.lying_angle && !user.resting && !user.IsSleeping()) || (user.IsParalyzed() || user.IsUnconscious())) + if(user.stat || (user.lying_angle && !user.resting && !user.has_status_effect(STATUS_EFFECT_SLEEPING)) || (user.has_status_effect(STATUS_EFFECT_PARALYZED) || user.has_status_effect(STATUS_EFFECT_UNCONSCIOUS))) user.unset_interaction() else if (!current || get_turf(user) != activated_turf || src.loc != user ) //camera doesn't work, or we moved. user.unset_interaction() diff --git a/code/modules/predator/yautja/procs.dm b/code/modules/predator/yautja/procs.dm index 2164cd2f1c0..4a63b4c0dfc 100644 --- a/code/modules/predator/yautja/procs.dm +++ b/code/modules/predator/yautja/procs.dm @@ -48,7 +48,7 @@ set name = "Butcher" set desc = "Butcher a corpse you're standing on for its tasty meats." - if(stat || (lying_angle && !resting && !IsSleeping()) || (IsParalyzed() || IsUnconscious()) || lying_angle || buckled) + if(stat || (lying_angle && !resting && !has_status_effect(STATUS_EFFECT_SLEEPING)) || (has_status_effect(STATUS_EFFECT_PARALYZED) || has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) || lying_angle || buckled) return var/list/choices = list() @@ -77,7 +77,7 @@ to_chat(src, span_warning("This tiny worm is not even worth using your tools on.")) return - if(stat || (lying_angle && !resting && !IsSleeping()) || (IsParalyzed() || IsUnconscious()) || lying_angle || buckled) + if(stat || (lying_angle && !resting && !has_status_effect(STATUS_EFFECT_SLEEPING)) || (has_status_effect(STATUS_EFFECT_PARALYZED) || has_status_effect(STATUS_EFFECT_UNCONSCIOUS)) || lying_angle || buckled) return if(isxeno(T)) diff --git a/code/modules/projectiles/ammo_datums/_ammo_datums.dm b/code/modules/projectiles/ammo_datums/_ammo_datums.dm index 756b4177dc9..313b30db24e 100644 --- a/code/modules/projectiles/ammo_datums/_ammo_datums.dm +++ b/code/modules/projectiles/ammo_datums/_ammo_datums.dm @@ -141,7 +141,7 @@ //Check for and apply hard CC. if(hard_size_threshold >= victim.mob_size && (stun || weaken || knockback)) var/mob/living/living_victim = victim - if(living_victim.IsStun() || living_victim.IsParalyzed()) //Prevent chain stunning. + if(living_victim.has_status_effect(STATUS_EFFECT_STUN) || living_victim.has_status_effect(STATUS_EFFECT_PARALYZED)) //Prevent chain stunning. stun = 0 weaken = 0 @@ -165,12 +165,12 @@ if(iscarbon(victim)) var/mob/living/carbon/carbon_victim = victim #if DEBUG_STAGGER_SLOWDOWN - to_chat(world, span_debuginfo("Damage: Initial stagger is: <b>[target.IsStaggered()]</b>")) + to_chat(world, span_debuginfo("Damage: Initial stagger is: <b>[target.has_status_effect(STATUS_EFFECT_STAGGER)]</b>")) #endif if(!HAS_TRAIT(carbon_victim, TRAIT_STAGGER_RESISTANT)) //Some mobs like the Queen are immune to projectile stagger carbon_victim.adjust_stagger(stagger) #if DEBUG_STAGGER_SLOWDOWN - to_chat(world, span_debuginfo("Damage: Final stagger is: <b>[target.IsStaggered()]</b>")) + to_chat(world, span_debuginfo("Damage: Final stagger is: <b>[target.has_status_effect(STATUS_EFFECT_STAGGER)]</b>")) to_chat(world, span_debuginfo("Damage: Initial slowdown is: <b>[target.slowdown]</b>")) #endif carbon_victim.add_slowdown(slowdown) diff --git a/code/modules/projectiles/gun_system.dm b/code/modules/projectiles/gun_system.dm index 6b4b744f213..3ddb7ac80b3 100644 --- a/code/modules/projectiles/gun_system.dm +++ b/code/modules/projectiles/gun_system.dm @@ -1735,7 +1735,7 @@ projectile_to_fire.point_blank_range = 0 if(isliving(firer)) var/mob/living/living_firer = firer - if(living_firer.IsStaggered()) + if(living_firer.has_status_effect(STATUS_EFFECT_STAGGER)) projectile_to_fire.damage *= STAGGER_DAMAGE_MULTIPLIER ///Sets the projectile accuracy and scatter diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index d1b8a971a11..f7170f216d1 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -185,7 +185,7 @@ if(!isliving(user)) return var/mob/living/L = user - if(L.stat || L.IsStun() || L.IsParalyzed() || flushing) + if(L.stat || L.has_status_effect(STATUS_EFFECT_STUN) || L.has_status_effect(STATUS_EFFECT_PARALYZED) || flushing) return if(L.loc == src) go_out(L) diff --git a/code/modules/vehicles/armored/armored_weapons.dm b/code/modules/vehicles/armored/armored_weapons.dm index 722eba41616..c1696665477 100644 --- a/code/modules/vehicles/armored/armored_weapons.dm +++ b/code/modules/vehicles/armored/armored_weapons.dm @@ -170,7 +170,7 @@ if(!isliving(firer)) return var/mob/living/living_firer = firer - if(living_firer.IsStaggered()) + if(living_firer.has_status_effect(STATUS_EFFECT_STAGGER)) projectile_to_fire.damage *= STAGGER_DAMAGE_MULTIPLIER if((projectile_to_fire.ammo.flags_ammo_behavior & AMMO_IFF) && ishuman(firer)) var/mob/living/carbon/human/human_firer = firer diff --git a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm index 39c1031d577..7fe92c84d2a 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm @@ -151,7 +151,7 @@ if(!isliving(firer)) return var/mob/living/living_firer = firer - if(living_firer.IsStaggered()) + if(living_firer.has_status_effect(STATUS_EFFECT_STAGGER)) projectile_to_fire.damage *= STAGGER_DAMAGE_MULTIPLIER if((projectile_to_fire.ammo.flags_ammo_behavior & AMMO_IFF) && ishuman(firer)) var/mob/living/carbon/human/human_firer = firer