Partial extension of MatchController for career-mode round recovery. Exposes whether results are pending, whether calculation failed, whether a retry is allowed, and a retry method that sets a localized club notice and bumps Revision.
using Socer;
public sealed partial class MatchController
{
public bool AwaitingCareerRoundResults=>careerMatch && !IsRulesPreview && Match?.Finished==true && Career?.Pending!=null;
public bool CareerRoundCalculationFailed=>AwaitingCareerRoundResults && !string.IsNullOrEmpty(Career.RoundResultsError);
public bool CanRetryCareerRoundResults=>AwaitingCareerRoundResults && Career.CanRetryRoundResults;
public void RetryCareerRoundResults()
{
if(!CanRetryCareerRoundResults || !Career.RetryRoundResults())return;
ClubNotice=GamePreferences.Russian?"Повторяем расчёт остальных матчей тура…":"Retrying the other matches…";
Revision++;
}
}