3 class LuxuryCabin 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("[%s:%d] Konstruktor erreicht.<br />\n",
15 // Beschreibung setzen
16 $this->setPartDescr("Luxuskabine");
19 $this->createUniqueID();
22 $this->removeSystemArray();
25 // Eine Luxuskabine erstellen
26 public static function createLuxuryCabin ($numLuxury, $numRooms, $numBeds, $dim) {
28 $luxuryInstance = new LuxuryCabin();
31 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $luxuryInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Luxuskabine wird konstruiert...<br />\n",
36 // Abmasse extrahieren
37 $luxuryInstance->extractDimensions($dim);
39 // Den Rest auch setzen
40 $luxuryInstance->setNumCabin($numLuxury);
41 $luxuryInstance->setNumRooms($numRooms);
42 $luxuryInstance->setNumBeds($numBeds);
45 $luxuryInstance->removePartInstance();
47 // Instanz zurueckgeben
48 return $luxuryInstance;
51 // Loesch-Methode fuer Anzahl Betten
52 public function removeNumBeds() {
53 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Betten gelöscht.<br />\n",
57 unset($this->numBeds);
58 parent::removeNumBeds();
61 // Loesch-Methode fuer Anzahl Kabinen
62 public function removeNumCabin() {
63 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Kabinen gelöscht.<br />\n",
67 unset($this->numCabin);
68 parent::removeNumCabin();
71 // Loesch-Methode fuer Anzahl Raeume
72 public function removeNumRooms() {
73 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Räume gelöscht.<br />\n",
77 unset($this->numRooms);
78 parent::removeNumRooms();
81 // Overwritten method for tradeable items
82 public function isTradeable () {
87 * Limits this object with an ObjectLimits instance
89 public function limitObject (ObjectLimits $limitInstance) {
90 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");