diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 4b581b7d914..59ad665bd74 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -69,6 +69,10 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) var/reminder_timer_id = TIMER_ID_NULL var/has_active_secondary_goal = FALSE +/obj/machinery/requests_console/examine(mob/user) + . = ..() + . += SPAN_NOTICE("You can Alt-Click to quickly swipe your ID.") + /obj/machinery/requests_console/power_change() if(!..()) return @@ -291,6 +295,10 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) if("toggleSilent") silent = !silent +/obj/machinery/requests_console/AltClick(mob/living/user) + if(Adjacent(user) && user.get_id_card()) + use_id(user, user.get_id_card()) + /obj/machinery/requests_console/item_interaction(mob/living/user, obj/item/used, list/modifiers) var/obj/item/stamp/stamp = used if(istype(stamp)) @@ -300,16 +308,21 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) return ITEM_INTERACT_COMPLETE - var/obj/item/card/id/id_card = used + if(use_id(user, used)) + return ITEM_INTERACT_COMPLETE + + return ..() + +/obj/machinery/requests_console/proc/use_id(mob/living/user, obj/item/card/id/id_card) if(!istype(id_card)) - return ..() + return FALSE if(inoperable(MAINT)) - return ITEM_INTERACT_COMPLETE + return TRUE if(screen == RCS_MESSAUTH) msgVerified = "Verified by [id_card.registered_name] ([id_card.assignment])" SStgui.update_uis(src) - return ITEM_INTERACT_COMPLETE + return TRUE if(screen == RCS_ANNOUNCE) if(ACCESS_RC_ANNOUNCE in id_card.GetAccess()) announceAuth = TRUE @@ -318,20 +331,20 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) reset_message() to_chat(user, SPAN_WARNING("You are not authorized to send announcements.")) SStgui.update_uis(src) - return ITEM_INTERACT_COMPLETE + return TRUE if(screen == RCS_SECONDARY) secondaryGoalAuth = TRUE goalRequester = id_card has_active_secondary_goal = check_for_active_secondary_goal(goalRequester) - return ITEM_INTERACT_COMPLETE + return TRUE if(screen == RCS_SHIPPING) msgVerified = "Sender verified as [id_card.registered_name] ([id_card.assignment])" SStgui.update_uis(src) - return ITEM_INTERACT_COMPLETE + return TRUE - return ..() + return FALSE /obj/machinery/requests_console/proc/reset_message(mainmenu = FALSE) message = "" diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index d348210584a..76740520400 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -67,7 +67,7 @@ . += SPAN_NOTICE("It seems to be sealed shut, there's no way you're getting that open.") else if(!open) - . += SPAN_NOTICE("The ID lock is active, you need to swipe an ID to open it.") + . += SPAN_NOTICE("The ID lock is active, you need to swipe an ID to open it (Shortcut: Alt-Click).") else if((broken || open) && showpiece) . += SPAN_NOTICE("[showpiece] is held in a loose low gravity suspension field. You can take [showpiece] out[broken ? "." : ", or lock [src] with an ID"].") @@ -142,19 +142,30 @@ if(!open && !broken) . += "glassbox_closed" +/obj/structure/displaycase/proc/id_act(mob/living/user, obj/item/card/id/id_card = null) + if(!istype(id_card)) + id_card = user.get_id_card() + if(!openable) + to_chat(user, SPAN_WARNING("There is no ID scanner, looks like this one is sealed shut.")) + return + if(broken) + to_chat(user, SPAN_WARNING("[src] is broken, the ID lock won't do anything.")) + return + if(allowed(user) || emagged) + to_chat(user, SPAN_NOTICE("You use [id_card] to [open ? "close" : "open"] [src].")) + toggle_lock() + return TRUE + else + to_chat(user, SPAN_WARNING("Access denied.")) + return + +/obj/structure/displaycase/AltClick(mob/living/user) + if(Adjacent(user)) + id_act(user, user.get_id_card()) + /obj/structure/displaycase/item_interaction(mob/living/user, obj/item/I, list/modifiers) if(I.GetID()) - if(!openable) - to_chat(user, SPAN_WARNING("There is no ID scanner, looks like this one is sealed shut.")) - return ITEM_INTERACT_COMPLETE - if(broken) - to_chat(user, SPAN_WARNING("[src] is broken, the ID lock won't do anything.")) - return ITEM_INTERACT_COMPLETE - if(allowed(user) || emagged) - to_chat(user, SPAN_NOTICE("You use [I] to [open ? "close" : "open"] [src].")) - toggle_lock() - else - to_chat(user, SPAN_WARNING("Access denied.")) + id_act(user, I) return ITEM_INTERACT_COMPLETE else if(open && !showpiece) if(!(I.flags & (ABSTRACT | DROPDEL)) && user.drop_item()) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 2e158408433..407860d43aa 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -329,6 +329,8 @@ else . += "[src] is in pristine condition." + . += SPAN_NOTICE("You can Alt-Click to quickly swipe your ID.") + /mob/living/simple_animal/bot/adjustHealth(amount, updating_health = TRUE) if(amount > 0 && prob(10)) new /obj/effect/decal/cleanable/blood/oil(loc) @@ -422,18 +424,26 @@ /mob/living/simple_animal/bot/proc/interact(mob/user) show_controls(user) +/mob/living/simple_animal/bot/AltClick(mob/user) + if(Adjacent(user)) + toggle_lock(user) + +/mob/living/simple_animal/bot/proc/toggle_lock(mob/user) + if(allowed(user) && !open && !emagged) + locked = !locked + to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]") + return TRUE + if(emagged) + to_chat(user, SPAN_DANGER("ERROR")) + if(open) + to_chat(user, SPAN_WARNING("Please close the access panel before locking it.")) + else + to_chat(user, SPAN_WARNING("Access denied.")) + return FALSE + /mob/living/simple_animal/bot/item_interaction(mob/living/user, obj/item/W, list/modifiers) if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) - if(allowed(user) && !open && !emagged) - locked = !locked - to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]") - return ITEM_INTERACT_COMPLETE - if(emagged) - to_chat(user, SPAN_DANGER("ERROR")) - if(open) - to_chat(user, SPAN_WARNING("Please close the access panel before locking it.")) - else - to_chat(user, SPAN_WARNING("Access denied.")) + toggle_lock(user) return ITEM_INTERACT_COMPLETE if(istype(W, /obj/item/paicard)) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 49405df2d80..390224b9277 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -88,17 +88,7 @@ /mob/living/simple_animal/bot/cleanbot/item_interaction(mob/living/user, obj/item/W, list/modifiers) if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) - if(allowed(user) && !open && !emagged) - locked = !locked - to_chat(user, SPAN_NOTICE("You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.")) - else - if(emagged) - to_chat(user, SPAN_WARNING("ERROR")) - if(open) - to_chat(user, SPAN_WARNING("Please close the access panel before locking it.")) - else - to_chat(user, SPAN_NOTICE("\The [src] doesn't seem to respect your authority.")) - + toggle_lock(user) return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 6b1299290b7..1b9d7a1a45f 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -138,7 +138,7 @@ update_controls() update_icon() -/mob/living/simple_animal/bot/mulebot/proc/toggle_lock(mob/user) +/mob/living/simple_animal/bot/mulebot/toggle_lock(mob/user) if(allowed(user)) locked = !locked update_controls()