QcVillageStyle::Piece Struct
struct QcVillageStyle::PieceA kind of building (QcVillagePiece) with its blueprints and rules. More...
Public Functions
Public Variables
| QList<QcVillageStyle::Blueprint> | blueprints |
| double | chance |
| QcBlockId | deck |
| int | jettyOver |
| int | jettyWidth |
| int | max |
| int | minRoadLength |
| QcBlockId | post |
| int | water |
| int | weight |
Detailed Description
Member Function Documentation
const QcVillageStyle::Blueprint &Piece::first() const
Returns the first blueprint (the centre and the lamp have just one).
bool Piece::hasRules() const
Returns whether the kind has a rule: a chance below 1, a minimum road length or a water rule.
Member Variable Documentation
QList<QcVillageStyle::Blueprint> Piece::blueprints
The blueprints, one chosen by weight per building.
double Piece::chance
Rule: the chance per village that the kind is built (for the rare centre: that it stands instead of the centre).
int Piece::max
At most this many in one village; 0: no limit (a kind with rules: at least one).
int Piece::minRoadLength
Rule: built only in villages whose roads are at least this many blocks long together.
int Piece::water
Rule: built only beside a road end with water at most this many blocks ahead; 0: no water rule.
int Piece::weight
The relative chance against the other kinds of the style.