From 6020c9a794fd8d193dde3a8a2b5e8f8925072fb8 Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Sun, 14 Oct 2018 20:46:31 -0400 Subject: [PATCH] borer fixes --- code/game/gamemodes/miniantags/borer/borer.dm | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 5543a54caa6..cc9a6593df3 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -91,6 +91,7 @@ ) var/talk_inside_host = FALSE // So that borers don't accidentally give themselves away on a botched message var/used_dominate + var/input_open = FALSE // To prevent people from spam opening the Dominate Victim input var/chemicals = 10 // Chemicals used for reproduction and chemical injection. var/max_chems = 250 var/mob/living/carbon/human/host // Human host for the brain worm. @@ -471,7 +472,7 @@ set category = "Borer" set name = "Dominate Victim" set desc = "Freeze the limbs of a potential host with supernatural fear." - + if(world.time - used_dominate < 150) to_chat(src, "You cannot use that ability again so soon.") return @@ -483,23 +484,43 @@ if(stat) to_chat(src, "You cannot do that in your current state.") return - + + if(input_open) + to_chat(src, "You're already targetting someone!") + return + var/list/choices = list() for(var/mob/living/carbon/C in view(3,src)) if(C.stat != DEAD) choices += C - + if(world.time - used_dominate < 300) to_chat(src, "You cannot use that ability again so soon.") return - + + input_open = TRUE + var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices - if(!M || !src) + if(!M) + input_open = FALSE + return + + if(!src) //different statement to avoid a runtime since if the source is deleted then input_open would also be deleted return if(M.has_brain_worms()) to_chat(src, "You cannot dominate someone who is already infested!") + input_open = FALSE + return + + if(stat == DEAD) + input_open = FALSE + return + + if(get_dist(src, M) > 7) //to avoid people remotely doing from across the map etc, 7 is the default view range + to_chat(src, "You're too far away!") + input_open = FALSE return to_chat(src, "You focus your psychic lance on [M] and freeze [M.p_their()] limbs with a wave of terrible dread.") @@ -507,6 +528,7 @@ M.Weaken(3) used_dominate = world.time + input_open = FALSE /mob/living/simple_animal/borer/verb/release_host() set category = "Borer"