// Token: 0x06002604 RID: 9732 RVA: 0x000A5558 File Offset: 0x000A3758 private void Update() { uint currentSeedCycle = WeeklyRun.GetCurrentSeedCycle(); if (currentSeedCycle != this.currentCycle) { this.currentCycle = currentSeedCycle; this.UpdateLeaderboard(); } TimeSpan t = WeeklyRun.GetSeedCycleStartDateTime(this.currentCycle + 1U) - WeeklyRun.now; string @string = Language.GetString("WEEKLY_RUN_NEXT_CYCLE_COUNTDOWN_FORMAT"); this.countdownLabel.text = string.Format(@string, t.Hours + t.Days * 24, t.Minutes, t.Seconds); if (t != this.lastCountdown) { this.lastCountdown = t; this.labelFadeValue = 0f; } this.labelFadeValue = Mathf.Max(this.labelFadeValue + Time.deltaTime * 1f, 0f); Color white = Color.white; if (t.Days == 0 && t.Hours == 0) { white.g = this.labelFadeValue; white.b = this.labelFadeValue; } this.countdownLabel.color = white; }
// Token: 0x06002602 RID: 9730 RVA: 0x000A5506 File Offset: 0x000A3706 private void UpdateLeaderboard() { if (this.leaderboard) { this.leaderboard.SetRequestedInfo(WeeklyRun.GetLeaderboardName(1, this.currentCycle), this.leaderboard.currentRequestType, this.leaderboard.currentPage); } }
private static void SaveFile(RunReport report, WeeklyRun run) { String time = ((Int32)Math.Ceiling((Double)report.runStopwatchValue / 1000.0)).ToString(); var cycle = WeeklyRun.GetCurrentSeedCycle(); var cycleStart = WeeklyRun.GetSeedCycleStartDateTime(WeeklyRun.GetCurrentSeedCycle()); String cycleDate = cycleStart.ToShortDateString(); var body = BodyCatalog.GetBodyPrefab(NetworkUser.readOnlyLocalPlayersList[0].bodyIndexPreference); if (body == null) { instance.Logger.LogError("Invalid body selected"); return; } var survivorDef = SurvivorCatalog.FindSurvivorDefFromBody(body); if (survivorDef == null) { instance.Logger.LogError("Selected body is not in survivorcatalog"); return; } String character = Language.GetString(survivorDef.displayNameToken); instance.Logger.LogMessage("Your character was: " + character); instance.Logger.LogMessage("Your time was: " + time); instance.Logger.LogMessage("Score send aborted, saving run report to disk instead."); instance.Logger.LogMessage("In the future, there may be a leaderboard set up such that you can upload the file to submit a run"); String directory = "\\ModdedTrials\\" + cycleStart + "\\" + character + "\\"; String directoryGlobal = getRunReportsFolder() + directory; System.IO.Directory.CreateDirectory(directoryGlobal); String fileBaseName = time; Int32 i = 0; while (System.IO.File.Exists(directoryGlobal + fileBaseName + (i != 0 ? "(" + i + ")" : String.Empty))) { ++i; } RunReport.Save(report, directory + fileBaseName); }
// Token: 0x06002315 RID: 8981 RVA: 0x000A54A8 File Offset: 0x000A36A8 private void GetObjectiveSources(CharacterMaster master, [NotNull] List <ObjectivePanelController.ObjectiveSourceDescriptor> output) { output.Clear(); WeeklyRun weeklyRun = Run.instance as WeeklyRun; if (weeklyRun && weeklyRun.crystalsRequiredToKill > weeklyRun.crystalsKilled) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = Run.instance, master = master, objectiveType = typeof(ObjectivePanelController.DestroyTimeCrystals) }); } TeleporterInteraction instance = TeleporterInteraction.instance; if (instance) { Type type = null; if (instance.isCharging) { type = typeof(ObjectivePanelController.ChargeTeleporterObjectiveTracker); } else if (instance.isCharged && !instance.isInFinalSequence) { type = typeof(ObjectivePanelController.FinishTeleporterObjectiveTracker); } else if (instance.isIdle) { type = typeof(ObjectivePanelController.FindTeleporterObjectiveTracker); } if (type != null) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = instance, master = master, objectiveType = type }); } } if (BossGroup.instance && BossGroup.instance.readOnlyMembersList.Count != 0) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = BossGroup.instance, master = master, objectiveType = typeof(ObjectivePanelController.DefeatBossObjectiveTracker) }); } if (GoldshoresMissionController.instance) { Type type2 = GoldshoresMissionController.instance.entityStateMachine.state.GetType(); if (type2 == typeof(ActivateBeacons) || type2 == typeof(GoldshoresBossfight)) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = GoldshoresMissionController.instance, master = master, objectiveType = typeof(ObjectivePanelController.ActivateGoldshoreBeaconTracker) }); } } }
// Token: 0x0600232E RID: 9006 RVA: 0x000A5A70 File Offset: 0x000A3C70 protected override string GenerateString() { WeeklyRun weeklyRun = Run.instance as WeeklyRun; return(string.Format(Language.GetString(this.baseToken), weeklyRun.crystalsKilled, weeklyRun.crystalsRequiredToKill)); }
// Token: 0x06002601 RID: 9729 RVA: 0x000A54F3 File Offset: 0x000A36F3 private void OnEnable() { this.currentCycle = WeeklyRun.GetCurrentSeedCycle(); this.UpdateLeaderboard(); }
// Token: 0x06002485 RID: 9349 RVA: 0x0009F618 File Offset: 0x0009D818 private void GetObjectiveSources(CharacterMaster master, [NotNull] List <ObjectivePanelController.ObjectiveSourceDescriptor> output) { output.Clear(); WeeklyRun weeklyRun = Run.instance as WeeklyRun; if (weeklyRun && weeklyRun.crystalsRequiredToKill > weeklyRun.crystalsKilled) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = Run.instance, master = master, objectiveType = typeof(ObjectivePanelController.DestroyTimeCrystals) }); } TeleporterInteraction instance = TeleporterInteraction.instance; if (instance) { Type type = null; if (instance.isCharging) { type = typeof(ObjectivePanelController.ChargeTeleporterObjectiveTracker); } else if (instance.isCharged && !instance.isInFinalSequence) { type = typeof(ObjectivePanelController.FinishTeleporterObjectiveTracker); } else if (instance.isIdle) { type = typeof(ObjectivePanelController.FindTeleporterObjectiveTracker); } if (type != null) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = instance, master = master, objectiveType = type }); } } if (GoldshoresMissionController.instance) { Type type2 = GoldshoresMissionController.instance.entityStateMachine.state.GetType(); if ((type2 == typeof(ActivateBeacons) || type2 == typeof(GoldshoresBossfight)) && GoldshoresMissionController.instance.beaconsActive < GoldshoresMissionController.instance.beaconCount) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = GoldshoresMissionController.instance, master = master, objectiveType = typeof(ObjectivePanelController.ActivateGoldshoreBeaconTracker) }); } } if (ArenaMissionController.instance && ArenaMissionController.instance.clearedRounds < ArenaMissionController.instance.totalRoundsMax) { output.Add(new ObjectivePanelController.ObjectiveSourceDescriptor { source = ArenaMissionController.instance, master = master, objectiveType = typeof(ObjectivePanelController.ClearArena) }); } Action <CharacterMaster, List <ObjectivePanelController.ObjectiveSourceDescriptor> > action = ObjectivePanelController.collectObjectiveSources; if (action == null) { return; } action(master, output); }