From 75b57006e7c6dc76d891bba33b32a1dc147e285c Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Mon, 27 Jul 2020 02:04:18 +0100 Subject: [PATCH] Warns user when using an ID card on a drone. --- .../mob/living/silicon/robot/drone/drone.dm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 91970d030a6..c58b97f9529 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -154,15 +154,19 @@ return else - user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.") + var/confirm = null + confirm = alert("Using your ID on a Maintenance Drone will shut it down, are you sure you want to do this?", "Disable Drone", "Yes", "No") + if (confirm == ("Yes")) + user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.") - if(emagged) - return + if(emagged) + return - if(allowed(W)) - shut_down() - else - to_chat(user, "Access denied.") + if(allowed(W)) + shut_down() + else + to_chat(user, "Access denied.") + return return