diff --git a/changelog b/changelog index 05caed9785a..27191a0133d 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,7 @@ Version 1.5.1+svn: * campaigns: + * Tutorial + * Fixed players side name to same as leaders name (bug: #10114) * formula AI: * Added variant_iterator to iterate over variant elements * Modified choose, filter, find and map functions to use variant_iterator, diff --git a/data/campaigns/tutorial/scenarios/1_Tutorial.cfg b/data/campaigns/tutorial/scenarios/1_Tutorial.cfg index 0d59fd7d052..018f1f1b0c1 100644 --- a/data/campaigns/tutorial/scenarios/1_Tutorial.cfg +++ b/data/campaigns/tutorial/scenarios/1_Tutorial.cfg @@ -76,6 +76,7 @@ border_size=1 type=Fighter id=student name=_"Konrad" + current_player=_"Konrad" canrecruit=yes side=1 controller=human @@ -492,20 +493,20 @@ Now, this quintain gets 5 chances to hit you for 3 damage each. If it hits every id=Delfador message=_ "There is a village on the other side of the river. Visiting villages is a good idea, and ending your turn in one will heal you. To the village!" [/message] - #wmlindent: start ignoring - {GENDER ({PRINT (_"Left click on Konrad")}) - ({PRINT (_"Left click on Li'sar")})} - #wmlindent: stop ignoring + #wmlindent: start ignoring + {GENDER ({PRINT (_"Left click on Konrad")}) + ({PRINT (_"Left click on Li'sar")})} + #wmlindent: stop ignoring [event] name=select [filter] side=1 [/filter] - #wmlindent: start ignoring - {GENDER ({PRINT (_"Click on the village to move Konrad")}) - ({PRINT (_"Click on the village to move Li'sar")})} - #wmlindent: stop ignoring + #wmlindent: start ignoring + {GENDER ({PRINT (_"Click on the village to move Konrad")}) + ({PRINT (_"Click on the village to move Li'sar")})} + #wmlindent: stop ignoring [/event] {TARGET_HEX 11 7} @@ -572,10 +573,10 @@ Now, this quintain gets 5 chances to hit you for 3 damage each. If it hits every message=_ "A splendid idea. You can recruit two units if you return to the keep. You have plenty of gold for that." [/message] {TARGET_HEX 9 6} - #wmlindent: start ignoring - {GENDER ({PRINT (_"Move Konrad to the keep")}) - ({PRINT (_"Move Li'sar to the keep")})} - #wmlindent: stop ignoring + #wmlindent: start ignoring + {GENDER ({PRINT (_"Move Konrad to the keep")}) + ({PRINT (_"Move Li'sar to the keep")})} + #wmlindent: stop ignoring [event] name=moveto [filter] diff --git a/data/campaigns/tutorial/scenarios/2_Tutorial.cfg b/data/campaigns/tutorial/scenarios/2_Tutorial.cfg index e7ac30c58cc..a83ed7695ee 100644 --- a/data/campaigns/tutorial/scenarios/2_Tutorial.cfg +++ b/data/campaigns/tutorial/scenarios/2_Tutorial.cfg @@ -293,6 +293,7 @@ type=Fighter id=student name=_"Konrad" + current_player=_"Konrad" canrecruit=yes side=1 gold=123 diff --git a/src/game_events.cpp b/src/game_events.cpp index 5f480fff741..c4f0f9d8591 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -1689,6 +1689,11 @@ namespace { loc = find_vacant_tile(*game_map,*units,loc); const bool show = screen != NULL && !screen->fogged(loc); const bool animate = show && utils::string_bool(cfg["animate"], false); + + // If new unit is leader set current player/visible side name + // to units name + if (new_unit.can_recruit()) + (*teams)[new_unit.side() - 1].set_current_player(new_unit.name()); units->erase(loc); units->add(new std::pair(loc,new_unit));