mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
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:
committed by
yogstation13-bot
parent
645295c3d9
commit
1f7a76ade0
@@ -195,20 +195,18 @@
|
||||
/mob/proc/put_in_l_hand(obj/item/I)
|
||||
return put_in_hand(I, get_empty_held_index_for_side("l"))
|
||||
|
||||
|
||||
//Puts the item into the first available right hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_r_hand(obj/item/I)
|
||||
return put_in_hand(I, get_empty_held_index_for_side("r"))
|
||||
|
||||
|
||||
/mob/proc/put_in_hand_check(obj/item/I)
|
||||
if(lying && !(I.item_flags & ABSTRACT))
|
||||
return FALSE
|
||||
if(!istype(I))
|
||||
return FALSE //nonliving mobs don't have hands
|
||||
|
||||
/mob/living/put_in_hand_check(obj/item/I)
|
||||
if(!(mobility_flags & MOBILITY_PICKUP) || !istype(I))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
//Puts the item into our active hand if possible. returns TRUE on success.
|
||||
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE, ignore_animation = TRUE)
|
||||
return put_in_hand(I, active_hand_index, forced, ignore_animation)
|
||||
|
||||
Reference in New Issue
Block a user