From fa686dbfef5b6577e603ffbea585907f386b566b Mon Sep 17 00:00:00 2001 From: xxalpha Date: Fri, 24 Jul 2015 10:15:00 +0100 Subject: [PATCH 1/2] Made it possible to emag a cyborg more than once. --- code/modules/mob/living/silicon/robot/robot.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index b0e916f11a9..f8dec28231e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -569,7 +569,6 @@ user << "The cover is already unlocked!" return if(opened)//Cover is open - if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice if(wiresexposed) user << "You must close the cover first!" return From a5062c812bd383058a00e9c8e858a8df2e3f97ed Mon Sep 17 00:00:00 2001 From: xxalpha Date: Tue, 1 Sep 2015 15:53:12 +0100 Subject: [PATCH 2/2] Added emag cooldown. Added emag protection if cyborg slaved to tator AI. --- code/modules/mob/living/silicon/robot/robot.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 13dfa8b8469..a91cdd75268 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -36,6 +36,7 @@ var/opened = 0 var/emagged = 0 + var/emag_cooldown = 0 var/wiresexposed = 0 var/locked = 1 var/list/req_access = list(access_robotics) @@ -578,10 +579,26 @@ user << "The cover is already unlocked!" return if(opened)//Cover is open + if((world.time - 100) < emag_cooldown) + return + + var/ai_is_antag = 0 + if(connected_ai && connected_ai.mind) + if(connected_ai.mind.special_role) + ai_is_antag = (connected_ai.mind.special_role == "malfunction") || (connected_ai.mind.special_role == "traitor") + if(ai_is_antag) + user << "You emag [src]'s interface." + src << "ALERT: Foreign software execution prevented." + connected_ai << "ALERT: Cyborg unit \[[src]] successfuly defended against subversion." + log_game("[key_name(user)] attempted to emag cyborg [key_name(src)] slaved to traitor AI [connected_ai].") + emag_cooldown = world.time + return + if(wiresexposed) user << "You must close the cover first!" return else + emag_cooldown = world.time sleep(6) SetEmagged(1) SetLockdown(1) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown