diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 4337fa0f207..532d3a10336 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -253,6 +253,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai ///An item that is oiled. If sprayed with water, it's slowdown reverts to normal. #define TRAIT_OIL_SLICKED "oil_slicked" +///An item that can be pointed at mobs, while on non-help intent. +#define TRAIT_CAN_POINT_WITH "can_point_with" + // // common trait sources #define TRAIT_GENERIC "generic" diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 5d16fd63781..0e2d8b42bec 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -50,6 +50,7 @@ if(!reagents) create_reagents(max_water) reagents.add_reagent("water", max_water) + ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT) /obj/item/extinguisher/attack_self(mob/user as mob) safety = !safety diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index eeaf68253ef..67b3df02b90 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -26,6 +26,10 @@ distill_reagent = "bananahonk" tastes = list("banana" = 1) +/obj/item/reagent_containers/food/snacks/grown/banana/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT) + /obj/item/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user) user.visible_message("[user] is aiming [src] at [user.p_themselves()]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 20f7d90f3d8..a08c954549d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -272,7 +272,7 @@ var/pointed_object = "\the [A]" if(A.loc in src) pointed_object += " inside [A.loc]" - if(istype(hand_item, /obj/item/gun) && A != hand_item) + if(HAS_TRAIT(hand_item, TRAIT_CAN_POINT_WITH) && A != hand_item) if(a_intent == INTENT_HELP || !ismob(A)) visible_message("[src] points to [pointed_object] with [hand_item]") return TRUE diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index aa2f0aef163..d735eb14359 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -76,6 +76,7 @@ if(gun_light) verbs += /obj/item/gun/proc/toggle_gunlight build_zooming() + ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT) /obj/item/gun/Destroy() QDEL_NULL(bayonet) diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index ea31992b7d4..a87cec73c93 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -19,6 +19,10 @@ possible_transfer_amounts = null var/delay = CLICK_CD_RANGE * 2 +/obj/item/reagent_containers/spray/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT) + /obj/item/reagent_containers/spray/afterattack(atom/A, mob/user) if(isstorage(A) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \ || istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))