mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
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:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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]°C ([patient.bodytemperature*1.8-459.67]°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 />
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user