public override void OnAwake() { Debug.Log($"{ModTag} Started"); VesselModuleManager.RemoveModuleOfType(typeof(CommNet.CommNetVessel)); if (GetCommNetScenarioModule() is ProtoScenarioModule psm && !CommNetPatched(psm)) { Debug.Log($"{ClassName} Patching out CommNetScenario"); UnloadCommNet(psm); } }
private void Start() { var fiw = VesselModuleManager.GetWrapper(typeof(FlightIntegrator)); if (fiw != null && fiw.active) { print("[MFIManager] FlightIntegrator is active. Deactivating it"); VesselModuleManager.SetWrapperActive(typeof(FlightIntegrator), false); } // Should we display this only if we deactivated the stock FI ? string msg = "[MFIManager] Current active VesselModule : \n"; foreach (var vesselModuleWrapper in VesselModuleManager.GetModules(false, false)) { msg += " " + vesselModuleWrapper.type.ToString() + " active=" + vesselModuleWrapper.active + " order=" + vesselModuleWrapper.order + "\n"; } print(msg); }
private void Start() { VesselModuleManager.VesselModuleWrapper fiw = VesselModuleManager.GetWrapper(typeof(FlightIntegrator)); if (fiw != null && fiw.active) { Log.detail("[MFIManager] FlightIntegrator is active. Deactivating it"); VesselModuleManager.SetWrapperActive(typeof(FlightIntegrator), false); } // Should we display this only if we deactivated the stock FI ? string msg = "[MFIManager] Current active VesselModule : \n"; foreach (VesselModuleManager.VesselModuleWrapper vesselModuleWrapper in VesselModuleManager.GetModules(false, false)) { msg += "[MFIManager] " + vesselModuleWrapper.type.ToString() + " active=" + vesselModuleWrapper.active + " order=" + vesselModuleWrapper.order + "\n"; } Log.detail(msg); GameEvents.onVesselPrecalcAssign.Add(AddModularPrecalc); }