示例#1
0
        static bool ValidateParticipant(ExtendedData.Participant p, CompoundDataPiece piece)
        {
            var modid = ExtendedDataUtils.GetModForParticipant(p)?.ModInfo.Id ?? "srml";

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

            p.InitData(ExtendedDataUtils.GetPieceForParticipantFromRoot(modid, p, piece));
        }