mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-30 08:38:13 +01:00
Merge pull request #8355 from Atermonera/fix-sheet-dispenser-overflow
Fixes overflow bug that can delete sheets from smartfridge
This commit is contained in:
@@ -90,6 +90,8 @@
|
||||
for(var/obj/item/stack/T as anything in instances)
|
||||
if(count <= 0)
|
||||
break
|
||||
if(T.get_amount() <= count)
|
||||
instances -= T
|
||||
count -= T.transfer_to(S, count)
|
||||
|
||||
S.forceMove(product_location)
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
if(amount < 1)
|
||||
return
|
||||
|
||||
count = min(count, amount)
|
||||
|
||||
while(count > 0)
|
||||
var/obj/item/stack/S = I.get_product(get_turf(src), min(count, amount))
|
||||
var/obj/item/stack/S = I.get_product(get_turf(src), count)
|
||||
count -= S.amount
|
||||
SStgui.update_uis(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user