mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user