Allow "Log 1st Flight" achievement to be awarded even if flight is upcoming
This commit is contained in:
@@ -15,6 +15,11 @@ abstract class BaseChecker implements AchievementCheckerInterface
|
||||
return $this->service->getFlights();
|
||||
}
|
||||
|
||||
protected function allLoggedFlightsCount(): int
|
||||
{
|
||||
return $this->service->getLoggedFlightCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve an achievement ID from its internal name.
|
||||
* Results are cached on the service so repeated lookups are free.
|
||||
|
||||
@@ -15,10 +15,11 @@ class GeneralFlyingChecker extends BaseChecker
|
||||
*/
|
||||
$flights = $this->flights();
|
||||
$count = $flights->count();
|
||||
$allLoggedFlightsCount = $this->allLoggedFlightsCount();
|
||||
|
||||
// --- Boolean achievements ---
|
||||
|
||||
$this->awardIf($count >= 1, 'general_flying.first_flight');
|
||||
$this->awardIf($allLoggedFlightsCount >= 1, 'general_flying.first_flight');
|
||||
|
||||
$this->awardIf(
|
||||
$flights->contains(fn ($f) => $f->isDomestic()),
|
||||
|
||||
Reference in New Issue
Block a user