From 45c92bcb6fd34cb8d6c45717b51fd3cf68928e45 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Wed, 15 Jan 2020 19:07:47 -0700
Subject: [PATCH] s
---
code/datums/martial/cqc.dm | 4 ++--
code/game/atoms_movable.dm | 2 +-
code/game/machinery/computer/robot.dm | 6 +++---
.../mob/living/carbon/alien/special/alien_embryo.dm | 8 ++++----
code/modules/mob/living/carbon/carbon_defense.dm | 2 +-
code/modules/mob/living/carbon/human/species.dm | 2 +-
.../mob/living/carbon/human/species_types/angel.dm | 13 ++++++-------
code/modules/projectiles/projectile/magic.dm | 4 ++--
.../chemistry/reagents/medicine_reagents.dm | 7 +++----
code/modules/surgery/organs/augments_internal.dm | 7 ++-----
code/modules/surgery/organs/vocal_cords.dm | 6 ++----
11 files changed, 27 insertions(+), 34 deletions(-)
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index 793c43bd80..b1ac5d7846 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -54,7 +54,7 @@
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
- if(!D.stat || !D.IsKnockdown())
+ if(CHECK_MOBILITY(D, MOBILITY_STAND)
D.visible_message("[A] kicks [D] back!", \
"[A] kicks you back!")
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
@@ -62,7 +62,7 @@
D.throw_at(throw_target, 1, 14, A)
D.apply_damage(10, BRUTE)
log_combat(A, D, "kicked (CQC)")
- if(!CHECK_MOBILITY(D, MOBILITY_STAND) && !D.stat)
+ if(!CHECK_MOBILITY(D, MOBILITY_STAND) && CHECK_MOBILITY(D, MOBILITY_USE))
log_combat(A, D, "knocked out (Head kick)(CQC)")
D.visible_message("[A] kicks [D]'s head, knocking [D.p_them()] out!", \
"[A] kicks your head, knocking you out!")
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 7c57de74a4..d5b9f9ad47 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -154,7 +154,7 @@
grab_state = 0
if(isliving(ex_pulled))
var/mob/living/L = ex_pulled
- L.update_canmove()// mob gets up if it was lyng down in a chokehold
+ L.update_mobility()// mob gets up if it was lyng down in a chokehold
/atom/movable/proc/Move_Pulled(atom/A)
if(!pulling)
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index 2df3dd5fe5..5e4e1c696a 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -115,10 +115,10 @@
if(src.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) in GLOB.silicon_mobs
if(can_control(usr, R))
- var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
+ var/choice = input("Are you certain you wish to [R.locked_down? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm" && can_control(usr, R) && !..())
- message_admins("[ADMIN_LOOKUPFLW(usr)] [R.canmove ? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!")
- log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R)]!")
+ message_admins("[ADMIN_LOOKUPFLW(usr)] [R.locked_down? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!")
+ log_game("[key_name(usr)] [R.locked_down? "locked down" : "released"] [key_name(R)]!")
R.SetLockdown(!R.locked_down)
to_chat(R, "[!R.locked_down ? "Your lockdown has been lifted!" : "You have been locked down!"]")
if(R.connected_ai)
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index c08fe4f582..b5a9b30a21 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -89,8 +89,8 @@
var/mob/living/carbon/alien/larva/new_xeno = new(xeno_loc)
ghost.transfer_ckey(new_xeno, FALSE)
SEND_SOUND(new_xeno, sound('sound/voice/hiss5.ogg',0,0,0,100)) //To get the player's attention
- new_xeno.canmove = 0 //so we don't move during the bursting animation
- new_xeno.notransform = 1
+ new_xeno.Paralyze(6)
+ new_xeno.notransform = TRUE
new_xeno.invisibility = INVISIBILITY_MAXIMUM
sleep(6)
@@ -99,8 +99,8 @@
return
if(new_xeno)
- new_xeno.canmove = 1
- new_xeno.notransform = 0
+ new_xeno.SetParalyzed(0)
+ new_xeno.notransform = FALSE
new_xeno.invisibility = 0
var/mob/living/carbon/old_owner = owner
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 5676e9dfd3..82fd5abb87 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -77,7 +77,7 @@
var/mob/living/carbon/tempcarb = user
if(!tempcarb.combatmode)
totitemdamage *= 0.5
- if(user.resting)
+ if(!CHECK_MOBILITY(user, MOBILITY_STAND))
totitemdamage *= 0.5
if(!combatmode)
totitemdamage *= 1.5
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index e74ffcc78f..7aa023d0c1 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1894,7 +1894,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(shove_blocked && !target.buckled)
var/directional_blocked = !target.Adjacent(target_shove_turf)
- var/targetatrest = target.resting
+ var/targetatrest = !CHECK_MOBILITY(target, MOBILITY_STAND)
if((directional_blocked || !(target_collateral_human || target_shove_turf.shove_act(target, user))) && !targetatrest)
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_SOLID)
user.visible_message("[user.name] shoves [target.name], knocking them down!",
diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm
index ce0ccd73e8..fadaec9eda 100644
--- a/code/modules/mob/living/carbon/human/species_types/angel.dm
+++ b/code/modules/mob/living/carbon/human/species_types/angel.dm
@@ -52,21 +52,20 @@
return 0
/datum/species/angel/proc/CanFly(mob/living/carbon/human/H)
- if(H.stat || H.IsStun() || H.IsKnockdown())
- return 0
+ if(!CHECK_MOBILITY(H, MOBILITY_MOVE))
+ return FALSE
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) && (!H.wear_suit.species_exception || !is_type_in_list(src, H.wear_suit.species_exception)))) //Jumpsuits have tail holes, so it makes sense they have wing holes too
to_chat(H, "Your suit blocks your wings from extending!")
- return 0
+ return FALSE
var/turf/T = get_turf(H)
if(!T)
- return 0
+ return FALSE
var/datum/gas_mixture/environment = T.return_air()
if(environment && !(environment.return_pressure() > 30))
to_chat(H, "The atmosphere is too thin for you to fly!")
- return 0
- else
- return 1
+ return FALSE
+ return TRUE
/datum/action/innate/flight
name = "Toggle Flight"
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 2b894a9189..9b3638ca7a 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -124,8 +124,8 @@
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags))
return
- M.notransform = 1
- M.canmove = 0
+ M.notransform = TRUE
+ M.Paralyze(INFINITY)
M.icon = null
M.cut_overlays()
M.invisibility = INVISIBILITY_ABSTRACT
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index b02d507b5e..d4acb8a67f 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -648,10 +648,9 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
pH = 12
/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
- M.AdjustUnconscious(-20, 0)
- M.adjustStaminaLoss(-4.5*REM, 0)
+ M.AdjustAllImmobility(-20, FALSE)
+ M.AdjustUnconscious(-20, FALSE)
+ M.adjustStaminaLoss(-4.5*REM, FALSE)
M.Jitter(10)
if(prob(50))
M.confused = max(M.confused, 1)
diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm
index f487e61d38..37ff93c7d9 100644
--- a/code/modules/surgery/organs/augments_internal.dm
+++ b/code/modules/surgery/organs/augments_internal.dm
@@ -105,11 +105,8 @@
..()
if(crit_fail || !(organ_flags & ORGAN_FAILING))
return
- owner.adjustStaminaLoss(-3.5) //Citadel edit, makes it more useful in Stamina based combat
- if(owner.AmountStun() > STUN_SET_AMOUNT)
- owner.SetStun(STUN_SET_AMOUNT)
- if(owner.AmountKnockdown() > STUN_SET_AMOUNT)
- owner.SetKnockdown(STUN_SET_AMOUNT)
+ owner.adjustStaminaLoss(-3.5, FALSE) //Citadel edit, makes it more useful in Stamina based combat
+ owner.HealAllImmobilityUpTo, STUN_SET_AMOUNT)
/obj/item/organ/cyberimp/brain/anti_stun/emp_act(severity)
. = ..()
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index bc35500b93..15ed883734 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -1431,10 +1431,8 @@
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)//Tier 3 only
- if(L.resting)
- L.lay_down() //aka get up
- L._REFACTORING_SetStun(0)
- L.SetKnockdown(0)
+ L.set_resting(FALSE, TRUE, FALSE)
+ L.SetAllImmobility(0)
L.SetUnconscious(0) //i said get up i don't care if you're being tased
E.cooldown += 10 //This could be really strong
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You jump to your feet from sheer willpower!"), 5)