Skip to content

Commit

Permalink
release v2.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffierThanThou committed Jul 31, 2021
1 parent 1fce8fc commit 4c95ce9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Binary file modified Assemblies/BackupPower.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions Source/MapComponent_PowerBroker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void PowerNetUpdate(PowerNet net, HashSet<Building_BackupPowerAttachment>

// Log.Debug( $"need: {need}, production: {production}, static: {staticProduction}" );

if (production > need || hasStorage && storageLevel > 0) {
if (production > need || (hasStorage && storageLevel > 0)) {
// try to shut backups off
List<(CompPowerTrader comp, Building_BackupPowerAttachment broker, float consumption, float currentProduction, float potentialProduction)> backups = users.Where( u => u.broker != null
&& u.currentProduction > 0
Expand All @@ -135,7 +135,7 @@ public void PowerNetUpdate(PowerNet net, HashSet<Building_BackupPowerAttachment>
}
}

if (production < need || hasStorage && storageLevel < 1) {
if (production < need || (hasStorage && storageLevel < 1)) {
// try to turn backups on
List<(CompPowerTrader comp, Building_BackupPowerAttachment broker, float consumption, float currentProduction, float potentialProduction)> backups = users.Where( u => u.broker != null
&& Math.Abs( u.currentProduction ) < Mathf.Epsilon
Expand Down
1 change: 1 addition & 0 deletions Source/preview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"url": "https://github.com/fluffy-mods/BackupPower",
"version": {
"major": 2,
"minor": 0,
"build": 6
"minor": 1,
"build": 7
},
"author": {
"name": "Fluffy",
Expand All @@ -19,6 +19,15 @@
"url": "https://github.com/fluffy-mods/BackupPower"
},
"changelog": [
{
"date": "2021-07-31T14:35:52.000Z",
"message": "red squiglies, update project",
"author": {
"name": "Fluffy",
"email": "[email protected]"
},
"hash": "1fce8fcccbb9e15a3bbc961f100ff7d7f41cf6a1"
},
{
"date": "2021-06-03T06:12:08.000Z",
"message": "Create BackupPower.xml",
Expand Down

0 comments on commit 4c95ce9

Please sign in to comment.