From eea98e632d422324ee6fe350df9fcde8b1c50a9f Mon Sep 17 00:00:00 2001 From: d3athrow Date: Mon, 6 Jan 2014 14:26:24 -0600 Subject: [PATCH] Gives AI the choice to open the door or not! --- code/game/machinery/camera/tracking.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 29843283846..8124adc6d07 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -155,9 +155,13 @@ else //world << "[D.name] not close enough | [get_dist(D, target)] | [dist]" if(tobeopened) - var/nhref = "src=\ref[tobeopened];aiEnable=7" - tobeopened.Topic(nhref, params2list(nhref), tobeopened, 1) - src << "\blue You've opened the nearest airlock to [target]" + switch(alert(G, "Do you want to open \the [tobeopened] for [target]?","Doorknob_v2a.exe","Yes","No")) + if("Yes") + var/nhref = "src=\ref[tobeopened];aiEnable=7" + tobeopened.Topic(nhref, params2list(nhref), tobeopened, 1) + src << "\blue You've opened \the [tobeopened] for [target]." + if("No") + src << "\red You deny the request." else src << "\red You've failed to open an airlock for [target]" return