pellinor0 / TweakScale

Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
29 stars 23 forks source link

[NF-solar] power of curved solar panels #6

Open pellinor0 opened 9 years ago

pellinor0 commented 9 years ago

Power generation does not scale. This is the exponent I use:

TWEAKSCALEEXPONENTS:NEEDS[NearFutureSolar]
{
    name = ModuleCurvedSolarPanel
    TotalEnergyRate = 2
}
pellinor0 commented 9 years ago

I had a look in https://github.com/ChrisAdderley/NearFutureSolar/blob/master/ModuleCurvedSolarPanel.cs

The problem seems to be that TotalEnergyRate is used only once to calculate chargePerTransform, probably this is done before TweakScale tries to scale it. chargePerTransform can not be scaled because it is not a kspField.

In my opinion this is best solved in NF-Solar, by evaluating TotalEnergyRate directly in the fixedUpdate method.

EDIT: I am working on a pull request for NF-Solar