add trait for 'gunpoint,' swap guns over to new trait. (#23494)

add pointy banana, among other non-gun pointies.

Co-authored-by: Scribble-Sheep <15377810-AlyxisDrayko@users.noreply.gitlab.com>
This commit is contained in:
Sheep
2023-12-12 14:29:04 -06:00
committed by GitHub
parent 0291675051
commit ec85e888e6
6 changed files with 14 additions and 1 deletions
+4
View File
@@ -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("<span class='suicide'>[user] is aiming [src] at [user.p_themselves()]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
+1 -1
View File
@@ -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("<b>[src]</b> points to [pointed_object] with [hand_item]")
return TRUE
+1
View File
@@ -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)
@@ -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))