]> git.mxchange.org Git - city.git/commitdiff
Upwards is only air, starting with "zero point", so first ground "level" is -1.
authorRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 20:30:52 +0000 (22:30 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 20:30:52 +0000 (22:30 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php

index b7ab16f1fd276fb418ea7fc20eb79cc006be03c9..0dc60030b3d007a9f0ae678606dd3c31b40a02c3 100644 (file)
@@ -68,10 +68,12 @@ class CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySec
        // @TODO "water" is not yet supported and may end up in a very random land.
        const SECTION_TYPE_WATER      = 'water';
        const SECTION_TYPE_EMPTY_LAND = 'land';
+       const SECTION_TYPE_AIR        = 'air';
 
        // Sub sections
        // @TODO All types of water are not supported yet.
        const SECTION_SUB_TYPE_GRASS = 'grass';
+       const SECTION_SUB_TYPE_AIR   = 'air';
 
        // Reserved flag
        const IS_NOT_RESERVED = 0;
@@ -168,8 +170,8 @@ class CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySec
                $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_ID                , 1);
                $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_ID                   , $cityId);
                $dataSetInstance->addCriteria(self::DB_COLUMN_LOT_ID                    , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_TYPE              , self::SECTION_TYPE_EMPTY_LAND);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_SUB_TYPE          , self::SECTION_SUB_TYPE_GRASS);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_TYPE              , self::SECTION_TYPE_AIR);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_SUB_TYPE          , self::SECTION_SUB_TYPE_AIR);
                $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_X        , 0);
                $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_Y        , 0);
                $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_Z        , 0);
@@ -206,9 +208,9 @@ class CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySec
                                        $sections[($north * -1)][($west * -1)][$z]['type'] = self::SECTION_TYPE_EMPTY_LAND;
                                        $sections[($north * -1)][($west * -1)][$z]['sub']  = self::SECTION_SUB_TYPE_GRASS;
 
-                                       // Fill up array with north/west/up ids
-                                       $sections[$north][$west][$z]['type'] = self::SECTION_TYPE_EMPTY_LAND;
-                                       $sections[$north][$west][$z]['sub']  = self::SECTION_SUB_TYPE_GRASS;
+                                       // Fill up array with north/west/up ids (only air)
+                                       $sections[$north][$west][$z]['type'] = self::SECTION_TYPE_AIR;
+                                       $sections[$north][$west][$z]['sub']  = self::SECTION_SUB_TYPE_AIR;
                                } // END - for
                        } // END - for
                } // END - for