From 1af5a94068bf076a223194dada837adb7ab2d526 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Tue, 26 Mar 2019 19:03:59 +0100 Subject: [PATCH] Adds a restraint on the casting --- code/modules/mob/living/carbon/human/species/golem.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 032af8ea3b9..2505ebdb261 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -533,23 +533,26 @@ check_flags = AB_CHECK_CONSCIOUS button_icon_state = "blink" icon_icon = 'icons/mob/actions/actions.dmi' + var/activated = FALSE // To prevent spamming var/cooldown = 150 var/last_teleport = 0 var/tele_range = 6 /datum/action/innate/unstable_teleport/IsAvailable() if(..()) - if(world.time > last_teleport + cooldown) + if(world.time > last_teleport + cooldown && !activated) return 1 return 0 /datum/action/innate/unstable_teleport/Activate() + activated = TRUE var/mob/living/carbon/human/H = owner H.visible_message("[H] starts vibrating!", "You start charging your bluespace core...") playsound(get_turf(H), 'sound/weapons/flash.ogg', 25, 1) addtimer(CALLBACK(src, .proc/teleport, H), 15) /datum/action/innate/unstable_teleport/proc/teleport(mob/living/carbon/human/H) + activated = FALSE H.visible_message("[H] teleports!", "You teleport!") var/list/turfs = new/list() for(var/turf/T in orange(tele_range, H))