Satozaki
Newcomer
The Mill has a hard cap of outputting two stacks for an input, if I put in a full 999 stack of Beet, the next day there are only two stacks of Sugar (should be three).
The reason for the bug is a slight error in Utility.addItemToThisInventoryList(Item, IList<Item>, int), in the end code block:
if (i.Stack > i.maximumStackSize())
{
Item tmp = i.getOne();
tmp.Stack = i.maximumStackSize();
i.Stack -= i.maximumStackSize();
list.Add(tmp);
continue;
}
The line:
i.Stack -= i.maximumStackSize();
should actually be
(i as StardewValley.Object).stack.Value -= i.maximumStackSize();
This is because the Object.Stack accessors clamps the value to maximumStackSize() effectively just setting the new Stack value to the maxStackSize, instead of just removing the maxStackSize
The reason for the bug is a slight error in Utility.addItemToThisInventoryList(Item, IList<Item>, int), in the end code block:
if (i.Stack > i.maximumStackSize())
{
Item tmp = i.getOne();
tmp.Stack = i.maximumStackSize();
i.Stack -= i.maximumStackSize();
list.Add(tmp);
continue;
}
The line:
i.Stack -= i.maximumStackSize();
should actually be
(i as StardewValley.Object).stack.Value -= i.maximumStackSize();
This is because the Object.Stack accessors clamps the value to maximumStackSize() effectively just setting the new Stack value to the maxStackSize, instead of just removing the maxStackSize