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
+21 -20
View File
@@ -29,9 +29,8 @@
dropItemToGround(W)
//Make mob invisible and spawn animation
notransform = 1
canmove = 0
Stun(22, ignore_canstun = TRUE)
notransform = TRUE
Paralyze(22, ignore_canstun = TRUE)
icon = null
cut_overlays()
invisibility = INVISIBILITY_MAXIMUM
@@ -183,9 +182,9 @@
//Make mob invisible and spawn animation
notransform = 1
canmove = 0
Stun(22, ignore_canstun = TRUE)
notransform = TRUE
Paralyze(22, ignore_canstun = TRUE)
icon = null
cut_overlays()
invisibility = INVISIBILITY_MAXIMUM
@@ -313,11 +312,11 @@
/mob/living/carbon/AIize()
if (notransform)
return
notransform = TRUE
Paralyze(1, ignore_canstun = TRUE)
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
notransform = 1
canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
return ..()
@@ -354,14 +353,15 @@
/mob/living/carbon/human/proc/Robotize(delete_items = 0, transfer_after = TRUE)
if (notransform)
return
notransform = TRUE
Paralyze(1, ignore_canstun = TRUE)
for(var/obj/item/W in src)
if(delete_items)
qdel(W)
else
dropItemToGround(W)
regenerate_icons()
notransform = 1
canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts)
@@ -399,11 +399,11 @@
/mob/living/carbon/human/proc/Alienize()
if (notransform)
return
notransform = TRUE
mobility_flags = NONE
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
notransform = 1
canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts)
@@ -429,11 +429,11 @@
/mob/living/carbon/human/proc/slimeize(reproduce as num)
if (notransform)
return
notransform = TRUE
mobility_flags = NONE
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
notransform = 1
canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts)
@@ -468,11 +468,11 @@
/mob/living/carbon/human/proc/corgize()
if (notransform)
return
notransform = TRUE
Paralyze(1, ignore_canstun = TRUE)
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
notransform = 1
canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts) //this really should not be necessary
@@ -489,6 +489,8 @@
/mob/living/carbon/proc/gorillize()
if(notransform)
return
notransform = TRUE
Paralyze(1, ignore_canstun = TRUE)
SSblackbox.record_feedback("amount", "gorillas_created", 1)
@@ -498,8 +500,6 @@
dropItemToGround(W, TRUE)
regenerate_icons()
notransform = TRUE
canmove = FALSE
icon = null
invisibility = INVISIBILITY_MAXIMUM
var/mob/living/simple_animal/hostile/gorilla/new_gorilla = new (get_turf(src))
@@ -523,12 +523,13 @@
if(notransform)
return
notransform = TRUE
Paralyze(1, ignore_canstun = TRUE)
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
notransform = 1
canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM