예제 #1
0
        public KSPAPI(FormatterProvider formatters, VesselChangeDetector vesselChangeDetector,
                      Servers.AsynchronousServer.ServerConfiguration serverConfiguration)
        {
            APIHandlers.Add(new PausedDataLinkHandler(formatters));
            APIHandlers.Add(new FlyByWireDataLinkHandler(formatters));
            APIHandlers.Add(new FlightDataLinkHandler(formatters));
            APIHandlers.Add(new MechJebDataLinkHandler(formatters));
            APIHandlers.Add(new TimeWarpDataLinkHandler(formatters));
            APIHandlers.Add(new TargetDataLinkHandler(formatters));

            APIHandlers.Add(new CompoundDataLinkHandler(
                                new List <DataLinkHandler>()
            {
                new OrbitDataLinkHandler(formatters),
                new SensorDataLinkHandler(vesselChangeDetector, formatters),
                new VesselDataLinkHandler(formatters),
                new BodyDataLinkHandler(formatters),
                new ResourceDataLinkHandler(vesselChangeDetector, formatters),
                new APIDataLinkHandler(this, formatters, serverConfiguration),
                new NavBallDataLinkHandler(formatters),
                new MapViewDataLinkHandler(formatters),
                new DockingDataLinkHandler(formatters)
            }, formatters
                                ));

            APIHandlers.Add(new DefaultDataLinkHandler(formatters));
        }
        public void run()
        {
            Servers.AsynchronousServer.ServerConfiguration config = new Servers.AsynchronousServer.ServerConfiguration();
            Telemachus.VesselChangeDetector vesselChangeDetector = new Telemachus.VesselChangeDetector(false);
            Telemachus.KSPAPI api = new Telemachus.KSPAPI(Telemachus.JSONFormatterProvider.Instance, vesselChangeDetector, config);

            List<Telemachus.APIEntry> apiList = new List<Telemachus.APIEntry>();
            api.getAPIList(ref apiList);

            writeToMarkdownWiki(Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName, "Telemachus.wiki"),
                "API-String.md", ref apiList);
        }
예제 #3
0
        public void run()
        {
            Servers.AsynchronousServer.ServerConfiguration config = new Servers.AsynchronousServer.ServerConfiguration();
            Telemachus.VesselChangeDetector vesselChangeDetector  = new Telemachus.VesselChangeDetector(false);
            Telemachus.KSPAPI api = new Telemachus.KSPAPI(Telemachus.JSONFormatterProvider.Instance, vesselChangeDetector, config);

            List <Telemachus.APIEntry> apiList = new List <Telemachus.APIEntry>();

            api.getAPIList(ref apiList);

            writeToMarkdownWiki(Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName, "Telemachus.wiki"),
                                "API-String.md", ref apiList);
        }
예제 #4
0
 public DummyKSPAPI(FormatterProvider formatters, VesselChangeDetector vesselChangeDetector,
                    Servers.AsynchronousServer.ServerConfiguration serverConfiguration)
 {
     APIHandlers.Add(new DummyHandler(formatters));
 }
예제 #5
0
 public DataLinkResponsibility(Servers.AsynchronousServer.ServerConfiguration serverConfiguration, IKSPAPI kspAPI)
 {
     this.kspAPI = kspAPI;
 }