diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index b98e9354e94..99d907561c7 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -178,12 +178,13 @@ var/global/datum/controller/gameticker/ticker /datum/controller/gameticker/proc/declare_completion() for (var/mob/living/silicon/ai/aiPlayer in world) - if (aiPlayer.stat != 2) - world << "The AI's laws at the end of the game were:" - else - world << "The AI's laws when it was deactivated were:" + if (aiPlayer.name != "Inactive AI") + if (aiPlayer.stat != 2) + world << "The AI's laws at the end of the game were:" + else + world << "The AI's laws when it was deactivated were:" - aiPlayer.show_laws(1) + aiPlayer.show_laws(1) mode.declare_completion() diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index afbf8097f0f..7c0ba47d94c 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -40,21 +40,74 @@ src.name = "inteliCard" return else - var/mob/living/silicon/ai/O = new /mob/living/silicon/ai( src ) - O.invisibility = 0 - O.canmove = 0 - O.name = M.name - O.real_name = M.real_name - O.anchored = 1 - O.aiRestorePowerRoutine = 0 - O.control_disabled = 1 // Can't control things remotely if you're stuck in a card! - O.laws_object = M.laws_object - if(M.mind) - M.mind.transfer_to(O) - src.name = "inteliCard - [M.name]" - M.name = "Inactive AI" - M.real_name = "Inactive AI" - M.icon_state = "ai-crash" - src.icon_state = "aicard-full" - O << "You have been downloaded to a mobile storage device. Remote device connection severed." - user << "Transfer succeeded: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory." \ No newline at end of file + if (M.real_name != "Inactive AI") + var/mob/living/silicon/ai/O = new /mob/living/silicon/ai( src ) + O.invisibility = 0 + O.canmove = 0 + O.name = M.name + O.real_name = M.real_name + O.anchored = 1 + O.aiRestorePowerRoutine = 0 + O.control_disabled = 1 // Can't control things remotely if you're stuck in a card! + O.laws_object = M.laws_object + if(M.mind) + M.mind.transfer_to(O) + src.name = "inteliCard - [M.name]" + M.name = "Inactive AI" + M.real_name = "Inactive AI" + M.icon_state = "ai-crash" + src.icon_state = "aicard-full" + O << "You have been downloaded to a mobile storage device. Remote device connection severed." + user << "Transfer succeeded: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory." + + + Topic(href, href_list) + + 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") + for(var/mob/living/silicon/ai/A in src) + A.suiciding = 1 + A << "Your core files are being wiped!" + while (A.stat != 2) + A.oxyloss += 2 + A.updatehealth() + src.attack_self(usr) + sleep(10) + + + attack_self(mob/user) + user.machine = src + var/dat = "Intelicard
" + var/laws + for(var/mob/living/silicon/ai/A in src) + dat += "Stored AI: [A.name]
System integrity: [(A.health+100)/2]%
" + + if (A.laws_object.zeroth) + laws += "0: [A.laws_object.zeroth]
" + + var/number = 1 + for (var/index = 1, index <= A.laws_object.inherent.len, index++) + var/law = A.laws_object.inherent[index] + if (length(law) > 0) + laws += "[number]: [law]
" + number++ + + for (var/index = 1, index <= A.laws_object.supplied.len, index++) + var/law = A.laws_object.supplied[index] + if (length(law) > 0) + laws += "[number]: [law]
" + number++ + + dat += "Laws:
[laws]
" + + dat += {"Wipe AI"} + user << browse(dat, "window=aicard") + onclose(user, "aicard") + return + + + + + + diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index c31da707b81..305e6fcd2a0 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -12,9 +12,16 @@ src.lying = 1 src.icon_state = "ai-crash" + + + for(var/obj/machinery/ai_status_display/O in world) //change status spawn( 0 ) O.mode = 2 + if (istype(src.loc, /obj/item/device/aicard)) + src.loc.icon_state = "aicard" + src.loc.name = "inteliCard" + src.loc = O if(ticker.mode.name == "AI malfunction") world << "Human Victory"