mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Makes pistol whipping work properly for guns that have hold at gunpoint disabled (#90107)
## About The Pull Request Just shifts some logic around so that hold gunpoint being disabled on a gun does not cause it to fire when pistol whipping. ## Why It's Good For The Game Fixes an unintended interaction ## Changelog 🆑 fix: combat rmb will no longer fire the gun at the same time as pistol whipping for certain guns /🆑
This commit is contained in:
@@ -291,12 +291,12 @@
|
||||
return NONE
|
||||
|
||||
/obj/item/gun/interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
if(!can_hold_up || !isliving(interacting_with))
|
||||
return interact_with_atom(interacting_with, user, modifiers)
|
||||
|
||||
if(user.combat_mode && isliving(interacting_with))
|
||||
return ITEM_INTERACT_SKIP_TO_ATTACK // Gun bash / bayonet attack
|
||||
|
||||
if(!can_hold_up || !isliving(interacting_with))
|
||||
return interact_with_atom(interacting_with, user, modifiers)
|
||||
|
||||
var/datum/component/gunpoint/gunpoint_component = user.GetComponent(/datum/component/gunpoint)
|
||||
if (gunpoint_component)
|
||||
balloon_alert(user, "already holding [gunpoint_component.target == interacting_with ? "them" : "someone"] up!")
|
||||
|
||||
Reference in New Issue
Block a user