diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index 77b8b2194b2..98cf20d05b6 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -32,6 +32,10 @@
#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is stunned
+#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is knocked down
+
+#define STATUS_EFFECT_UNCONSCIOUS /datum/status_effect/incapacitating/unconscious //the affected is unconscious
+
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping //the affected is asleep
#define STATUS_EFFECT_BELLIGERENT /datum/status_effect/belligerent //forces the affected to walk, doing damage if they try to run
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index d14d68f7844..d2289c6e11b 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -307,7 +307,7 @@ Proc for attack log creation, because really why not
drifting = 0
Uloc = user.loc
- if(QDELETED(user) || user.stat || user.knockdown || user.IsStun() || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
+ if(QDELETED(user) || user.stat || user.IsKnockdown() || user.IsStun() || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
. = 0
break
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index b7420da923c..0fe73bad6ef 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -15,7 +15,7 @@
if(call(client.click_intercept,"InterceptClickOn")(src,params,A))
return
- if(stat || lockcharge || knockdown || IsStun() || unconscious)
+ if(stat || lockcharge || IsKnockdown() || IsStun() || IsUnconscious())
return
var/list/modifiers = params2list(params)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 8a98a5943e7..8f558bb1c83 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -348,7 +348,7 @@
/obj/screen/storage/Click(location, control, params)
if(world.time <= usr.next_move)
return 1
- if(usr.stat || usr.unconscious || usr.knockdown || usr.IsStun())
+ if(usr.stat || usr.IsUnconscious() || usr.IsKnockdown() || usr.IsStun())
return 1
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1
diff --git a/code/datums/action.dm b/code/datums/action.dm
index cee2d2c6121..cb8c820a3b5 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -73,7 +73,7 @@
if(owner.restrained())
return 0
if(check_flags & AB_CHECK_STUN)
- if(owner.knockdown || owner.IsStun())
+ if(owner.IsKnockdown() || owner.IsStun())
return 0
if(check_flags & AB_CHECK_LYING)
if(owner.lying)
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index b7c69d8895e..53e56218e57 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -35,7 +35,7 @@
return 0
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat || !D.knockdown)
+ if(!D.stat || !D.IsKnockdown())
D.visible_message("[A] slams [D] into the ground!", \
"[A] slams you into the ground!")
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
@@ -45,7 +45,7 @@
return 1
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat || !D.knockdown)
+ if(!D.stat || !D.IsKnockdown())
D.visible_message("[A] kicks [D] back!", \
"[A] kicks you back!")
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
@@ -53,7 +53,7 @@
D.throw_at(throw_target, 1, 14, A)
D.apply_damage(10, BRUTE)
add_logs(A, D, "cqc kicked")
- if(D.knockdown && !D.stat)
+ if(D.IsKnockdown() && !D.stat)
D.visible_message("[A] kicks [D]'s head, knocking them out!", \
"[A] kicks your head, knocking you out!")
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1)
@@ -114,7 +114,7 @@
A.do_attack_animation(D)
var/picked_hit_type = pick("CQC'd", "Big Bossed")
var/bonus_damage = 13
- if(D.knockdown || D.resting || D.lying)
+ if(D.IsKnockdown() || D.resting || D.lying)
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
@@ -125,7 +125,7 @@
D.visible_message("[A] [picked_hit_type] [D]!", \
"[A] [picked_hit_type] you!")
add_logs(A, D, "[picked_hit_type] with CQC")
- if(A.resting && !D.stat && !D.knockdown)
+ if(A.resting && !D.stat && !D.IsKnockdown())
D.visible_message("[A] leg sweeps [D]!", \
"[A] leg sweeps you!")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
@@ -140,7 +140,7 @@
if(check_streak(A,D))
return 1
if(prob(65))
- if(!D.stat || !D.knockdown || !restraining)
+ if(!D.stat || !D.IsKnockdown() || !restraining)
I = D.get_active_held_item()
D.visible_message("[A] strikes [D]'s jaw with their hand!", \
"[A] strikes your jaw, disorienting you!")
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index 9e86a7f08ab..f0196bb15f1 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -84,7 +84,7 @@
return 0
/datum/martial_art/krav_maga/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
- if(D.stat || D.knockdown)
+ if(D.stat || D.IsKnockdown())
return 0
D.visible_message("[A] leg sweeps [D]!", \
"[A] leg sweeps you!")
@@ -126,7 +126,7 @@
add_logs(A, D, "punched")
var/picked_hit_type = pick("punches", "kicks")
var/bonus_damage = 10
- if(D.knockdown || D.resting || D.lying)
+ if(D.IsKnockdown() || D.resting || D.lying)
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index 6c545153f5b..3045033948b 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -35,7 +35,7 @@
return 0
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat && !D.IsStun() && !D.knockdown)
+ if(!D.stat && !D.IsStun() && !D.IsKnockdown())
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("[A] grabs [D]'s wrist and wrenches it sideways!", \
"[A] grabs your wrist and violently wrenches it to the side!")
@@ -49,7 +49,7 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(A.dir == D.dir && !D.stat && !D.knockdown)
+ if(A.dir == D.dir && !D.stat && !D.IsKnockdown())
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("[A] kicks [D] in the back!", \
"[A] kicks you in the back, making you stumble and fall!")
@@ -61,7 +61,7 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat && !D.knockdown)
+ if(!D.stat && !D.IsKnockdown())
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.visible_message("[A] knees [D] in the stomach!", \
"[A] winds you with a knee in the stomach!")
@@ -74,7 +74,7 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat && !D.knockdown)
+ if(!D.stat && !D.IsKnockdown())
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.visible_message("[A] kicks [D] in the head!", \
"[A] kicks you in the jaw!")
@@ -87,7 +87,7 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(D.knockdown || D.resting || D.stat)
+ if(D.IsKnockdown() || D.resting || D.stat)
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("[A] elbow drops [D]!", \
"[A] piledrives you with their elbow!")
diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm
index 657082f5781..df124260fef 100644
--- a/code/datums/mutations.dm
+++ b/code/datums/mutations.dm
@@ -233,7 +233,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
text_gain_indication = "You get a headache."
/datum/mutation/human/epilepsy/on_life(mob/living/carbon/human/owner)
- if(prob(1) && !owner.unconscious)
+ if(prob(1) && owner.stat == CONSCIOUS)
owner.visible_message("[owner] starts having a seizure!", "You have a seizure!")
owner.Unconscious(200)
owner.Jitter(1000)
@@ -269,7 +269,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
text_gain_indication = "You start coughing."
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
- if((prob(5) && owner.unconscious <= 1))
+ if(prob(5) && owner.stat == CONSCIOUS)
owner.drop_item()
owner.emote("cough")
@@ -317,7 +317,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
text_gain_indication = "You twitch."
/datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner)
- if((prob(10) && owner.unconscious <= 1))
+ if(prob(10) && owner.stat == CONSCIOUS)
owner.Stun(200)
switch(rand(1, 3))
if(1)
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index 0f37131d0c8..c1b77e2a151 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -60,8 +60,8 @@
if(istype(L)) //this is probably more safety than actually needed
var/vanguard = L.stun_absorption["vanguard"]
desc = initial(desc)
- desc += "
[vanguard["stuns_absorbed"] * 2] seconds of stuns held back.\
- [GLOB.ratvar_awakens ? "":"
[round(min(vanguard["stuns_absorbed"] * 0.25, 20)) * 2] seconds of stun will affect you."]"
+ desc += "
[Floor(vanguard["stuns_absorbed"] * 0.1)] seconds of stuns held back.\
+ [GLOB.ratvar_awakens ? "":"
[Floor(min(vanguard["stuns_absorbed"] * 0.025, 20))] seconds of stun will affect you."]"
..()
/datum/status_effect/vanguard_shield/Destroy()
@@ -98,7 +98,7 @@
vanguard["end_time"] = 0 //so it doesn't absorb the stuns we're about to apply
owner.Knockdown(stuns_blocked)
message_to_owner = "The weight of the Vanguard's protection crashes down upon you!"
- if(stuns_blocked >= 15)
+ if(stuns_blocked >= 300)
message_to_owner += "\nYou faint from the exertion!"
stuns_blocked *= 2
owner.Unconscious(stuns_blocked)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index b752696bf07..4e6919b3acf 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -6,20 +6,37 @@
alert_type = null
var/update_canmove = TRUE
-/datum/status_effect/incapacitating/on_apply()
+/datum/status_effect/incapacitating/on_creation(mob/living/new_owner, updating_canmove)
+ ..()
+ if(isnum(updating_canmove))
+ update_canmove = updating_canmove
if(update_canmove)
owner.update_canmove()
+ if(issilicon(owner))
+ owner.update_stat()
+
+/datum/status_effect/incapacitating/on_apply()
+ . = ..()
update_canmove = TRUE
- return ..()
/datum/status_effect/incapacitating/on_remove()
if(update_canmove)
owner.update_canmove()
+ if(issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
+ owner.update_stat()
//STUN
/datum/status_effect/incapacitating/stun
id = "stun"
+//KNOCKDOWN
+/datum/status_effect/incapacitating/knockdown
+ id = "knockdown"
+
+//UNCONSCIOUS
+/datum/status_effect/incapacitating/unconscious
+ id = "unconscious"
+
//SLEEPING
/datum/status_effect/incapacitating/sleeping
id = "sleeping"
@@ -27,18 +44,18 @@
var/mob/living/carbon/carbon_owner
var/mob/living/carbon/human/human_owner
-/datum/status_effect/incapacitating/sleeping/Destroy()
- carbon_owner = null
- human_owner = null
- return ..()
-
-/datum/status_effect/incapacitating/sleeping/on_apply()
+/datum/status_effect/incapacitating/sleeping/on_creation(mob/living/new_owner, updating_canmove)
+ ..()
if(update_canmove)
owner.update_stat()
if(iscarbon(owner)) //to avoid repeated istypes
carbon_owner = owner
if(ishuman(owner))
human_owner = owner
+
+/datum/status_effect/incapacitating/sleeping/Destroy()
+ carbon_owner = null
+ human_owner = null
return ..()
/datum/status_effect/incapacitating/sleeping/tick()
diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm
index 610d44a1e05..8b8eab61be4 100644
--- a/code/datums/status_effects/status_effect.dm
+++ b/code/datums/status_effects/status_effect.dm
@@ -12,7 +12,10 @@
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
-/datum/status_effect/New(mob/living/new_owner)
+/datum/status_effect/New(list/arguments)
+ on_creation(arglist(arguments))
+
+/datum/status_effect/proc/on_creation(mob/living/new_owner, ...)
if(new_owner)
owner = new_owner
if(owner)
@@ -76,7 +79,7 @@
// HELPER PROCS //
//////////////////
-/mob/living/proc/apply_status_effect(effect) //applies a given status effect to this mob, returning the effect if it was successful
+/mob/living/proc/apply_status_effect(effect, ...) //applies a given status effect to this mob, returning the effect if it was successful
. = FALSE
var/datum/status_effect/S1 = effect
LAZYINITLIST(status_effects)
@@ -86,7 +89,9 @@
S.be_replaced()
else
return
- S1 = new effect(src)
+ var/list/arguments = args.Copy()
+ arguments[1] = src
+ S1 = new effect(arguments)
. = S1
/mob/living/proc/remove_status_effect(effect) //removes all of a given status effect from this mob, returning TRUE if at least one was removed
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 670ebba21ea..b5fe460bf59 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -440,6 +440,8 @@
if(!no_effect && (visual_effect_icon || used_item))
do_item_attack_animation(A, visual_effect_icon, used_item)
+ if(A == src)
+ return //don't do an animation if attacking self
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/final_pixel_y = initial(pixel_y)
diff --git a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm
index 8bec1ab3ed4..15cd9b8e3c7 100644
--- a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm
+++ b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm
@@ -69,7 +69,7 @@
if(iscultist(L))
to_chat(L, "\"Watch your step, wretch.\"")
L.adjustBruteLoss(10)
- L.Knockdown(140)
+ L.Knockdown(140, FALSE)
L.visible_message("[src] appears around [L] in a burst of light!", \
"[target_flashed ? "An unseen force":"The glowing sigil around you"] holds you in place!")
L.Stun(100)
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index 9d9bb86d60f..17f0995fc1a 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -260,7 +260,7 @@
darkness_view = 8
flash_protect = 1
-/obj/item/clothing/glasses/night/cultblind/equipped(mob/user, slot)
+/obj/item/clothing/glasses/night/cultblind/equipped(mob/living/user, slot)
..()
if(!iscultist(user))
to_chat(user, "\"You want to be blind, do you?\"")
@@ -283,7 +283,7 @@
icon_state ="shuttlecurse"
var/global/curselimit = 0
-/obj/item/device/shuttle_curse/attack_self(mob/user)
+/obj/item/device/shuttle_curse/attack_self(mob/living/user)
if(!iscultist(user))
user.dropItemToGround(src, TRUE)
user.Knockdown(100)
diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm
index c06f935603b..811b5d04e63 100644
--- a/code/game/gamemodes/gang/recaller.dm
+++ b/code/game/gamemodes/gang/recaller.dm
@@ -226,7 +226,7 @@
/obj/item/device/gangtool/proc/can_use(mob/living/carbon/human/user)
if(!istype(user))
return 0
- if(user.restrained() || user.lying || user.stat || user.IsStun() || user.knockdown)
+ if(user.incapacitated())
return 0
if(!(src in user.contents))
return 0
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index fe6d0e1c8b0..d391e70c356 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -44,7 +44,7 @@
//////////////////////////////Capturing////////////////////////////////////////////////////////
-/obj/item/device/soulstone/attack(mob/living/carbon/human/M, mob/user)
+/obj/item/device/soulstone/attack(mob/living/carbon/human/M, mob/living/user)
if(!iscultist(user) && !iswizard(user) && !usability)
user.Unconscious(100)
to_chat(user, "Your body is wracked with debilitating pain!")
@@ -63,7 +63,7 @@
///////////////////Options for using captured souls///////////////////////////////////////
-/obj/item/device/soulstone/attack_self(mob/user)
+/obj/item/device/soulstone/attack_self(mob/living/user)
if(!in_range(src, user))
return
if(!iscultist(user) && !iswizard(user) && !usability)
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index d1c2fa2c0d2..9186872f586 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -850,7 +850,7 @@
icon_state ="bookknock"
desc = "This book is hard to hold closed properly."
-/obj/item/weapon/spellbook/oneuse/knock/recoil(mob/user)
+/obj/item/weapon/spellbook/oneuse/knock/recoil(mob/living/user)
..()
to_chat(user,"You're knocked down!")
user.Knockdown(40)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index d6f7976d457..70292346400 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1200,7 +1200,7 @@
/obj/machinery/door/airlock/proc/weld_checks(obj/item/weapon/weldingtool/W, mob/user)
return !operating && density && user && W && W.isOn() && user.loc
-/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/user)
+/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/living/user)
var/beingcrowbarred = null
if(istype(I, /obj/item/weapon/crowbar) )
beingcrowbarred = 1
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index 59e219d1051..7fdaa950de5 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -379,20 +379,20 @@
/obj/machinery/door/airlock/cult/canAIControl(mob/user)
return (iscultist(user) && !isAllPowerCut())
-/obj/machinery/door/airlock/cult/allowed(mob/M)
+/obj/machinery/door/airlock/cult/allowed(mob/living/L)
if(!density)
return 1
- if(friendly || iscultist(M) || istype(M, /mob/living/simple_animal/shade) || isconstruct(M))
+ if(friendly || iscultist(L) || istype(L, /mob/living/simple_animal/shade) || isconstruct(L))
new openingoverlaytype(loc)
return 1
else
new /obj/effect/temp_visual/cult/sac(loc)
var/atom/throwtarget
- throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(M, src)))
- M << pick(sound('sound/hallucinations/turn_around1.ogg',0,1,50), sound('sound/hallucinations/turn_around2.ogg',0,1,50))
- flash_color(M, flash_color="#960000", flash_time=20)
- M.Knockdown(40)
- M.throw_at(throwtarget, 5, 1,src)
+ throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
+ L << pick(sound('sound/hallucinations/turn_around1.ogg',0,1,50), sound('sound/hallucinations/turn_around2.ogg',0,1,50))
+ flash_color(L, flash_color="#960000", flash_time=20)
+ L.Knockdown(40)
+ L.throw_at(throwtarget, 5, 1,src)
return 0
/obj/machinery/door/airlock/cult/narsie_act()
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index cfec0123183..7beffc4a54c 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -113,7 +113,7 @@
/obj/effect/anomaly/grav/Bumped(mob/A)
gravShock(A)
-/obj/effect/anomaly/grav/proc/gravShock(mob/A)
+/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
if(boing && isliving(A) && !A.stat)
A.Knockdown(40)
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm
index dace69fe1fa..0a813744355 100644
--- a/code/game/objects/effects/effect_system/effects_other.dm
+++ b/code/game/objects/effects/effect_system/effects_other.dm
@@ -128,10 +128,10 @@
s.set_up(2, 1, location)
s.start()
- for(var/mob/M in viewers(1, location))
- if (prob (50 * amount))
- to_chat(M, "The explosion knocks you down.")
- M.Knockdown(rand(20,100))
+ for(var/mob/living/L in viewers(1, location))
+ if(prob(50 * amount))
+ to_chat(L, "The explosion knocks you down.")
+ L.Knockdown(rand(20,100))
return
else
dyn_explosion(location, amount, flashing_factor)
\ No newline at end of file
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index a0cbd83ea1f..1ae2cf07ecd 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -46,7 +46,7 @@
name = "stun mine"
var/stun_time = 80
-/obj/effect/mine/stun/mineEffect(mob/victim)
+/obj/effect/mine/stun/mineEffect(mob/living/victim)
if(isliving(victim))
victim.Knockdown(stun_time)
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 2118143ecde..a115dabe61d 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -100,21 +100,21 @@
if(!signal || signal.encryption != code)
return
- if(ismob(loc) && on)
+ if(isliving(loc) && on)
if(shock_cooldown != 0)
return
shock_cooldown = 1
spawn(100)
shock_cooldown = 0
- var/mob/M = loc
- step(M, pick(GLOB.cardinal))
+ var/mob/living/L = loc
+ step(L, pick(GLOB.cardinal))
- to_chat(M, "You feel a sharp shock!")
+ to_chat(L, "You feel a sharp shock!")
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, M)
+ s.set_up(3, 1, L)
s.start()
- M.Knockdown(100)
+ L.Knockdown(100)
if(master)
master.receive_signal()
diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm
index e486b1fe44f..ea93b34aa39 100644
--- a/code/game/objects/items/weapons/melee/misc.dm
+++ b/code/game/objects/items/weapons/melee/misc.dm
@@ -77,7 +77,7 @@
var/cooldown = 0
var/on = 1
-/obj/item/weapon/melee/classic_baton/attack(mob/target, mob/living/user)
+/obj/item/weapon/melee/classic_baton/attack(mob/living/target, mob/living/user)
if(!on)
return ..()
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 2fa19570bf9..c931e07880a 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -6,7 +6,7 @@
var/climb_time = 20
var/climb_stun = 20
var/climbable = FALSE
- var/mob/structureclimber
+ var/mob/living/structureclimber
var/broken = 0 //similar to machinery's stat BROKEN
/obj/structure/Initialize()
@@ -48,7 +48,7 @@
. = ..()
if(!climbable)
return
- if(ismob(O) && user == O && iscarbon(user))
+ if(user == O && iscarbon(O))
if(user.canmove)
climb_structure(user)
return
diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
index 82e988c1fb5..6901d47f398 100644
--- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
+++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
@@ -20,7 +20,7 @@
var/egged = 0
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
- if(opened || move_delay || user.stat || user.IsStun() || user.knockdown || user.unconscious || !isturf(loc) || !has_gravity(loc))
+ if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
return
move_delay = 1
if(step(src, direction))
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 5cc2204332e..bbc993c2e29 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -198,7 +198,7 @@
if(M.has_gravity() && M.mob_size > MOB_SIZE_SMALL && !(M.movement_type & FLYING))
table_shatter(M)
-/obj/structure/table/glass/proc/table_shatter(mob/M)
+/obj/structure/table/glass/proc/table_shatter(mob/living/L)
visible_message("[src] breaks!",
"You hear breaking glass.")
var/turf/T = get_turf(src)
@@ -208,8 +208,8 @@
AM.forceMove(T)
debris -= AM
if(istype(AM, /obj/item/weapon/shard))
- AM.throw_impact(M)
- M.Knockdown(100)
+ AM.throw_impact(L)
+ L.Knockdown(100)
qdel(src)
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
@@ -451,7 +451,7 @@
attack_hand(user)
/obj/structure/rack/attack_hand(mob/living/user)
- if(user.knockdown || user.resting || user.lying || user.get_num_legs() < 2)
+ if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index be5a15a1578..a2a2e6f4bcd 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -463,7 +463,7 @@
user.clean_blood()
-/obj/structure/sink/attackby(obj/item/O, mob/user, params)
+/obj/structure/sink/attackby(obj/item/O, mob/living/user, params)
if(busy)
to_chat(user, "Someone's already washing here!")
return
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 4d83f8dcbb6..a7fa8a77ef5 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1340,23 +1340,24 @@
return
var/mob/M = locate(href_list["tdome1"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob.")
+ if(!isliving(M))
+ to_chat(usr, "This can only be used on instances of type /mob/living.")
return
if(isAI(M))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
return
+ var/mob/living/L = M
- for(var/obj/item/I in M)
- M.dropItemToGround(I, TRUE)
+ for(var/obj/item/I in L)
+ L.dropItemToGround(I, TRUE)
- M.Unconscious(100)
+ L.Unconscious(100)
sleep(5)
- M.loc = pick(GLOB.tdome1)
+ L.forceMove(pick(GLOB.tdome1))
spawn(50)
- to_chat(M, "You have been sent to the Thunderdome.")
- log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
- message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)")
+ to_chat(L, "You have been sent to the Thunderdome.")
+ log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Team 1)")
+ message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Team 1)")
else if(href_list["tdome2"])
if(!check_rights(R_FUN))
@@ -1366,23 +1367,24 @@
return
var/mob/M = locate(href_list["tdome2"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob.")
+ if(!isliving(M))
+ to_chat(usr, "This can only be used on instances of type /mob/living.")
return
if(isAI(M))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
return
+ var/mob/living/L = M
- for(var/obj/item/I in M)
- M.dropItemToGround(I, TRUE)
+ for(var/obj/item/I in L)
+ L.dropItemToGround(I, TRUE)
- M.Unconscious(100)
+ L.Unconscious(100)
sleep(5)
- M.loc = pick(GLOB.tdome2)
+ L.forceMove(pick(GLOB.tdome2))
spawn(50)
- to_chat(M, "You have been sent to the Thunderdome.")
- log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
- message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)")
+ to_chat(L, "You have been sent to the Thunderdome.")
+ log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Team 2)")
+ message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Team 2)")
else if(href_list["tdomeadmin"])
if(!check_rights(R_FUN))
@@ -1392,20 +1394,21 @@
return
var/mob/M = locate(href_list["tdomeadmin"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob.")
+ if(!isliving(M))
+ to_chat(usr, "This can only be used on instances of type /mob/living.")
return
if(isAI(M))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
return
+ var/mob/living/L = M
- M.Unconscious(100)
+ L.Unconscious(100)
sleep(5)
- M.loc = pick(GLOB.tdomeadmin)
+ L.forceMove(pick(GLOB.tdomeadmin))
spawn(50)
- to_chat(M, "You have been sent to the Thunderdome.")
- log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
- message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)")
+ to_chat(L, "You have been sent to the Thunderdome.")
+ log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Admin.)")
+ message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Admin.)")
else if(href_list["tdomeobserve"])
if(!check_rights(R_FUN))
@@ -1415,27 +1418,28 @@
return
var/mob/M = locate(href_list["tdomeobserve"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob.")
+ if(!isliving(M))
+ to_chat(usr, "This can only be used on instances of type /mob/living.")
return
if(isAI(M))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
return
+ var/mob/living/L = M
- for(var/obj/item/I in M)
- M.dropItemToGround(I, TRUE)
+ for(var/obj/item/I in L)
+ L.dropItemToGround(I, TRUE)
- if(ishuman(M))
- var/mob/living/carbon/human/observer = M
+ if(ishuman(L))
+ var/mob/living/carbon/human/observer = L
observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), slot_w_uniform)
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes)
- M.Unconscious(100)
+ L.Unconscious(100)
sleep(5)
- M.loc = pick(GLOB.tdomeobserve)
+ L.forceMove(pick(GLOB.tdomeobserve))
spawn(50)
- to_chat(M, "You have been sent to the Thunderdome.")
- log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
- message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)")
+ to_chat(L, "You have been sent to the Thunderdome.")
+ log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Observer.)")
+ message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Observer.)")
else if(href_list["revive"])
if(!check_rights(R_REJUVINATE))
diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm
index 20804106e2e..a99eff9fc05 100644
--- a/code/modules/flufftext/Dreaming.dm
+++ b/code/modules/flufftext/Dreaming.dm
@@ -1,6 +1,6 @@
/mob/living/carbon/proc/dream()
set waitfor = 0
- dreaming = 1
+ dreaming = TRUE
var/list/dreams = list(
"an ID card","a bottle","a familiar face","a crewmember","a toolbox","a security officer","the captain",
"voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness",
@@ -9,18 +9,18 @@
"a blue light","an abandoned laboratory","Nanotrasen","The Syndicate","blood","healing","power","respect",
"riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying"
)
- for(var/i = rand(1,4),i > 0, i--)
+ for(var/i in 1 to rand(1, rand(3, 7)))
var/dream_image = pick(dreams)
dreams -= dream_image
to_chat(src, "... [dream_image] ...")
sleep(rand(40,70))
- if(unconscious <= 0)
- dreaming = 0
- return 0
- dreaming = 0
+ if(stat != UNCONSCIOUS || InCritical())
+ break
+ dreaming = FALSE
return 1
/mob/living/carbon/proc/handle_dreams()
- if(prob(5) && !dreaming) dream()
+ if(prob(5) && !dreaming)
+ dream()
-/mob/living/carbon/var/dreaming = 0
\ No newline at end of file
+/mob/living/carbon/var/dreaming = FALSE
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
index 6b18923377c..3992cc62ca5 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
@@ -12,7 +12,7 @@
else
icon_state = "alien[caste]_dead"
- else if((stat == UNCONSCIOUS && !asleep) || knockdown)
+ else if((stat == UNCONSCIOUS && !asleep) || IsKnockdown())
icon_state = "alien[caste]_unconscious"
else if(leap_on_click)
icon_state = "alien[caste]_pounce"
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index f723e891f33..e0fce5614c7 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -20,7 +20,7 @@
if(health<= -maxHealth || !getorgan(/obj/item/organ/brain))
death()
return
- if(unconscious || IsSleeping() || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT)
+ if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index c48703a644a..4415c0d7ab7 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -683,7 +683,7 @@
if(health<= HEALTH_THRESHOLD_DEAD)
death()
return
- if(unconscious || IsSleeping() || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT)
+ if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 8c3e42f394c..8664989c5ab 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -501,7 +501,7 @@
to_chat(usr, "Unable to locate a data core entry for this person.")
/mob/living/carbon/human/proc/canUseHUD()
- return !(src.stat || src.knockdown || IsStun() || src.restrained())
+ return !(src.stat || IsKnockdown() || IsStun() || src.restrained())
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, var/penetrate_thick = 0)
. = 1 // Default to returning true.
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index b371efe6131..67ecfd6b260 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -105,7 +105,7 @@
/mob/living/carbon/human/proc/check_block()
if(mind)
- if(mind.martial_art && prob(mind.martial_art.block_chance) && in_throw_mode && !stat && !knockdown && !IsStun())
+ if(mind.martial_art && prob(mind.martial_art.block_chance) && in_throw_mode && !stat && !IsKnockdown() && !IsStun())
return TRUE
return FALSE
diff --git a/code/modules/mob/living/carbon/human/interactive.dm b/code/modules/mob/living/carbon/human/interactive.dm
index 03f0c999c49..72eedbff9ff 100644
--- a/code/modules/mob/living/carbon/human/interactive.dm
+++ b/code/modules/mob/living/carbon/human/interactive.dm
@@ -450,7 +450,7 @@
return 1
if(restrained())
return 1
- if(unconscious)
+ if(IsUnconscious())
return 1
if(IsStun())
return 1
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index b188fe8439c..7b971e3648a 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -888,14 +888,14 @@
if(!(RADIMMUNE in species_traits))
if(H.radiation)
if (H.radiation > 100)
- if(!H.knockdown)
+ if(!H.IsKnockdown())
H.emote("collapse")
H.Knockdown(200)
to_chat(H, "You feel weak.")
switch(H.radiation)
if(50 to 75)
if(prob(5))
- if(!H.knockdown)
+ if(!H.IsKnockdown())
H.emote("collapse")
H.Knockdown(60)
to_chat(H, "You feel weak.")
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 c420c087a6d..42cb4cd9167 100644
--- a/code/modules/mob/living/carbon/human/species_types/angel.dm
+++ b/code/modules/mob/living/carbon/human/species_types/angel.dm
@@ -47,7 +47,7 @@
return 0
/datum/species/angel/proc/CanFly(mob/living/carbon/human/H)
- if(H.stat || H.IsStun() || H.knockdown)
+ if(H.stat || H.IsStun() || H.IsKnockdown())
return 0
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!")
diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm
index 75ffdea8310..619885c3c3c 100644
--- a/code/modules/mob/living/carbon/monkey/combat.dm
+++ b/code/modules/mob/living/carbon/monkey/combat.dm
@@ -53,7 +53,7 @@
return 1
if(health <= 0 && checkDead)
return 1
- if(unconscious)
+ if(IsUnconscious())
return 1
if(IsStun())
return 1
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index a67d4b86e66..99adc133ef3 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -26,7 +26,7 @@
if (radiation)
if (radiation > 100)
- if(!knockdown)
+ if(!IsKnockdown())
emote("collapse")
Knockdown(200)
to_chat(src, "You feel weak.")
@@ -35,7 +35,7 @@
if(50 to 75)
if(prob(5))
- if(!knockdown)
+ if(!IsKnockdown())
emote("collapse")
Knockdown(60)
to_chat(src, "You feel weak.")
diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm
index 69a18ac0538..d95b10a1487 100644
--- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm
@@ -48,9 +48,9 @@
playsound(loc, "punch", 25, 1, -1)
var/damage = rand(5, 10)
- if (prob(40))
+ if(prob(40))
damage = rand(10, 15)
- if ( (unconscious < 5) && (health > 0) )
+ if(AmountUnconscious() < 100 && health > 0)
Unconscious(rand(200, 300))
visible_message("[M] has knocked out [name]!", \
"[M] has knocked out [name]!", null, 5)
@@ -66,7 +66,7 @@
visible_message("[M] has attempted to punch [name]!", \
"[M] has attempted to punch [name]!", null, COMBAT_MESSAGE_RANGE)
if("disarm")
- if (!unconscious)
+ if(!IsUnconscious())
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if (prob(25))
Knockdown(40)
@@ -88,7 +88,7 @@
var/damage = rand(15, 30)
if (damage >= 25)
damage = rand(20, 40)
- if (unconscious < 15)
+ if(AmountUnconscious() < 300)
Unconscious(rand(200, 300))
visible_message("[M] has wounded [name]!", \
"[M] has wounded [name]!", null, COMBAT_MESSAGE_RANGE)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 131e035010d..eb96d09bde0 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -60,8 +60,6 @@
GLOB.living_mob_list -= src
if(!gibbed)
GLOB.dead_mob_list += src
- unconscious = 0
- knockdown = 0
set_drugginess(0)
SetSleeping(0, 0)
blind_eyes(1)
diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm
index b2eda7ee6ae..2dd5056c3c3 100644
--- a/code/modules/mob/living/emote.dm
+++ b/code/modules/mob/living/emote.dm
@@ -62,8 +62,9 @@
/datum/emote/living/collapse/run_emote(mob/user, params)
. = ..()
- if(.)
- user.Unconscious(40)
+ if(. && isliving(user))
+ var/mob/living/L = user
+ L.Unconscious(40)
/datum/emote/living/cough
key = "cough"
@@ -330,8 +331,9 @@
/datum/emote/living/surrender/run_emote(mob/user, params)
. = ..()
- if(.)
- user.Knockdown(200)
+ if(. && isliving(user))
+ var/mob/living/L = user
+ L.Knockdown(200)
/datum/emote/living/sway
key = "sway"
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 0cca6184b40..e0a1217363c 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -99,10 +99,6 @@
//this updates all special effects: knockdown, druggy, stuttering, etc..
/mob/living/proc/handle_status_effects()
- if(knockdown)
- AdjustKnockdown(-20, 1, 1)
- if(unconscious)
- AdjustUnconscious(-20, 1, 1)
if(confused)
confused = max(0, confused - 1)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 8248a2a39c5..8ac5f96db55 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -237,7 +237,7 @@
death()
/mob/living/incapacitated(ignore_restraints, ignore_grab)
- if(stat || unconscious || IsStun() || knockdown || (!ignore_restraints && restrained(ignore_grab)))
+ if(stat || IsUnconscious() || IsStun() || IsKnockdown() || (!ignore_restraints && restrained(ignore_grab)))
return 1
/mob/living/proc/InCritical()
@@ -935,7 +935,7 @@
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
//Robots, animals and brains have their own version so don't worry about them
/mob/living/proc/update_canmove()
- var/ko = knockdown || unconscious || stat || (status_flags & FAKEDEATH)
+ var/ko = IsKnockdown() || IsUnconscious() || stat || (status_flags & FAKEDEATH)
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
var/buckle_lying = !(buckled && !buckled.buckle_lying)
var/has_legs = get_num_legs()
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index ca5774fa6b3..b50a8daff21 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -591,7 +591,7 @@
/mob/living/silicon/robot/update_icons()
cut_overlays()
icon_state = module.cyborg_base_icon
- if(stat != DEAD && !(unconscious || IsStun() || knockdown || low_power_mode)) //Not dead, not stunned.
+ if(stat != DEAD && !(IsUnconscious() || IsStun() || IsKnockdown() || low_power_mode)) //Not dead, not stunned.
if(!eye_lights)
eye_lights = new()
if(lamp_intensity > 2)
@@ -917,7 +917,7 @@
if(health <= -maxHealth) //die only once
death()
return
- if(unconscious || IsStun() || knockdown || getOxyLoss() > maxHealth*0.5)
+ if(IsUnconscious() || IsStun() || IsKnockdown() || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
diff --git a/code/modules/mob/living/silicon/status_procs.dm b/code/modules/mob/living/silicon/status_procs.dm
deleted file mode 100644
index 14118225e9b..00000000000
--- a/code/modules/mob/living/silicon/status_procs.dm
+++ /dev/null
@@ -1,38 +0,0 @@
-
-//Here are the procs used to modify status effects of a mob.
-//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
-// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
-
-/////////////////////////////////// STUN ////////////////////////////////////
-
-/mob/living/silicon/Stun(amount, updating = 1, ignore_canstun = 0)
- . = ..()
- if(. && updating)
- update_stat()
-
-/mob/living/silicon/SetStun(amount, updating = 1, ignore_canstun = 0)
- . = ..()
- if(. && updating)
- update_stat()
-
-/mob/living/silicon/AdjustStun(amount, updating = 1, ignore_canstun = 0)
- . = ..()
- if(. && updating)
- update_stat()
-
-/////////////////////////////////// KNOCKDOWN ////////////////////////////////////
-
-/mob/living/silicon/Knockdown(amount, updating = 1, ignore_canknockdown = 0)
- . = ..()
- if(. && updating)
- update_stat()
-
-/mob/living/silicon/SetKnockdown(amount, updating = 1, ignore_canknockdown = 0)
- . = ..()
- if(. && updating)
- update_stat()
-
-/mob/living/silicon/AdjustKnockdown(amount, updating = 1, ignore_canknockdown = 0)
- . = ..()
- if(. && updating)
- update_stat()
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index 52ebdbb2507..5d76e3a1360 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -255,7 +255,7 @@ Auto Patrol[]"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
- if(!Adjacent(target) || !isturf(target.loc) || target.knockdown < 2)
+ if(!Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40)
back_to_hunt()
return
@@ -282,7 +282,7 @@ Auto Patrol[]"},
back_to_idle()
return
- if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.knockdown < 2)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
+ if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 2779650f6a9..e62f8a85b5e 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -634,16 +634,15 @@
// called when bot bumps into anything
/mob/living/simple_animal/bot/mulebot/Bump(atom/obs)
if(wires.is_cut(WIRE_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs
- var/mob/M = obs
- if(ismob(M))
- if(iscyborg(M))
- visible_message("[src] bumps into [M]!")
+ if(isliving(obs))
+ var/mob/living/L = obs
+ if(iscyborg(L))
+ visible_message("[src] bumps into [L]!")
else
if(!paicard)
- add_logs(src, M, "knocked down")
- visible_message("[src] knocks over [M]!")
- M.stop_pulling()
- M.Knockdown(160)
+ add_logs(src, L, "knocked down")
+ visible_message("[src] knocks over [L]!")
+ L.Knockdown(160)
return ..()
// called from mob/living/carbon/human/Crossed()
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 4d439afdf72..d6ba183e205 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -286,7 +286,7 @@ Auto Patrol: []"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
- if( !Adjacent(target) || !isturf(target.loc) || target.knockdown < 2 )
+ if( !Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40)
back_to_hunt()
return
@@ -313,7 +313,7 @@ Auto Patrol: []"},
back_to_idle()
return
- if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.knockdown < 2)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
+ if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else //Try arresting again if the target escapes.
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 695070bf7ae..61b92679e84 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -387,7 +387,7 @@
..()
/mob/living/simple_animal/update_canmove()
- if(unconscious || IsStun() || knockdown || stat || resting)
+ if(IsUnconscious() || IsStun() || IsKnockdown() || stat || resting)
drop_all_held_items()
canmove = 0
else if(buckled)
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index caa0fe71f3b..c974ce76ea0 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -5,19 +5,126 @@
////////////////////////////// STUN ////////////////////////////////////
-/mob/living/Stun(amount, updating = 1, ignore_canstun = 0)
- if(!stat && islist(stun_absorption) && (status_flags & CANSTUN || ignore_canstun))
- if(absorb_stun(amount))
- return 0
- return ..()
+/mob/living/IsStun() //If we're stunned
+ return has_status_effect(STATUS_EFFECT_STUN)
+
+/mob/living/proc/AmountStun() //How many deciseconds remain in our stun
+ var/datum/status_effect/incapacitating/stun/S = IsStun()
+ if(S)
+ if(S.isprocessing)
+ return S.duration - world.time
+ else
+ return S.duration
+ return 0
+
+/mob/living/proc/Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if((status_flags & CANSTUN) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ var/datum/status_effect/incapacitating/stun/S = IsStun()
+ if(S)
+ if(S.isprocessing)
+ S.duration = max(world.time + amount, S.duration)
+ else
+ S.duration = max(amount, S.duration)
+ else if(amount > 0)
+ S = apply_status_effect(STATUS_EFFECT_STUN, updating)
+ S.duration = amount
+ S.update_canmove = updating
+ return S
+
+/mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if((status_flags & CANSTUN) || ignore_canstun)
+ var/datum/status_effect/incapacitating/stun/S = IsStun()
+ if(amount <= 0)
+ if(S)
+ S.update_canmove = updating
+ qdel(S)
+ else
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ if(S)
+ if(S.isprocessing)
+ S.duration = world.time + amount
+ else
+ S.duration = amount
+ else
+ S = apply_status_effect(STATUS_EFFECT_STUN, updating)
+ S.duration = amount
+ return S
+
+/mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if((status_flags & CANSTUN) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ var/datum/status_effect/incapacitating/stun/S = IsStun()
+ if(S)
+ S.duration += amount
+ else if(amount > 0)
+ S = apply_status_effect(STATUS_EFFECT_STUN, updating)
+ S.duration = amount
+ return S
///////////////////////////////// KNOCKDOWN /////////////////////////////////////
-/mob/living/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- if(!stat && islist(stun_absorption) && (status_flags & CANKNOCKDOWN || ignore_canknockdown))
- if(absorb_stun(amount))
- return 0
- return ..()
+/mob/living/IsKnockdown() //If we're knocked down
+ return has_status_effect(STATUS_EFFECT_KNOCKDOWN)
+
+/mob/living/proc/AmountKnockdown() //How many deciseconds remain in our knockdown
+ var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
+ if(K)
+ if(K.isprocessing)
+ return K.duration - world.time
+ else
+ return K.duration
+ return 0
+
+/mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Can't go below remaining duration
+ if((status_flags & CANKNOCKDOWN) || ignore_canknockdown)
+ if(absorb_stun(amount, ignore_canknockdown))
+ return
+ var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
+ if(K)
+ if(K.isprocessing)
+ K.duration = max(world.time + amount, K.duration)
+ else
+ K.duration = max(amount, K.duration)
+ else if(amount > 0)
+ K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, updating)
+ K.duration = amount
+ return K
+
+/mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Sets remaining duration
+ if((status_flags & CANKNOCKDOWN) || ignore_canknockdown)
+ var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
+ if(amount <= 0)
+ if(K)
+ K.update_canmove = updating
+ qdel(K)
+ else
+ if(absorb_stun(amount, ignore_canknockdown))
+ return
+ if(K)
+ if(K.isprocessing)
+ K.duration = world.time + amount
+ else
+ K.duration = amount
+ else
+ K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, updating)
+ K.duration = amount
+ return K
+
+/mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Adds to remaining duration
+ if((status_flags & CANKNOCKDOWN) || ignore_canknockdown)
+ if(absorb_stun(amount, ignore_canknockdown))
+ return
+ var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
+ if(K)
+ K.duration += amount
+ else if(amount > 0)
+ K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, updating)
+ K.duration = amount
+ return K
///////////////////////////////////// STUN ABSORPTION /////////////////////////////////////
@@ -33,7 +140,9 @@
stun_absorption[key] = list("end_time" = world.time + duration, "priority" = priority, "stuns_absorbed" = 0, \
"visible_message" = message, "self_message" = self_message, "examine_message" = examine_message)
-/mob/living/proc/absorb_stun(amount)
+/mob/living/proc/absorb_stun(amount, ignoring_flag_presence)
+ if(!amount || amount <= 0 || stat || ignoring_flag_presence || !islist(stun_absorption))
+ return FALSE
var/priority_absorb_key
var/highest_priority
for(var/i in stun_absorption)
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 8e94cbfc193..c721903d0fc 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -68,8 +68,6 @@
var/satiety = 0//Carbon
var/overeatduration = 0 // How long this guy is overeating //Carbon
- var/unconscious = 0
- var/knockdown = 0
var/losebreath = 0//Carbon
var/a_intent = INTENT_HELP//Living
var/list/possible_a_intents = null//Living
diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm
index 1a403072b2d..62049ef87be 100644
--- a/code/modules/mob/status_procs.dm
+++ b/code/modules/mob/status_procs.dm
@@ -3,120 +3,72 @@
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
-#define STUN_TIME_MULTIPLIER 0.05 //temporary; multiplies input stun times by this, will be removed once stuns are status effects
-
/////////////////////////////////// STUN ////////////////////////////////////
/mob/proc/IsStun() //non-living mobs shouldn't be stunned
return FALSE
-/mob/living/IsStun() //If we're stunned
- return has_status_effect(STATUS_EFFECT_STUN)
-
-/mob/living/proc/AmountStun() //How many deciseconds remain in our stun
- var/datum/status_effect/incapacitating/stun/S = IsStun()
- if(S)
- return S.duration - world.time
- return 0
-
-/mob/living/proc/Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
- if((status_flags & CANSTUN) || ignore_canstun)
- var/datum/status_effect/incapacitating/stun/S = IsStun()
- if(S)
- var/remaining_duration = world.time - S.duration
- S.duration = world.time + max(amount, remaining_duration)
- else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_STUN)
- S.duration = amount
- S.update_canmove = updating
- return S
-
-/mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
- if((status_flags & CANSTUN) || ignore_canstun)
- var/datum/status_effect/incapacitating/stun/S = IsStun()
- if(amount <= 0)
- if(S)
- S.update_canmove = updating
- qdel(S)
- else if(S)
- S.duration = world.time + amount
- else
- S = apply_status_effect(STATUS_EFFECT_STUN)
- S.duration = amount
- S.update_canmove = updating
- return S
-
-/mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
- if((status_flags & CANSTUN) || ignore_canstun)
- var/datum/status_effect/incapacitating/stun/S = IsStun()
- if(S)
- S.duration += amount
- else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_STUN)
- S.duration = amount
- S.update_canmove = updating
- return S
-
/////////////////////////////////// KNOCKDOWN ////////////////////////////////////
-/mob/proc/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- if((status_flags & CANKNOCKDOWN) || ignore_canknockdown)
- knockdown = max(max(knockdown,amount * STUN_TIME_MULTIPLIER),0)
- return TRUE
-
-/mob/living/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- . = ..()
- if(. && updating)
- update_canmove() //updates lying, canmove and icons
-
-/mob/proc/SetKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- if(status_flags & CANKNOCKDOWN || ignore_canknockdown)
- knockdown = max(amount * STUN_TIME_MULTIPLIER,0)
- return TRUE
-
-/mob/living/SetKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- . = ..()
- if(. && updating)
- update_canmove() //updates lying, canmove and icons
-
-/mob/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- if((status_flags & CANKNOCKDOWN) || ignore_canknockdown)
- knockdown = max(knockdown + (amount * STUN_TIME_MULTIPLIER) ,0)
- return TRUE
-
-/mob/living/AdjustKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE)
- . = ..()
- if(. && updating)
- update_canmove() //updates lying, canmove and icons
+/mob/proc/IsKnockdown() //non-living mobs shouldn't be knocked down
+ return FALSE
/////////////////////////////////// UNCONSCIOUS ////////////////////////////////////
-/mob/proc/Unconscious(amount, updating = TRUE, ignore_canunconscious = FALSE)
- if(status_flags & CANUNCONSCIOUS || ignore_canunconscious)
- var/old_unconscious = unconscious
- unconscious = max(max(unconscious,amount * STUN_TIME_MULTIPLIER),0)
- if((!old_unconscious && unconscious) || (old_unconscious && !unconscious))
- if(updating)
- update_stat()
- return TRUE
+/mob/proc/IsUnconscious() //non-living mobs shouldn't be unconscious
+ return FALSE
-/mob/proc/SetUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE)
- if(status_flags & CANUNCONSCIOUS || ignore_canunconscious)
- var/old_unconscious = unconscious
- unconscious = max(amount * STUN_TIME_MULTIPLIER,0)
- if((!old_unconscious && unconscious) || (old_unconscious && !unconscious))
- if(updating)
- update_stat()
- return TRUE
+/mob/living/IsUnconscious() //If we're unconscious
+ return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
-/mob/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE)
- if(status_flags & CANUNCONSCIOUS || ignore_canunconscious)
- var/old_unconscious = unconscious
- unconscious = max(unconscious + (amount * STUN_TIME_MULTIPLIER) ,0)
- if((!old_unconscious && unconscious) || (old_unconscious && !unconscious))
- if(updating)
- update_stat()
- return TRUE
+/mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(U)
+ if(U.isprocessing)
+ return U.duration - world.time
+ else
+ return U.duration
+ return 0
+
+/mob/living/proc/Unconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Can't go below remaining duration
+ if((status_flags & CANUNCONSCIOUS) || ignore_canunconscious)
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(U)
+ if(U.isprocessing)
+ U.duration = max(world.time + amount, U.duration)
+ else
+ U.duration = max(amount, U.duration)
+ else if(amount > 0)
+ U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, updating)
+ U.duration = amount
+ return U
+
+/mob/living/proc/SetUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Sets remaining duration
+ if((status_flags & CANUNCONSCIOUS) || ignore_canunconscious)
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(amount <= 0)
+ if(U)
+ U.update_canmove = updating
+ qdel(U)
+ else if(U)
+ if(U.isprocessing)
+ U.duration = world.time + amount
+ else
+ U.duration = amount
+ else
+ U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, updating)
+ U.duration = amount
+ return U
+
+/mob/living/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Adds to remaining duration
+ if((status_flags & CANUNCONSCIOUS) || ignore_canunconscious)
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(U)
+ U.duration += amount
+ else if(amount > 0)
+ U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, updating)
+ U.duration = amount
+ return U
/////////////////////////////////// SLEEPING ////////////////////////////////////
@@ -126,18 +78,22 @@
/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
- return S.duration - world.time
+ if(S.isprocessing)
+ return S.duration - world.time
+ else
+ return S.duration
return 0
/mob/living/proc/Sleeping(amount, updating = TRUE) //Can't go below remaining duration
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
- var/remaining_duration = world.time - S.duration
- S.duration = world.time + max(amount, remaining_duration)
+ if(S.isprocessing)
+ S.duration = max(world.time + amount, S.duration)
+ else
+ S.duration = max(amount, S.duration)
else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_SLEEPING)
+ S = apply_status_effect(STATUS_EFFECT_SLEEPING, updating)
S.duration = amount
- S.update_canmove = updating
return S
/mob/living/proc/SetSleeping(amount, updating = TRUE) //Sets remaining duration
@@ -147,11 +103,13 @@
S.update_canmove = updating
qdel(S)
else if(S)
- S.duration = world.time + amount
+ if(S.isprocessing)
+ S.duration = world.time + amount
+ else
+ S.duration = amount
else
- S = apply_status_effect(STATUS_EFFECT_SLEEPING)
+ S = apply_status_effect(STATUS_EFFECT_SLEEPING, updating)
S.duration = amount
- S.update_canmove = updating
return S
/mob/living/proc/AdjustSleeping(amount, updating = TRUE) //Adds to remaining duration
@@ -159,9 +117,8 @@
if(S)
S.duration += amount
else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_SLEEPING)
+ S = apply_status_effect(STATUS_EFFECT_SLEEPING, updating)
S.duration = amount
- S.update_canmove = updating
return S
/////////////////////////////////// RESTING ////////////////////////////////////
diff --git a/code/modules/spells/spell_types/mind_transfer.dm b/code/modules/spells/spell_types/mind_transfer.dm
index 426217e89db..48523be917b 100644
--- a/code/modules/spells/spell_types/mind_transfer.dm
+++ b/code/modules/spells/spell_types/mind_transfer.dm
@@ -20,7 +20,7 @@ Urist: I don't feel like figuring out how you store object spells so I'm leaving
Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering.
Also, you never added distance checking after target is selected. I've went ahead and did that.
*/
-/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets, mob/user = usr, distanceoverride)
+/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets, mob/living/user = usr, distanceoverride)
if(!targets.len)
to_chat(user, "No mind found!")
return
@@ -59,7 +59,7 @@ Also, you never added distance checking after target is selected. I've went ahea
return
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
- var/mob/caster = user//The wizard/whomever doing the body transferring.
+ var/mob/living/caster = user//The wizard/whomever doing the body transferring.
//MIND TRANSFER BEGIN
var/mob/dead/observer/ghost = victim.ghostize(0)
diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm
index 29727bf6a2e..78e5333b324 100644
--- a/code/modules/surgery/organs/augments_internal.dm
+++ b/code/modules/surgery/organs/augments_internal.dm
@@ -1,5 +1,4 @@
#define STUN_SET_AMOUNT 40
-#define STUN_CHECK_AMOUNT 2
/obj/item/organ/cyberimp
name = "cybernetic implant"
@@ -110,7 +109,7 @@
if(owner.AmountStun() > STUN_SET_AMOUNT)
owner.SetStun(STUN_SET_AMOUNT)
- if(owner.knockdown > STUN_CHECK_AMOUNT)
+ if(owner.AmountKnockdown() > STUN_SET_AMOUNT)
owner.SetKnockdown(STUN_SET_AMOUNT)
/obj/item/organ/cyberimp/brain/anti_stun/emp_act(severity)
diff --git a/tgstation.dme b/tgstation.dme
index 14a96f30991..50c2f4317a4 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -1618,7 +1618,6 @@
#include "code\modules\mob\living\silicon\say.dm"
#include "code\modules\mob\living\silicon\silicon.dm"
#include "code\modules\mob\living\silicon\silicon_defense.dm"
-#include "code\modules\mob\living\silicon\status_procs.dm"
#include "code\modules\mob\living\silicon\ai\ai.dm"
#include "code\modules\mob\living\silicon\ai\ai_defense.dm"
#include "code\modules\mob\living\silicon\ai\death.dm"