3 // Motorisierter Antrieb
4 class Motor extends BaseDrive implements ItemIsTradeable, ConstructableShipPart {
6 private function __construct() {
7 // Eltern-Konstruktor aufrufen
8 parent::constructor(__CLASS__);
11 if (((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
12 $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
18 // Beschreibung setzen
19 $this->setPartDescr("Namenloser Motor");
22 $this->createUniqueID();
25 $this->removeSystemArray();
28 // Einen Motor erstellen
29 public static function createMotor ($descr, $hp, $cams, $w, $h, $l) {
31 $motorInstance = new Motor();
34 if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $motorInstance->getDebugInstance()->output(sprintf("[%s:%d] Motor <strong>%s</strong> wird gebaut...<br />\n",
40 // Beschreibung und Abmasse setzen
41 $motorInstance->setPartDescr($descr);
42 $motorInstance->setWidth($w);
43 $motorInstance->setHeight($h);
44 $motorInstance->setLength($l);
46 // Weitere Daten setzen
47 $motorInstance->setHorsePower($hp);
48 $motorInstance->setNumCams($cams);
50 // Instanz zurueckgeben
51 return $motorInstance;
54 // Overwritten method for tradeable items
55 public function isTradeable () {
62 public function saveObjectToDatabase () {
63 $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
70 * Limits this object with an ObjectLimits instance
72 public function limitObject (ObjectLimits $limitInstance) {
73 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");