public double supplyFNResourceFixed(double supply, String resourcename) { ResourceManager manager = getManagerForVessel(resourcename); if (manager == null) { return(0); } return(manager.powerSupplyFixed(this, Math.Max(supply, 0))); }
public double supplyFNResourceFixed(double supply, String resourcename) { if (supply.IsInfinityOrNaN() || String.IsNullOrEmpty(resourcename)) { Debug.LogError("[KSPI]: supplyFNResourceFixed was called with illegal value"); return(0); } ResourceManager manager = getManagerForVessel(resourcename); if (manager == null) { return(0); } return(manager.powerSupplyFixed(this, Math.Max(supply, 0))); }
public double supplyFNResourceFixed(double supply, String resourcename) { if (double.IsNaN(supply) || String.IsNullOrEmpty(resourcename)) { Debug.Log("[KSPI] - supplyFNResourceFixed illegal values."); return(0); } ResourceManager manager = getManagerForVessel(resourcename); if (manager == null) { return(0); } return(manager.powerSupplyFixed(this, Math.Max(supply, 0))); }