Merge lp:~widelands-dev/widelands/bug-1451977 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 7456
Proposed branch: lp:~widelands-dev/widelands/bug-1451977
Merge into: lp:widelands
Diff against target: 15 lines (+2/-1)
1 file modified
scripting/win_conditions/collectors.lua (+2/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1451977
Reviewer Review Type Date Requested Status
TiborB Approve
Review via email: mp+258335@code.launchpad.net

Commit message

Collectors win condition now displays descname for wares.

Description of the change

Collectors win condition now displays descname for wares.

To post a comment you must log in.
Revision history for this message
TiborB (tiborb95) wrote :

LGTM

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for the review :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripting/win_conditions/collectors.lua'
2--- scripting/win_conditions/collectors.lua 2015-05-03 09:38:41 +0000
3+++ scripting/win_conditions/collectors.lua 2015-05-06 07:27:04 +0000
4@@ -106,9 +106,10 @@
5 end
6 local lpoints = count * value
7 points = points + lpoints
8+ local warename = wl.Game():get_ware_description(plr.tribe_name, ware).descname
9 -- TRANSLATORS: For example: 'gold (3 P) x 4 = 12 P", P meaning "Points'
10 descr[#descr+1] = [[• ]] .. (_" %1$s (%2$i P) x %3$i = %4$i P"):bformat(
11- ware, value, count, lpoints
12+ warename, value, count, lpoints
13 ) .. "<br>"
14 end
15 descr[#descr+1] = "</p>" .. h3(ngettext("Total: %i point", "Total: %i points", points)):format(points)

Subscribers

People subscribed via source and target branches

to status/vote changes: