void ReadData <T, V>(BinaryReader reader, ModSaveInfo info) where T : V, IDataRegistryMember where V : PersistedDataSet, new() { if (!IsCustomModel) { data = new V(); data.Load(reader.BaseStream); } else { var actorId = reader.ReadInt32(); data = info.GetRegistryFor <T>().GetDataForID(actorId); data.Load(reader.BaseStream); } }
void ReadData <T>(BinaryReader reader) where T : PersistedDataSet, new() { data = new T(); data.Load(reader.BaseStream); }