mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user