mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
[FIX] Animated closet fixes (#27102)
* Some animated closet fixes * Trailing newline --------- Co-authored-by: adrermail@gmail.com <adrermail@gmail.com>
This commit is contained in:
@@ -524,13 +524,15 @@
|
||||
for(var/atom/A in location)
|
||||
if(A.density && A != src && A != AM)
|
||||
transparent = TRUE
|
||||
break
|
||||
alpha = 180
|
||||
update_icon()
|
||||
return
|
||||
alpha = 255
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/bluespace/Crossed(atom/movable/AM, oldloc)
|
||||
if(AM.density)
|
||||
transparent = TRUE
|
||||
update_icon()
|
||||
UpdateTransparency(location = loc)
|
||||
|
||||
/obj/structure/closet/bluespace/Move(NewLoc, direct) // Allows for "phasing" throug objects but doesn't allow you to stuff your EOC homebois in one of these and push them through walls.
|
||||
var/turf/T = get_turf(NewLoc)
|
||||
|
||||
@@ -39,10 +39,6 @@
|
||||
if(opened || !istype(W, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/card/id/guest))
|
||||
to_chat(user, "<span class='warning'>Invalid identification card.</span>")
|
||||
return
|
||||
@@ -51,24 +47,16 @@
|
||||
if(!I || !I.registered_name)
|
||||
return
|
||||
|
||||
if(src == user.loc)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
|
||||
else if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
cut_overlays()
|
||||
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
locked = !locked
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
icon_state = icon_closed
|
||||
togglelock(user)
|
||||
if(!locked)
|
||||
registered_name = null
|
||||
desc = initial(desc)
|
||||
|
||||
if(!registered_name && locked)
|
||||
registered_name = I.registered_name
|
||||
desc = "Owned by [I.registered_name]."
|
||||
desc = "Owned by [I.registered_name]."
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
Reference in New Issue
Block a user