public void DeactivateAllGroup(LBMechanicBase mech)
        {
            string g = FindGroup(mech);

            if (g == "")
            {
                return;
            }

            DeactivateAllGroup(g);
        }
        //Find active mechanic in a group, where <mech> is nested (for groups with exclusive activation)
        public LBMechanicBase FindActiveMechanic(LBMechanicBase mech)
        {
            string group = FindGroup(mech);

            if (group == "")
            {
                return(null);
            }

            return(FindActiveMechanic(group));
        }
        public void ActivateMechanic(string group, string name)
        {
            LBMechanicBase m = FindMechanic(group, name);

            if (m == null)
            {
                return;
            }

            if (m.CanActivateMechanic())
            {
                m.ActivateMechanic();
            }
        }
        public string FindGroup(LBMechanicBase mech)
        {
            int i, j;

            for (i = 0; i < MechanicGroups.Length; i++)
            {
                for (j = 0; j < MechanicGroups[i].Mechanics.Length; j++)
                {
                    if (MechanicGroups [i].Mechanics [j] == mech)
                    {
                        return(MechanicGroups [i].GroupName);
                    }
                }
            }

            return("");
        }