From 9612999bf0e66431dc7336c2a6364b692a0a903d Mon Sep 17 00:00:00 2001 From: LiquidPotroh Date: Thu, 11 Apr 2024 02:26:44 +0300 Subject: [PATCH] =?UTF-8?q?merge=20fix=20=E2=84=969000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/__DEFINES/traits/sources.dm | 1 + code/game/objects/items/weapons/twohanded.dm | 2 +- code/modules/martial_arts/theforce.dm | 11 +++++++---- code/modules/mob/mob_grab.dm | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/__DEFINES/traits/sources.dm b/code/__DEFINES/traits/sources.dm index 7b0f506c512..60053829a98 100644 --- a/code/__DEFINES/traits/sources.dm +++ b/code/__DEFINES/traits/sources.dm @@ -66,4 +66,5 @@ #define IMPLANT_JUMP_BOOTS_TRAIT "implant_jump_boots_trait" #define SPELL_LEAP_TRAIT "spell_leap_trait" #define SPELL_LUNGE_TRAIT "spell_lunge_trait" +#define FORCE_GRAB_TRAIT "force_grab_trait" diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index cf69c99d70d..85ed62988b3 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -256,7 +256,7 @@ /obj/item/twohanded/dualsaber/equipped(mob/user, slot) var/datum/component/two_handed/two_handed - if((slot == slot_r_hand || slot == slot_l_hand) && active) + if((slot == SLOT_HUD_RIGHT_HAND || slot == SLOT_HUD_LEFT_HAND) && active) two_handed = GetComponent(/datum/component/two_handed) two_handed.require_twohands = TRUE . = ..() diff --git a/code/modules/martial_arts/theforce.dm b/code/modules/martial_arts/theforce.dm index e62a9ddad94..a2af4078692 100644 --- a/code/modules/martial_arts/theforce.dm +++ b/code/modules/martial_arts/theforce.dm @@ -35,10 +35,13 @@ if(INTENT_GRAB) var/mob/living/carbon/human/victim = A - if(istype(victim) && get_dist(owner, victim) <= 4) - var/obj/item/grab/force/G = victim.grabbedby(owner, grab_type = /obj/item/grab/force) - G.state = GRAB_PASSIVE - victim.LoseBreath(10 SECONDS) + if(istype(victim)) + if(get_dist(owner, victim) <= 4) + var/obj/item/grab/force/G = victim.grabbedby(owner, grab_type = /obj/item/grab/force) + G.state = GRAB_PASSIVE + victim.LoseBreath(10 SECONDS) + else + to_chat(owner, span_danger("You can't reach that target!")) if(INTENT_HARM) if(!force_lightning_spell.cooldown_handler.is_on_cooldown()) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 3a4b9477f37..abc05fd1935 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -502,7 +502,7 @@ /obj/item/grab/force/New(mob/user, mob/victim) ..() - affecting.flying = TRUE + ADD_TRAIT(affecting, TRAIT_MOVE_FLYING, FORCE_GRAB_TRAIT) assailant.canmove = FALSE /obj/item/grab/force/process() @@ -524,7 +524,7 @@ return FALSE if(world.time < (last_upgrade + UPGRADE_COOLDOWN)) return FALSE - if(assailant.lying) + if(assailant.lying_angle) qdel(src) return FALSE return TRUE @@ -545,7 +545,7 @@ return affecting /obj/item/grab/Destroy() - affecting.flying = FALSE + REMOVE_TRAIT(affecting, TRAIT_MOVE_FLYING, FORCE_GRAB_TRAIT) assailant.canmove = TRUE return ..()