mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 08:06:33 +01:00
[MIRROR] Fix lockers giving no feedback when trying to close them with another locker inside [MDB IGNORE] (#15749)
* Fix lockers giving no feedback when trying to close them with another locker inside (#69172) Fix lockers giving no feedback when trying to close them with another locker inside You also no longer try to toggle the lock status when you fail to close an open locker. I think this was a bit weird behaviour because changing the lock status of an open locker doesn't really make sense and only resulted in confusing messages. * Fix lockers giving no feedback when trying to close them with another locker inside Co-authored-by: Vincent <CPTANT@users.noreply.github.com>
This commit is contained in:
@@ -220,6 +220,8 @@
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/structure/closet/closet in T)
|
||||
if(closet != src && !closet.wall_mounted)
|
||||
if(user)
|
||||
balloon_alert(user, "another closet is in the way!")
|
||||
return FALSE
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
@@ -458,7 +460,7 @@
|
||||
var/item_is_id = W.GetID()
|
||||
if(!item_is_id)
|
||||
return FALSE
|
||||
if(item_is_id || !toggle(user))
|
||||
if((item_is_id || !toggle(user)) && !opened)
|
||||
togglelock(user)
|
||||
else
|
||||
return FALSE
|
||||
@@ -538,9 +540,11 @@
|
||||
if(user.body_position == LYING_DOWN && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
if(!toggle(user))
|
||||
togglelock(user)
|
||||
if(toggle(user))
|
||||
return
|
||||
|
||||
if(!opened)
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
Reference in New Issue
Block a user