 |
Cytopia
0.3
A city building simulation game
|
Go to the documentation of this file.
10 #define TD_PRICE_MAX 100000
11 #define TD_UPKEEP_MIN -10000
12 #define TD_UPKEEP_MAX 10000
13 #define TD_POWER_MIN -100
14 #define TD_POWER_MAX 1000
15 #define TD_WATER_MIN -100
16 #define TD_WATER_MAX 1000
17 #define TD_EDUCATION_MIN -100
18 #define TD_EDUCATION_MAX 100
19 #define TD_POLLUTION_MIN -100
20 #define TD_POLLUTION_MAX 100
21 #define TD_CRIME_MIN -100
22 #define TD_CRIME_MAX 100
23 #define TD_HABITANTS_MIN 0
24 #define TD_HABITANTS_MAX 10000
25 #define TD_FIREDANGER_MIN -100
26 #define TD_FIREDANGER_MAX 100
27 #define TD_HAPPINESS_MIN -100
28 #define TD_HAPPINESS_MAX 100
29 #define TD_TITLE_MAX_CHARS 100
30 #define TD_DESCRIPTION_MAX_CHARS 100
31 #define TD_BIOME_MAX_CHARS 100
32 #define TD_AUTHOR_MAX_CHARS 100
33 #define TD_ID_MAX_CHARS 100
34 #define TD_CATEGORY_MAX_CHARS 40
35 #define TD_SUBCATEGORY_MAX_CHARS 40
36 #define TD_REQUIREDTILES_MIN 1
37 #define TD_REQUIREDTILES_MAX 20
55 BETTER_ENUM(ZoneType,
int, RESIDENTIAL, INDUSTRIAL, COMMERCIAL, AGRICULTURAL)
76 int clippingWidth = 0;
77 int clippingHeight = 0;
80 bool pickRandomTile =
false;
121 size_t hash = TileSizeToHash.width + 10 * TileSizeToHash.height;
144 std::vector<std::string>
159 std::vector<std::string>
std::string title
The item's title. It's shown ingame and in the editor's tree-view.
int water
water production / consumption if negative
bool placeOnWater
whether or not this building is placeable on water
bool placeOnGround
whether or not this building is placeable on ground
bool operator==(const TileSize &other) const
std::string category
The category this item resides in. Categories are used for the building menu in-game and for sorting ...
int crimeLevel
Crime this building produces or prevents (police station)
How many tiles are occupied by a building.
std::vector< std::string > groundDecoration
tileID of the item that should be drawn on ground below sprite instead of terrain(grass,...
std::vector< std::string > biomes
Restrict this building to spawn only in the given biomes. Must correspond to a biome defined in resou...
uint8_t buildingsize
the size that the building occupies in tiles.
int happiness
The effect on happiness around this building.
std::string description
Description of the item that is shown in its details.
TileSetData tiles
Tile Spritesheet information.
int pollutionLevel
Pollution this building produces or prevents.
BETTER_ENUM(TileType, int, DEFAULT, FLORA, TERRAIN, WATER, BLUEPRINT, AUTOTILE, ZONE, ROAD, POWERLINE, GROUNDDECORATION, UNDERGROUND, RCI) BETTER_ENUM(ZoneDensity
@ ZONE
4- Optional layer, zones(Industrial/Residential/Commercial).
@ BLUEPRINT
1- Optional layer - Map Blueprint
size_t operator()(const TileSize &TileSizeToHash) const noexcept
int inhabitants
How many residents / workers this building can hold. Also how much jobs it provides.
std::vector< Style > style
Restrict this building to certain Art Styles.
int power
power production / consumption if negative
std::size_t operator()(const TileSize &p) const noexcept
const bool operator<(const TileSize &other)
std::string id
The ID of this item. Must be unique and can be referenced in the code.
TileSize & operator=(const TileSize &other)
bool isOverPlacable
Determines if other tiles can be placed over this one tile.
TileSize RequiredTiles
How many tiles this building uses.
@ FLORA
10- Trees and other flora/Fauna tiles
std::vector< ZoneType > zoneTypes
Restrict this building to a zone type.
TileSize(const TileSize &other)
TileSetData slopeTiles
Slope Tile Spritesheet information.
@ TERRAIN
3- Terrain tiles, decorations, ... - must always be a "full" tile
int upkeepCost
monthly cost
std::vector< std::string > tags
Tags to filter buildings in the gui.
@ ROAD
5- Optional layer, roads.
std::vector< ZoneDensity > zoneDensity
Restrict this building to a certain zone density. See enum ZoneDensity.
int fireHazardLevel
Fire Danger this building produces or prevents.
int educationLevel
How much education this building provides (educational building) / requires (job)
TileSize(unsigned int width, unsigned int height)
std::string subCategory
subcategories are used for the building menu in-game and for sorting the items in the editors tree vi...
@ UNDERGROUND
2- Optional layer - Pipes, Subway-pipes and so onn
Holds all releavted information to this specific tile.
std::string author
The author of this item.
TileSetData shoreTiles
Shore Tile Spritesheet information.