(no commit message)
[shipsimu.git] / application / ship-simu / main / parts / maschineroom / class_MaschineRoom.php
1 <?php
2 // Der Maschinenraum ist etwas anderes als eine Kabine, etc. !
3 // Daher hat er eine eigene Klasse
4 class MaschineRoom extends BaseShipPart {
5         // Constructor
6         private function __construct () {
7                 // Eltern-Konstruktor aufrufen
8                 parent::constructor(__CLASS__);
9
10                 // Debug message
11                 if (((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
12                         $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
13                                 __CLASS__,
14                                 __LINE__
15                         ));
16                 }
17
18                 // Beschreibung setzen
19                 $this->setPartDescr("Maschinenraum");
20
21                 // Unique-ID erzeugen
22                 $this->createUniqueID();
23
24                 // Clean up a little
25                 $this->removeSystemArray();
26         }
27
28         // Maschinenraum erstellen
29         public static function createMaschineRoom () {
30                 // Instanz holen
31                 $roomInstance = new MaschineRoom();
32
33                 // Debug message
34                 if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $roomInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Maschinenraum wird konstruiert.<br />\n",
35                         __CLASS__,
36                         __LINE__
37                 ));
38
39                 // Umrechnungsfaktoren setzen
40                 $roomInstance->setResizeFactorElement('width' , 1.3);
41                 $roomInstance->setResizeFactorElement('height', 1.8);
42                 $roomInstance->setResizeFactorElement('length', 1.3);
43
44                 // Instanz zurueckgeben
45                 return $roomInstance;
46         }
47
48         /**
49          * Stub!
50          */
51         public function saveObjectToDatabase () {
52                 $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
53                         $this->__toString(),
54                         __FUNCTION__
55                 ));
56         }
57
58         /**
59          * Limits this object with an ObjectLimits instance
60          */
61         public function limitObject (ObjectLimits $limitInstance) {
62                 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
63         }
64 }
65
66 // [EOF]
67 ?>