private void AddToGUIUpdateList(bool addLinkedHUDs) { if (Screen.Selected is SubEditorScreen) { if (editingHUD != null && editingHUD.UserData == this) { editingHUD.AddToGUIUpdateList(); } } else { if (HasInGameEditableProperties) { if (editingHUD != null && editingHUD.UserData == this) { editingHUD.AddToGUIUpdateList(); } } } if (Character.Controlled != null && Character.Controlled?.SelectedConstruction != this) { return; } bool needsLayoutUpdate = false; foreach (ItemComponent ic in activeHUDs) { if (!ic.CanBeSelected) { continue; } bool useAlternativeLayout = ic.Item != this; bool wasUsingAlternativeLayout = ic.UseAlternativeLayout; ic.UseAlternativeLayout = useAlternativeLayout; needsLayoutUpdate |= ic.UseAlternativeLayout != wasUsingAlternativeLayout; ic.AddToGUIUpdateList(); } if (itemInUseWarning != null && itemInUseWarning.Visible) { itemInUseWarning.AddToGUIUpdateList(); } if (needsLayoutUpdate) { SetHUDLayout(); } }