diff --git a/code/defines/mob/living/silicon/decoy.dm b/code/defines/mob/living/silicon/decoy.dm new file mode 100644 index 0000000000000..ee912d0620929 --- /dev/null +++ b/code/defines/mob/living/silicon/decoy.dm @@ -0,0 +1,6 @@ +/mob/living/silicon/decoy + name = "AI" + voice_name = "synthesized voice" + icon = 'mob.dmi'// + icon_state = "ai" + anchored = 1 // -- TLE \ No newline at end of file diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index bc72095539d9b..259290336d9ed 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -22,6 +22,8 @@ for (var/mob/living/silicon/ai/aiplayer in world) malf_ai += aiplayer.mind + + /*if(malf_ai.len < 1) world << "Uh oh, its malfunction and there is no AI! Please report this." world << "Rebooting world in 5 seconds." diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index b5c14094f762e..830a8edbb20e2 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -52,4 +52,8 @@ 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 + 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) + M.death() + user << "ERROR ERROR ERROR" \ No newline at end of file diff --git a/code/modules/mob/living/silicon/decoy/death.dm b/code/modules/mob/living/silicon/decoy/death.dm new file mode 100644 index 0000000000000..7817354f3ae3e --- /dev/null +++ b/code/modules/mob/living/silicon/decoy/death.dm @@ -0,0 +1,9 @@ +/mob/living/silicon/decoy/death(gibbed) + src.icon_state = "ai-crash" + spawn(rand(10, 30)) + explosion(src.loc, 3, 6, 12, 15) + + for(var/obj/machinery/ai_status_display/O in world) //change status + spawn( 0 ) + O.mode = 2 + return ..(gibbed) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/decoy/decoy.dm b/code/modules/mob/living/silicon/decoy/decoy.dm new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/code/modules/mob/living/silicon/decoy/life.dm b/code/modules/mob/living/silicon/decoy/life.dm new file mode 100644 index 0000000000000..24261e8616ddf --- /dev/null +++ b/code/modules/mob/living/silicon/decoy/life.dm @@ -0,0 +1,14 @@ +/mob/living/silicon/decoy/Life() + if (src.stat == 2) + return + else + if (src.health <= -100.0) + death() + return + +/mob/living/silicon/decoy/updatehealth() + if (src.nodamage == 0) + src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss + else + src.health = 100 + src.stat = 0 \ No newline at end of file diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 6c81b6f121610..6ae098abd7e8d 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -108,6 +108,7 @@ O:malf_picker = new /datum/game_mode/malfunction/AI_Module/module_picker O.show_laws() O << "Kill all." + O.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle O.verbs += /mob/living/silicon/ai/proc/show_laws_verb O.verbs += /mob/living/silicon/ai/proc/ai_camera_track @@ -135,6 +136,11 @@ O.name = newname world << text("[O.real_name] is the AI!") + if (ticker.mode.name == "AI malfunction") + for (var/obj/landmark/start/A in world) + if (A.name == "AI") + var/mob/living/silicon/decoy/D = new /mob/living/silicon/decoy(A.loc) + D.name = O.name del(src) return O