Leaving container item of fuel items inserted into the generator in its inventory (e.g. buckets can be retrieved with generator.remove). Closes #698.

This commit is contained in:
Florian Nücke 2014-11-27 17:05:07 +01:00
parent ece65d8961
commit a01dc9dd04

View File

@ -101,7 +101,10 @@ class UpgradeGenerator(val host: EnvironmentHost with Robot) extends prefab.Mana
updateClient()
stack.stackSize -= 1
if (stack.stackSize <= 0) {
inventory = None
if (stack.getItem.hasContainerItem(stack))
inventory = Option(stack.getItem.getContainerItem(stack))
else
inventory = None
}
}
if (remainingTicks > 0) {