Review: Approve

Thanks. Please go ahead and merge :)

Diff comments:

> === modified file 
> 'campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua'
> --- campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua     
> 2015-05-31 13:45:13 +0000
> +++ campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua     
> 2015-06-10 16:51:14 +0000
> @@ -19,9 +19,25 @@
>     message_box_objective(plr, tavern_burnt_down)
>     sleep(2000)
>     local o = message_box_objective(plr, building_stat)
> -   -- wait for the window to open and close
>     while not mv.windows.building_statistics do sleep(100) end
> -   -- we cannot check whether the user scrolled, so let's hope he does it
> +   sleep(500)
> +   o.done = true
> +
> +   o = message_box_objective(plr,explain_building_stat)
> +   -- We cannot create several objectives with the same name. Therefore, we 
> create o2 here once and change its visibility
> +   local o2 = add_campaign_objective(reopen_building_stat_obj)
> +   o2.visible = false
> +   local medium_tab_active = false
> +   while not medium_tab_active do
> +      if not mv.windows.building_statistics then
> +         o2.visible = true
> +         message_box_objective(plr, reopen_building_stat)
> +         while not mv.windows.building_statistics do sleep(200) end
> +         o2.visible = false
> +      end
> +      if mv.windows.building_statistics.tabs["building_stats_medium"].active 
> then medium_tab_active = true end
> +      sleep(200)
> +   end
>     while mv.windows.building_statistics do sleep(100) end
>     o.done = true
>  
> @@ -32,7 +48,7 @@
>  
>     o = message_box_objective(plr, inventory2)
>     -- We cannot create several objectives with the same name. Therefore, we 
> create o2 here once and change its visibility
> -   local o2 = add_campaign_objective(reopen_stock_menu_obj)
> +   o2 = add_campaign_objective(reopen_stock_menu_obj)

I see it now - it has already been declared. All good then :)

