public Notes_CrewObject(ProtoCrewMember c, Notes_CrewPart r)
 {
     crew = c;
     root = r;
     profIcon = assignPIcon(crew.experienceTrait);
     levelIcon = assignLIcon(crew.experienceLevel);
 }
 public Notes_CrewObject(ProtoCrewMember c, Notes_Archived_Crew_Container r)
 {
     crew = c;
     root = null;
     archive_Root = r;
     profIcon = assignPIcon(crew.experienceTrait);
     levelIcon = assignLIcon(crew.experienceLevel);
 }
        protected override void updateValidParts()
        {
            if (validParts.Count <= 0)
                return;

            for (int i = 0; i < validParts.Count; i++)
            {
                Part p = validParts[i];

                if (p == null)
                    continue;

                Notes_CrewPart n = getCrewNotes(p.flightID);

                if (n == null)
                    n = new Notes_CrewPart(p, this);

                n.clearCrew();

                for (int j = 0; j < p.protoModuleCrew.Count; j++)
                {
                    ProtoCrewMember c = p.protoModuleCrew[j];

                    if (c == null)
                        continue;

                    n.addPartCrew(c);
                }

                if (n.CrewCount > 0)
                {
                    if (!allCrew.ContainsKey(p.flightID))
                        allCrew.Add(p.flightID, n);
                }
                else if (allCrew.ContainsKey(p.flightID))
                    allCrew.Remove(p.flightID);
            }
        }