コード例 #1
0
        // RimWorld.FacePresetDatabase
        public FacePreset MakeNewFacePreset()
        {
            int arg_40_0;

            if (this.facePresets.Any <FacePreset>())
            {
                arg_40_0 = this.facePresets.Max((FacePreset o) => o.uniqueId) + 1;
            }
            else
            {
                arg_40_0 = 1;
            }

            int        uniqueId = arg_40_0;
            FacePreset outfit   = new FacePreset(uniqueId, "FacePreset".Translate() + " " + uniqueId.ToString());

            outfit.filter.SetAllow(ThingCategoryDefOf.Apparel, true);
            this.facePresets.Add(outfit);
            return(outfit);
        }
コード例 #2
0
 // RimWorld.FacePresetDatabase
 public AcceptanceReport TryDelete(FacePreset outfit)
 {
     this.facePresets.Remove(outfit);
     return(AcceptanceReport.WasAccepted);
 }