You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your FuelPowerPlant, you retrurn cachedPowerOutput for DesiredPowerOutput. The problem is that cachedPowerOutput only gets set when the generator is running, which means that if backup power is applied to a generator that is not currently running, it thinks the generator cannot produce anything. Manually toggling the generator once populates cachedPowerOutput, and fixes the problem.
Solution:
I think you're overcomplicating DesiredPowerOutput. Vanilla uses this for power plants with varying outputs, e.g. wind/solar/water, and updates them per tick. For generators that have a constant output (when on) it simply sets it to that;
I don't think you're using variable outputs, so I don't see why you need to override DesiredPowerOutput at all. If you do want to use variable outputs, please update DesiredPowerOutput to reflect the current possible maximum, and use PowerOutput to reflect what is actually generated. This would bring your values in line with vanilla logic, and allow BackupPower to function with your generators, without altering how your generators function.
The text was updated successfully, but these errors were encountered:
Description;
In your
FuelPowerPlant
, you retrurncachedPowerOutput
forDesiredPowerOutput
. The problem is thatcachedPowerOutput
only gets set when the generator is running, which means that if backup power is applied to a generator that is not currently running, it thinks the generator cannot produce anything. Manually toggling the generator once populates cachedPowerOutput, and fixes the problem.Solution:
I think you're overcomplicating
DesiredPowerOutput
. Vanilla uses this for power plants with varying outputs, e.g. wind/solar/water, and updates them per tick. For generators that have a constant output (when on) it simply sets it to that;I don't think you're using variable outputs, so I don't see why you need to override
DesiredPowerOutput
at all. If you do want to use variable outputs, please updateDesiredPowerOutput
to reflect the current possible maximum, and usePowerOutput
to reflect what is actually generated. This would bring your values in line with vanilla logic, and allow BackupPower to function with your generators, without altering how your generators function.The text was updated successfully, but these errors were encountered: