示例#1
0
    public Func <Vessel, string[], object> GetAPIHandler(string API)
    {
        if (SimpleValues.ContainsKey(API.ToLowerInvariant()))
        {
            return((v, a) =>
            {
                if (FlightData.GetLastNavUpdateUT() + 0.05 < Planetarium.GetUniversalTime())
                {
                    FlightData.updateNavigationData();
                }
                return SimpleValues[API.ToLowerInvariant()]();
            });
        }

        return(null);
    }