This commit is contained in:
DBotThePony 2023-01-14 14:29:33 +07:00
parent 1365ac445a
commit 87276e22ed
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -88,10 +88,10 @@ interface IMatteryEnergyStorage : IEnergyStorage {
fun receiveEnergyChecked(howMuch: Decimal, simulate: Boolean): Decimal {
require(!howMuch.isNegative) { "Negative amount of energy: $howMuch" }
if (!energyFlow.output)
if (!energyFlow.input)
return Decimal.ZERO
return extractEnergy(howMuch, simulate)
return receiveEnergy(howMuch, simulate)
}
/**