X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fconstructions%2Fharbors%2Fclass_Harbor.php;h=31781661b0ad5cc779a5e90571a4b00d99b2198d;hp=3bdc297b34a2e5b503c9c4004f196d794ff44404;hb=b3e47fb693fb8d40868158b0192b3392b309d97a;hpb=d2ab4e266a9ba039dc587ffa753a55328ca34f4a diff --git a/application/ship-simu/main/constructions/harbors/class_Harbor.php b/application/ship-simu/main/constructions/harbors/class_Harbor.php index 3bdc297..3178166 100644 --- a/application/ship-simu/main/constructions/harbors/class_Harbor.php +++ b/application/ship-simu/main/constructions/harbors/class_Harbor.php @@ -6,7 +6,7 @@ * @version 0.0.0 * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.ship-simu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ class Harbor extends BaseConstruction { $this->setObjectDescription("Hafen"); // Generate unique ID number - $this->createUniqueID(); + $this->generateUniqueId(); // Clean up a little $this->removeSystemArray(); @@ -56,7 +56,7 @@ class Harbor extends BaseConstruction { $harborInstance = new Harbor(); // Debug message - if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen %s wird konstruiert.
\n", $harborName)); + if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen %s wird konstruiert.", $harborName)); // Hafenname setzen $harborInstance->setHarborName($harborName); @@ -65,7 +65,7 @@ class Harbor extends BaseConstruction { $harborInstance->createshipyardList(); // Debug-Meldung ausgeben - if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen %s ist jetzt fertig gebaut.
\n", $harborName)); + if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen %s ist jetzt fertig gebaut.", $harborName)); // Instanz zurueckliefern return $harborInstance; @@ -73,60 +73,30 @@ class Harbor extends BaseConstruction { // 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 %s erstellt.
\n", - $this->getHarborName() - )); - $this->shipyardList = new FrameworkArrayObject(); + $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 %s.
\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 %s wurde angefordert.
\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 %s wird im Hafen %s gebaut.
\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 %s wird im Hafen %s gebaut.
\n", - $shipyardName, $this->getHarborName() - )); - // Werft generieren und in die Werftliste aufnehmen $this->shipyardList->append(Shipyard::createShipyard($this, $shipyardName)); } - - /** - * Stub! - */ - public function saveObjectToDatabase () { - $this->getDebugInstance()->output(sprintf("[%s:] Stub %s erreicht.", - $this->__toString(), - __FUNCTION__ - )); - } - - /** - * Limits this object with an ObjectLimits instance - */ - public function limitObject (ObjectLimits $limitInstance) { - ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!"); - } } // [EOF]