[MIRROR] prevent sheet snatcher overflow (#9872)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-14 08:38:29 -07:00
committed by GitHub
parent 4019c963eb
commit b9813a3627

View File

@@ -326,11 +326,15 @@
break break
if(!inserted) if(!inserted)
usr.remove_from_mob(S) if(capacity < current + S.get_amount())
if (usr.client && usr.s_active != src) var/obj/item/stack/F = S.split(amount)
usr.client.screen -= S F.loc = src
S.dropped(usr) else
S.loc = src usr.remove_from_mob(S)
if (usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
S.loc = src
orient2hud(usr) orient2hud(usr)
if(usr.s_active) if(usr.s_active)