mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
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>  </details> ## Changelog 🆑 fix: Fixed armycrawl chatspam when unable to crawl fix: Fixed hidden borers unable to ventcrawl /🆑
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user