From 32c5220f4cea31170b100963201a3de49ed995c7 Mon Sep 17 00:00:00 2001 From: Krausus Date: Mon, 4 Jul 2016 02:45:49 -0400 Subject: [PATCH] Borer fixes - Fixes borers dying to environmental damage while inside a host. - Fixes borers not releasing control of a host when it dies. - Fixes borers being able to assume control of dead hosts. - Fixes borers being able to talk to their host while dead. - Fixes borers being told they can't leave their host while incapacitated/dead, but then trying to leave it anyway. - Removes an unused proc. --- code/game/gamemodes/miniantags/borer/borer.dm | 24 ++++++++++++------- code/modules/mob/living/carbon/human/death.dm | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 4998aaeca48..843ef5d98b3 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -97,10 +97,15 @@ set category = "Borer" set name = "Converse with Host" set desc = "Send a silent message to your host." + if(!host) to_chat(src, "You do not have a host to communicate with!") return + if(stat) + to_chat(src, "You cannot do that in your current state.") + return + var/input = stripped_input(src, "Please enter a message to tell your host.", "Borer", "") if(!input) return @@ -207,6 +212,12 @@ if(prob(host.getBrainLoss()/20)) host.say("*[pick(list("blink","blink_r","choke","aflap","drool","twitch","twitch_s","gasp"))]") +/mob/living/simple_animal/borer/handle_environment() + if(host) + return // Snuggled up, nice and warm, in someone's head + else + return ..() + /mob/living/simple_animal/borer/New(var/by_gamemode=0) ..() add_language("Cortical Link") @@ -231,14 +242,6 @@ // VERBS! -/mob/living/simple_animal/borer/proc/borer_speak(var/message) - if(!message) - return - - for(var/mob/M in mob_list) - if(M.mind && (istype(M, /mob/living/simple_animal/borer) || istype(M, /mob/dead/observer))) - to_chat(M, "Cortical link, [truename]: [copytext(message, 2)]") - /mob/living/simple_animal/borer/verb/dominate_victim() set category = "Borer" set name = "Dominate Victim" @@ -288,6 +291,10 @@ to_chat(src, "You are not inside a host body.") return + if(host.stat == DEAD) + to_chat(src, "This host is in no condition to be controlled.") + return + if(src.stat) to_chat(src, "You cannot do that in your current state.") return @@ -405,6 +412,7 @@ if(stat) to_chat(src, "You cannot leave your host in your current state.") + return if(docile) to_chat(src, "\blue You are feeling far too docile to do that.") diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 5ac5d796897..8bcccb69eb5 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -111,7 +111,7 @@ if(istype(I,/mob/living/simple_animal/borer)) B = I if(B) - if(!B.ckey && ckey && B.controlling) + if(B.controlling && B.host == src) B.detatch() verbs -= /mob/living/carbon/proc/release_control