| Conditions | 4 |
| Paths | 5 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function isCompatible(Map $map): bool |
||
| 40 | { |
||
| 41 | if (!$map->lapRace) { |
||
| 42 | return false; |
||
| 43 | } |
||
| 44 | |||
| 45 | $nbLaps = 1; |
||
| 46 | if ($map->lapRace) { |
||
| 47 | $nbLaps = $map->nbLaps; |
||
| 48 | } |
||
| 49 | |||
| 50 | $scriptSettings = $this->gameDataStorage->getScriptOptions(); |
||
| 51 | if ($scriptSettings['S_ForceLapsNb'] != -1) { |
||
| 52 | $nbLaps = $scriptSettings['S_ForceLapsNb']; |
||
| 53 | } |
||
| 54 | |||
| 55 | // If rounds is configured to be single laps then no need for race data. lap is sufficient. |
||
| 56 | return $nbLaps > 1; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |