mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
You can now altclick lockboxes to open them (#22957)
* You can now altclick lockboxes to open them * Contra feedback - Add early return of adjacent * Update code/game/objects/items/weapons/storage/fancy.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/lockbox.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -382,6 +382,16 @@
|
||||
else
|
||||
. += "ledb"
|
||||
|
||||
/obj/item/storage/lockbox/vials/AltClick(mob/user)
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
/obj/item/storage/lockbox/vials/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
@@ -44,6 +44,15 @@
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return
|
||||
|
||||
/obj/item/storage/lockbox/AltClick(mob/user)
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] [src].</span>")
|
||||
icon_state = "[locked ? icon_locked : icon_closed]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
/obj/item/storage/lockbox/show_to(mob/user as mob)
|
||||
if(locked)
|
||||
|
||||
Reference in New Issue
Block a user