mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
forward refs in usr dialog (#17090)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
f326dec745
commit
adcd25a00f
@@ -42,7 +42,7 @@ FLOOR SAFES
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(tumbler_1_pos == tumbler_1_open)
|
||||
to_chat(user, span_notice("You hear a [pick("tonk", "krunk", "plunk")] from \the [src]."))
|
||||
@@ -75,7 +75,7 @@ FLOOR SAFES
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user as mob)
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='byond://?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='byond://?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='byond://?src=\ref[src];increment=1'>+</a>"
|
||||
@@ -101,7 +101,7 @@ FLOOR SAFES
|
||||
to_chat(user, span_notice("You [open ? "close" : "open"] [src]."))
|
||||
open = !open
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
return
|
||||
else
|
||||
to_chat(user, span_notice("You can't [open ? "close" : "open"] [src], the lock is engaged!"))
|
||||
@@ -120,7 +120,7 @@ FLOOR SAFES
|
||||
playsound(src, 'sound/machines/click.ogg', 20, 1)
|
||||
check_unlocked(user, canhear)
|
||||
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
return
|
||||
|
||||
if(href_list["increment"])
|
||||
@@ -135,7 +135,7 @@ FLOOR SAFES
|
||||
to_chat(user, span_notice("You hear a [pick("click", "chink", "clink")] from \the [src]."))
|
||||
playsound(src, 'sound/machines/click.ogg', 20, 1)
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
return
|
||||
|
||||
if(href_list["retrieve"])
|
||||
@@ -145,17 +145,17 @@ FLOOR SAFES
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user)
|
||||
if(open)
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
to_chat(user, span_notice("You put [I] in \the [src]."))
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(user)
|
||||
return
|
||||
else
|
||||
to_chat(user, span_notice("[I] won't fit in \the [src]."))
|
||||
|
||||
Reference in New Issue
Block a user