3 class PremierCabin 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'))) $this->getDebugInstance()->output(sprintf("[PremierCabin:] Konstruktor erreicht.<br />\n",
15 // Beschreibung setzen
16 $this->setPartDescr("Premier-Class-Kabine");
19 $this->createUniqueID();
22 $this->removeSystemArray();
25 // Premier-Kabine erstellen
26 public static function createPremierCabin ($numLuxury, $numRooms, $numBeds, $dim) {
28 $premierInstance = new PremierCabin();
31 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $premierInstance->getDebugInstance()->output("[PremierCabin:] Eine Premier-Kabine wird konstruiert...<br />\n");
33 // Abmasse extrahieren
34 $premierInstance->extractDimensions($dim);
36 // Den Rest auch setzen
37 $premierInstance->setNumCabin($numLuxury);
38 $premierInstance->setNumRooms($numRooms);
39 $premierInstance->setNumBeds($numBeds);
42 $premierInstance->removePartInstance();
44 // Instanz zurueckgeben
45 return $premierInstance;
48 // Loesch-Methode fuer Anzahl Betten
49 public function removeNumBeds() {
50 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Betten gelöscht.<br />\n",
54 unset($this->numBeds);
55 parent::removeNumBeds();
58 // Loesch-Methode fuer Anzahl Kabinen
59 public function removeNumCabin() {
60 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Kabinen gelöscht.<br />\n",
64 unset($this->numCabin);
65 parent::removeNumCabin();
68 // Loesch-Methode fuer Anzahl Raeume
69 public function removeNumRooms() {
70 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Räume gelöscht.<br />\n",
74 unset($this->numRooms);
75 parent::removeNumRooms();
78 // Overwritten method for tradeable items
79 public function isTradeable () {
84 * Limits this object with an ObjectLimits instance
86 public function limitObject (ObjectLimits $limitInstance) {
87 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");