3 class TrainDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPart {
5 private function __construct () {
6 // Eltern-Konstruktor aufrufen
7 parent::constructor(__CLASS__);
10 if (((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
15 // Beschreibung setzen
16 $this->setPartDescr("Zug-Deck");
19 $this->createUniqueID();
22 $this->removeSystemArray();
26 public static function createTrainDeck ($numDecks, $dim) {
28 $trainInstance = new TrainDeck();
31 if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $trainInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein LKW-Deck wird konstruiert...<br />\n",
36 // Abmasse extrahieren
37 $trainInstance->extractDimensions($dim);
39 // Andere Daten uebetragen
40 $trainInstance->setNumDecks($numDecks);
42 // Nicht noetige Instanz
43 $trainInstance->removePartInstance();
45 // Instanz zurueckliefern
46 return $trainInstance;
49 // Deckanzahl entfernen
50 public function removeNumDecks() {
51 if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Decks wurde gelöscht.<br />\n",
55 parent::removeNumDecks();
58 // Setter-Methode fuer Anzahl Decks
59 public function setNumDecks ($numDecks) {
60 parent::setNumDecks($numDecks);
63 // Getter-Methode fuer Anzahl Decks
64 public function getNumDecks() {
65 return parent::getNumDecks();
68 // Overwritten method for tradeable items
69 public function isTradeable () {
74 * Limits this object with an ObjectLimits instance
76 public function limitObject (ObjectLimits $limitInstance) {
77 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");