Fixes #6163

* Rounded res.amount to keep the fabricator from dispensing non-integer numbers of stacks
* Added a check to prevent stacks of < 1 from being put into the fabricator
Merge remote-tracking branch 'upstream/master'
Merge pull request #6186 from Kilakk/master

Fixes #6163