Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/wesnoth/wesnoth
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed May 18, 2014
2 parents 3501d43 + ff3b686 commit ff00416
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripting/lua.cpp
Expand Up @@ -1182,6 +1182,8 @@ static int impl_side_get(lua_State *L)
return_string_attrib("name", t.name());
return_string_attrib("color", t.color());
return_cstring_attrib("controller", t.controller_string());
return_bool_attrib("fight_on_without_leader", t.fight_on_without_leader());
return_bool_attrib("lost", t.lost());

if (strcmp(m, "recruit") == 0) {
std::set<std::string> const &recruits = t.recruits();
Expand Down Expand Up @@ -1224,6 +1226,8 @@ static int impl_side_set(lua_State *L)
modify_string_attrib("team_name", t.change_team(value, t.user_team_name()));
modify_string_attrib("controller", t.change_controller(value));
modify_string_attrib("color", t.set_color(value));
modify_bool_attrib("fight_on_without_leader", t.set_fight_on_without_leader(value));
modify_bool_attrib("lost", t.set_lost(value));

if (strcmp(m, "recruit") == 0) {
t.set_recruits(std::set<std::string>());
Expand Down
1 change: 1 addition & 0 deletions src/team.hpp
Expand Up @@ -266,6 +266,7 @@ class team : public savegame::savegame_config
bool get_disallow_observers() const {return info_.disallow_observers; }
bool no_leader() const { return info_.no_leader; }
bool fight_on_without_leader() const { return info_.fight_on_without_leader; }
void set_fight_on_without_leader(bool value) { info_.fight_on_without_leader = value; }
void have_leader(bool value=true) { info_.no_leader = !value; }
bool hidden() const { return info_.hidden; }
void set_hidden(bool value) { info_.hidden=value; }
Expand Down

0 comments on commit ff00416

Please sign in to comment.