From 5e7b0c0971c19f70f5d27e6b27dab75a2f31e179 Mon Sep 17 00:00:00 2001
From: DGamerL <108773801+DGamerL@users.noreply.github.com>
Date: Mon, 8 Jul 2024 00:57:01 +0200
Subject: [PATCH] Changes even more uses of `stat` comparisons to use the
defines (#26154)
* First wave
* Second wave
* Last wave
* Apply suggestions from code review
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
* We love signals in this household
* Revert "We love signals in this household"
This reverts commit 75fe8d46a3ad0ee50b53bfb6394fb110e191319b.
* Update code/game/machinery/camera/tracking.dm
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
* Update code/game/machinery/camera/tracking.dm
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
---------
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
---
code/game/dna/mutations/mutation_powers.dm | 4 ++--
.../miniantags/guardian/types/explosive_guardian.dm | 2 +-
code/game/gamemodes/miniantags/guardian/types/healer.dm | 4 ++--
code/game/gamemodes/wizard/soulstone.dm | 2 +-
code/game/machinery/camera/tracking.dm | 6 +++---
code/game/machinery/doors/airlock.dm | 6 +++---
code/game/machinery/doors/door.dm | 6 +++---
code/game/mecha/equipment/tools/medical_tools.dm | 4 ++--
code/game/mecha/mecha_topic.dm | 2 +-
code/game/objects/items/devices/scanners.dm | 6 +++---
code/modules/admin/player_panel.dm | 2 +-
code/modules/admin/verbs/onlyone.dm | 2 +-
.../food_and_drinks/kitchen_machinery/monkeyrecycler.dm | 2 +-
code/modules/mob/living/carbon/carbon_update_status.dm | 2 +-
code/modules/mob/living/carbon/human/human_defense.dm | 2 +-
code/modules/mob/living/carbon/human/human_life.dm | 4 ++--
code/modules/mob/living/living_defines.dm | 1 -
code/modules/mob/living/silicon/ai/ai_mob.dm | 6 +++---
code/modules/mob/living/silicon/ai/freelook/eye.dm | 2 +-
code/modules/mob/living/simple_animal/bot/medbot.dm | 2 +-
code/modules/mob/living/simple_animal/friendly/cat.dm | 2 +-
code/modules/mob/living/simple_animal/friendly/crab.dm | 2 +-
.../mob/living/simple_animal/friendly/farm_animals.dm | 8 ++++----
code/modules/mob/living/simple_animal/friendly/lizard.dm | 2 +-
code/modules/mob/living/simple_animal/friendly/mouse.dm | 2 +-
code/modules/mob/living/simple_animal/hostile/hostile.dm | 2 +-
.../living/simple_animal/hostile/megafauna/colossus.dm | 2 +-
.../living/simple_animal/hostile/megafauna/hierophant.dm | 2 +-
.../mob/living/simple_animal/hostile/mining/goldgrub.dm | 2 +-
.../mob/living/simple_animal/hostile/mining/mining.dm | 4 ++--
code/modules/mob/living/simple_animal/hostile/mushroom.dm | 4 ++--
.../simple_animal/hostile/terror_spiders/princess.dm | 2 +-
.../simple_animal/hostile/terror_spiders/queen_terror.dm | 2 +-
.../simple_animal/hostile/terror_spiders/terror_ai.dm | 2 +-
code/modules/mob/living/simple_animal/parrot.dm | 8 ++++----
code/modules/mob/living/simple_animal/simple_animal.dm | 2 +-
code/modules/mob/living/simple_animal/slime/slime_life.dm | 6 +++---
code/modules/mob/living/simple_animal/slime/slime_mob.dm | 4 ++--
code/modules/mob/mob_vars.dm | 3 ++-
code/modules/paperwork/faxmachine.dm | 2 +-
code/modules/paperwork/photography.dm | 2 +-
code/modules/tgui/states/default.dm | 2 +-
42 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/code/game/dna/mutations/mutation_powers.dm b/code/game/dna/mutations/mutation_powers.dm
index 0df8ee7db8c..e24f4b8819a 100644
--- a/code/game/dna/mutations/mutation_powers.dm
+++ b/code/game/dna/mutations/mutation_powers.dm
@@ -509,7 +509,7 @@
if(user.restrained())//Why being pulled while cuffed prevents you from moving
for(var/mob/living/M in range(user, 1))
if(M.pulling == user)
- if(!M.restrained() && M.stat == 0 && !(M.mobility_flags & MOBILITY_STAND) && user.Adjacent(M))
+ if(!M.restrained() && M.stat == CONSCIOUS && !(M.mobility_flags & MOBILITY_STAND) && user.Adjacent(M))
failure = TRUE
else
M.stop_pulling()
@@ -685,7 +685,7 @@
to_chat(user, "You can't see into [M.name]'s mind at all!")
return
- if(M.stat == 2)
+ if(M.stat == DEAD)
to_chat(user, "[M.name] is dead and cannot have [M.p_their()] mind read.")
return
if(M.health < 0)
diff --git a/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm b/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm
index 4952cf1e36d..52538dcbab3 100644
--- a/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm
@@ -23,7 +23,7 @@
to_chat(src, "You're too far from [A] to disguise it as a bomb.")
return
if(isobj(A) && can_plant(A))
- if(bomb_cooldown <= world.time && !stat)
+ if(bomb_cooldown <= world.time && stat == CONSCIOUS)
var/obj/item/guardian_bomb/B = new /obj/item/guardian_bomb(get_turf(A))
add_attack_logs(src, A, "booby trapped (summoner: [summoner])")
to_chat(src, "Success! Bomb on [A] armed!")
diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm
index d202fdd1fcd..845cea11d5b 100644
--- a/code/game/gamemodes/miniantags/guardian/types/healer.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm
@@ -63,7 +63,7 @@
if(toggle == HEALING)
if(iscarbon(target))
changeNext_move(1.5 SECONDS)
- if(heal_cooldown <= world.time && !stat)
+ if(heal_cooldown <= world.time && stat == CONSCIOUS)
var/mob/living/carbon/human/C = target
C.adjustBruteLoss(-5, robotic=1)
C.adjustFireLoss(-5, robotic=1)
@@ -78,7 +78,7 @@
if(!iscarbon(target))
return
var/mob/living/carbon/human/C = target
- if(surgical_cooldown <= world.time && !stat)
+ if(surgical_cooldown <= world.time && stat == CONSCIOUS)
to_chat(src, "You begin to do a mass repair on [C], keep them still!")
surgical_cooldown = world.time + 10 SECONDS
if(!do_after_once(src, 10 SECONDS, target = src))
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index 896ecf85717..9261b150e9d 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -317,7 +317,7 @@
if("VICTIM")
var/mob/living/carbon/human/T = target
- if(T.stat == 0)
+ if(T.stat == CONSCIOUS)
to_chat(user, "Capture failed! Kill or maim the victim first!")
else
if(!length(T.client_mobs_in_contents))
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index df5c209d2f5..92f39c2a0d3 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -9,7 +9,7 @@
track.cameras.Cut()
- if(src.stat == 2)
+ if(stat == DEAD)
return
var/list/L = list()
@@ -33,7 +33,7 @@
set category = "AI Commands"
set name = "Show Camera List"
- if(src.stat == 2)
+ if(stat == DEAD)
to_chat(src, "You can't list the cameras because you are dead!")
return
@@ -60,7 +60,7 @@
track.humans.Cut()
track.others.Cut()
- if(usr.stat == 2)
+ if(usr.stat == DEAD)
return list()
for(var/mob/living/M in GLOB.mob_list)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index c1246041050..c0de809130e 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -614,7 +614,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
if("closing")
update_icon(AIRLOCK_CLOSING)
if("deny")
- if(!stat)
+ if(stat == CONSCIOUS)
update_icon(AIRLOCK_DENY)
playsound(src,doorDeni,50,0,3)
sleep(6)
@@ -1490,7 +1490,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
// Must be powered and have working AI wire.
- if(canAIControl(src) && !stat)
+ if(canAIControl(src) && stat == CONSCIOUS)
locked = FALSE //For airlocks that were bolted open.
safe = FALSE //DOOR CRUSH
close()
@@ -1501,7 +1501,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
/obj/machinery/door/airlock/disable_lockdown()
// Must be powered and have working AI wire.
- if(canAIControl(src) && !stat)
+ if(canAIControl(src) && stat == CONSCIOUS)
unlock()
electrified_until = 0
open()
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 3a563f347bc..711af87cc8a 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -350,7 +350,7 @@
else
flick("doorc1", src)
if("deny")
- if(!stat)
+ if(stat == CONSCIOUS)
flick("door_deny", src)
/obj/machinery/door/proc/open()
@@ -537,9 +537,9 @@
/obj/machinery/door/proc/update_bounds()
if(width <= 1)
return
-
+
QDEL_LIST_CONTENTS(fillers)
-
+
if(dir in list(EAST, WEST))
bound_width = width * world.icon_size
bound_height = world.icon_size
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index f090c33faf0..cb5cf0a9046 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -105,7 +105,7 @@
if(output)
var/temp = ""
if(patient)
- temp = "
\[Occupant: [patient] ([patient.stat > 1 ? "*DECEASED*" : "Health: [patient.health]%"])\]
View stats|Eject"
+ temp = "
\[Occupant: [patient] ([patient.stat == DEAD ? "*DECEASED*" : "Health: [patient.health]%"])\]
View stats|Eject"
return "[output] [temp]"
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
@@ -161,7 +161,7 @@
t1 = "*dead*"
else
t1 = "Unknown"
- return {"Health: [patient.stat > 1 ? "[t1]" : "[patient.health]% ([t1])"]
+ return {"Health: [patient.stat == DEAD ? "[t1]" : "[patient.health]% ([t1])"]
Core Temperature: [patient.bodytemperature-T0C]°C ([patient.bodytemperature*1.8-459.67]°F)
Brute Damage: [patient.getBruteLoss()]%
Respiratory Damage: [patient.getOxyLoss()]%
diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm
index b00cd44314b..188a9a8c399 100644
--- a/code/game/mecha/mecha_topic.dm
+++ b/code/game/mecha/mecha_topic.dm
@@ -250,7 +250,7 @@
return
if(href_list["close"])
return
- if(usr.stat > 0)
+ if(usr.stat != CONSCIOUS)
return
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
if(href_list["select_equip"])
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 906ac9501ac..3260884c7f3 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -429,7 +429,7 @@ SLIME SCANNER
if("robot")
var/burn = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss()
var/brute = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss()
- msgs += "Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health]% functional"]"
+ msgs += "Analyzing Results for [M]:\n\t Overall Status: [M.stat == DEAD ? "fully disabled" : "[M.health]% functional"]"
msgs += "\t Key: Electronics/Brute"
msgs += "\t Damage Specifics: [burn] - [brute]"
if(M.timeofdeath && M.stat == DEAD)
@@ -460,7 +460,7 @@ SLIME SCANNER
if("prosthetics")
var/mob/living/carbon/human/H = M
var/is_ipc = ismachineperson(H)
- msgs += "Analyzing Results for [M]: [is_ipc ? "\n\t Overall Status: [H.stat > 1 ? "fully disabled" : "[H.health]% functional"]
" : "
"]" //for the record im sorry
+ msgs += "Analyzing Results for [M]: [is_ipc ? "\n\t Overall Status: [H.stat == DEAD ? "fully disabled" : "[H.health]% functional"]
" : "
"]" //for the record im sorry
msgs += "\t Key: Electronics/Brute"
msgs += "External prosthetics:"
var/organ_found
@@ -502,7 +502,7 @@ SLIME SCANNER
var/mob/living/silicon/ai/A = M
var/burn = A.getFireLoss() > 50 ? "[A.getFireLoss()]" : A.getFireLoss()
var/brute = A.getBruteLoss() > 50 ? "[A.getBruteLoss()]" : A.getBruteLoss()
- msgs += "Analyzing Results for [M]:\n\t Overall Status: [A.stat > 1 ? "fully disabled" : "[A.health]% functional"]"
+ msgs += "Analyzing Results for [M]:\n\t Overall Status: [A.stat == DEAD ? "fully disabled" : "[A.health]% functional"]"
msgs += "\t Key: Electronics/Brute"
msgs += "\t Damage Specifics: [burn] - [brute]"
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index afe8db20b06..40ffa590774 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -346,7 +346,7 @@
if(!dname)
dname = M
- return {"| [dname][caption][logout_status][istype(A, /area/station/security/permabrig) ? " (PERMA) " : ""][M.stat == 2 ? " (DEAD)" : ""] |
+ return {"
| [dname][caption][logout_status][istype(A, /area/station/security/permabrig) ? " (PERMA) " : ""][M.stat == DEAD ? " (DEAD)" : ""] |
PM [ADMIN_FLW(M, "FLW")] [ADMIN_OBS(M, "OBS")] | [close ? "
" : ""]"}
/datum/admins/proc/check_antagonists()
diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm
index dadf06693a1..3c921066da3 100644
--- a/code/modules/admin/verbs/onlyone.dm
+++ b/code/modules/admin/verbs/onlyone.dm
@@ -66,7 +66,7 @@
return
for(var/mob/living/carbon/human/H in GLOB.player_list)
- if(H.stat == 2 || !(H.client)) continue
+ if(H.stat == DEAD || !(H.client)) continue
if(is_special_character(H)) continue
SSticker.mode.traitors += H.mind
diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
index 7fdbbfbde7e..753b398e6a3 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
@@ -99,7 +99,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
if(ishuman(grabbed))
var/mob/living/carbon/human/target = grabbed
if(issmall(target))
- if(target.stat == 0)
+ if(target.stat == CONSCIOUS)
to_chat(user, "The monkey is struggling far too much to put it in the recycler.")
else
user.drop_item()
diff --git a/code/modules/mob/living/carbon/carbon_update_status.dm b/code/modules/mob/living/carbon/carbon_update_status.dm
index c8f2b182a4b..f98d41b6863 100644
--- a/code/modules/mob/living/carbon/carbon_update_status.dm
+++ b/code/modules/mob/living/carbon/carbon_update_status.dm
@@ -24,7 +24,7 @@
/mob/living/carbon/update_stamina()
var/stam = getStaminaLoss()
- if(stam > DAMAGE_PRECISION && (maxHealth - stam) <= HEALTH_THRESHOLD_CRIT && !stat)
+ if(stam > DAMAGE_PRECISION && (maxHealth - stam) <= HEALTH_THRESHOLD_CRIT && stat == CONSCIOUS)
enter_stamcrit()
else if(stam_paralyzed)
SEND_SIGNAL(src, COMSIG_CARBON_EXIT_STAMINACRIT)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index c545b75d7c6..36e0a478082 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -531,7 +531,7 @@ emp_act
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
H.add_mob_blood(src)
- if(!stat)
+ if(stat == CONSCIOUS)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(stat == CONSCIOUS && armor < 50)
diff --git a/code/modules/mob/living/carbon/human/human_life.dm b/code/modules/mob/living/carbon/human/human_life.dm
index ac2757f49b6..9361e13160e 100644
--- a/code/modules/mob/living/carbon/human/human_life.dm
+++ b/code/modules/mob/living/carbon/human/human_life.dm
@@ -691,7 +691,7 @@
/mob/living/carbon/human/handle_random_events()
// Puke if toxloss is too high
- if(!stat)
+ if(stat == CONSCIOUS)
if(getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
@@ -764,7 +764,7 @@
if(reagents.has_reagent("formaldehyde")) //embalming fluid stops decay
return
- if(decaytime <= 8 MINUTES)
+ if(decaytime <= 8 MINUTES)
return
if(decaytime > 8 MINUTES)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 09c0f5375bd..0471a39bcad 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -14,7 +14,6 @@
var/maxHealth = 100 //Maximum health that should be possible.
var/health = 100 //A mob's health
-
//Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS
var/bruteloss = 0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
var/oxyloss = 0 //Oxygen depravation damage (no air in lungs)
diff --git a/code/modules/mob/living/silicon/ai/ai_mob.dm b/code/modules/mob/living/silicon/ai/ai_mob.dm
index b19e498d42e..21473ee908c 100644
--- a/code/modules/mob/living/silicon/ai/ai_mob.dm
+++ b/code/modules/mob/living/silicon/ai/ai_mob.dm
@@ -807,7 +807,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
set category = "AI Commands"
set name = "Access Robot Control"
set desc = "Wirelessly control various automatic robots."
- if(stat == 2)
+ if(stat == DEAD)
to_chat(src, "Critical error. System offline.")
return
@@ -905,7 +905,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
if(check_unable())
return
- if(usr.stat == 2)
+ if(usr.stat == DEAD)
to_chat(usr, "You can't change your camera network because you are dead!")
return
@@ -945,7 +945,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
set category = "AI Commands"
set name = "AI Status"
- if(usr.stat == 2)
+ if(usr.stat == DEAD)
to_chat(usr, "You cannot change your emotional status because you are dead!")
return
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index 33cecf72df6..d4cc79f3fd1 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -137,7 +137,7 @@
set category = "AI Commands"
set name = "Toggle Camera Acceleration"
- if(usr.stat == 2)
+ if(usr.stat == DEAD)
return //won't work if dead
acceleration = !acceleration
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 66251a3dd9e..0ad74bdf358 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -277,7 +277,7 @@
playsound(loc, 'sound/machines/buzz-two.ogg', 50, FALSE)
last_warning = world.time
return
- if(H.stat == 2)
+ if(H.stat == DEAD)
return
if((H == oldpatient) && (world.time < last_found + 200))
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 59a38dbee4d..36e23eeb11c 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -121,7 +121,7 @@
collar_type = "[initial(collar_type)]_sit"
/mob/living/simple_animal/pet/cat/handle_automated_action()
- if(!stat && !buckled)
+ if(stat == CONSCIOUS && !buckled)
if(prob(1))
custom_emote(EMOTE_VISIBLE, pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
lay_down()
diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm
index e1a7390a7c7..1e3b6089f8a 100644
--- a/code/modules/mob/living/simple_animal/friendly/crab.dm
+++ b/code/modules/mob/living/simple_animal/friendly/crab.dm
@@ -23,7 +23,7 @@
/mob/living/simple_animal/crab/handle_automated_movement()
//CRAB movement
- if(!stat || !isturf(loc) || IS_HORIZONTAL(src) || buckled)
+ if(stat == CONSCIOUS || !isturf(loc) || IS_HORIZONTAL(src) || buckled)
return
turns_since_move++
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 0e5c9d704a1..38f8ae6789f 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -70,7 +70,7 @@
/mob/living/simple_animal/hostile/retaliate/goat/Move()
. = ..()
- if(!stat)
+ if(stat == CONSCIOUS)
eat_plants()
/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O as obj, mob/user as mob, params)
@@ -159,12 +159,12 @@
udder.generateMilk()
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
- if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
+ if(stat == CONSCIOUS && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
M.visible_message("[M] tips over [src].","You tip over [src].")
Weaken(60 SECONDS)
icon_state = icon_dead
spawn(rand(20,50))
- if(!stat && M)
+ if(stat == CONSCIOUS && M)
icon_state = icon_living
var/list/responses = list( "[src] looks at you imploringly.",
"[src] looks at you pleadingly",
@@ -312,7 +312,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params)
if(istype(O, food_type)) //feedin' dem chickens
- if(!stat && eggsleft < 8)
+ if(stat == CONSCIOUS && eggsleft < 8)
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
user.visible_message(feedmsg)
user.drop_item()
diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm
index 0fa7edbf6d2..1203cc7a72f 100644
--- a/code/modules/mob/living/simple_animal/friendly/lizard.dm
+++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm
@@ -31,7 +31,7 @@
var/has_tail = TRUE
/mob/living/simple_animal/lizard/handle_automated_action()
- if(!stat && !buckled)
+ if(stat == CONSCIOUS && !buckled)
if(prob(1))
custom_emote(EMOTE_VISIBLE, pick("sticks out its tongue.", "wags its tail.", "lies down."))
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index fc353913a78..f6e67037be3 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -100,7 +100,7 @@
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj, oldloc)
if(ishuman(AM))
- if(!stat)
+ if(stat == CONSCIOUS)
var/mob/M = AM
to_chat(M, "[bicon(src)] Squeek!")
..()
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 3e728d2a858..4c3cf14fd3f 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -315,7 +315,7 @@
/mob/living/simple_animal/hostile/adjustHealth(damage, updating_health = TRUE)
. = ..()
- if(!ckey && !stat && search_objects < 3 && damage > 0)//Not unconscious, and we don't ignore mobs
+ if(!ckey && stat == CONSCIOUS && search_objects < 3 && damage > 0)//Not unconscious, and we don't ignore mobs
if(search_objects)//Turn off item searching and ignore whatever item we were looking at, we're more concerned with fight or flight
target = null
LoseSearchObjects()
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index fc7096f8b19..9f41c32f4d7 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -329,7 +329,7 @@ Difficulty: Very Hard
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom/movable, orbit), target, 0, FALSE, 0, 0, FALSE, TRUE)
/mob/living/simple_animal/hostile/megafauna/colossus/bullet_act(obj/item/projectile/P)
- if(!stat)
+ if(stat == CONSCIOUS)
var/obj/effect/temp_visual/at_shield/AT = new /obj/effect/temp_visual/at_shield(loc, src)
var/random_x = rand(-32, 32)
AT.pixel_x += random_x
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index eff4ffeb7c6..943b8692190 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -529,7 +529,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/hierophant/Moved(oldLoc, movement_dir)
. = ..()
- if(!stat && .)
+ if(stat == CONSCIOUS && .)
var/obj/effect/temp_visual/hierophant/squares/HS = new(oldLoc)
HS.setDir(movement_dir)
playsound(src, 'sound/mecha/mechmove04.ogg', 65, TRUE, -4)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm b/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm
index c6021bab7c4..a56c7c8def7 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm
@@ -68,7 +68,7 @@
visible_message("The ore was swallowed whole!")
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time
- if(!stat)
+ if(stat == CONSCIOUS)
visible_message("[src] buries into the ground, vanishing from sight!")
qdel(src)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm
index 1f0d48fee49..70ae70c6ed6 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm
@@ -36,7 +36,7 @@
icon_state = icon_living
/mob/living/simple_animal/hostile/asteroid/bullet_act(obj/item/projectile/P)//Reduces damage from most projectiles to curb off-screen kills
- if(!stat)
+ if(stat == CONSCIOUS)
Aggro()
if(P.damage < 30 && P.damage_type != BRUTE && has_laser_resist)
P.damage = (P.damage / 3)
@@ -46,7 +46,7 @@
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //No floor tiling them to death, wiseguy
if(isitem(AM))
var/obj/item/T = AM
- if(!stat)
+ if(stat == CONSCIOUS)
Aggro()
if(T.throwforce <= 20)
visible_message("[T] [throw_message] [src.name]!")
diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
index 6e2fb046dbd..0dcd454410e 100644
--- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
@@ -45,7 +45,7 @@
/mob/living/simple_animal/hostile/mushroom/Life(seconds, times_fired)
..()
- if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
+ if(stat == CONSCIOUS)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
adjustBruteLoss(-2)
/mob/living/simple_animal/hostile/mushroom/Initialize(mapload) //Makes every shroom a little unique
@@ -147,7 +147,7 @@
adjustBruteLoss(-maxHealth) //They'll always heal, even if they don't gain a level, in case you want to keep this shroom around instead of harvesting it
/mob/living/simple_animal/hostile/mushroom/proc/Bruise()
- if(!bruised && !stat)
+ if(!bruised && stat == CONSCIOUS)
src.visible_message("[src] was bruised!")
bruised = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
index afd8b279c57..9332ac77b6f 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
@@ -109,7 +109,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/queen/princess/spider_special_action()
// Princess AI routine. GREATLY simplified version of queen routine.
- if(!stat && !ckey)
+ if(stat == CONSCIOUS && !ckey)
// Utilize normal queen AI for finding a nest site (neststep=0), and activating NestMode() (neststep=1)
if(neststep != 2)
return ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen_terror.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen_terror.dm
index 2d359f0617f..4dfaf26f85a 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen_terror.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen_terror.dm
@@ -136,7 +136,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/queen/spider_special_action()
- if(!stat && !ckey)
+ if(stat == CONSCIOUS && !ckey)
switch(neststep)
if(0)
// No nest. If current location is eligible for nesting, advance to step 1.
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm
index 5134355baf4..63f606f8293 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm
@@ -77,7 +77,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/LoseTarget()
if(target && isliving(target))
var/mob/living/T = target
- if(T.stat > 0)
+ if(T.stat != CONSCIOUS)
killcount++
regen_points += regen_points_per_kill
attackstep = 0
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 63c2f13ebba..07a8d7a821e 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -139,7 +139,7 @@
if(client)
return
- if(!stat && M.a_intent == "harm")
+ if(stat == CONSCIOUS && M.a_intent == "harm")
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks
if(parrot_state == PARROT_PERCH)
@@ -161,7 +161,7 @@
//Mobs with objects
/mob/living/simple_animal/parrot/attackby(obj/item/O, mob/user, params)
..()
- if(!stat && !client && !istype(O, /obj/item/stack/medical))
+ if(stat == CONSCIOUS && !client && !istype(O, /obj/item/stack/medical))
if(O.force)
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
@@ -175,7 +175,7 @@
//Bullets
/mob/living/simple_animal/parrot/bullet_act(obj/item/projectile/P)
..()
- if(!stat && !client)
+ if(stat == CONSCIOUS && !client)
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
@@ -189,7 +189,7 @@
/mob/living/simple_animal/parrot/grabbedby(mob/living/carbon/user, supress_message)
..()
- if(held_item && !stat)
+ if(held_item && stat == CONSCIOUS)
drop_held_item()
/*
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 606c185ba64..8cb03da0998 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -622,7 +622,7 @@
/mob/living/simple_animal/adjustHealth(amount, updating_health = TRUE)
. = ..()
- if(!ckey && !stat)//Not unconscious
+ if(!ckey && stat == CONSCIOUS)//Not unconscious
if(AIStatus == AI_IDLE)
toggle_ai(AI_ON)
diff --git a/code/modules/mob/living/simple_animal/slime/slime_life.dm b/code/modules/mob/living/simple_animal/slime/slime_life.dm
index 8f8bbe9adfa..b8d659c6b40 100644
--- a/code/modules/mob/living/simple_animal/slime/slime_life.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm
@@ -5,7 +5,7 @@
if(..())
if(buckled)
handle_feeding()
- if(!stat) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech
+ if(stat == CONSCIOUS) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech
handle_nutrition()
if(QDELETED(src)) // Stop if the slime split during handle_nutrition()
return
@@ -152,7 +152,7 @@
/mob/living/simple_animal/slime/handle_status_effects()
..()
- if(prob(30) && !stat)
+ if(prob(30) && stat == CONSCIOUS)
adjustBruteLoss(-1)
/mob/living/simple_animal/slime/proc/handle_feeding()
@@ -436,7 +436,7 @@
phrases += "What happened?"
if(!slimes_near)
phrases += "Lonely..."
- if(!stat)
+ if(stat == CONSCIOUS)
say (pick(phrases))
/mob/living/simple_animal/slime/proc/get_max_nutrition() // Can't go above it
diff --git a/code/modules/mob/living/simple_animal/slime/slime_mob.dm b/code/modules/mob/living/simple_animal/slime/slime_mob.dm
index dcad68cd578..503db02f478 100644
--- a/code/modules/mob/living/simple_animal/slime/slime_mob.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime_mob.dm
@@ -133,7 +133,7 @@
icon_dead = "[icon_text] dead"
if(stat != DEAD)
icon_state = icon_text
- if(mood && !stat)
+ if(mood && stat == CONSCIOUS)
add_overlay("aslime-[mood]")
else
icon_state = icon_dead
@@ -357,7 +357,7 @@
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
- if(istype(I, /obj/item/stack/sheet/mineral/plasma) && !stat) //Let's you feed slimes plasma.
+ if(istype(I, /obj/item/stack/sheet/mineral/plasma) && stat == CONSCIOUS) //Let's you feed slimes plasma.
to_chat(user, "You feed the slime the plasma. It chirps happily.")
var/obj/item/stack/sheet/mineral/plasma/S = I
S.use(1)
diff --git a/code/modules/mob/mob_vars.dm b/code/modules/mob/mob_vars.dm
index 0330a6b82ed..627a6bad072 100644
--- a/code/modules/mob/mob_vars.dm
+++ b/code/modules/mob/mob_vars.dm
@@ -7,7 +7,8 @@
var/datum/mind/mind
blocks_emissive = EMISSIVE_BLOCK_GENERIC
- var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
+ /// Is this mob alive, unconscious or dead?
+ var/stat = CONSCIOUS // TODO: Move to /mob/living
/// The zone this mob is currently targeting
var/zone_selected = null
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 98d0832d2f1..8021539dcbf 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -207,7 +207,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
var/n_name = tgui_input_text(usr, "What would you like to label the fax?", "Fax Labelling", copyitem.name)
if(!n_name)
return
- if(copyitem && copyitem.loc == src && usr.stat == 0)
+ if(copyitem && copyitem.loc == src && usr.stat == CONSCIOUS)
if(istype(copyitem, /obj/item/paper))
copyitem.name = "[(n_name ? "[n_name]" : initial(copyitem.name))]"
copyitem.desc = "This is a paper titled '" + copyitem.name + "'."
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index 77ea69bf8ca..f151998b1f7 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -45,7 +45,7 @@
if(!txt)
return
txt = copytext(txt, 1, 128)
- if(loc == user && user.stat == 0)
+ if(loc == user && user.stat == CONSCIOUS)
scribble = txt
else if(P.get_heat())
burnphoto(P, user)
diff --git a/code/modules/tgui/states/default.dm b/code/modules/tgui/states/default.dm
index 9a3f1457e8f..8f79c6a9196 100644
--- a/code/modules/tgui/states/default.dm
+++ b/code/modules/tgui/states/default.dm
@@ -69,7 +69,7 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new)
/mob/living/silicon/pai/default_can_use_topic(src_object)
// pAIs can only use themselves and the owner's radio.
- if((src_object == src || src_object == radio) && !stat)
+ if((src_object == src || src_object == radio) && stat == CONSCIOUS)
return UI_INTERACTIVE
else
return ..()