mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 02:03:41 +00:00
Improve the previous custom command feature:
...allow sequence of commands like : custom Thief ; unit gender female ; unit hitpoints 100 ; unit name Wonderwoman Then the hotkey will always create this special unit. Not very useful with the current set of commands but was easy to implement. The main use is probably custom Thief ; unit moves 10
This commit is contained in:
parent
840d1d0642
commit
956d928659
@ -2904,7 +2904,11 @@ private:
|
||||
|
||||
void menu_handler::custom_command(mouse_handler& mousehandler, const unsigned int team_num)
|
||||
{
|
||||
do_command(preferences::custom_command(), team_num, mousehandler);
|
||||
std::vector<std::string> commands = utils::split(preferences::custom_command(), ';');
|
||||
std::vector<std::string>::iterator c = commands.begin();
|
||||
for (; c != commands.end() ; ++c) {
|
||||
do_command(*c, team_num, mousehandler);
|
||||
}
|
||||
}
|
||||
|
||||
void menu_handler::ai_formula()
|
||||
|
Loading…
x
Reference in New Issue
Block a user