From 523210e7b87bea4db310aac74b3ad0e8b887a029 Mon Sep 17 00:00:00 2001 From: GunHog Date: Fri, 30 Oct 2015 15:31:04 -0500 Subject: [PATCH 1/2] Posibrain possession fix - Ghosts can no longer take the posibrain of another player, even if that player ghosts. - Fixes a bug in which cyborgs can gain additional players in the same body. --- code/modules/mob/living/carbon/brain/posibrain.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index a90b9e22e18..b3e08ba11c4 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -9,6 +9,7 @@ var/global/posibrain_notif_cooldown = 0 origin_tech = "biotech=3;programming=2" var/notified = 0 var/askDelay = 10 * 60 * 1 + var/used = 0 //Prevents split personality virus. May be reset if personality deletion code is added. brainmob = null req_access = list(access_robotics) mecha = null//This does not appear to be used outside of reference in mecha.dm. @@ -28,6 +29,9 @@ var/global/posibrain_notif_cooldown = 0 posibrain_notif_cooldown = 0 /obj/item/device/mmi/posibrain/attack_self(mob/user) + if(used) + user << "[src]'s activation switch is locked, it appears to already have been programmed!" + return if(brainmob && !brainmob.key && !notified) //Start the process of notified for a new user. user << "You carefully locate the manual activation switch and start the positronic brain's boot process." @@ -47,7 +51,7 @@ var/global/posibrain_notif_cooldown = 0 //Two ways to activate a positronic brain. A clickable link in the ghost notif, or simply clicking the object itself. /obj/item/device/mmi/posibrain/proc/activate(mob/user) - if((brainmob && brainmob.key) || jobban_isbanned(user,"posibrain")) + if(used || (brainmob && brainmob.key) || jobban_isbanned(user,"posibrain")) return var/posi_ask = alert("Become a positronic brain? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No") @@ -81,7 +85,7 @@ var/global/posibrain_notif_cooldown = 0 return /obj/item/device/mmi/posibrain/proc/transfer_personality(mob/candidate) - if(brainmob && brainmob.key) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain. + if(used || (brainmob && brainmob.key)) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain. candidate << "This brain has already been taken! Please try your possesion again later!" return notified = 0 @@ -97,6 +101,7 @@ var/global/posibrain_notif_cooldown = 0 visible_message("The positronic brain chimes quietly.") update_icon() + used = 1 /obj/item/device/mmi/posibrain/examine() From 90033680789e8b6da2bb3951de28a63f37903f04 Mon Sep 17 00:00:00 2001 From: GunHog Date: Thu, 5 Nov 2015 08:46:26 -0600 Subject: [PATCH 2/2] Lets used brains be reset. Positronic brains now may be reset if abandoned by the user. --- code/modules/mob/living/carbon/brain/posibrain.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index b3e08ba11c4..e789a28e5bb 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -29,14 +29,12 @@ var/global/posibrain_notif_cooldown = 0 posibrain_notif_cooldown = 0 /obj/item/device/mmi/posibrain/attack_self(mob/user) - if(used) - user << "[src]'s activation switch is locked, it appears to already have been programmed!" - return if(brainmob && !brainmob.key && !notified) - //Start the process of notified for a new user. + //Start the process of requesting a new ghost. user << "You carefully locate the manual activation switch and start the positronic brain's boot process." ping_ghosts("requested") notified = 1 + used = 0 update_icon() spawn(askDelay) //Seperate from the global cooldown. notified = 0 @@ -123,7 +121,7 @@ var/global/posibrain_notif_cooldown = 0 if(UNCONSCIOUS) msg += "It doesn't seem to be responsive.\n" if(DEAD) msg += "It appears to be completely inactive.\n" else - msg += "It appears to be completely inactive.\n" + msg += "It appears to be completely inactive. The reset light is blinking.\n" msg += "*---------*" usr << msg return