| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class AbstractReactorSystemData extends AbstractSystemData |
||
| 8 | { |
||
| 9 | public int $output = 0; |
||
| 10 | public int $load = 0; |
||
| 11 | |||
| 12 | public abstract function getIcon(): string; |
||
| 13 | |||
| 14 | public abstract function getLoadUnits(): int; |
||
| 15 | |||
| 16 | /** @return array<int, int> */ |
||
| 17 | public abstract function getLoadCost(): array; |
||
| 18 | |||
| 19 | public abstract function getCapacity(): int; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * proportional to reactor system status |
||
| 23 | */ |
||
| 24 | public function getOutput(): int |
||
| 25 | { |
||
| 26 | return (int) (ceil($this->output |
||
| 27 | * $this->ship->getShipSystem($this->getSystemType())->getStatus() / 100)); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getTheoreticalReactorOutput(): int |
||
| 31 | { |
||
| 32 | return $this->output; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function setOutput(int $output): AbstractReactorSystemData |
||
| 39 | } |
||
| 40 | |||
| 41 | public function getLoad(): int |
||
| 42 | { |
||
| 43 | return $this->load; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function setLoad(int $load): AbstractReactorSystemData |
||
| 51 | } |
||
| 52 | } |
||
| 53 |