From ba220a251fdfc8da8131a532c068b484e15e6429 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 7 Dec 2022 02:04:30 +0100 Subject: [PATCH] [MIRROR] Fixes changeling tentacle secondary behaviour [MDB IGNORE] (#17932) * Fixes changeling tentacle secondary behaviour (#71686) ## About The Pull Request Fixes #69013 ## Why It's Good For The Game ## Changelog :cl: fix: fixed using the changeling tentacle arm via right mouse click holding people up instead of firing it. Now it will fire like normal /:cl: Co-authored-by: Time-Green * Fixes changeling tentacle secondary behaviour * update modular Co-authored-by: FinancialGoose <92416224+TheBoondock@users.noreply.github.com> Co-authored-by: Time-Green Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> --- code/modules/antagonists/changeling/powers/mutations.dm | 1 + code/modules/projectiles/gun.dm | 4 ++++ .../master_files/code/modules/projectiles/guns/gun.dm | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 6c792289c98..69b3ee6f349 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -260,6 +260,7 @@ throwforce = 0 //Just to be on the safe side throw_range = 0 throw_speed = 0 + can_hold_up = FALSE /obj/item/gun/magic/tentacle/Initialize(mapload, silent) . = ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 075de5a93ab..b3a83519c73 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -43,6 +43,8 @@ var/semicd = 0 //cooldown handler var/weapon_weight = WEAPON_LIGHT var/dual_wield_spread = 24 //additional spread when dual wielding + ///Can we hold up our target with this? Default to yes + var/can_hold_up = TRUE /// Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun. var/projectile_damage_multiplier = 1 @@ -192,6 +194,8 @@ /obj/item/gun/afterattack_secondary(mob/living/victim, mob/living/user, params) if(!isliving(victim) || !IN_GIVEN_RANGE(user, victim, GUNPOINT_SHOOTER_STRAY_RANGE)) return ..() //if they're out of range, just shootem. + if(!can_hold_up) + return ..() var/datum/component/gunpoint/gunpoint_component = user.GetComponent(/datum/component/gunpoint) if (gunpoint_component) if(gunpoint_component.target == victim) diff --git a/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm b/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm index bdcd7f8eb19..b8f4d5b886b 100644 --- a/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm +++ b/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm @@ -43,6 +43,8 @@ var/semicd = 0 // cooldown handler var/weapon_weight = WEAPON_LIGHT var/dual_wield_spread = 24 // additional spread when dual wielding + ///Can we hold up our target with this? Default to yes + var/can_hold_up = TRUE /// Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun. var/projectile_damage_multiplier = 1 @@ -319,6 +321,8 @@ /obj/item/gun/afterattack_secondary(mob/living/victim, mob/living/user, params) if(!isliving(victim) || !IN_GIVEN_RANGE(user, victim, GUNPOINT_SHOOTER_STRAY_RANGE)) return ..() //if they're out of range, just shootem. + if(!can_hold_up) + return ..() var/datum/component/gunpoint/gunpoint_component = user.GetComponent(/datum/component/gunpoint) if (gunpoint_component) if(gunpoint_component.target == victim)