>     o2.visible = false
>     while not o.done do
>        if not mv.windows.stock_menu then
> 
> === modified file 
> 'campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua'
> --- campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua        
> 2014-10-17 08:38:24 +0000
> +++ campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua        
> 2015-06-10 16:51:14 +0000
> @@ -2,7 +2,7 @@
>  -- Initialization
>  -- ===============
>  
> -plr:forbid_buildings{"scouts_house"} -- otherwise, player could scout and 
> attack the enemy when he should not
> +plr:forbid_buildings{"scouts_house"} -- otherwise, player could scout the 
> wasteland
>  
>  function init_player()
>     -- a headquarters without helms, lances, ores and coal
> @@ -138,6 +138,8 @@
>        {"fortress",71,66},
>        {"fortress",75,72}
>     )
> +   plr:place_building("quarry", map:get_field(87,36), true, true) -- a 
> construction site
> +
>     plr:conquer(map:get_field(111,34),3) -- some remaining fields inside
>  
>     connected_road(plr,map:get_field(97,54).immovable,"tr,tr|tr,tl")
> 
> === modified file 'campaigns/tutorial04_economy.wmf/scripting/texts.lua'
> --- campaigns/tutorial04_economy.wmf/scripting/texts.lua      2014-11-11 
> 10:41:28 +0000
> +++ campaigns/tutorial04_economy.wmf/scripting/texts.lua      2015-06-10 
> 16:51:14 +0000
> @@ -53,29 +53,76 @@
>     title = _"Building statistics",
>     body = rt(
>        h1(_[[Check out your taverns]]) ..
> -      p(_[[At first, we should find out how many taverns we currently have. 
> Widelands offers you a list where you can easily check this.]])
> +      p(_[[At first, we should find out how many taverns we currently have. 
> Widelands offers you a window where you can easily check this.]])
>     ) ..
>     rt("image=pics/menu_toggle_menu.png",p(_[[First, you will have to open 
> the statistics menu (you can find the corresponding button at the bottom). We 
> will need this menu several times.]])) ..
>     rt("image=pics/menu_building_stats.png",p(_[[Afterwards, choose the 
> ‘Building statistics’.]]) ..
>        paragraphdivider() ..
>        listitem_bullet(_[[Open the building statistics window.]]) ..
> -      listitem_bullet(_[[When you have looked up the number of taverns, 
> close it.]])
> +      listitem_arrow(_[[You can also use the hotkey ‘b’.]])
>     ),
>     h = 350,
>     obj_name = "open_building_stat",
> -   obj_title = _"Look up your number of taverns in the building statistics 
> window.",
> +   obj_title = _"Open the building statistics window.",
>     obj_body =
>        rt("image=pics/menu_building_stats.png", p(_[[The building statistics 
> window gives you an overview over the buildings you have.]])) ..
>     rt(
>        paragraphdivider() ..
>        -- TRANSLATORS: "it" refers to the building statistics window
>        listitem_bullet(_[[Open it. You can access it from the statistics 
> menu.]]) ..
> -      listitem_arrow(_[[The statistics menu is accessed via the second 
> button at the bottom. It provides several windows that give you information 
> about the game.]]) ..
> -      listitem_bullet(_[[Look up how many taverns you have (in the column 
> ‘Owned’)]]) ..
> +      listitem_arrow(_[[The statistics menu is accessed via the second 
> button at the bottom. It provides several windows that give you information 
> about the game.]])
> +   )
> +}
> +
> +explain_building_stat = {
> +   title = _"Building Statistics",
> +   body = rt(
> +      p(_[[This is the building statistics window. It shows you all 
> buildings you can own, sorted by their size.]]) ..
> +      p(_[[Let me now explain what all those numbers mean:]]) ..
> +      paragraphdivider() ..
> +      listitem_bullet(_[[‘2/1’ below the quarry: This means that you have 
> two quarries, plus another one which is under construction.]]) ..
> +      listitem_bullet(_[[‘0%’: This indicates the average productivity of 
> all buildings of that type. You have just started this game, therefore none 
> of your buildings has done any work yet, but they are going to start working 
> soon.]]) ..
> +      listitem_bullet(_[[‘2/4’ below your sentry: For military buildings, 
> the stationed soldiers are shown instead of a productivity. You want to have 
> four soldiers in your sentries, but only two soldiers are stationed in this 
> kind of building. This leaves two vacant positions — we really need more 
> soldiers.]]) ..
> +      listitem_arrow(_[[In both cases, the color (green - yellow - red) 
> signals you how good the value is.]]) ..
> +      listitem_bullet(_[[If you click on a building, you can scroll through 
> the buildings of the selected type.]]) ..
> +      listitem_bullet(_[[If you don’t have any building of a particular 
> building type, it will be shown greyed out.]])
> +   ) ..
> +   rt(
> +      h2(_[[Now it’s your turn]]) ..
> +      p(_[[This is enough explanation for now. Now try it out yourself. We 
> want to know whether we still have taverns, so you have to choose the ‘Medium 
> Buildings’ tab. Close the building statistics menu afterwards.]])
> +   ),
> +   obj_name = "check_taverns",
> +   obj_title = _"Look up your number of taverns in the building statistics 
> window.",
> +   obj_body = rt(
> +      listitem_bullet(_[[Choose the ‘Medium Buildings’ tab in the building 
> statistics window.]]) ..
> +      listitem_bullet(_[[Look up how many taverns you have.]]) ..
> +      listitem_arrow(_[[Below every building, there are two lines. The first 
> one shows the number of buildings you own and how many are under 
> construction. The second line shows the average productivity if it is a 
> production site or training site, or the stationed and desired soldiers in 
> military buildings.]]) ..
>        listitem_bullet(_[[Close the building statistics window when you are 
> done.]])
>     )
>  }
>  
> +reopen_building_stat = {
> +   title = _"You closed the building statistics window!",
> +   body = rt(
> +      p(_[[You have closed the building statistics window. I didn’t notice 
> that you switched to the medium buildings to look up the number of taverns. 
> Would you please be so nice and show it to me?]])
> +   ),
> +   show_instantly = true,
> +   w = 300,
> +   h = 250
> +}
> +
> +reopen_building_stat_obj = {
> +   obj_name = "open_building_stat_again",
> +   obj_title = _"Open the building statistics window again.",
> +   obj_body = rt(
> +      p(_[[You closed the building statistics window, although you have not 
> yet looked up the number of taverns.]]) ..
> +      paragraphdivider() ..
> +      -- TRANSLATORS: "it" refers to the building statistics window.
> +      listitem_bullet(_[[Please reopen it and choose the second tab (medium 
> buildings).]])
> +   ),
> +   h = 250
> +}
> +
>  inventory1 = {
>     position = "topright",
>     title = _"Stock",
> 


-- 
https://code.launchpad.net/~widelands-dev/widelands/building-statistics-window-tut04/+merge/261615
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/building-statistics-window-tut04.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to