示例#1
0
        public SpaceEngineersCore()
        {
            var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            MyPlugins.RegisterGameObjectBuildersAssemblyFile(Path.Combine(path, "SpaceEngineers.ObjectBuilders.dll"));
            MyPlugins.RegisterSandboxAssemblyFile(Path.Combine(path, "Sandbox.Common.dll"));

            SpaceEngineersApi.LoadLocalization();
            _stockDefinitions = new SpaceEngineersResources();
            _stockDefinitions.LoadDefinitions();
            _manageDeleteVoxelList = new List<string>();
        }
示例#2
0
        public SpaceEngineersCore()
        {
            var contentPath = ToolboxUpdater.GetApplicationContentPath();
            string userDataPath = SpaceEngineersConsts.BaseLocalPath.DataPath;

            MyFileSystem.Reset();
            MyFileSystem.Init(contentPath, userDataPath);

            MyLog.Default = MySandboxGame.Log;
            MySandboxGame.Config = new MyConfig("SpaceEngineers.cfg"); // TODO: Is specific to SE, not configurable to ME.
            MySandboxGame.Config.Load();

            MyFileSystem.InitUserSpecific(null);
            SpaceEngineersGame.SetupPerGameSettings();

            VRageRender.MyRenderProxy.Initialize(new MyNullRender());
            // We create a whole instance of MySandboxGame!
            MySandboxGame gameTemp = new MySandboxGame(null, null);

            SpaceEngineersApi.LoadLocalization();
            _stockDefinitions = new SpaceEngineersResources();
            _stockDefinitions.LoadDefinitions();
            _manageDeleteVoxelList = new List<string>();
        }