Fixes proning of borers and humans (#2718)

## About The Pull Request
closes #2525

Adds an extra argument to the prone component to make it give handless
correctly. Also fixes some logic of armycrawl.
## Why It's Good For The Game

Bugfix good
## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>


![image](https://github.com/user-attachments/assets/44bab785-20f5-4a1a-8eb9-491da579f04b)

</details>

## Changelog
🆑
fix: Fixed armycrawl chatspam when unable to crawl
fix: Fixed hidden borers unable to ventcrawl
/🆑
This commit is contained in:
Waterpig
2024-12-19 01:51:50 -08:00
committed by GitHub
parent e65a6cffeb
commit e63321bb2d
2 changed files with 10 additions and 4 deletions
@@ -1,11 +1,15 @@
/datum/component/prone_mob
var/hand_blocking = FALSE
/datum/component/prone_mob/Initialize(mob/living/source)
/datum/component/prone_mob/Initialize(mob/living/source, block_hands = FALSE)
. = ..()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
source = parent
parent.add_traits(list(TRAIT_PRONE, TRAIT_FLOORED, TRAIT_NO_THROWING, TRAIT_HANDS_BLOCKED), type)
hand_blocking = block_hands
if(hand_blocking)
parent.add_traits(list(TRAIT_HANDS_BLOCKED), type)
parent.add_traits(list(TRAIT_PRONE, TRAIT_FLOORED, TRAIT_NO_THROWING), type)
passtable_on(parent, type)
source.layer = PROJECTILE_HIT_THRESHHOLD_LAYER
@@ -9,13 +9,15 @@
if(!do_after(crawler, 3 SECONDS))
return
SEND_SIGNAL(crawler, COMSIG_MOVABLE_REMOVE_PRONE_STATE)
else
else if(crawler.can_army_crawl())
visible_message("[crawler] begins to lower themself further")
if(!do_after(crawler, 3 SECONDS, extra_checks = CALLBACK(crawler, PROC_REF(can_army_crawl))))
if(!crawler.resting)
balloon_alert(crawler, "must be laying down!")
return
crawler.AddComponent(/datum/component/prone_mob)
crawler.AddComponent(/datum/component/prone_mob, block_hands = TRUE)
else
balloon_alert(crawler, "must be laying down!")
/mob/living/carbon/proc/can_army_crawl()
return resting