void Start() { FARSettingsScenarioModule.MainMenuBuildDefaultScenarioModule(); this.enabled = false; FARLogger.Info(string.Format("Unity engine version '{0}'.", Application.unityVersion)); }
public static void MainMenuBuildDefaultScenarioModule() { if (instance == null) { instance = new FARSettingsScenarioModule(); Debug.Log("Creating new setting module for tutorial/scenario"); instance.OnLoad(new ConfigNode()); } }
public static void MainMenuBuildDefaultScenarioModule() { if (Instance != null) return; Instance = new GameObject().AddComponent<FARSettingsScenarioModule>(); FARLogger.Info("Creating new setting module for tutorial/scenario"); Instance.OnLoad(new ConfigNode()); Instance.Start(); }
private void Start() { FARSettingsScenarioModule module = FARSettingsScenarioModule.Instance; if (module == null) { Debug.LogError("FARSettingsScenarioModule could not be found. Unable to start FAR aerodynamics"); } this.enabled = false; }
private void Start() { Instance = this; FARLogger.Info("Vehicle Voxel Setup started"); FARAeroSection.GenerateCrossFlowDragCurve(); VehicleVoxel.VoxelSetup(); PhysicsGlobals.DragCubeMultiplier = 0; FARLogger.Info("Vehicle Voxel Setup complete"); newGame = false; }
private void Start() { if (!CompatibilityChecker.IsAllCompatible()) { enabled = false; return; } Instance = this; FARLogger.Info("Vehicle Voxel Setup started"); FARAeroSection.GenerateCrossFlowDragCurve(); VehicleVoxel.VoxelSetup(); PhysicsGlobals.DragCubeMultiplier = 0; FARLogger.Info("Vehicle Voxel Setup complete"); newGame = false; }
void Start() { if (!CompatibilityChecker.IsAllCompatible()) { this.enabled = false; return; } instance = this; //if (newGame) // PopupDialog.SpawnPopupDialog("Ferram Aerospace Research", "Welcome to KSP with FAR!\n\r\n\rThings will be much harder from here on out; the FAR button in the top-right corner will bring you to difficulty settings if you ever decide to change them. Have fun!", "OK", false, HighLogic.Skin); FARLogger.Info("Vehicle Voxel Setup started"); FerramAerospaceResearch.FARAeroComponents.FARAeroSection.GenerateCrossFlowDragCurve(); VehicleVoxel.VoxelSetup(); PhysicsGlobals.DragCubeMultiplier = 0; FARLogger.Info("Vehicle Voxel Setup complete"); //GameEvents.onGameStateSave.Add(OnSave); newGame = false; }
void Start() { FARSettingsScenarioModule.MainMenuBuildDefaultScenarioModule(); this.enabled = false; }
public override void OnLoad(ConfigNode node) { Instance = this; GeneratePresets(); int index = 4; if (node.HasValue("newGame")) { newGame = bool.Parse(node.GetValue("newGame")); } if (node.HasValue("index")) { index = int.Parse(node.GetValue("index")); } dropdown = new GUIDropDown <FARDifficultyAndExactnessSettings>(presetNames.ToArray(), presets.ToArray(), index < 0 ? 2 : index); voxelSettings = new FARVoxelSettings(); if (node.HasValue("numVoxelsControllableVessel")) { voxelSettings.numVoxelsControllableVessel = int.Parse(node.GetValue("numVoxelsControllableVessel")); } if (node.HasValue("numVoxelsDebrisVessel")) { voxelSettings.numVoxelsDebrisVessel = int.Parse(node.GetValue("numVoxelsDebrisVessel")); } if (node.HasValue("minPhysTicksPerUpdate")) { voxelSettings.minPhysTicksPerUpdate = int.Parse(node.GetValue("minPhysTicksPerUpdate")); } if (node.HasValue("useHigherResVoxelPoints")) { voxelSettings.useHigherResVoxelPoints = bool.Parse(node.GetValue("useHigherResVoxelPoints")); } if (node.HasValue("use32BitIndices")) { DebugVoxelMesh.Use32BitIndices = bool.Parse(node.GetValue("use32BitIndices")); } if (index == -1) { settings = new FARDifficultyAndExactnessSettings(index); if (node.HasValue("fractionTransonicDrag")) { settings.fractionTransonicDrag = double.Parse(node.GetValue("fractionTransonicDrag")); } if (node.HasValue("gaussianVehicleLengthFractionForSmoothing")) { settings.gaussianVehicleLengthFractionForSmoothing = double.Parse(node.GetValue("gaussianVehicleLengthFractionForSmoothing")); } if (node.HasValue("numAreaSmoothingPasses")) { settings.numAreaSmoothingPasses = int.Parse(node.GetValue("numAreaSmoothingPasses")); } if (node.HasValue("numDerivSmoothingPasses")) { settings.numDerivSmoothingPasses = int.Parse(node.GetValue("numDerivSmoothingPasses")); } customSettings = settings; } else { settings = presets[index]; customSettings = new FARDifficultyAndExactnessSettings(-1); } currentIndex = index; FARLogger.Info("Loading FAR Data"); flightGUISettings = new List <ConfigNode>(); if (node.HasNode("FlightGUISettings")) { foreach (ConfigNode flightGUINode in node.GetNode("FlightGUISettings").nodes) { flightGUISettings.Add(flightGUINode); } } FARDebugAndSettings.LoadConfigs(node); }
FARSettingsScenarioModule() { instance = this; }