From 739b7cea261b552275776b94b52e91bb375e1878 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 14 May 2021 16:47:40 +0100 Subject: [PATCH] borg spraycans have a five second delay before being able to knock someone down again (#14627) * Update crayons.dm * Update crayons.dm * kevin review changes * Update crayons.dm * Update code/game/objects/items/crayons.dm Co-authored-by: DeltaFire <46569814+DeltaFire15@users.noreply.github.com> --- code/game/objects/items/crayons.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index e584cad9e8..aa48930d6c 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -649,6 +649,9 @@ pre_noise = TRUE post_noise = FALSE + var/stun_delay = 0 // how long it takes for you to be able to stun someone with the spraycan again + var/last_stun_time = 0 + /obj/item/toy/crayon/spraycan/isValidSurface(surface) return (istype(surface, /turf/open/floor) || istype(surface, /turf/closed/wall)) @@ -716,7 +719,8 @@ if(C.client) C.blur_eyes(3) C.blind_eyes(1) - if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS. + if(C.get_eye_protection() <= 0 && (last_stun_time + stun_delay) <= world.time) // no eye protection? ARGH IT BURNS. + last_stun_time = world.time C.confused = max(C.confused, 3) C.DefaultCombatKnockdown(60) if(ishuman(C) && actually_paints) @@ -771,6 +775,7 @@ name = "cyborg spraycan" desc = "A metallic container containing shiny synthesised paint." charges = -1 + stun_delay = 5 SECONDS /obj/item/toy/crayon/spraycan/borg/draw_on(atom/target,mob/user,proximity, params) var/diff = ..()