diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index 7fa1c37e8e1..5a91f323b70 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -10,37 +10,39 @@ attack(mob/living/silicon/ai/M as mob, mob/user as mob) if(!istype(M, /mob/living/silicon/ai)) return ..() - // ** Bugfix for r74 ** - if(istype(M, /mob/living/silicon/decoy)) // Don't branch this out into a separate attack(), it overwrites the first definition. - M.death() // We typecast in the function's arguments, but it doesn't actually typecheck - user << "ERROR ERROR ERROR" // (beyond, I suspect, the big four ATOMs), typechecking for subtypes of one of the ATOMs needs - return 0 // to occur in the function itself. -- TLE if(src.contents.len > 0) + for(var/mob/living/silicon/ai/A in src) + // Already have an AI - if(M.client) - user << "Transfer failed: Existing daemon found on this terminal. Remove existing daemon to install a new one." - return - else if(M.stat == 2) - user << "Transfer failed: Unable to establish connection." - return - else - for(var/mob/living/silicon/ai/A in src) + if(M.client) + user << "Transfer failed: Existing daemon found on this terminal. Remove existing daemon to install a new one." + return + else if(M.stat != A.stat) + user << "Transfer failed: Unable to establish connection." + return + else M.name = A.name M.real_name = A.real_name if(A.mind) A.mind.transfer_to(M) M.control_disabled = 0 M.laws_object = A.laws_object + M.oxyloss = A.oxyloss + M.fireloss = A.fireloss + M.bruteloss = A.bruteloss + M.toxloss = A.toxloss + M.updatehealth() M << "You have been uploaded to a stationary terminal. Remote device connection restored." user << "Transfer succesful: [M.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed." del(A) + if (!M.stat) + M.icon_state = "ai" src.icon_state = "aicard" - M.icon_state = "ai" src.name = "inteliCard" return else - if (M.real_name != "Inactive AI" && M.stat != 2) + if (M.real_name != "Inactive AI") var/mob/living/silicon/ai/O = new /mob/living/silicon/ai( src ) O.invisibility = 0 O.canmove = 0 @@ -50,16 +52,31 @@ 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 + O.stat = M.stat + O.oxyloss = M.oxyloss + O.fireloss = M.fireloss + O.bruteloss = M.bruteloss + O.toxloss = M.toxloss + O.updatehealth() 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" + if (O.stat == 2) + src.icon_state = "aicard-404" + else + 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." + attack(mob/living/silicon/decoy/M as mob, mob/user as mob) + if (!istype (M, /mob/living/silicon/decoy)) + return ..() + else + M.death() + user << "ERROR ERROR ERROR" Topic(href, href_list) @@ -101,7 +118,10 @@ dat += "Laws:
[laws]
" - dat += {"Wipe AI"} + if (A.stat == 2) + dat += "AI nonfunctional" + else + 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 305e6fcd2a0..73a6b1f06b1 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -19,9 +19,7 @@ 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 + src.loc.icon_state = "aicard-404" if(ticker.mode.name == "AI malfunction") world << "Human Victory" diff --git a/icons/obj/pda.dmi b/icons/obj/pda.dmi index 3af9578ddb9..aacced9005c 100644 Binary files a/icons/obj/pda.dmi and b/icons/obj/pda.dmi differ