From 42f0aba130fae8957562d873f852725bf3e7fbb4 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 12 Jan 2020 20:11:26 -0800
Subject: [PATCH] s
---
.../chemistry/reagents/drug_reagents.dm | 29 +++++++++----------
.../chemistry/reagents/medicine_reagents.dm | 15 ++++------
2 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index e956fcac36..a60fb89d5e 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -22,7 +22,7 @@
/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M)
M.set_drugginess(15)
if(isturf(M.loc) && !isspaceturf(M.loc))
- if(M.canmove)
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE))
if(prob(10))
step(M, pick(GLOB.cardinals))
if(prob(7))
@@ -55,8 +55,7 @@
var/smoke_message = pick("You feel relaxed.", "You feel calmed.","You feel alert.","You feel rugged.")
to_chat(M, "[smoke_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "smoked", /datum/mood_event/smoked, name)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
+ M.AdjustAllImmobility(-20, 0)
M.AdjustUnconscious(-20, 0)
M.adjustStaminaLoss(-0.5*REM, 0)
..()
@@ -76,8 +75,7 @@
if(prob(5))
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
to_chat(M, "[high_message]")
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
+ M.AdjustAllImmobility(-20, 0)
M.AdjustUnconscious(-20, 0)
..()
. = 1
@@ -188,8 +186,7 @@
var/high_message = pick("You feel hyper.", "You feel like you need to go faster.", "You feel like you can run the world.")
if(prob(5))
to_chat(M, "[high_message]")
- M.AdjustStun(-40, 0)
- M.AdjustKnockdown(-40, 0)
+ M.AdjustAllImmobility(-40, 0)
M.AdjustUnconscious(-40, 0)
M.adjustStaminaLoss(-7.5 * REM, 0)
if(jitter)
@@ -203,7 +200,7 @@
. = 1
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i in 1 to 4)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -230,7 +227,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 4, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -240,7 +237,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(20)
@@ -294,7 +291,7 @@
M.adjustStaminaLoss(-5, 0)
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4)
M.hallucination += 5
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
step(M, pick(GLOB.cardinals))
step(M, pick(GLOB.cardinals))
..()
@@ -302,7 +299,7 @@
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
M.hallucination += 5
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i in 1 to 8)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -313,7 +310,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
M.hallucination += 10
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(5)
@@ -324,7 +321,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
M.hallucination += 20
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(10)
@@ -336,7 +333,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
M.hallucination += 30
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 12, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -348,7 +345,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
M.hallucination += 30
- if(M.canmove && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 16, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(50)
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 52e4568b06..7a3d651fac 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -49,8 +49,7 @@
REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT))
M.set_blurriness(0)
M.set_blindness(0)
- M.SetKnockdown(0, 0)
- M.SetStun(0, 0)
+ M.SetAllImmobility(0, 0)
M.SetUnconscious(0, 0)
M.silent = FALSE
M.dizziness = 0
@@ -92,8 +91,7 @@
/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M)
M.drowsyness = max(M.drowsyness-5, 0)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
+ M.AdjustAllImmobility(-20, 0)
M.AdjustUnconscious(-20, 0)
if(holder.has_reagent("mindbreaker"))
holder.remove_reagent("mindbreaker", 5)
@@ -866,8 +864,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
M.adjustStaminaLoss(-0.5*REM, 0)
. = 1
if(prob(20))
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
+ M.AdjustAllImmobility(-20, 0)
M.AdjustUnconscious(-20, 0)
..()
@@ -1345,8 +1342,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
/datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/M as mob)
M.AdjustUnconscious(-20, 0)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
+ M.AdjustAllImmobility(-20, 0)
M.AdjustSleeping(-20, 0)
M.adjustStaminaLoss(-30, 0)
..()
@@ -1433,8 +1429,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
/datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/M)
if(!overdosed) // We do not want any effects on OD
overdose_threshold = overdose_threshold + rand(-10,10)/10 // for extra fun
- M.AdjustStun(-5, 0)
- M.AdjustKnockdown(-5, 0)
+ M.AdjustAllImmobility(-5, 0)
M.AdjustUnconscious(-5, 0)
M.adjustStaminaLoss(-1*REM, 0)
M.Jitter(1)