Skip to content

Commit

Permalink
fixed battery buffers consuming power when full
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Dec 15, 2023
1 parent 3f0bd03 commit 664c937
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public long insertEu(long voltage, boolean simulate) {
}
return superInsert + loss;
}
return insertInternal(voltage, simulate) + loss;
long internalInsert = insertInternal(voltage, simulate);
return internalInsert > 0 ? internalInsert + loss : 0;
}

public long insertInternal(long energy, boolean simulate) {
Expand Down

0 comments on commit 664c937

Please sign in to comment.