private double maxSpeedBase; // maximum speed without modifiers #endregion /// <summary> /// Constructor /// </summary> /// <param name="v"></param> /// <param name="module"></param> internal KerbalController(Vessel v, ConfigNode module) : base(v, module) { // Load values from config if it isn't the first run of the mod (we are reseting vessel on the first run) if (!Configuration.FirstRun) { averageSpeed = double.Parse(BVModule.GetValue("averageSpeed") != null ? BVModule.GetValue("averageSpeed") : "0"); vesselHeightFromTerrain = double.Parse(BVModule.GetValue("vesselHeightFromTerrain") != null ? BVModule.GetValue("vesselHeightFromTerrain") : "0"); } maxSpeedBase = 0.5; }
/// <summary> /// Constructor /// </summary> /// <param name="v"></param> /// <param name="module"></param> internal ShipController(Vessel v, ConfigNode module) : base(v, module) { // Load values from config if it isn't the first run of the mod (we are reseting vessel on the first run) if (!Configuration.FirstRun) { averageSpeed = double.Parse(BVModule.GetValue("averageSpeed") != null ? BVModule.GetValue("averageSpeed") : "0"); averageSpeedAtNight = double.Parse(BVModule.GetValue("averageSpeedAtNight") != null ? BVModule.GetValue("averageSpeedAtNight") : "0"); manned = bool.Parse(BVModule.GetValue("manned") != null ? BVModule.GetValue("manned") : "false"); vesselHeightFromTerrain = double.Parse(BVModule.GetValue("vesselHeightFromTerrain") != null ? BVModule.GetValue("vesselHeightFromTerrain") : "0"); } speedMultiplier = 1.0; angle = 0; maxSpeedBase = 0; crewSpeedBonus = 0; }
/// <summary> /// Constructor /// </summary> /// <param name="v"></param> /// <param name="module"></param> internal RoverController(Vessel v, ConfigNode module) : base(v, module) { // Load values from config averageSpeed = double.Parse(BVModule.GetValue("averageSpeed") != null ? BVModule.GetValue("averageSpeed") : "0"); averageSpeedAtNight = double.Parse(BVModule.GetValue("averageSpeedAtNight") != null ? BVModule.GetValue("averageSpeedAtNight") : "0"); manned = bool.Parse(BVModule.GetValue("manned") != null ? BVModule.GetValue("manned") : "false"); vesselHeightFromTerrain = double.Parse(BVModule.GetValue("vesselHeightFromTerrain") != null ? BVModule.GetValue("vesselHeightFromTerrain") : "0"); speedMultiplier = 1.0; angle = 0; electricPower_Solar = 0; electricPower_Other = 0; requiredPower = 0; maxSpeedBase = 0; wheelsPercentualModifier = 0; crewSpeedBonus = 0; }