$harborInstance = new Harbor();
// Debug message
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> wird konstruiert.<br />\n", $harborName));
+ if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> wird konstruiert.", $harborName));
// Hafenname setzen
$harborInstance->setHarborName($harborName);
$harborInstance->createshipyardList();
// Debug-Meldung ausgeben
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> ist jetzt fertig gebaut.<br />\n", $harborName));
+ if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> ist jetzt fertig gebaut.", $harborName));
// Instanz zurueckliefern
return $harborInstance;
// Werft-Liste generieren
public function createshipyardList () {
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Werft-Liste wird für den Hafen <strong>%s</strong> erstellt.<br />\n",
- $this->getHarborName()
- ));
$this->shipyardList = new FrameworkArrayObject("FakedShipyardList");
}
// Setter fuer Hafennamen
public final function setHarborName ($harborName) {
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen heisst jetzt <strong>%s</strong>.<br />\n", $harborName));
$this->harborName = (string) $harborName;
}
// Getter fuer Hafennamen
public final function getHarborName () {
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Hafenname <strong>%s</strong> wurde angefordert.<br />\n", $this->harborName));
return $this->harborName;
}
// Werft in den Hafen einbauen und Werft->Reederei zuweisen
public function addNewShipyardNotify ($shipyardName, ShippingCompany $companyInstance) {
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Die Werft <strong>%s</strong> wird im Hafen <strong>%s</strong> gebaut.<br />\n",
- $shipyardName, $this->getHarborName()
- ));
-
// Werft generieren und in die Werftliste aufnehmen
$this->shipyardList->append(Shipyard::createShipyardNotify($this, $shipyardName, $companyInstance));
}
// Werft in den Hafen einbauen ohne Zuweisung einer Reederei (gehoert der "Stadt" dann)
public function addNewShipyard ($shipyardName) {
- if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Die Werft <strong>%s</strong> wird im Hafen <strong>%s</strong> gebaut.<br />\n",
- $shipyardName, $this->getHarborName()
- ));
-
// Werft generieren und in die Werftliste aufnehmen
$this->shipyardList->append(Shipyard::createShipyard($this, $shipyardName));
}