public IvxrPluginContext()
        {
            var seLog = new SeLog(
                Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                "ivxr-plugin",
                alwaysFlush: true
                );

            Log = seLog;

            var configPath   = Path.Combine(MyFileSystem.UserDataPath, CONFIG_FILE);
            var configLoader = new ConfigLoader(Log, new Jsoner(), configPath);
            var config       = configLoader.LoadOrSaveDefault();

            ContinuousMovementController = new ContinuousMovementController(seLog, m_gameSession);

            var se = new RealSpaceEngineers(m_gameSession, Log, config);

            FuncActionDispatcher = new FuncActionDispatcher(seLog);

            JsonRpcStarter = new JsonRpcStarter(
                new SynchronizedSpaceEngineers(se, FuncActionDispatcher),
                hostname: config.Hostname,
                port: config.JsonRpcPort
                )
            {
                Log = Log
            };
        }
Example #2
0
        public IvxrPluginContext(PluginConfig config)
        {
            var seLog = new SeLog(
                Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                "ivxr-plugin",
                alwaysFlush: true
                );

            Log = seLog;

            ContinuousMovementController = new ContinuousMovementController(seLog, m_gameSession);

            var se = new RealSpaceEngineers(m_gameSession, Log, config);

            MethodCallContext = new MethodCallContext(Log);

            JsonRpcStarter = new JsonRpcStarter(
                new SynchronizedSpaceEngineers(se, MethodCallContext),
                hostname: config.Hostname,
                port: config.JsonRpcPort
                )
            {
                Log = Log
            };
        }