Skip to content

Commit

Permalink
Update bags.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Kashargul authored Jan 13, 2025
1 parent f976906 commit fee5b21
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions code/game/objects/items/weapons/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@
var/amount
var/inserted = 0
var/current = 0
var/old_loc = S.loc
for(var/obj/item/stack/material/S2 in contents)
current += S2.get_amount()
if(capacity < current + S.get_amount())//If the stack will fill it up
Expand All @@ -327,15 +326,14 @@
break

if(!inserted)
usr.remove_from_mob(S)
if (usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
if(capacity < current + S.get_amount())
var/obj/item/stack/F = S.split(amount)
S.forceMove(old_loc)
F.loc = src
else
usr.remove_from_mob(S)
if (usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
S.loc = src

orient2hud(usr)
Expand Down

0 comments on commit fee5b21

Please sign in to comment.