Example #1
0
 /// <summary>
 /// Assign a CrewMember to a Position
 /// </summary>
 public void AssignCrewMember(Position position, CrewMember crewMember)
 {
     if (position != Position.Null)
     {
         //if a Position is provided and has a CrewMember already assigned to it, remove them from that position
         if (PositionCrew.ContainsKey(position))
         {
             AssignCrewMember(Position.Null, PositionCrew[position]);
         }
     }
     if (crewMember != null)
     {
         //if a CrewMember is provided and is assigned to a position, remove them from that position
         var current = GetCrewMemberPosition(crewMember);
         if (current != Position.Null)
         {
             PositionCrew.Remove(current);
             PositionScores.Remove(current);
         }
         if (position != Position.Null)
         {
             //add combination of CrewMember and Position to PositionCrew dictionary
             PositionCrew.Add(position, crewMember);
             PositionScores.Add(position, 0);
             crewMember.UpdateSingleBelief(NPCBelief.Position, position);
         }
         else
         {
             crewMember.UpdateSingleBelief(NPCBelief.Position);
         }
     }
 }
Example #2
0
 /// <summary>
 /// Save the current attributes of the CrewMember to their EmotionalAppraisal Asset
 /// </summary>
 internal void UpdateAvatarBeliefs(CrewMember crewMember)
 {
     crewMember.UpdateSingleBelief(NPCBelief.AvatarBestSkill, _bestSkill);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarBodyType, BodyType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarEyebrowType, EyebrowType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarEyeType, EyeType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarEyeColorRed, EyeColor.R);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarEyeColorGreen, EyeColor.G);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarEyeColorBlue, EyeColor.B);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarHairColorRed, HairColor.R);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarHairColorGreen, HairColor.G);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarHairColorBlue, HairColor.B);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarHairType, HairType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarHeight, Height);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarMouthType, MouthType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarMouthColor, MouthColor);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarTeethType, TeethType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarNoseType, NoseType);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarSkinColorRed, SkinColor.R);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarSkinColorGreen, SkinColor.G);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarSkinColorBlue, SkinColor.B);
     crewMember.UpdateSingleBelief(NPCBelief.AvatarWeight, Weight);
 }