public IList <RunEvent> Convert(RunImport run) { var events = _component.Convert(run); foreach (var playerAchievements in run.Achievements) { var playerId = playerAchievements.Key; foreach (var achievement in playerAchievements.Value) { if (EventNames.AdvancementTranslation.ContainsKey(achievement.Event)) { var value = EventNames.AdvancementTranslation[achievement.Event]; var runEvent = new RunEvent( EventTypes.Advancement, achievement.Timestamp, value, playerId); if (!events.Contains(runEvent)) { events.Add(runEvent); } } } } return(events); }
public RunImport Enhance(RunImport run) { run.Events = _runEventConverter.Convert(run); run.PlayerIds = _playerFinder.Find(run); run.LevelNbt = _nbtLevel.Convert(run); run.PlayerNbts = _nbtPlayer.Convert(run); return(run); }
public IList <RunEvent> Convert(RunImport run) { var events = _component.Convert(run); foreach (var line in run.Logs) { var lineEvents = _lineConverter.Convert(line); foreach (var lineEvent in lineEvents) { if (!events.Contains(lineEvent)) { events.Add(lineEvent); } } } return(events); }