private void disableAndLockForActionSequence(GameObject overrideObject = null) { bool flag = true; if (overrideObject != null) { ButtonDisablerOverride component = overrideObject.GetComponent <ButtonDisablerOverride>(); if (component != null && component.buttonsToOverride.Length > 0) { TrayInputButtonDisabler componentInParent = GetComponentInParent <TrayInputButtonDisabler>(); string[] buttonsToOverride = component.buttonsToOverride; foreach (string text in buttonsToOverride) { if (text == componentInParent.UIElementID) { flag = false; break; } } } } if (flag && !inputButton.IsLocked) { inputButton.Lock(TrayInputButton.ButtonState.Disabled); isLockedByActionSequence = true; } }