shadowmage45/SSTULabs

SSTUSolarPanelDeployable - SSTUResourceBoiloff - Public Accessible 'EC In/Out' methods

shadowmage45 opened this issue · 4 comments

Allow for external mods to query for the resource costs/generation from these part-modules.

Returned values should reflect the maximum (nominal) values for the current part configuration in cases where parts can be modified.

  • Boiloff should return the maximum EC/s consumed for full storage tanks
  • Solar panel should return the nominal EC output for fully-lit panels in orbit of Kerbin/reference distance and temperature.

Modules that need hooks:

  • SSTUModularPart - Solar Panel
  • SSTUSolarPanelDeployable
  • SSTUSolarPanelStatic
  • SSTUResourceBoiloff

Implemented for ModularPart in dev --

/// <summary>
/// Nominal output of the solar panels; 100% thermal efficiency at Kerbin orbit distance from sun (1 KAU). This value is set when
/// the part is initialied and updated any time solar panel layout is changed. Can be queried in the editor or flight scene to
/// determine the current -nominal- EC output of solar panels.
/// </summary>
[KSPField(isPersistant = true)]
public float nominalSolarOutput = 0f;

Implemented in SolarPanelDeployable --

/// <summary>
/// Nominal output of the solar panels; 100% thermal efficiency at Kerbin orbit distance from sun (1 KAU). This value is set when
/// the part is initialied and updated any time solar panel layout is changed. Can be queried in the editor or flight scene to
/// determine the current -nominal- EC output of solar panels.
/// </summary>
[KSPField(isPersistant = true)]
public float nominalSolarOutput = 0f;

Already implemented in SolarPanelStatic

[KSPField(isPersistant = false)]
public float resourceAmount = 3.0f;

Implemented for ResourceBoiloff:

/// <summary>
/// The nominal EC cost for the currently configured container. This is the cooling cost with full tanks of the currently selected resources,
/// with the currently selected tank type.
/// </summary>
[KSPField(guiActive = false, guiActiveEditor = false)]
public float nominalECCost = 0f;