From 385f290bc3d5333322ba82fc0e57eadfa54814f8 Mon Sep 17 00:00:00 2001 From: nicetoolbox Date: Sun, 16 Sep 2018 12:28:39 -0700 Subject: [PATCH] Clean up some grabs --- code/game/objects/items/weapons/garrote.dm | 3 +-- code/modules/martial_arts/adminfu.dm | 3 +-- code/modules/martial_arts/brawling.dm | 3 +-- code/modules/ninja/martial_art.dm | 6 ++---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 4a01914a31a..03125313656 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -84,8 +84,7 @@ unwield(U) U.swap_hand() // For whatever reason the grab will not properly work if we don't have the free hand active. - M.grabbedby(U, 1) - var/obj/item/grab/G = U.get_active_hand() + var/obj/item/grab/G = M.grabbedby(U, 1) U.swap_hand() if(G && istype(G)) diff --git a/code/modules/martial_arts/adminfu.dm b/code/modules/martial_arts/adminfu.dm index a279765c980..eaec2b1c3c8 100644 --- a/code/modules/martial_arts/adminfu.dm +++ b/code/modules/martial_arts/adminfu.dm @@ -37,8 +37,7 @@ add_to_streak("G",D) if(check_streak(A,D)) return 1 - D.grabbedby(A,1) - var/obj/item/grab/G = A.get_active_hand() + var/obj/item/grab/G = D.grabbedby(A,1) if(G) G.state = GRAB_NECK diff --git a/code/modules/martial_arts/brawling.dm b/code/modules/martial_arts/brawling.dm index b326e9f8b33..f7c4d307968 100644 --- a/code/modules/martial_arts/brawling.dm +++ b/code/modules/martial_arts/brawling.dm @@ -53,8 +53,7 @@ A.visible_message("[A] tries to grab ahold of [D], but fails!", \ "You fail to grab ahold of [D]!") return 1 - D.grabbedby(A,1) - var/obj/item/grab/G = A.get_active_hand() + var/obj/item/grab/G = D.grabbedby(A,1) if(G) D.visible_message("[A] grabs ahold of [D] drunkenly!", \ "[A] grabs ahold of [D] drunkenly!") diff --git a/code/modules/ninja/martial_art.dm b/code/modules/ninja/martial_art.dm index c97a3e505c3..a7edb67407f 100644 --- a/code/modules/ninja/martial_art.dm +++ b/code/modules/ninja/martial_art.dm @@ -87,8 +87,7 @@ "[A]\ puts you in a [hold_name]! You are unable to speak!") step_to(D,get_step(D,D.dir),1) - D.grabbedby(A, 1) - var/obj/item/grab/G = A.get_active_hand() + var/obj/item/grab/G = D.grabbedby(A, 1) if(G) G.state = GRAB_NECK @@ -136,8 +135,7 @@ return A.pointed(D) /datum/martial_art/ninja_martial_art/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) //Instant aggressive grab - D.grabbedby(A) - var/obj/item/grab/G = A.get_active_hand() + var/obj/item/grab/G = D.grabbedby(A) if(G) G.state = GRAB_AGGRESSIVE