2 // Economy-Class-Kabinen
3 class EconomyCabin extends BaseCabin implements ItemIsTradeable, ConstructableShipPart {
5 private function __construct () {
6 // Eltern-Konstruktor aufrufen
7 parent::constructor(__CLASS__);
10 if (((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
11 $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
17 // Beschreibung setzen
18 $this->setPartDescr("Economy-Class-Kabine");
21 $this->createUniqueID();
24 $this->removeSystemArray();
27 // Economy-Kabine erstellen
28 public static function createEconomyCabin ($numLuxury, $numRooms, $numBeds, $dim) {
30 $ecoInstance = new EconomyCabin();
33 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $ecoInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Economy-Class-Kabine wird konstruiert...<br />\n",
38 // Abmasse extrahieren
39 $ecoInstance->extractDimensions($dim);
41 // Den Rest auch setzen
42 $ecoInstance->setNumCabin($numLuxury);
43 $ecoInstance->setNumRooms($numRooms);
44 $ecoInstance->setNumBeds($numBeds);
47 $ecoInstance->removePartInstance();
49 // Instanz zurueckgeben
53 // Loesch-Methode fuer Anzahl Betten
54 public function removeNumBeds() {
55 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Betten gelöscht.<br />\n",
59 unset($this->numBeds);
60 parent::removeNumBeds();
63 // Loesch-Methode fuer Anzahl Kabinen
64 public function removeNumCabin() {
65 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Kabinen gelöscht.<br />\n",
69 unset($this->numCabin);
70 parent::removeNumCabin();
73 // Loesch-Methode fuer Anzahl Raeume
74 public function removeNumRooms() {
75 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Räume gelöscht.<br />\n",
79 unset($this->numRooms);
80 parent::removeNumRooms();
83 // Overwritten method for tradeable items
84 public function isTradeable () {
89 * Limits this object with an ObjectLimits instance
91 public function limitObject (ObjectLimits $limitInstance) {
92 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");