コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }