From 6e1bc2b0fb32149fd0538f6b14d32eaeb65ce68f Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sun, 6 May 2012 19:14:59 +0100 Subject: [PATCH] TG: AI can now ctrl-click APCs to turn them off. Purge module no longer gives robocop laws. Revision: r3524 Author: VivianFoxfoot --- code/game/atom_procs.dm | 11 ++++++++++- code/game/objects/items/weapons/AI_modules.dm | 2 +- code/modules/power/apc.dm | 7 +++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 21236b1c9ff..ff0a4c034cf 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -1058,9 +1058,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl else var/nhref = "src=\ref[src];aiDisable=5" src.Topic(nhref, params2list(nhref), src, 1) + + return -/atom/proc/AICtrlClick() // Bolts doors. +/atom/proc/AICtrlClick() // Bolts doors, turns off APCs. if(istype(src , /obj/machinery/door/airlock)) if(src:locked) var/nhref = "src=\ref[src];aiEnable=4" @@ -1068,6 +1070,13 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl else var/nhref = "src=\ref[src];aiDisable=4" src.Topic(nhref, params2list(nhref), src, 1) + + else if (istype(src , /obj/machinery/power/apc/)) + var/nhref = "src=\ref[src];breaker=1" + src.Topic(nhref, params2list(nhref), 0) + + + return /* diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 06a632056cb..7836735d3d5 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -431,7 +431,7 @@ AI MODULES origin_tech = "programming=4" -/obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) +/obj/item/weapon/aiModule/robocop/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) ..() target.clear_inherent_laws() target.add_inherent_law("Serve the public trust.") diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 2ec671495d5..7f25de3258d 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -789,7 +789,7 @@ return 0 return 1 -/obj/machinery/power/apc/Topic(href, href_list) +/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1) if (!can_use(usr)) return src.add_fingerprint(usr) @@ -822,6 +822,7 @@ if (ticker.mode.config_tag == "malfunction") if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) operating ? ticker.mode:apcs++ : ticker.mode:apcs-- + src.update() updateicon() @@ -897,7 +898,9 @@ else if (href_list["deoccupyapc"]) malfvacate() - src.updateDialog() + if(usingUI) + src.updateDialog() + return /obj/machinery/power/apc/proc/malfoccupy(var/mob/living/silicon/ai/malf)