Fixed the Stack Machine from eating Materials (#4688)

The stacker was coded to accept 1 sheet at a time, meaning that if you insert a stack of 50 sheets into the stacker, it will count that as only 1 sheet because people don't know how to code.
This commit is contained in:
BurgerLUA
2018-05-06 17:21:05 +03:00
committed by Erki
parent a9e42d20d2
commit c11d7ac148
2 changed files with 10 additions and 3 deletions
+4 -3
View File
@@ -123,9 +123,10 @@
var/turf/T = get_turf(input)
for(var/obj/item/O in T)
if(!O) return
if(istype(O, /obj/item/stack) && stack_storage[O.type] != null)
stack_storage[O.type]++
qdel(O)
var/obj/item/stack/S = O
if(istype(S) && stack_storage[S.type] != null)
stack_storage[S.type] += S.amount
qdel(S)
else
O.forceMove(output.loc)