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 75fe8d46a3.

* 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>
This commit is contained in:
DGamerL
2024-07-08 00:57:01 +02:00
committed by GitHub
parent edc6695e54
commit 5e7b0c0971
42 changed files with 67 additions and 67 deletions
+2 -2
View File
@@ -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, "<span class='warning'>You can't see into [M.name]'s mind at all!</span>")
return
if(M.stat == 2)
if(M.stat == DEAD)
to_chat(user, "<span class='warning'>[M.name] is dead and cannot have [M.p_their()] mind read.</span>")
return
if(M.health < 0)
@@ -23,7 +23,7 @@
to_chat(src, "<span class='danger'>You're too far from [A] to disguise it as a bomb.</span>")
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, "<span class='danger'>Success! Bomb on [A] armed!</span>")
@@ -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, "<span class='notice'>You begin to do a mass repair on [C], keep them still!</span>")
surgical_cooldown = world.time + 10 SECONDS
if(!do_after_once(src, 10 SECONDS, target = src))
+1 -1
View File
@@ -317,7 +317,7 @@
if("VICTIM")
var/mob/living/carbon/human/T = target
if(T.stat == 0)
if(T.stat == CONSCIOUS)
to_chat(user, "<span class='danger'>Capture failed!</span> Kill or maim the victim first!")
else
if(!length(T.client_mobs_in_contents))
+3 -3
View File
@@ -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)
+3 -3
View File
@@ -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()
+3 -3
View File
@@ -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
@@ -105,7 +105,7 @@
if(output)
var/temp = ""
if(patient)
temp = "<br />\[Occupant: [patient] ([patient.stat > 1 ? "*DECEASED*" : "Health: [patient.health]%"])\]<br /><a href='byond://?src=[UID()];view_stats=1'>View stats</a>|<a href='byond://?src=[UID()];eject=1'>Eject</a>"
temp = "<br />\[Occupant: [patient] ([patient.stat == DEAD ? "*DECEASED*" : "Health: [patient.health]%"])\]<br /><a href='byond://?src=[UID()];view_stats=1'>View stats</a>|<a href='byond://?src=[UID()];eject=1'>Eject</a>"
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 {"<font color="[patient.health > 50 ? "blue" : "red"]"><b>Health:</b> [patient.stat > 1 ? "[t1]" : "[patient.health]% ([t1])"]</font><br />
return {"<font color="[patient.health > 50 ? "blue" : "red"]"><b>Health:</b> [patient.stat == DEAD ? "[t1]" : "[patient.health]% ([t1])"]</font><br />
<font color="[patient.bodytemperature > 50 ? "blue" : "red"]"><b>Core Temperature:</b> [patient.bodytemperature-T0C]&deg;C ([patient.bodytemperature*1.8-459.67]&deg;F)</font><br />
<font color="[patient.getBruteLoss() < 60 ? "blue" : "red"]"><b>Brute Damage:</b> [patient.getBruteLoss()]%</font><br />
<font color="[patient.getOxyLoss() < 60 ? "blue" : "red"]"><b>Respiratory Damage:</b> [patient.getOxyLoss()]%</font><br />
+1 -1
View File
@@ -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"])
+3 -3
View File
@@ -429,7 +429,7 @@ SLIME SCANNER
if("robot")
var/burn = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
var/brute = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
msgs += "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health]% functional"]</span>"
msgs += "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat == DEAD ? "fully disabled" : "[M.health]% functional"]</span>"
msgs += "\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
msgs += "\t Damage Specifics: <font color='#FFA500'>[burn]</font> - <font color='red'>[brute]</font>"
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 += "<span class='notice'>Analyzing Results for [M]: [is_ipc ? "\n\t Overall Status: [H.stat > 1 ? "fully disabled" : "[H.health]% functional"]</span><hr>" : "<hr>"]" //for the record im sorry
msgs += "<span class='notice'>Analyzing Results for [M]: [is_ipc ? "\n\t Overall Status: [H.stat == DEAD ? "fully disabled" : "[H.health]% functional"]</span><hr>" : "<hr>"]" //for the record im sorry
msgs += "\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
msgs += "<span class='notice'>External prosthetics:</span>"
var/organ_found
@@ -502,7 +502,7 @@ SLIME SCANNER
var/mob/living/silicon/ai/A = M
var/burn = A.getFireLoss() > 50 ? "<b>[A.getFireLoss()]</b>" : A.getFireLoss()
var/brute = A.getBruteLoss() > 50 ? "<b>[A.getBruteLoss()]</b>" : A.getBruteLoss()
msgs += "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [A.stat > 1 ? "fully disabled" : "[A.health]% functional"]</span>"
msgs += "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [A.stat == DEAD ? "fully disabled" : "[A.health]% functional"]</span>"
msgs += "\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
msgs += "\t Damage Specifics: <font color='#FFA500'>[burn]</font> - <font color='red'>[brute]</font>"
+1 -1
View File
@@ -346,7 +346,7 @@
if(!dname)
dname = M
return {"<tr><td><a href='byond://?src=[UID()];adminplayeropts=[M.UID()]'>[dname]</a><b>[caption]</b>[logout_status][istype(A, /area/station/security/permabrig) ? "<b><font color=red> (PERMA) </b></font>" : ""][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>
return {"<tr><td><a href='byond://?src=[UID()];adminplayeropts=[M.UID()]'>[dname]</a><b>[caption]</b>[logout_status][istype(A, /area/station/security/permabrig) ? "<b><font color=red> (PERMA) </b></font>" : ""][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>
<td><a href='byond://?src=[usr.UID()];priv_msg=[M.client?.ckey]'>PM</a> [ADMIN_FLW(M, "FLW")] [ADMIN_OBS(M, "OBS")] </td>[close ? "</tr>" : ""]"}
/datum/admins/proc/check_antagonists()
+1 -1
View File
@@ -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
@@ -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, "<span class='warning'>The monkey is struggling far too much to put it in the recycler.</span>")
else
user.drop_item()
@@ -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)
@@ -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)
@@ -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)
@@ -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)
+3 -3
View File
@@ -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, "<span class='danger'>Critical error. System offline.</span>")
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
@@ -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"].")
@@ -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))
@@ -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()
@@ -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++
@@ -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("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
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()
@@ -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."))
@@ -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, "<span class='notice'>[bicon(src)] Squeek!</span>")
..()
@@ -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()
@@ -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
@@ -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)
@@ -68,7 +68,7 @@
visible_message("<span class='notice'>The ore was swallowed whole!</span>")
/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("<span class='danger'>[src] buries into the ground, vanishing from sight!</span>")
qdel(src)
@@ -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("<span class='notice'>[T] [throw_message] [src.name]!</span>")
@@ -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("<span class='notice'>[src] was bruised!</span>")
bruised = 1
@@ -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 ..()
@@ -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.
@@ -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
@@ -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()
/*
@@ -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)
@@ -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
@@ -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, "<span class='notice'>You feed the slime the plasma. It chirps happily.</span>")
var/obj/item/stack/sheet/mineral/plasma/S = I
S.use(1)
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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 + "'."
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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 ..()