Fixes locker shoving closing and opening the locker thrice, sending its victim to the backrooms (#86572)

## About The Pull Request

Closes #86456 and fixes this

![dreamseeker_bPI7dM78rV](https://github.com/user-attachments/assets/b9939d24-347e-49e2-b3b4-cec1185d2dfc)

## Changelog
🆑
fix: Fixed locker shoving closing and opening the locker thrice, sending
its victim to the backrooms
/🆑
This commit is contained in:
SmArtKar
2024-09-10 16:29:58 +02:00
committed by GitHub
parent b69b394039
commit 8182453c4e
@@ -1191,15 +1191,13 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
return
if(!opened && ((shove_flags & SHOVE_KNOCKDOWN_BLOCKED) || !(shove_flags & SHOVE_BLOCKED)))
return
var/was_opened = opened
if(!toggle())
return
if(was_opened)
if (!target.Move(get_turf(src), get_dir(target, src)))
if(opened)
if (target.loc != loc)
return
target.forceMove(src)
else
target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
toggle()
update_icon()
target.visible_message(span_danger("[shover.name] shoves [target.name] into [src]!"),
span_userdanger("You're shoved into [src] by [shover.name]!"),