public override string GetInfo()
{
int defaultAvgInstructions = 200;
string format =
"Default disk capacity: {0}\n\n" +
"<color=#99ff00ff>Requires:</color>\n" +
" - ElectricCharge: {1}\n" +
"<color=#99ff00ff>Example:</color>\n" +
" - {2:N3}EC/s if IPU={3} and no wait instructions.";
// For the sake of GetInfo, prorate the EC usage based on the smallest physics frame currently selected
// Because this is called before the part is set, we need to manually calculate it instead of letting Update handle it.
double power = diskSpace * ECPerBytePerSecond + defaultAvgInstructions * ECPerInstruction / Time.fixedDeltaTime;
string chargeText = (ECPerInstruction == 0) ?
"None. It's powered by pure magic ... apparently." : // for cheaters who use MM or editing part.cfg, to get rid of it.
string.Format("1 per {0} instructions executed", (int)(1 / ECPerInstruction));
return string.Format(format, diskSpace, chargeText, power, defaultAvgInstructions);
}