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
+6 -1
View File
@@ -60,10 +60,15 @@
return UI_CLOSE
else if(stat) // Disable UIs if unconcious.
return UI_DISABLED
else if(incapacitated() || lying) // Update UIs if incapicitated but concious.
else if(incapacitated()) // Update UIs if incapicitated but concious.
return UI_UPDATE
return UI_INTERACTIVE
/mob/living/shared_ui_interaction(src_object)
. = ..()
if(!(mobility_flags & MOBILITY_UI) && . == UI_INTERACTIVE)
return UI_UPDATE
/mob/living/silicon/ai/shared_ui_interaction(src_object)
if(lacks_power()) // Disable UIs if the AI is unpowered.
return UI_DISABLED
@@ -24,6 +24,10 @@ GLOBAL_DATUM_INIT(not_incapacitated_turf_state, /datum/ui_state/not_incapacitate
/datum/ui_state/not_incapacitated_state/can_use_topic(src_object, mob/user)
if(user.stat)
return UI_CLOSE
if(user.incapacitated() || user.lying || (turf_check && !isturf(user.loc)))
if(user.incapacitated() || (turf_check && !isturf(user.loc)))
return UI_DISABLED
if(isliving(user))
var/mob/living/L = user
if(!(L.mobility_flags & MOBILITY_STAND))
return UI_DISABLED
return UI_INTERACTIVE