From a310b6ddd400f033d1aaf4210ba258770f3b2ba2 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Sat, 16 Oct 2010 17:50:22 +0000 Subject: [PATCH] Made it impossible for non-malfunctioning AIs to disable the malf AI's APC. Made malf AIs uncardable. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@292 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/devices/aicard.dm | 11 +++++++++++ code/modules/mob/living/silicon/ai/ai.dm | 16 +++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index 1c5ef18ed54..3d3b8a547c4 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -49,6 +49,12 @@ return else if (M.real_name != "Inactive AI") + if (ticker.mode.name == "AI malfunction") + var/datum/game_mode/malfunction/malf = ticker.mode + for (var/datum/mind/malfai in malf.malf_ai) + if (M.mind == malfai) + user << "This AI's download interface has been disabled." + return var/mob/living/silicon/ai/O = new /mob/living/silicon/ai( src ) O.invisibility = 0 O.canmove = 0 @@ -88,6 +94,10 @@ Topic(href, href_list) + if (href_list["close"]) + usr << browse(null, "window=aicard") + usr.machine = null + if (href_list["wipe"]) var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No") if(confirm == "Yes") @@ -146,6 +156,7 @@ else dat += "Wipe in progress" dat += {" [A.control_disabled ? "Enable" : "Disable"] Wireless Activity"} + dat += {" Close"} user << browse(dat, "window=aicard") onclose(user, "aicard") return diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index dda88448fb0..a446944e4ef 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -333,7 +333,21 @@ if(src.network == "AI Satellite") src.network = "SS13" else if (src.network == "Prison") - src.network = "AI Satellite" + if (ticker.mode.name == "AI malfunction") +// world << "It's malf, checking if this dude is malfunctioning" + var/datum/game_mode/malfunction/malf = ticker.mode + for (var/datum/mind/M in malf.malf_ai) +// world << "There's a malf ai, he belongs to [M.key], while the AI tryign to poke around is [src.mind.key]" + if (src.mind == M) +// world <<"They match" + src.network = "AI Satellite" + src << "\blue Switched to [src.network] camera network." + return + else +// world <<"They don't match" + src.network = "SS13" + else + src.network = "SS13" else //(src.network == "SS13") src.network = "Prison" // src.network = "AI Satellite"