]> git.mxchange.org Git - city.git/commitdiff
Expanded sections table with new columns:
authorRoland Haeder <roland@mxchange.org>
Sun, 26 Jul 2015 14:32:15 +0000 (16:32 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 26 Jul 2015 14:38:32 +0000 (16:38 +0200)
- Lot id              : Referencing lot (as one lot may have n sections)
- Type                : Section type (residential, commercial, road, etc.)
- Sub type            : Sub section type (hut, house, skyscraper, etc.)
- Neighbour left id   : Connected section id to left
- Neighbour right id  : Connected section id to right
- Neighbour bottom id : Connected section id to bottom (horizontal)
- Neighbour top id    : Connected section id to top (horizontal)
- Neighbour up id     : Connected section id to upward
- Neighbour down id   : Connected section id to downward

Signed-off-by: Roland Haeder <roland@mxchange.org>
application/city/main/database/frontend/city_sections/class_CitySectionsDatabaseWrapper.php
docs/ideas.txt

index 0ba967d790de9ab901e78e52d8c9eaaaa93d5386..6e46284668b37c2a557a448ba6f1e9819721970b 100644 (file)
@@ -25,9 +25,31 @@ class CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySec
        // Constants for database table names
        const DB_TABLE_CITY_SECTIONS = 'city_sections';
 
-       // Constants for database column names
-       const DB_COLUMN_SECTION_ID = 'city_section_id';
-       const DB_COLUMN_CITY_ID    = 'city_id';
+       // Section id, an referenced city id and lot id
+       const DB_COLUMN_SECTION_ID             = 'city_section_id';
+       const DB_COLUMN_CITY_ID                = 'city_id';
+       const DB_COLUMN_LOT_ID                 = 'lot_id';
+
+       // Section and sub type (e.g. residential, hut)
+       const DB_COLUMN_SECTION_TYPE           = 'section_type';
+       const DB_COLUMN_SECTION_SUB_TYPE       = 'section_sub_type';
+
+       // X-Y-Z position
+       const DB_COLUMN_SECTION_POSITION_X     = 'section_position_x';
+       const DB_COLUMN_SECTION_POSITION_Y     = 'section_position_y';
+       const DB_COLUMN_SECTION_POSITION_Z     = 'section_position_z';
+
+       // Connected neigbouring sections
+       const DB_COLUMN_SECTION_NEIGHBOUR_LEFT_ID   = 'section_neighbour_left_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_RIGHT_ID  = 'section_neighbour_right_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_TOP_ID    = 'section_neighbour_top_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_BOTTOM_ID = 'section_neighbour_bottom_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_UP_ID     = 'section_neighbour_up_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_DOWN_ID   = 'section_neighbour_down_id';
+
+       // Other settings:
+       // Reserved section (see documentation)
+       const DB_COLUMN_SECTION_RESERVED       = 'section_reserved';
 
        /**
         * Protected constructor
index 8cea36289ba9af1bf35145fe78627a809c84ad95..008f2c25cc92a149a333f3a5761744b9d447e9c3 100644 (file)
@@ -5,8 +5,8 @@ Not included in mind map:
 
 - Simulation speed: How many simulation seconds per real second
   + Simple method to "get" (calculate) currently elapsed simulation time
+  + User may change this through client
   + Game daemon can be stopped for a long time and city continues to grow
     if the daemon is running again.
-  + User may change this through client
 
 [EOF]