Cytopia  0.3
A city building simulation game
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TileData Struct Reference

Holds all releavted information to this specific tile. More...

#include <tileData.hxx>

+ Collaboration diagram for TileData:

Public Attributes

std::string id
 The ID of this item. Must be unique and can be referenced in the code. More...
 
std::string author
 The author of this item. More...
 
std::string category
 The category this item resides in. Categories are used for the building menu in-game and for sorting the items in the editors tree view. More...
 
std::string subCategory
 subcategories are used for the building menu in-game and for sorting the items in the editors tree view More...
 
uint8_t buildingsize
 the size that the building occupies in tiles. More...
 
std::vector< std::stringbiomes
 Restrict this building to spawn only in the given biomes. Must correspond to a biome defined in resources/data/TerrainGen.json. More...
 
std::vector< std::stringtags
 Tags to filter buildings in the gui. More...
 
TileSetData tiles
 Tile Spritesheet information. More...
 
TileType tileType = TileType::DEFAULT
 
TileSetData shoreTiles
 Shore Tile Spritesheet information. More...
 
TileSetData slopeTiles
 Slope Tile Spritesheet information. More...
 
std::string title
 The item's title. It's shown ingame and in the editor's tree-view. More...
 
std::string description
 Description of the item that is shown in its details. More...
 
int price = 0
 building cost More...
 
int upkeepCost = 0
 monthly cost More...
 
int power = 0
 power production / consumption if negative More...
 
int water = 0
 water production / consumption if negative More...
 
std::vector< std::stringgroundDecoration
 tileID of the item that should be drawn on ground below sprite instead of terrain(grass, concrete, ...). Must be a tileID with tileType GroundDecoration More...
 
bool placeOnGround = true
 whether or not this building is placeable on ground More...
 
bool placeOnWater = false
 whether or not this building is placeable on water More...
 
bool isOverPlacable
 Determines if other tiles can be placed over this one tile. More...
 
int pollutionLevel = 0
 Pollution this building produces or prevents. More...
 
int crimeLevel = 0
 Crime this building produces or prevents (police station) More...
 
int fireHazardLevel = 0
 Fire Danger this building produces or prevents. More...
 
int inhabitants = 0
 How many residents / workers this building can hold. Also how much jobs it provides. More...
 
int happiness = 0
 The effect on happiness around this building. More...
 
int educationLevel = 0
 How much education this building provides (educational building) / requires (job) More...
 
std::vector< ZoneType > zoneTypes
 Restrict this building to a zone type. More...
 
std::vector< Style > style
 Restrict this building to certain Art Styles. More...
 
std::vector< ZoneDensity > zoneDensity
 Restrict this building to a certain zone density. See enum ZoneDensity. More...
 
TileSize RequiredTiles
 How many tiles this building uses. More...
 

Detailed Description

Holds all releavted information to this specific tile.

Definition at line 135 of file tileData.hxx.

Member Data Documentation

◆ author

std::string TileData::author

The author of this item.

Definition at line 138 of file tileData.hxx.

◆ biomes

std::vector<std::string> TileData::biomes

Restrict this building to spawn only in the given biomes. Must correspond to a biome defined in resources/data/TerrainGen.json.

Definition at line 145 of file tileData.hxx.

◆ buildingsize

uint8_t TileData::buildingsize

the size that the building occupies in tiles.

Definition at line 143 of file tileData.hxx.

◆ category

std::string TileData::category

The category this item resides in. Categories are used for the building menu in-game and for sorting the items in the editors tree view.

Definition at line 140 of file tileData.hxx.

◆ crimeLevel

int TileData::crimeLevel = 0

Crime this building produces or prevents (police station)

Definition at line 165 of file tileData.hxx.

◆ description

std::string TileData::description

Description of the item that is shown in its details.

Definition at line 153 of file tileData.hxx.

◆ educationLevel

int TileData::educationLevel = 0

How much education this building provides (educational building) / requires (job)

Definition at line 169 of file tileData.hxx.

◆ fireHazardLevel

int TileData::fireHazardLevel = 0

Fire Danger this building produces or prevents.

Definition at line 166 of file tileData.hxx.

◆ groundDecoration

std::vector<std::string> TileData::groundDecoration

tileID of the item that should be drawn on ground below sprite instead of terrain(grass, concrete, ...). Must be a tileID with tileType GroundDecoration

Definition at line 160 of file tileData.hxx.

◆ happiness

int TileData::happiness = 0

The effect on happiness around this building.

Definition at line 168 of file tileData.hxx.

◆ id

std::string TileData::id

The ID of this item. Must be unique and can be referenced in the code.

Definition at line 137 of file tileData.hxx.

◆ inhabitants

int TileData::inhabitants = 0

How many residents / workers this building can hold. Also how much jobs it provides.

Definition at line 167 of file tileData.hxx.

◆ isOverPlacable

bool TileData::isOverPlacable

Determines if other tiles can be placed over this one tile.

Definition at line 163 of file tileData.hxx.

◆ placeOnGround

bool TileData::placeOnGround = true

whether or not this building is placeable on ground

Definition at line 161 of file tileData.hxx.

◆ placeOnWater

bool TileData::placeOnWater = false

whether or not this building is placeable on water

Definition at line 162 of file tileData.hxx.

◆ pollutionLevel

int TileData::pollutionLevel = 0

Pollution this building produces or prevents.

Definition at line 164 of file tileData.hxx.

◆ power

int TileData::power = 0

power production / consumption if negative

Definition at line 156 of file tileData.hxx.

◆ price

int TileData::price = 0

building cost

Definition at line 154 of file tileData.hxx.

◆ RequiredTiles

TileSize TileData::RequiredTiles

How many tiles this building uses.

Definition at line 173 of file tileData.hxx.

◆ shoreTiles

TileSetData TileData::shoreTiles

Shore Tile Spritesheet information.

Definition at line 150 of file tileData.hxx.

◆ slopeTiles

TileSetData TileData::slopeTiles

Slope Tile Spritesheet information.

Definition at line 151 of file tileData.hxx.

◆ style

std::vector<Style> TileData::style

Restrict this building to certain Art Styles.

Definition at line 171 of file tileData.hxx.

◆ subCategory

std::string TileData::subCategory

subcategories are used for the building menu in-game and for sorting the items in the editors tree view

Definition at line 142 of file tileData.hxx.

◆ tags

std::vector<std::string> TileData::tags

Tags to filter buildings in the gui.

Definition at line 146 of file tileData.hxx.

◆ tiles

TileSetData TileData::tiles

Tile Spritesheet information.

Definition at line 148 of file tileData.hxx.

◆ tileType

TileType TileData::tileType = TileType::DEFAULT
Todo:
: String for now, should be an enum

Definition at line 149 of file tileData.hxx.

◆ title

std::string TileData::title

The item's title. It's shown ingame and in the editor's tree-view.

Definition at line 152 of file tileData.hxx.

◆ upkeepCost

int TileData::upkeepCost = 0

monthly cost

Definition at line 155 of file tileData.hxx.

◆ water

int TileData::water = 0

water production / consumption if negative

Definition at line 157 of file tileData.hxx.

◆ zoneDensity

std::vector<ZoneDensity> TileData::zoneDensity

Restrict this building to a certain zone density. See enum ZoneDensity.

Definition at line 172 of file tileData.hxx.

◆ zoneTypes

std::vector<ZoneType> TileData::zoneTypes

Restrict this building to a zone type.

Definition at line 170 of file tileData.hxx.


The documentation for this struct was generated from the following file: