Lua: added side.choose_random getter (fixes #2378)
This commit is contained in:
parent
13a4822d77
commit
3de5ee8b42
2 changed files with 7 additions and 0 deletions
|
@ -86,6 +86,7 @@ static int impl_side_get(lua_State *L)
|
|||
return_string_attrib("share_vision", t.share_vision().to_string());
|
||||
return_bool_attrib("share_maps", t.share_maps());
|
||||
return_bool_attrib("share_view", t.share_view());
|
||||
return_bool_attrib("chose_random", t.chose_random());
|
||||
|
||||
if (strcmp(m, "recruit") == 0) {
|
||||
const std::set<std::string>& recruits = t.recruits();
|
||||
|
|
|
@ -398,6 +398,12 @@ public:
|
|||
info_.handle_legacy_share_vision(cfg);
|
||||
}
|
||||
std::string allied_human_teams() const;
|
||||
|
||||
bool chose_random() const
|
||||
{
|
||||
return info_.chose_random;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
const std::vector<const shroud_map*>& ally_shroud(const std::vector<team>& teams) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue