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>
This commit is contained in:
Timothy Teakettle
2021-05-14 16:47:40 +01:00
committed by GitHub
parent 4a5561d273
commit 739b7cea26
+6 -1
View File
@@ -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 = ..()