X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fcity%2Fclasses%2Fmanager%2Fcity_entities%2Flots%2Fclass_CityLotsManager.php;h=3650cc252c09aba65d8050ef3ff88d7872ff155d;hb=2f13b8829ca1aaa76fe28448223230502adfb93f;hp=f4a7e982b2d16313c98c800afc16cf54dfbfaa20;hpb=e846ee2bfd5833a9df8da8c5445ef7b445dcfdee;p=city.git diff --git a/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php b/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php index f4a7e98..3650cc2 100644 --- a/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php +++ b/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php @@ -1,10 +1,16 @@ * @version 0.0.0 - * @copyright Copyright (c) 2015 City Developer Team + * @copyright Copyright (c) 2015, 2016 City Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -50,53 +56,4 @@ class CityLotsManager extends BaseFrameworkSystem implements ManageableCityLots, // Return the prepared instance return $managerInstance; } - - /** - * Checks whether at least one map requires expansion - * - * @return $requiresExpansion Whether a map requires expansion - * @todo 0% done - */ - public function isMapPendingExpansion () { - // Default is no expansion is needed - $requireExpansion = FALSE; - - // First, a simple check if the lots table contains any entries at all - if ($this->getWrapperInstance()->countTotalRows() == 0) { - // This definedly requires expansion - $requireExpansion = TRUE; - } // END - if - - // Return status - return $requireExpansion; - } - - /** - * Expands any map that requires expansion - * - * @return void - * @todo ~10% done - * @todo z-coordinate not used - */ - public function expandMaps () { - // Get a city info wrapper instance - $cityWrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_info_db_wrapper_class'); - - // Get all city ids from it - $cityIds = $cityWrapperInstance->getAllCityIds(); - - // Now check all ids - foreach ($cityIds as $cityId) { - // Does this id have any lots - if (!$this->getWrapperInstance()->ifCityHasLots($cityId)) { - // Nothing found, so it is a brand-new city that needs first initialization - $lots = $this->getWrapperInstance()->doInitialCityExpansion($cityId); - } else { - // @TODO Maybe some expansion is needed - } - } // END - foreach - } } - -// [EOF] -?>