Support for vision in [unit], previously it worked only in [unit_type].
This commit is contained in:
parent
ed41ff9803
commit
06269beeaf
1 changed files with 2 additions and 0 deletions
|
@ -372,6 +372,8 @@ unit::unit(const config &cfg, bool use_traits, game_state* state, const vconfig*
|
|||
max_movement_ = std::max(0, cfg["max_moves"].to_int(max_movement_));
|
||||
max_experience_ = std::max(1, cfg["max_experience"].to_int(max_experience_));
|
||||
|
||||
vision_ = cfg["vision"].to_int(vision_);
|
||||
|
||||
std::vector<std::string> temp_advances = utils::split(cfg["advances_to"]);
|
||||
if(temp_advances.size() == 1 && temp_advances.front() == "null") {
|
||||
advances_to_.clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue