From 016a8fed2d6acb7774ce45c4a5ff9f88eb9a7a17 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 29 Jun 2015 04:27:53 +0200 Subject: [PATCH] Variable 'cityMode' is not available here + added initial documentation file for all used tasks. Signed-off-by: Roland Haeder --- .../class_CityDaemonInitializationFilter.php | 4 +-- ...CityDaemonTaskHandlerInitializerFilter.php | 2 +- docs/tasks.txt | 28 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 docs/tasks.txt diff --git a/application/city/main/filter/city_daemon/class_CityDaemonInitializationFilter.php b/application/city/main/filter/city_daemon/class_CityDaemonInitializationFilter.php index 108b6c5..2a64d19 100644 --- a/application/city/main/filter/city_daemon/class_CityDaemonInitializationFilter.php +++ b/application/city/main/filter/city_daemon/class_CityDaemonInitializationFilter.php @@ -60,11 +60,11 @@ class CityDaemonInitializationFilter extends BaseCityFilter implements Filterabl } catch (ClassNotFoundException $e) { // This exception means, the city mode is invalid. // @TODO Can we rewrite this to app_exit() ? - $this->debugBackTrace('[' . __METHOD__ . ':' . __LINE__ . ']: city mode ' . $cityMode . ' is invalid.'); + $this->debugBackTrace('[' . __METHOD__ . ':' . __LINE__ . ']: City daemon could not be initialized: ' . $e->getMessage()); } // Debug message - /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: City daemon ' . $cityMode . ' has been added to registry.'); + /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: City daemon has been added to registry.'); } } diff --git a/application/city/main/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php b/application/city/main/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php index 31f2848..b2d3e4c 100644 --- a/application/city/main/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php +++ b/application/city/main/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php @@ -64,7 +64,7 @@ class CityDaemonTaskHandlerInitializerFilter extends BaseCityFilter implements F // Put the task handler in registry Registry::getRegistry()->addInstance('task_handler', $handlerInstance); - // Prepare a map-expanding task + // Prepare a city map expansion task $taskInstance = ObjectFactory::createObjectByConfiguredName('city_daemon_map_expander_task_class'); // Register it diff --git a/docs/tasks.txt b/docs/tasks.txt new file mode 100644 index 0000000..364a88d --- /dev/null +++ b/docs/tasks.txt @@ -0,0 +1,28 @@ +The following tasks are used: +----------------------------- + +Name | Description +--------------+-------------------------------- + map_expander | Expands the city map if needed +--------------+-------------------------------- + +- - - - - + +Task 'map_expander': +-------------------- + +The task is responsible for expanding the city map around outer-most zones and +roads. It also initializes the map at first startup (if the city has been +"founded"). + +For doing this, around the outer-most zones/roads the map is expanded for a +configurable value (default: 100). After the first road has been constructed, +the map is not expanded directly as this would cause permanent expansion of it +which leads to more system load. + +Instead, the map is being expanded if the outer-most zone/road has come to +close ("city border threashold") to the border (default: 10). If that value +has reached or surpassed (to close, e.g. by constructing a long road) the map +is expanded (default: 10+100 from outer-most). + +[EOF] -- 2.39.5