mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Personal lockers can no longer be locked from the inside. Also fixes the "It won't budge" message which kept appearing. Per https://github.com/ZomgPonies/Paradise/issues/452.
This commit is contained in:
@@ -129,11 +129,9 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user as mob)
|
||||
var/orig = src.opened
|
||||
. = src.opened ? src.close() : src.open()
|
||||
if(. == orig)
|
||||
if(!(src.opened ? src.close() : src.open()))
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
return
|
||||
return
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/ex_act(severity)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/personal
|
||||
desc = "It's a secure locker for personell. The first card swiped gains control."
|
||||
desc = "It's a secure locker for personnel. The first card swiped gains control."
|
||||
name = "personal closet"
|
||||
req_access = list(access_all_personal_lockers)
|
||||
var/registered_name = null
|
||||
@@ -68,7 +68,9 @@
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
if(src == user.loc)
|
||||
user << "<span class='notice'>You can't reach the lock from inside.</span>"
|
||||
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked) src.icon_state = src.icon_locked
|
||||
|
||||
Reference in New Issue
Block a user