public bool PartIsKosProc(Part input, out kOSProcessor proc) { foreach (var processor in input.Modules.OfType <kOSProcessor>()) { proc = processor; return(true); } proc = null; return(false); }
public bool PartIsKosProc(Part input, out kOSProcessor proc) { foreach (var processor in input.Modules.OfType<kOSProcessor>()) { proc = processor; return true; } proc = null; return false; }
public ProcessorConnection(kOSProcessor processor, SharedObjects shared) : base() { this.shared = shared; this.processor = processor; }
public kOSProcessorFields(kOSProcessor processor, SharedObjects sharedObj) : base(processor, sharedObj) { this.processor = processor; InitializeSuffixes(); }
/// <summary> /// Connect this TelnetSingletonServer to a CPU to start acting as its terminal. /// </summary> /// <param name="processor">The kOSProcessor PartModule to attach to</param> public void ConnectToProcessor(kOSProcessor processor) { ConnectedProcessor = processor; ConnectedProcessor.GetScreen().SetSize(ClientHeight, ClientWidth); // Reset the GUI terminal to match the telnet window. ConnectedProcessor.GetWindow().AttachTelnet(this); // Tell the GUI window that I am one of its telnets now (even when closed, it still does the heavy lifting). ConnectedProcessor.GetWindow().SendTitleToTelnet(this); ConnectedProcessor.GetWindow().RepaintTelnet(this, true); // Need to start with a full paint of the terminal. }