Add alt-click ID swiping to more objects. (#31988)

* Add alt-click ID swiping to more objects.

* Add more alt-clickable bots. Add examine text.

* Bold alt-click hint, make display case alt clickable.

* Fix display case unlock message for CI.
This commit is contained in:
Alan
2026-05-14 23:05:27 +00:00
committed by GitHub
parent 5ebf710cfd
commit 31a27d13a8
5 changed files with 66 additions and 42 deletions
@@ -329,6 +329,8 @@
else
. += "[src] is in pristine condition."
. += SPAN_NOTICE("You can <b>Alt-Click</b> 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))
@@ -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 ..()
@@ -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()