public override void UpdateMachine(SegmentEntity targetEntity) { QuantumIoPortMachine ioPort = targetEntity as QuantumIoPortMachine; if (ioPort == null) { GenericMachinePanelScript.instance.Hide(); UIManager.RemoveUIRules("Machine"); return; } if (ItemSearch) { if (QuantumIoPortItemSearch.UpdateMachine((BaseMachineWindow)this)) { Dirty = true; return; } } else { if (ioPort.GetController().GetItems().Count != SlotCount) { Redraw(targetEntity); Dirty = true; return; } else { WindowUpdate(ioPort.GetController()); } } Dirty = false; }