for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Stu\Component\Ship\System\Data;
abstract class AbstractReactorSystemData extends AbstractSystemData
{
public int $output = 0;
public int $load = 0;
public abstract function getIcon(): string;
public abstract function getLoadUnits(): int;
/** @return array<int, int> */
public abstract function getLoadCost(): array;
public abstract function getCapacity(): int;
/**
* proportional to reactor system status
*/
public function getOutput(): int
return (int) (ceil($this->output
* $this->ship->getShipSystem($this->getSystemType())->getStatus() / 100));
}
public function getTheoreticalReactorOutput(): int
return $this->output;
public function setOutput(int $output): AbstractReactorSystemData
$this->output = $output;
return $this;
public function getLoad(): int
return $this->load;
public function setLoad(int $load): AbstractReactorSystemData
$this->load = $load;