Unconscious and Knockdown are now status effects (#28696)

* Unconscious and Knockdown are now status effects

* Fixes #28628

* fixes borgs

* the terrifying second argument

* Much better
This commit is contained in:
Joan Lung
2017-06-23 12:00:49 -04:00
committed by Jordan Brown
parent 06f2b4f45e
commit deae811756
58 changed files with 376 additions and 325 deletions
+1 -1
View File
@@ -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)))
@@ -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, "<span class='danger'>The explosion knocks you down.</span>")
M.Knockdown(rand(20,100))
for(var/mob/living/L in viewers(1, location))
if(prob(50 * amount))
to_chat(L, "<span class='danger'>The explosion knocks you down.</span>")
L.Knockdown(rand(20,100))
return
else
dyn_explosion(location, amount, flashing_factor)
+1 -1
View File
@@ -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)
@@ -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, "<span class='danger'>You feel a sharp shock!</span>")
to_chat(L, "<span class='danger'>You feel a sharp shock!</span>")
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()
@@ -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 ..()
+2 -2
View File
@@ -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
@@ -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))
+4 -4
View File
@@ -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("<span class='warning'>[src] breaks!</span>",
"<span class='danger'>You hear breaking glass.</span>")
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)
+1 -1
View File
@@ -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, "<span class='warning'>Someone's already washing here!</span>")
return