public bool GetFormationLeaderSetting_bool(string key = null) { bool is_ = false; if (key != null) { ImpulseVesselType leader = null; foreach (KeyValuePair <string, ImpulseVesselType> pair in this.ImpulseVesselList) { if (pair.Value.is_formationMode_enabled) { leader = pair.Value; } } switch (key) { case "is_fullHalt_enabled": is_ = leader.is_fullHalt_enabled; break; case "is_MakeSlowToSave_enabled": is_ = leader.is_MakeSlowToSave_enabled; break; case "is_fullImpulse_enabled": is_ = leader.is_fullImpulse_enabled; break; case "is_UseReserves_enabled": is_ = leader.is_UseReserves_enabled; break; case "is_accelerationLock_enabled": is_ = leader.is_accelerationLock_enabled; break; case "is_pilotMode_enabled": is_ = leader.is_pilotMode_enabled; break; case "is_holdspeed_enabled": is_ = leader.is_holdspeed_enabled; break; case "is_holdheight_enabled": is_ = leader.is_holdheight_enabled; break; } } return(is_); }
public ImpulseVesselType AddImpulseVessel(string key) { if (!this.ImpulseVesselList.ContainsKey(key)) { ImpulseVesselType activeImpulseVessel = new ImpulseVesselType(); this.ImpulseVesselList.Add(key, activeImpulseVessel); return(activeImpulseVessel); } else { return(this.ImpulseVesselList[key]); } }
public void print_stats(string called_by) { UnityEngine.Debug.Log("================================================================"); UnityEngine.Debug.Log("ImpulseDrive: ImpulseVessel_manager print_stats:"); UnityEngine.Debug.Log("number of items in List: " + this.ImpulseVesselList.Count); UnityEngine.Debug.Log("called_by: " + called_by); foreach (KeyValuePair <string, ImpulseVesselType> pair in this.ImpulseVesselList) { IVship = pair.Value; UnityEngine.Debug.Log("-------------------------"); UnityEngine.Debug.Log("ship: " + IVship.pid); UnityEngine.Debug.Log("name: " + IVship.name); UnityEngine.Debug.Log("windowPosition: " + IVship.windowPosition.ToString()); UnityEngine.Debug.Log("geeVector: " + IVship.geeVector.ToString()); UnityEngine.Debug.Log("is_active_vessel: " + IVship.is_active_vessel.ToString()); UnityEngine.Debug.Log("is_gravity_enabled: " + IVship.is_gravity_enabled.ToString()); UnityEngine.Debug.Log("is_fullHalt_enabled: " + IVship.is_fullHalt_enabled.ToString()); UnityEngine.Debug.Log("is_MakeSlowToSave_enabled: " + IVship.is_MakeSlowToSave_enabled.ToString()); UnityEngine.Debug.Log("is_fullImpulse_enabled: " + IVship.is_fullImpulse_enabled.ToString()); UnityEngine.Debug.Log("is_UseReserves_enabled: " + IVship.is_UseReserves_enabled.ToString()); UnityEngine.Debug.Log("is_accelerationLock_enabled: " + IVship.is_accelerationLock_enabled.ToString()); UnityEngine.Debug.Log("is_pilotMode_enabled: " + IVship.is_pilotMode_enabled.ToString()); UnityEngine.Debug.Log("is_formationMode_enabled: " + IVship.is_formationMode_enabled.ToString()); UnityEngine.Debug.Log("is_ignoreformationcommandos_enabled: " + IVship.is_ignoreformationcommandos_enabled.ToString()); UnityEngine.Debug.Log("is_holdspeed_enabled: " + IVship.is_holdspeed_enabled.ToString()); UnityEngine.Debug.Log("HoldSpeed_value: " + IVship.HoldSpeed_value); UnityEngine.Debug.Log("is_holdheight_enabled: " + IVship.is_holdheight_enabled.ToString()); UnityEngine.Debug.Log("HoldHeight_value: " + IVship.HoldHeight_value); } Vessel activeVessel = FlightGlobals.ActiveVessel; string ActiveVessel_pid = activeVessel.id.ToString(); UnityEngine.Debug.Log("activeVessel.Landed: (" + ActiveVessel_pid + ") " + activeVessel.Landed); UnityEngine.Debug.Log("Vessel.GetSituationString(activeVessel): (" + ActiveVessel_pid + ") " + Vessel.GetSituationString(activeVessel)); UnityEngine.Debug.Log("================================================================"); }