mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[MIRROR] [s] holdup fixes [MDB IGNORE] (#15502)
* [s] holdup fixes * Fixes the merge conflict and updates our modular version of /tg/'s gunpoint code Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
ShizCalev
GoldenAlpharex
parent
99aa74313c
commit
96bd733d90
@@ -190,7 +190,12 @@
|
||||
O.emp_act(severity)
|
||||
|
||||
/obj/item/gun/afterattack_secondary(mob/living/victim, mob/living/user, params)
|
||||
if (user.GetComponent(/datum/component/gunpoint))
|
||||
if(!isliving(victim) || !IN_GIVEN_RANGE(user, victim, GUNPOINT_SHOOTER_STRAY_RANGE))
|
||||
return ..() //if they're out of range, just shootem.
|
||||
var/datum/component/gunpoint/gunpoint_component = user.GetComponent(/datum/component/gunpoint)
|
||||
if (gunpoint_component)
|
||||
if(gunpoint_component.target == victim)
|
||||
return ..() //we're already holding them up, shoot that mans instead of complaining
|
||||
to_chat(user, span_warning("You are already holding someone up!"))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
if (user == victim)
|
||||
|
||||
Reference in New Issue
Block a user