(no commit message)
[shipsimu.git] / application / ship-simu / main / structures / extended / upper / class_Bridge.php
diff --git a/application/ship-simu/main/structures/extended/upper/class_Bridge.php b/application/ship-simu/main/structures/extended/upper/class_Bridge.php
new file mode 100644 (file)
index 0000000..08ea8e7
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+// Die Aufbauten allgemein
+class Bridge extends BaseUpperStructure implements ItemIsTradeable, ConstructableShipPart {
+       // Constructor
+       private function __construct () {
+               // Eltern-Konstruktor aufrufen
+               parent::constructor(__CLASS__);
+
+               // Debug message
+               if (((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
+                       __CLASS__,
+                       __LINE__
+               ));
+
+               // Beschreibung setzen
+               $this->setPartDescr("Br&uuml;cke");
+
+               // Unique-ID erzeugen
+               $this->createUniqueID();
+
+               // Clean up a little
+               $this->removeSystemArray();
+               $this->removePartInstance();
+       }
+
+       // Eine Kommandobruecke erstellen
+       public static function createBridge ($width, $height, $length) {
+               // Instanz holen
+               $bridgeInstance = new Bridge();
+
+               // Debug message
+               if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $bridgeInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Br&uuml;cke wird konstruiert...<br />\n",
+                       __CLASS__,
+                       __LINE__
+               ));
+
+               // Abmasse setzen
+               $bridgeInstance->setWidth($width);
+               $bridgeInstance->setHeight($height);
+               $bridgeInstance->setLength($length);
+
+               // Instanz zurueckgeben
+               return $bridgeInstance;
+       }
+
+       // Overwritten method for tradeable items
+       public function isTradeable () {
+               return true;
+       }
+
+       /**
+        * Stub!
+        */
+       public function saveObjectToDatabase () {
+               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
+                       $this->__toString(),
+                       __FUNCTION__
+               ));
+       }
+
+       /**
+        * Limits this object with an ObjectLimits instance
+        */
+       public function limitObject (ObjectLimits $limitInstance) {
+               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
+       }
+}
+
+// [EOF]
+?>