The in-memory representation of a [terrain_graphics] WML rule. More...
Public Member Functions | |
bool | operator< (const building_rule &that) const |
unsigned int | get_hash () const |
Public Attributes | |
constraint_set | constraints |
The set of [tile] constraints of this rule. More... | |
map_location | location_constraints |
The location on which this map may match. More... | |
map_location | modulo_constraints |
Used to constrain locations to ones with coordinates that are multiples of the "mod_x" and "mod_y" parameters. More... | |
int | probability = 100 |
The probability of this rule to match, when all conditions are met. More... | |
int | precedence = 0 |
Ordering relation between the rules. More... | |
bool = false | |
Indicate if the rule is only for this scenario. More... | |
Private Attributes | |
unsigned int | hash_ = DUMMY_HASH |
The in-memory representation of a [terrain_graphics] WML rule.
Definition at line 359 of file builder.hpp.
unsigned int terrain_builder::building_rule::get_hash | ( | ) | const |
Definition at line 1107 of file builder.cpp.
References terrain_builder::DUMMY_HASH, hash_str(), terrain_builder::rule_image_variant::image_string, and terrain_builder::rule_image::variants.
Referenced by terrain_builder::apply_rule(), and terrain_builder::rule_matches().
|
inline |
Definition at line 397 of file builder.hpp.
References precedence.
terrain_builder::building_rule::bool = false |
Indicate if the rule is only for this scenario.
Definition at line 395 of file builder.hpp.
constraint_set terrain_builder::building_rule::constraints |
The set of [tile] constraints of this rule.
Definition at line 364 of file builder.hpp.
Referenced by terrain_builder::apply_rule(), terrain_builder::load_images(), terrain_builder::parse_config(), terrain_builder::parse_mapstring(), terrain_builder::replace_rotate_tokens(), terrain_builder::rotate_rule(), and terrain_builder::rule_matches().
|
mutableprivate |
Definition at line 405 of file builder.hpp.
map_location terrain_builder::building_rule::location_constraints |
The location on which this map may match.
Set to a valid map_location if the "x" and "y" parameters of the [terrain_graphics] rule are set.
Definition at line 371 of file builder.hpp.
Referenced by terrain_builder::parse_config(), and terrain_builder::rule_matches().
map_location terrain_builder::building_rule::modulo_constraints |
Used to constrain locations to ones with coordinates that are multiples of the "mod_x" and "mod_y" parameters.
Doesn't actually refer to a real map location.
Definition at line 378 of file builder.hpp.
Referenced by terrain_builder::parse_config(), and terrain_builder::rule_matches().
int terrain_builder::building_rule::precedence = 0 |
Ordering relation between the rules.
Definition at line 390 of file builder.hpp.
Referenced by operator<(), and terrain_builder::parse_config().
int terrain_builder::building_rule::probability = 100 |
The probability of this rule to match, when all conditions are met.
Defined if the "probability" parameter of the [terrain_graphics] element is set.
Definition at line 385 of file builder.hpp.
Referenced by terrain_builder::parse_config(), and terrain_builder::rule_matches().