Fix dynamic power draw, fix power consumption

This commit is contained in:
2023-07-16 02:34:55 -05:00
parent 03eb532d7e
commit fdb9c7537e
5 changed files with 6 additions and 2 deletions

View File

@@ -29,6 +29,7 @@
<li Class="CompProperties_Power">
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>480</basePowerConsumption>
<idlePowerDraw>150</idlePowerDraw>
</li>
<li Class="CompProperties_Flickable" />
</comps>

View File

@@ -32,6 +32,7 @@
<li Class="CompProperties_Power">
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>750</basePowerConsumption>
<idlePowerDraw>150</idlePowerDraw>
</li>
<li Class="CompProperties_Flickable" />
</comps>

View File

@@ -33,6 +33,7 @@
<li Class="CompProperties_Power">
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>2200</basePowerConsumption>
<idlePowerDraw>150</idlePowerDraw>
</li>
<li Class="CompProperties_Flickable" />
</comps>

View File

@@ -32,6 +32,7 @@
<li Class="CompProperties_Power">
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>1500</basePowerConsumption>
<idlePowerDraw>150</idlePowerDraw>
</li>
<li Class="CompProperties_Flickable" />
</comps>

View File

@@ -25,10 +25,10 @@ namespace HydroponicsExpanded {
switch (value) {
case HydroponicsStage.Sowing:
case HydroponicsStage.Harvest:
_compPowerTrader.PowerOutput = _compPowerTrader.Props.idlePowerDraw;
_compPowerTrader.PowerOutput = -_compPowerTrader.Props.idlePowerDraw;
break;
case HydroponicsStage.Grow:
_compPowerTrader.PowerOutput = _compPowerTrader.Props.PowerConsumption;
_compPowerTrader.PowerOutput = -_compPowerTrader.Props.PowerConsumption;
break;
default:
throw new ArgumentOutOfRangeException();