コード例 #1
0
ファイル: Models.cs プロジェクト: aidygus/CrewManifest
 public void SyncKerbal()
 {
     Kerbal.ChangeName(Name);
     Kerbal.stupidity = Stupidity;
     Kerbal.courage   = Courage;
     Kerbal.isBadass  = Badass;
     Kerbal.gender    = Gender;
     Kerbal.type      = Type;
 }
コード例 #2
0
ファイル: ModKerbal.cs プロジェクト: Acea-K/ShipManifest
 public void SyncKerbal()
 {
     if (SMSettings.EnableKerbalRename)
     {
         Kerbal.ChangeName(Name);
         if (SMSettings.EnableChangeProfession)
         {
             KerbalRoster.SetExperienceTrait(Kerbal, Trait);
         }
     }
     Kerbal.gender    = Gender;
     Kerbal.stupidity = Stupidity;
     Kerbal.courage   = Courage;
     Kerbal.isBadass  = Badass;
 }
コード例 #3
0
        public void SyncKerbal()
        {
            if (RMSettings.EnableKerbalRename)
            {
                Kerbal.ChangeName(Name);
            }
            if (!SalaryContractDispute)
            {
                if (Status == ProtoCrewMember.RosterStatus.Assigned)
                {
                    UnregisterExperienceTrait(this);
                }
                RealTrait    = Trait;
                Kerbal.trait = Trait;
                KerbalRoster.SetExperienceTrait(Kerbal, Trait);
                if (Status == ProtoCrewMember.RosterStatus.Assigned)
                {
                    RegisterExperienceTrait(this);
                }
            }
            Kerbal.gender          = Gender;
            Kerbal.suit            = Suit;
            Kerbal.stupidity       = Stupidity;
            Kerbal.courage         = Courage;
            Kerbal.isBadass        = Badass;
            Kerbal.experienceLevel = Skill;
            Kerbal.experience      = Experience;
            Kerbal.type            = Type;
            Kerbal.rosterStatus    = Status;

            // Now let's do some validaton for Type and status
            if (Type == ProtoCrewMember.KerbalType.Tourist && Trait != "Tourist")
            {
                Kerbal.trait = "Tourist";
            }
            if (Type != ProtoCrewMember.KerbalType.Tourist && Trait == "Tourist")
            {
                Kerbal.type = ProtoCrewMember.KerbalType.Tourist;
            }
        }