void init() { if (!TCA_Active) { return; } updateCFG(); VSL = new VesselWrapper(this); EnableTCA(VSL.Engines.All.Count > 0 || VSL.Engines.RCS.Count > 0 || VSL.Torque.Wheels.Count > 0); if (!TCA_Active) { VSL = null; return; } VSL.Init(); TCAModulesDatabase.InitModules(this); VSL.ConnectAutopilotOutput();//should follow module initialization vessel.OnPreAutopilotUpdate += OnPreAutopilotUpdate; vessel.OnPostAutopilotUpdate += OnPostAutopilotUpdate; TCAGui.Reinitialize(this); StartCoroutine(updateUnpackDistance()); Actions["onActionUpdate"].active = true; Actions["ToggleTCA"].actionGroup = CFG.ActionGroup; CFG.Resume(this); }
void init() { if (!enabled) { return; } updateCFG(); VSL = new VesselWrapper(this); enable_module(VSL.Engines.All.Count > 0 || VSL.Engines.RCS.Count > 0); if (!enabled) { VSL = null; return; } VSL.Init(); TCAModulesDatabase.InitModules(this); VSL.ConnectAutopilotOutput(); //should follow module initialization TCAGui.AttachTCA(this); StartCoroutine(updateUnpackDistance()); Actions["onActionUpdate"].active = true; Actions["ToggleTCA"].actionGroup = CFG.ActionGroup; CFG.Resume(this); }