public double supplyFNResourcePerSecond(double supply, String resourcename)
        {
            ResourceManager manager = getManagerForVessel(resourcename);

            if (manager == null)
            {
                return(0);
            }

            return(manager.powerSupplyPerSecond(this, Math.Max(supply, 0)));
        }
        public double supplyFNResourcePerSecond(double supply, String resourcename)
        {
            if (supply.IsInfinityOrNaN() || String.IsNullOrEmpty(resourcename))
            {
                Debug.LogError("[KSPI]: supplyFNResourcePerSecond  was called with illegal value");
                return(0);
            }

            ResourceManager manager = getManagerForVessel(resourcename);

            if (manager == null)
            {
                return(0);
            }

            return(manager.powerSupplyPerSecond(this, Math.Max(supply, 0)));
        }
Example #3
0
        public double supplyFNResourcePerSecond(double supply, String resourcename)
        {
            if (double.IsNaN(supply) || String.IsNullOrEmpty(resourcename))
            {
                Debug.Log("[KSPI] - supplyFNResourcePerSecond illegal values.");
                return(0);
            }

            ResourceManager manager = getManagerForVessel(resourcename);

            if (manager == null)
            {
                return(0);
            }

            return(manager.powerSupplyPerSecond(this, Math.Max(supply, 0)));
        }