widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03968
[Merge] lp:~widelands-dev/widelands/bug-1451977 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1451977 into lp:widelands.
Commit message:
Collectors win condition now displays descname for wares.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1451977 in widelands: "Collectors message contains bad names"
https://bugs.launchpad.net/widelands/+bug/1451977
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1451977/+merge/258335
Collectors win condition now displays descname for wares.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1451977 into lp:widelands.
=== modified file 'scripting/win_conditions/collectors.lua'
--- scripting/win_conditions/collectors.lua 2015-05-03 09:38:41 +0000
+++ scripting/win_conditions/collectors.lua 2015-05-06 07:27:04 +0000
@@ -106,9 +106,10 @@
end
local lpoints = count * value
points = points + lpoints
+ local warename = wl.Game():get_ware_description(plr.tribe_name, ware).descname
-- TRANSLATORS: For example: 'gold (3 P) x 4 = 12 P", P meaning "Points'
descr[#descr+1] = [[• ]] .. (_" %1$s (%2$i P) x %3$i = %4$i P"):bformat(
- ware, value, count, lpoints
+ warename, value, count, lpoints
) .. "<br>"
end
descr[#descr+1] = "</p>" .. h3(ngettext("Total: %i point", "Total: %i points", points)):format(points)
Follow ups