mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-09 07:49:26 +00:00
[modify_ai] tag support
This commit is contained in:
parent
0b9fbaf95d
commit
7c66964efe
@ -827,6 +827,16 @@ WML_HANDLER_FUNCTION(gold, /*event_info*/, cfg)
|
||||
}
|
||||
}
|
||||
|
||||
WML_HANDLER_FUNCTION(modify_ai, /*event_info*/, cfg)
|
||||
{
|
||||
std::string side = cfg["side"];
|
||||
const int side_num = lexical_cast_default<int>(side,0);
|
||||
if (side_num==0) {
|
||||
return;
|
||||
}
|
||||
ai::manager::modify_active_ai_for_side(side_num,cfg.get_parsed_config());
|
||||
}
|
||||
|
||||
WML_HANDLER_FUNCTION(modify_side, /*event_info*/, cfg)
|
||||
{
|
||||
std::vector<team> &teams = *resources::teams;
|
||||
|
Loading…
x
Reference in New Issue
Block a user