public RemoteCore(Vessel v, float energyDrain)
{
if (v == null) return;
vessel = v;
this.EnergyDrain = energyDrain;
settings = new SatSettings(this);
computer = new FlightComputer(this);
flightComputerGUI = new FlightComputerGUI(this);
Rnode = new RelayNode(vessel);
try
{
vessel.OnFlyByWire -= new FlightInputCallback(this.drive);
}
catch { }
try
{
vessel.OnFlyByWire += new FlightInputCallback(this.drive);
}
catch { }
GetCommandPath();
UpdateOtherModules();
planetariumCamera = (PlanetariumCamera)GameObject.FindObjectOfType(typeof(PlanetariumCamera));
obj = new GameObject("Line");
line = null;
obj.layer = 9;
line = obj.AddComponent<LineRenderer>();
line.useWorldSpace = true;
line.material = new Material(Shader.Find("Particles/Additive"));
line.SetColors(Color.blue, Color.blue);
line.SetWidth(0, 0);
localControl = vessel.GetCrewCount() > 0 || MechJeb;
}