From a2c3643e20ca4f36c65938d69c9048f68bdef058 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 17 Jul 2020 12:46:32 -0700 Subject: [PATCH] fix --- code/modules/mob/living/carbon/carbon_active_parry.dm | 2 ++ code/modules/mob/living/living_active_parry.dm | 8 +++++++- tgstation.dme | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 code/modules/mob/living/carbon/carbon_active_parry.dm diff --git a/code/modules/mob/living/carbon/carbon_active_parry.dm b/code/modules/mob/living/carbon/carbon_active_parry.dm new file mode 100644 index 0000000000..2683b6db6b --- /dev/null +++ b/code/modules/mob/living/carbon/carbon_active_parry.dm @@ -0,0 +1,2 @@ +/mob/living/carbon/check_unarmed_parry_activation_special() + return ..() && length(get_empty_held_indexes()) diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index 0dab70b045..8141603f64 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -34,7 +34,7 @@ data = mind.martial_art.block_parry_data method = MARTIAL_PARRY tool = mind.martial_art - else if(combat_flags & COMBAT_FLAG_UNARMED_PARRY) + else if((combat_flags & COMBAT_FLAG_UNARMED_PARRY) && check_unarmed_parry_activation_special()) data = block_parry_data method = UNARMED_PARRY tool = src @@ -93,6 +93,12 @@ if(I.can_active_parry()) return I +/** + * Check if we can unarmed parry + */ +/mob/living/proc/check_unarmed_parry_activation_special() + return TRUE + /** * Called via timer when the parry sequence ends. */ diff --git a/tgstation.dme b/tgstation.dme index 5cefae611a..9314992c5f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2392,6 +2392,7 @@ #include "code\modules\mob\living\brain\say.dm" #include "code\modules\mob\living\brain\status_procs.dm" #include "code\modules\mob\living\carbon\carbon.dm" +#include "code\modules\mob\living\carbon\carbon_active_parry.dm" #include "code\modules\mob\living\carbon\carbon_defense.dm" #include "code\modules\mob\living\carbon\carbon_defines.dm" #include "code\modules\mob\living\carbon\carbon_movement.dm"