Пример #1
0
 public void WriteGenome(CompoundDataPiece piece)
 {
     foreach (var v in Traits)
     {
         if (!v.ShouldBeSaved)
         {
             continue;
         }
         v.Processor.SerializeTrait(v, piece.GetCompoundPiece(v.Processor.FullID));
     }
 }
Пример #2
0
 public static CompoundDataPiece GetPieceForMod(String modid, CompoundDataPiece piece)
 {
     return(piece.GetCompoundPiece(modid));
 }
Пример #3
0
 public static CompoundDataPiece GetPieceForParticipant(string participantName, CompoundDataPiece piece)
 {
     return(piece.GetCompoundPiece(participantName));
 }
Пример #4
0
        static bool HasValidDataForParticipant(Participant p, CompoundDataPiece piece)
        {
            var modid = ExtendedDataUtils.GetModForParticipant(p)?.ModInfo.Id ?? "srml";

            return(piece.HasPiece(modid) && piece.GetCompoundPiece(modid).HasPiece(ExtendedDataUtils.GetParticipantName(p)));
        }