From 49f9b48d156ca990fd68267d785631690e24e889 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Thu, 25 May 2017 15:17:38 -0700 Subject: [PATCH 1/3] Visibly message when someone points a gun at something --- code/modules/mob/living/living.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 525559e8e6c..7f0098bafac 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -59,6 +59,15 @@ return 0 if(!..()) return 0 + if(ishuman(src)) + var/obj/item/hand_item = src.get_active_hand() + if(hand_item && istype(hand_item, /obj/item/weapon/gun) && A != hand_item) + if(src.a_intent == I_HELP || !ismob(A)) + visible_message("[src] points to [A] with [hand_item]") + return 1 + A.visible_message("[src] points [hand_item] at [A]!", + "[src] points [hand_item] at you!") + return 1 visible_message("[src] points to [A]") return 1 From 4c276bb47f1046d1ffdd70c53301d09ede182c41 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Thu, 25 May 2017 15:57:51 -0700 Subject: [PATCH 2/3] Fix bad style --- code/modules/mob/living/living.dm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7f0098bafac..1b49f5cd28b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -59,15 +59,14 @@ return 0 if(!..()) return 0 - if(ishuman(src)) - var/obj/item/hand_item = src.get_active_hand() - if(hand_item && istype(hand_item, /obj/item/weapon/gun) && A != hand_item) - if(src.a_intent == I_HELP || !ismob(A)) - visible_message("[src] points to [A] with [hand_item]") - return 1 - A.visible_message("[src] points [hand_item] at [A]!", - "[src] points [hand_item] at you!") + var/obj/item/hand_item = get_active_hand() + if(istype(hand_item, /obj/item/weapon/gun) && A != hand_item) + if(a_intent == I_HELP || !ismob(A)) + visible_message("[src] points to [A] with [hand_item]") return 1 + A.visible_message("[src] points [hand_item] at [A]!", + "[src] points [hand_item] at you!") + return 1 visible_message("[src] points to [A]") return 1 From beec82745948a15bec86a47fa249329644c6e114 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Thu, 25 May 2017 17:58:51 -0700 Subject: [PATCH 3/3] Add targetOn sound notification --- code/modules/mob/living/living.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1b49f5cd28b..4394de1fa6b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -66,6 +66,7 @@ return 1 A.visible_message("[src] points [hand_item] at [A]!", "[src] points [hand_item] at you!") + A << 'sound/weapons/TargetOn.ogg' return 1 visible_message("[src] points to [A]") return 1