From 1bd51e6daa3af2448e5716fef24b5e640a9e0091 Mon Sep 17 00:00:00 2001
From: dovydas12345 <37041561+dovydas12345@users.noreply.github.com>
Date: Sat, 27 Oct 2018 16:01:24 +0300
Subject: [PATCH] No more failed message, when they aren't trying to catch it
---
.../mob/living/carbon/carbon_defense.dm | 21 ++++++++++---------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 9f3e8431029..d6036114df9 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -1,10 +1,10 @@
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0)
if(!skipcatch)
- if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode
+ if(in_throw_mode) //Makes sure player is in throw mode
if(canmove && !restrained())
if(istype(AM, /obj/item/twohanded))
var/obj/item/twohanded/I = AM
- if(!get_active_hand() && !get_inactive_hand())
+ if(!get_active_hand() && !get_inactive_hand()) //Makes sure both hands are empty
if(isturf(I.loc))
put_in_active_hand(I)
visible_message("[src] catches [I]!")
@@ -14,14 +14,15 @@
visible_message("[src] fails to catch [I]!")
else if(istype(AM, /obj/item))
- var/obj/item/I = AM
- if(isturf(I.loc))
- put_in_active_hand(I)
- visible_message("[src] catches [I]!")
- throw_mode_off()
- return 1
- else
- visible_message("[src] fails to catch [I]!")
+ if(!get_active_hand()) //Makes sure active hand is empty
+ var/obj/item/I = AM
+ if(isturf(I.loc))
+ put_in_active_hand(I)
+ visible_message("[src] catches [I]!")
+ throw_mode_off()
+ return 1
+ else
+ visible_message("[src] fails to catch [I]!")
..()
/mob/living/carbon/water_act(volume, temperature, source)