Merge pull request #63 from Vultraz/master

Allowed [modify_side] to modify the scroll_to_leader key
This commit is contained in:
lipk 2013-08-15 02:27:03 -07:00
commit faee03bbf0
3 changed files with 8 additions and 0 deletions

View file

@ -31,6 +31,7 @@ Version 1.11.5+dev:
* If [recall] cannot find a unit to recall, the message is logged at the
"info" severity level in the "wml" domain (instead of the "error" level in
the "engine" domain). This means the message will be suppressed by default.
* Allowed [modify_side] to modify the scroll_to_leader key
* Miscellaneous and bug fixes
* Creating a unit via debug mode now clears fog/shroud around the unit.
* [move_unit_fake] now accepts an optional force_scroll= attribute (def. to

View file

@ -1296,6 +1296,12 @@ WML_HANDLER_FUNCTION(modify_side, /*event_info*/, cfg)
if ( !setc.empty() ) {
teams[team_index].set_no_turn_confirmation(setc.to_bool());
}
// Change leader scrolling options
config::attribute_value stl = cfg["scroll_to_leader"];
if ( !stl.empty()) {
teams[team_index].set_scroll_to_leader(stl.to_bool(true));
}
}
// Flag an update of the screen, if needed.

View file

@ -164,6 +164,7 @@ public:
{ info_.current_player = player; }
bool get_scroll_to_leader() const {return info_.scroll_to_leader;}
void set_scroll_to_leader(bool value) { info_.scroll_to_leader = value; }
const std::set<std::string>& recruits() const
{ return info_.can_recruit; }