Combat/Stun (slip) overhaul staging, mobility flags, adds crawling (#39967)

Aiming to implement the framework oranges has detailed in https://tgstation13.org/phpBB/viewtopic.php?f=10&t=19102
Moves canmove to a bitflag in a new variable called mobility_flags, that will allow finer grain control of what someone can do codewise, for example, letting them move but not stand up, or stand up but not move.

Adds Immobilize()d status effect that freezes movement but does not prevent anything else.
Adds Paralyze()d which is oldstun "You can't do anything at all and knock down).
Stun() will now prevent any item/UI usage and movement (which is similar to before).
Knockdown() will now only knockdown without preventing item usage/movement.
People knocked down will be able to crawl at softcrit-speeds
Refactors some /mob variables and procs to /mob/living.
update_canmove() refactored to update_mobility() and will handle mobility_flags instead of the removed canmove

cl
rscadd: Crawling is now possible if you are down but not stunned. Obviously, you will be slower.
/cl
Refactors are done. I'd rather get this merged faster than try to fine tune stuff like slips. The most obvious gameplay effect this pr has will be crawling, and I believe I made tiny tweaks but I can't find it Anything I missed or weird behavior should be reported.
This commit is contained in:
kevinz000
2018-10-11 11:22:21 +13:00
committed by oranges
parent e1d4ea4d93
commit 3e7184c975
286 changed files with 1269 additions and 979 deletions
+7 -9
View File
@@ -22,7 +22,7 @@
return
user.do_attack_animation(M)
M.Knockdown(100)
M.Paralyze(100)
M.apply_effect(EFFECT_STUTTER, 5)
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
@@ -76,15 +76,14 @@
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
else if(ishuman(M))
if(M.lying)
if(!(user.mobility_flags & MOBILITY_STAND))
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
else
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
if(M.resting)
M.resting = FALSE
M.update_canmove()
M.set_resting(FALSE, TRUE)
else
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
"<span class='notice'>You pet [M]!</span>")
@@ -92,7 +91,7 @@
if(1)
if(M.health >= 0)
if(ishuman(M))
if(M.lying)
if(!(M.mobility_flags & MOBILITY_STAND))
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
else if(user.zone_selected == BODY_ZONE_HEAD)
@@ -103,8 +102,7 @@
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
if(M.resting)
M.resting = FALSE
M.update_canmove()
M.set_resting(FALSE, TRUE)
else
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
"<span class='warning'>You bop [M] on the head!</span>")
@@ -116,7 +114,7 @@
M.electrocute_act(5, "[user]", safety = 1)
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
"<span class='danger'>You electrocute [M] with your touch!</span>")
M.update_canmove()
M.update_mobility()
else
if(!iscyborg(M))
M.adjustFireLoss(10)
@@ -330,7 +328,7 @@
C.stuttering += 10
C.Jitter(10)
if(2)
C.Knockdown(40)
C.Paralyze(40)
C.confused += 10
C.stuttering += 15
C.Jitter(25)
+3 -3
View File
@@ -317,8 +317,8 @@
O.robot_suit = src
if(!locomotion)
O.lockcharge = 1
O.update_canmove()
O.lockcharge = TRUE
O.update_mobility()
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
else
@@ -357,7 +357,7 @@
O.robot_suit = src
if(!locomotion)
O.lockcharge = TRUE
O.update_canmove()
O.update_mobility()
else if(istype(W, /obj/item/pen))
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")