Skip to content

Commit

Permalink
single letter vars
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Oct 14, 2023
1 parent 63aee8e commit 2835395
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions code/game/objects/items/stacks/stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,24 +227,24 @@ Also change the icon to reflect the amount of sheets, if possible.*/
qdel(oldsrc)

if(istype(new_item,/obj/item/stack)) //floor stacking convenience
var/obj/item/stack/S = new_item
for(var/obj/item/stack/F in usr.loc)
if(S.stack_id == F.stack_id && S != F)
var/diff = F.max_amount - F.amount
if (S.amount < diff)
F.amount += S.amount
var/obj/item/stack/stack_item = new_item
for(var/obj/item/stack/found_item in usr.loc)
if(stack_item.stack_id == found_item.stack_id && stack_item != found_item)
var/diff = found_item.max_amount - found_item.amount
if (stack_item.amount < diff)
found_item.amount += stack_item.amount
qdel(S)

Check failure on line 236 in code/game/objects/items/stacks/stack.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "S"
else
S.amount -= diff
F.amount += diff
stack_item.amount -= diff
found_item.amount += diff
break

new_item?.add_fingerprint(usr)

//BubbleWrap - so newly formed boxes are empty
if(isstorage(new_item))
for (var/obj/item/I in new_item)
qdel(I)
for (var/obj/item/found_item in new_item)
qdel(found_item)
//BubbleWrap END
if(src && usr.interactee == src) //do not reopen closed window
INVOKE_ASYNC(src, PROC_REF(interact), usr)
Expand Down

0 comments on commit 2835395

Please sign in to comment.