From e63321bb2ddf07d8ed03d793d25e2f3d4c1e989d Mon Sep 17 00:00:00 2001 From: Waterpig <49160555+Majkl-J@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:51:50 +0100 Subject: [PATCH] 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
Screenshots/Videos ![image](https://github.com/user-attachments/assets/44bab785-20f5-4a1a-8eb9-491da579f04b)
## Changelog :cl: fix: Fixed armycrawl chatspam when unable to crawl fix: Fixed hidden borers unable to ventcrawl /:cl: --- .../master_files/code/datums/components/prone_mob.dm | 8 ++++++-- .../master_files/code/modules/mob/mob_movement.dm | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modular_skyrat/master_files/code/datums/components/prone_mob.dm b/modular_skyrat/master_files/code/datums/components/prone_mob.dm index 883855ec756..9d457a67070 100644 --- a/modular_skyrat/master_files/code/datums/components/prone_mob.dm +++ b/modular_skyrat/master_files/code/datums/components/prone_mob.dm @@ -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 diff --git a/modular_skyrat/master_files/code/modules/mob/mob_movement.dm b/modular_skyrat/master_files/code/modules/mob/mob_movement.dm index ea6793d99b0..66806172398 100644 --- a/modular_skyrat/master_files/code/modules/mob/mob_movement.dm +++ b/modular_skyrat/master_files/code/modules/mob/mob_movement.dm @@ -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