diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index 1c764f0d346..452408ccdaa 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -100,7 +100,7 @@ if(drownee.stat == DEAD) //Dead spacemen don't drown more return - if(drownee.lose_breath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control. + if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control. return if(drownee.stat) //Mob is in critical. diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e308e3da3dd..471cb6bbf69 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -283,7 +283,7 @@ if(health <= config.health_threshold_crit) AdjustLoseBreath(1) - if(lose_breath > 0) + if(losebreath > 0) AdjustLoseBreath(-1) if(prob(10)) spawn emote("gasp") @@ -695,7 +695,7 @@ else overeatduration -= 2 - if(drowsy) + if(drowsyness) AdjustDrowsy(-1) EyeBlurry(2) if(prob(5)) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index ec4206a7dd5..5e0841168e0 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -51,7 +51,7 @@ if(health <= config.health_threshold_crit) AdjustLoseBreath(1) - if(lose_breath > 0) + if(losebreath > 0) AdjustLoseBreath(-1) if(prob(10)) spawn emote("gasp") @@ -321,7 +321,7 @@ src = oldsrc AdjustDizzy(-restingpwr) - if(drowsy) + if(drowsyness) AdjustDrowsy(-restingpwr) EyeBlurry(2) if(prob(5)) diff --git a/code/modules/mob/living/silicon/robot/update_status.dm b/code/modules/mob/living/silicon/robot/update_status.dm new file mode 100644 index 00000000000..ecdee3c023b --- /dev/null +++ b/code/modules/mob/living/silicon/robot/update_status.dm @@ -0,0 +1,4 @@ +// No args for restraints because robots don't have those +/mob/living/silicon/robot/incapacitated() + if(stat || lockcharge || weakened || stunned || paralysis || !is_component_functioning("actuator")) + return 1 diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 3b7189a5cdf..3b634b2920b 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -109,7 +109,7 @@ /mob // On `/mob` for now, to support legacy code var/confused = 0 var/dizziness = 0 - var/drowsy = 0 + var/drowsyness = 0 var/druggy = 0 var/drunk = 0 var/ear_damage = 0 @@ -118,7 +118,7 @@ var/eye_blurry = 0 var/hallucination = 0 var/jitteriness = 0 - var/lose_breath = 0 + var/losebreath = 0 var/paralysis = 0 var/silent = 0 var/sleeping = 0 @@ -188,13 +188,13 @@ // DROWSY /mob/living/Drowsy(amount) - SetDrowsy(max(drowsy, amount)) + SetDrowsy(max(drowsyness, amount)) /mob/living/SetDrowsy(amount) - drowsy = max(amount, 0) + drowsyness = max(amount, 0) /mob/living/AdjustDrowsy(amount, bound_lower = 0, bound_upper = INFINITY) - var/new_value = directional_bounded_sum(drowsy, amount, bound_lower, bound_upper) + var/new_value = directional_bounded_sum(drowsyness, amount, bound_lower, bound_upper) SetDrowsy(new_value) // DRUNK @@ -302,8 +302,6 @@ // Jitter is also associated with stun if(status_flags & CANSTUN || force) jitteriness = max(amount, 0) - else - jitteriness = 0 /mob/living/AdjustJitter(amount, bound_lower = 0, bound_upper = INFINITY, force = 0) var/new_value = directional_bounded_sum(jitteriness, amount, bound_lower, bound_upper) @@ -312,13 +310,13 @@ // LOSE_BREATH /mob/living/LoseBreath(amount) - SetLoseBreath(max(lose_breath, amount)) + SetLoseBreath(max(losebreath, amount)) /mob/living/SetLoseBreath(amount) - lose_breath = max(amount, 0) + losebreath = max(amount, 0) /mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY) - var/new_value = directional_bounded_sum(lose_breath, amount, bound_lower, bound_upper) + var/new_value = directional_bounded_sum(losebreath, amount, bound_lower, bound_upper) SetLoseBreath(new_value) // PARALYSE @@ -329,11 +327,9 @@ /mob/living/SetParalysis(amount, updating = 1, force = 0) if(status_flags & CANPARALYSE || force) paralysis = max(amount, 0) - else - paralysis = 0 - if(updating) - update_canmove() - update_stat() + if(updating) + update_canmove() + update_stat() /mob/living/AdjustParalysis(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) var/new_value = directional_bounded_sum(paralysis, amount, bound_lower, bound_upper) @@ -398,10 +394,8 @@ /mob/living/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" if(status_flags & CANSTUN || force) stunned = max(amount, 0) - else if(stunned) - stunned = 0 - if(updating) - update_canmove() + if(updating) + update_canmove() /mob/living/AdjustStunned(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) var/new_value = directional_bounded_sum(stunned, amount, bound_lower, bound_upper) @@ -417,8 +411,6 @@ //From mob/living/apply_effect: "Stuttering is often associated with Stun" if(status_flags & CANSTUN || force) stuttering = max(stuttering, 0) - else - stuttering = 0 /mob/living/AdjustStuttering(amount, bound_lower = 0, bound_upper = INFINITY, force = 0) var/new_value = directional_bounded_sum(stuttering, amount, bound_lower, bound_upper) @@ -432,10 +424,8 @@ /mob/living/SetWeakened(amount, updating = 1, force = 0) if(status_flags & CANWEAKEN || force) weakened = max(amount, 0) - else - weakened = 0 - if(updating) - update_canmove() //updates lying, canmove and icons + if(updating) + update_canmove() //updates lying, canmove and icons /mob/living/AdjustWeakened(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) var/new_value = directional_bounded_sum(weakened, amount, bound_lower, bound_upper) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index fff30f68155..4c210f6f8f8 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -233,7 +233,7 @@ mob.last_movement = world.time switch(mob.m_intent) if("run") - if(mob.drowsy > 0) + if(mob.drowsyness > 0) move_delay += 6 move_delay += 1+config.run_speed if("walk") diff --git a/code/modules/power/treadmill.dm b/code/modules/power/treadmill.dm index 7c263157342..0dc2bbb5f76 100644 --- a/code/modules/power/treadmill.dm +++ b/code/modules/power/treadmill.dm @@ -71,7 +71,7 @@ var/mob_speed = M.movement_delay() switch(M.m_intent) if("run") - if(M.drowsy > 0) + if(M.drowsyness > 0) mob_speed += 6 mob_speed += config.run_speed - 1 if("walk") diff --git a/paradise.dme b/paradise.dme index 1cd04564e77..bd6e246e18c 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1592,6 +1592,7 @@ #include "code\modules\mob\living\silicon\robot\robot_items.dm" #include "code\modules\mob\living\silicon\robot\robot_modules.dm" #include "code\modules\mob\living\silicon\robot\robot_movement.dm" +#include "code\modules\mob\living\silicon\robot\update_status.dm" #include "code\modules\mob\living\silicon\robot\drone\drone.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_console.dm"