]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php
Initial import of current development status
[shipsimu.git] / ship-simu / application / ship-simu / main / parts / maschineroom / class_MaschineRoom.php
diff --git a/ship-simu/application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php b/ship-simu/application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php
new file mode 100644 (file)
index 0000000..0e3f472
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+// Der Maschinenraum ist etwas anderes als eine Kabine, etc. !
+// Daher hat er eine eigene Klasse
+class MaschineRoom extends BaseShipPart {
+       // 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("Maschinenraum");
+
+               // Unique-ID erzeugen
+               $this->createUniqueID();
+
+               // Clean up a little
+               $this->removeSystemArray();
+       }
+
+       // Maschinenraum erstellen
+       public static function createMaschineRoom () {
+               // Instanz holen
+               $roomInstance = new MaschineRoom();
+
+               // Debug message
+               if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $roomInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Maschinenraum wird konstruiert.<br />\n",
+                       __CLASS__,
+                       __LINE__
+               ));
+
+               // Umrechnungsfaktoren setzen
+               $roomInstance->setResizeFactorElement('width' , 1.3);
+               $roomInstance->setResizeFactorElement('height', 1.8);
+               $roomInstance->setResizeFactorElement('length', 1.3);
+
+               // Instanz zurueckgeben
+               return $roomInstance;
+       }
+
+       /**
+        * 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]
+?>