Fix powered component power consumption being invalid
This commit is contained in:
parent
ba17a812e3
commit
9dc98b332a
@ -263,7 +263,7 @@ open class PoweredComponent<T : IStorageStack>(open val parent: IStorageComponen
|
||||
}
|
||||
|
||||
if (!simulate) {
|
||||
val requiredNew = storageType.energyPerOperation * stack.count - leftover.count
|
||||
val requiredNew = storageType.energyPerOperation * (stack.count - leftover.count)
|
||||
energy.extractEnergyInner(requiredNew, false)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user