3 class LowCabin extends BaseCabin implements ItemIsTradeable, ConstructableShipPart {
5 private function __construct () {
6 // Call parent constructor
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",
16 $this->setPartDescr("2Star-Class-Kabine");
18 // Generate unique ID number
19 $this->createUniqueID();
22 $this->removeSystemArray();
25 // 2-Sterne-Klasse erstellen
26 public static function createLowCabin ($numLuxury, $numRooms, $numBeds, $dim) {
28 $lowInstance = new LowCabin();
31 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $lowInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine 2-Sterne-Kabine wird konstruiert...<br />\n",
36 // Abmasse extrahieren
37 $lowInstance->extractDimensions($dim);
39 // Den Rest auch setzen
40 $lowInstance->setNumCabin($numLuxury);
41 $lowInstance->setNumRooms($numRooms);
42 $lowInstance->setNumBeds($numBeds);
45 $lowInstance->removePartInstance();
47 // Instanz zurueckgeben
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!");