From 55387d293defe16ae6e73f37247ce0bf6fd47fb6 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Thu, 21 Nov 2013 16:34:20 +0100 Subject: [PATCH] Kaze's Req : inactive AIs are wrenchable. Wrench an inactive AI core, and you can drag it around. Tested it, AI can be carded in when you are dragging the core, or carded out. --- code/game/machinery/computer/ai_core.dm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 7a9b02e5b6a..4a60b8b387a 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -175,10 +175,21 @@ anchored = 1 state = 20//So it doesn't interact based on the above. Not really necessary. - attackby(var/obj/item/device/aicard/A as obj, var/mob/user as mob) - if(istype(A, /obj/item/device/aicard))//Is it? - A.transfer_ai("INACTIVE","AICARD",src,user) - return +/obj/structure/AIcore/deactivated/attackby(var/obj/item/A as obj, var/mob/user as mob) + if(istype(A, /obj/item/device/aicard))//Is it? + A.transfer_ai("INACTIVE","AICARD",src,user) + if(istype(A, /obj/item/weapon/wrench)) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + switch(anchored) + if(0) + if(do_after(user, 20)) + user << "\blue You wrench the core into place." + anchored = 1 + if(1) + if(do_after(user, 20)) + user << "\blue You unfasten the core." + anchored = 0 + return /* This is a good place for AI-related object verbs so I'm sticking it here.