static bool ValidateParticipant(ExtendedData.Participant p, CompoundDataPiece piece) { var modid = ExtendedDataUtils.GetModForParticipant(p)?.ModInfo.Id ?? "srml"; return(p.IsDataValid(ExtendedDataUtils.GetPieceForParticipantFromRoot(modid, p, piece))); }
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))); }
static void InitParticipant(ExtendedData.Participant p, CompoundDataPiece piece) { var modid = ExtendedDataUtils.GetModForParticipant(p)?.ModInfo.Id ?? "srml"; p.InitData(ExtendedDataUtils.GetPieceForParticipantFromRoot(modid, p, piece)); }