Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-01-14 Thread GunChleoc
> I haven't looked closely at this, but it seems to have fixed the VICTORY/NEW
> OBJECTIVES headlines in campaing texts.

This is correct. I have overhauled the code in all the tutorial campaigns, 
taking the Atlanteans as a blueprint.
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-01-15 Thread GunChleoc
If we merge this soon after the next build release, we could retrieve the 
translations from the build tag.
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~gunchleoc/widelands/smugglers-i18n into lp:~widelands-dev/widelands/gci18nfixes

2014-02-10 Thread GunChleoc
Yes, I branched it from trunk. I made the merge request on gci18nfixes, because 
it depends on the ngettext and bformat functions in that branch and so we won't 
forget to merge that first.

On hindsight, it would have made lore sence to branch from gci18nfixes I guess. 
-- 
https://code.launchpad.net/~gunchleoc/widelands/smugglers-i18n/+merge/205496
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/gci18nfixes.

___
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


Re: [Widelands-dev] [Merge] lp:~gunchleoc/widelands/smugglers-i18n into lp:~widelands-dev/widelands/gci18nfixes

2014-02-11 Thread GunChleoc
I need help with testing first though, which is why I created a separate branch 
in the first place. Once we have this tested and running, I can just copy the 
scenario files to the other branch and scrap this branch.
-- 
https://code.launchpad.net/~gunchleoc/widelands/smugglers-i18n/+merge/205496
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/gci18nfixes.

___
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


Re: [Widelands-dev] [Merge] lp:~gunchleoc/widelands/smugglers-i18n into lp:~widelands-dev/widelands/gci18nfixes

2014-02-12 Thread GunChleoc
Maybe it's best I scrap this branch and split a new one from gci18nfixes, this 
way only the smugglers files will show up in the diff.

I have not really checked out the multiplayer stuff yet, is it possible to hook 
up something on LAN with a couple of Ubuntu virtual machines? I only have 3 
computers though, so I don't know how the IP addressing would work. I'm a 
networking numpty :P
-- 
https://code.launchpad.net/~gunchleoc/widelands/smugglers-i18n/+merge/205496
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/gci18nfixes.

___
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


Re: [Widelands-dev] [Merge] lp:~gunchleoc/widelands/smugglers-i18n into lp:~widelands-dev/widelands/gci18nfixes

2014-02-15 Thread GunChleoc
Magic :)

We can scrap this branch now, I'll do the changes in gci18nfixes.
-- 
https://code.launchpad.net/~gunchleoc/widelands/smugglers-i18n/+merge/205496
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/gci18nfixes.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-02-28 Thread GunChleoc
I did a merge on my local hard drive trunk -> gci18nfixes, and now I get a 
whole bunch of errors of the type

/src/logic/productionsite.h:156:33: error: ‘override’ does not name a type
/src/logic/productionsite.h:157:38: error: expected ‘;’ at end of member 
declaration

I get them in logic and economy files as well.

This is code I have not touched, so I have no idea where to start looking.
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-02-28 Thread GunChleoc
P.S: I also noticed than when I merge from trunk to my branch, some of the 
texts I proofread are reverted to the previous version. I will will also have 
to mantually diff everything. after the merge.

The general rules for the merge conflicts that bazaar flags up are this:

- Ignore the po/pot, we will need to run buildcat.py/buildlocale.py anyway 
after the merge

- Anything changed in Lua or for Lua stays in. Especially localized strings in 
the tribes and scenarios.

- Anything that is a localized string in C++ stays in

- Take anything else in C++ from Master.

The file with the most conflicts is src/logic/playercommand.cc. Take all of 
these from Master.
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-03-01 Thread GunChleoc
Sound like that is the reason then. I just tried and can't compile trunk either.

I decided to do a full manual diff, because the automated merge killed some of 
my string changes. I'll do my best not to kill your bformat and ngettext Lua 
functions :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-03-01 Thread GunChleoc
So did my best to merge trunk. All uncompiled and untested. Also, the .pot 
catalogs etc. will need to be rebuilt.
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands

2014-03-03 Thread GunChleoc
Do you have any ideas how to get rid of the added/removed/deleted conflicts?

I did a full manual merge and now bzr wants to track something somewhere and is 
generating these conflicts.

I tried saving my work, doing a bzr merge and then copying my files over, but 
then I get the same conflicts directly in the branch.

I tried stuff like deleting the test and po directories and copying them over 
from trunk, how to I tell bzr to shut up and accept the changes already?
-- 
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/i18n into lp:widelands

2014-03-04 Thread GunChleoc
After I could compile and test, this is the stuff that still needs looking into:

===

/test/maps/expedition.wmf/scripting/init.lua
- upper or lowercase needed here?
  wait_for_message("Expedition Ready")
  wait_for_message("Port Space Found")

===

/utils/test/test_lua-xgettext.py

- 2 differences, please check:

def run_test(self):
self.p.parse(self.code, self.filename)

+ print self.p.findings - do we need this line? It's in gci18nfixes, but 
missing from i18n

and at EOF:

- # k = SomeTestClass()
- # unittest.TextTestRunner().run(k)
+ k = SomeTestClass()
+ unittest.TextTestRunner().run(k)

===

Help messages in nethost.cc
-- 
https://code.launchpad.net/~widelands-dev/widelands/i18n/+merge/209212
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/i18n into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/i18n-20140406 into lp:widelands

2014-03-06 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/i18n-20140406 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140406/+merge/209770

Some small string bugfixes for i18n.

Catalogs will need rebuilding after the merge.
-- 
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140406/+merge/209770
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/i18n-20140406 into lp:widelands.
=== modified file 'campaigns/tutorial01.wmf/scripting/texts.lua'
--- campaigns/tutorial01.wmf/scripting/texts.lua	2014-03-05 18:47:03 +
+++ campaigns/tutorial01.wmf/scripting/texts.lua	2014-03-06 20:03:33 +
@@ -13,12 +13,12 @@
 -- =
 scould_player = {
title = _ "Nice And Easy Does It All the Time",
-   body = rt(p(_
+   body = rt(p(_(
 [[I am sorry, but will I have to tear this down again. ]] ..
 [[We might need the space here later on. ]] ..
 [[If I am too slow for you, you might want to play a real game and just find everything out for yourself. ]] ..
 [[Otherwise, please bear with me, I am not the youngest and quickest anymore.]]
-  )
+  ))
)
 }
 
@@ -584,7 +584,7 @@
 [[Training happens in training sites like the training camp or the battle arena: ]] ..
 [[soldiers go there (as our little fellows are currently doing), ]] ..
 [[consume some wares and advance a level in one category. If a barbarian soldier is fully trained, ]] ..
-[[he has level 3 health, level 5 attack, level 0 defense and level 2 evade. This is one fearsome warrior then!]] ..
+[[he has level 3 health, level 5 attack, level 0 defense and level 2 evade. This is one fearsome warrior then! ]] ..
 [[The individual statistics have the following meaning:]])
   ) .. h2(_"Health:") .. p(_(
 [[The total life of a soldier. A barbarian soldier starts with ~130 health points, ]] ..

=== modified file 'tribes/barbarians/fishers_hut/help.lua'
--- tribes/barbarians/fishers_hut/help.lua	2014-03-05 18:47:03 +
+++ tribes/barbarians/fishers_hut/help.lua	2014-03-06 20:03:33 +
@@ -46,5 +46,5 @@
 		text_line(_"Experience levels:","n/a") ..
 	--Production Section
 		rt(h2(_"Production")) ..
-		text_line(_"Performance:", _"The %1$s pauses %2$s before going to work again.":bformat(_"Fisher","18s"))
+		text_line(_"Performance:", _"The fisher pauses 18s before going to work again.")
 }

=== modified file 'tribes/barbarians/gamekeepers_hut/help.lua'
--- tribes/barbarians/gamekeepers_hut/help.lua	2014-03-05 18:47:03 +
+++ tribes/barbarians/gamekeepers_hut/help.lua	2014-03-06 20:03:33 +
@@ -40,5 +40,5 @@
 		text_line(_"Experience levels:","n/a") ..
 	--Production Section
 		rt(h2(_"Production")) ..
-		text_line(_"Performance:", _"The %1$s pauses %2$s before going to work again.":bformat(_"Gamekeeper","52.5s"))
+		text_line(_"Performance:", _"The gamekeeper pauses 52.5s before going to work again.")
 }

=== modified file 'tribes/barbarians/hunters_hut/help.lua'
--- tribes/barbarians/hunters_hut/help.lua	2014-03-05 18:47:03 +
+++ tribes/barbarians/hunters_hut/help.lua	2014-03-06 20:03:33 +
@@ -48,5 +48,5 @@
 		text_line(_"Experience levels:","n/a") ..
 	--Production Section
 		rt(h2(_"Production")) ..
-		text_line(_"Performance:", _"The %1$s pauses %2$s before going to work again.":bformat(_"Hunter","35s"))
+		text_line(_"Performance:", _"The hunter pauses 35s before going to work again.")
 }

=== modified file 'tribes/barbarians/quarry/help.lua'
--- tribes/barbarians/quarry/help.lua	2014-03-05 18:47:03 +
+++ tribes/barbarians/quarry/help.lua	2014-03-06 20:03:33 +
@@ -43,5 +43,5 @@
 		text_line(_"Experience levels:","n/a") ..
 	--Production Section
 		rt(h2(_"Production")) ..
-		text_line(_"Performance:", _"The %s pauses %s before going to work again.":format(_"Stonemason","25s"))
+		text_line(_"Performance:", _"The stonemason pauses 25s before going to work again.")
 }

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/i18n-20140406 into lp:widelands

2014-03-06 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/i18n-20140406 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140406/+merge/209788

Another minifix ;)
-- 
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140406/+merge/209788
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/i18n-20140406 into lp:widelands.
=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc	2014-03-04 13:24:58 +
+++ src/wui/interactive_base.cc	2014-03-06 21:25:01 +
@@ -312,8 +312,7 @@
 {
 	if (speed) {
 		char buffer[32];
-		/** TRANSLATORS: Game speed, e.g. 2.5x */
-		snprintf(buffer, sizeof(buffer), _("%1$u.%2$ux"), speed / 1000, speed / 100 % 10);
+		snprintf(buffer, sizeof(buffer), ("%u.%ux"), speed / 1000, speed / 100 % 10);
 		return buffer;
 	}
 	return _("PAUSE");

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/i18n-20140307 into lp:widelands

2014-03-07 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/i18n-20140307 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140307/+merge/210046

Some more i18n fixes.

Catalogs and translations will need rebuilding.
-- 
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140307/+merge/210046
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/i18n-20140307 into lp:widelands.
=== modified file 'maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua'
--- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua	2014-03-05 18:47:03 +
+++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua	2014-03-08 06:20:00 +
@@ -129,6 +129,7 @@
elseif  resource == "goldore" then
   return ngettext("%s Gold Ore","%s Gold Ore",count):bformat(count)
else
+  -- TRANSLATORS: number + resource name, e.g. '1 stone'
   return (_"%1$i %2$s"):bformat(count, resource)
end
 end

=== modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua'
--- maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua	2014-03-03 20:50:30 +
+++ maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua	2014-03-08 06:20:00 +
@@ -11,7 +11,7 @@
 [[To establish a smuggling route, you need to build a warehouse on a sending/receiving spot ]] ..
 [[while your team mate has to build one on the corresponding receiving/sending spot. ]] ..
 [[A ware is then transported every 10 seconds. ]]) ..
--- TRANSLATORS: %s = " points"
+-- TRANSLATORS: %s = ' points'
 _([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]]
 )) ..
rt("image=map:send_spot.png", p(_"A sending spot")) ..
@@ -25,30 +25,30 @@
 [[You can see the number of wares traded at any time in the general statistics menu. Good luck!]]
 )))
 
--- TRANSLATORS: the first 2 parameters are player names, the last parameter is " points"
+-- TRANSLATORS: the first 2 parameters are player names, the last parameter is ' points'
 smuggling_route_established_other_team = rt(p(_(
 [[A new smuggling route from %1$s to %2$s has been established! ]] ..
 [[Every ware they smuggle there is worth %3$s.]]
 )))
--- TRANSLATORS: %s = " points"
+-- TRANSLATORS: %s = ' points'
 smuggling_route_established_sender = rt(p(_(
 [[Your team has established a new smuggling route. You have the sending warehouse. ]] ..
 [[Every ware smuggled here is worth %s.]]
 )))
--- TRANSLATORS: %s = " points"
+-- TRANSLATORS: %s = ' points'
 smuggling_route_established_receiver = rt(p(_(
 [[Your team has established a new smuggling route. You have the receiving warehouse. ]] ..
 [[Every ware smuggled here is worth %s.]]
 )))
 
--- TRANSLATORS: the first parameter is " points", the last 2 parameters are player names
+-- TRANSLATORS: the first parameter is ' points', the last 2 parameters are player names
 smuggling_route_broken = rt(p(_
 [[The smuggling route worth %1$s from %2$s to %3$s has been broken!]]
 ))
 
 game_over = rt(
h1("Game over!") ..
--- TRANSLATORS: the first 4 parameters are player names, the last parameter is " points"
+-- TRANSLATORS: the first 4 parameters are player names, the last parameter is ' points'
p(_
 [[Game over! %1$s and %2$s have won the game! %3$s and %4$s only managed to collect %5$s.]]
 )

=== modified file 'maps/Plateau.wmf/scripting/texts.lua'
--- maps/Plateau.wmf/scripting/texts.lua	2014-02-26 16:52:26 +
+++ maps/Plateau.wmf/scripting/texts.lua	2014-03-08 06:20:00 +
@@ -53,7 +53,7 @@
"" .. reflow(text)
objs = {...}
if #objs > 0 then
-  s = s .. "" .. rt(h2(_"New Objectives")) .. ""
+  s = s .. "" .. rt(h2(_"New Objective")) .. ""
   local i = 1
   while i < #objs do
  s = s .. reflow(objs[i].body) .. ""

=== modified file 'scripting/win_conditions/04_wood_gnome.lua'
--- scripting/win_conditions/04_wood_gnome.lua	2014-03-03 20:50:30 +
+++ scripting/win_conditions/04_wood_gnome.lua	2014-03-08 06:20:00 +
@@ -12,10 +12,10 @@
 
 local wc_name = _ "Wood Gnome"
 local wc_version = 2
-local wc_desc = _
-[[As wood gnome you like big forests, so your task is to have more trees on
-your territory than any other player. The game will end after 4 hours of
-playing. The one with the most trees at that point will win the game.]]
+local wc_desc = _(
+[[As wood gnome you like big forests, so your task is to have more trees on ]] ..
+[[your territory than any other player. The game will end after 4 hours of ]] ..
+[[playing. The one with the most 

[Widelands-dev] [Merge] lp:~gunchleoc/widelands/bug-1289586 into lp:widelands

2014-03-08 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/bug-1289586 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1289586 in widelands: "Let tree descriptions use the same size scheme as 
buildings"
  https://bugs.launchpad.net/widelands/+bug/1289586

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/bug-1289586/+merge/210060

Tree sizes renamed :)
-- 
https://code.launchpad.net/~gunchleoc/widelands/bug-1289586/+merge/210060
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/bug-1289586 into lp:widelands.
=== modified file 'worlds/blackland/conf'
--- worlds/blackland/conf	2014-02-26 21:20:10 +
+++ worlds/blackland/conf	2014-03-08 20:46:35 +
@@ -42,38 +42,42 @@
 stones4=_Stones
 stones5=_Stones
 stones6=_Stones
-tree1=_Aspen
-tree1_m=_Aspen (medium)
-tree1_s=_Aspen (small)
-tree1_t=_Aspen (tiny)
-tree2=_Oak
-tree2_m=_Oak (medium)
-tree2_s=_Oak (small)
-tree2_t=_Oak (tiny)
-tree3=_Spruce
-tree3_m=_Spruce (medium)
-tree3_s=_Spruce (small)
-tree3_t=_Spruce (tiny)
-tree4=_Maple
-tree4_m=_Maple (medium)
-tree4_s=_Maple (small)
-tree4_t=_Maple (tiny)
-tree5=_Birch
-tree5_m=_Birch (medium)
-tree5_s=_Birch (small)
-tree5_t=_Birch (tiny)
-tree6=_Beech
-tree6_m=_Beech (medium)
-tree6_s=_Beech (small)
-tree6_t=_Beech (tiny)
-tree7=_Larch
-tree7_m=_Larch (medium)
-tree7_s=_Larch (small)
-tree7_t=_Larch (tiny)
-tree8=_Rowan
-tree8_m=_Rowan (medium)
-tree8_s=_Rowan (small)
-tree8_t=_Rowan (tiny)
+# TRANSLATORS: Old tree: dominate old growth forest; height growth slows greatly, with majority of productivity in seed production
+tree1=_Aspen (Old)
+# TRANSLATORS: Mature tree: over 30 cm diameter, reproductive years begin
+tree1_m=_Aspen (Mature)
+# TRANSLATORS: Pole: young trees from 7-30 cm diameter
+tree1_s=_Aspen (Pole)
+# TRANSLATORS: Sapling: After the seedling reaches 1 m tall, and until it reaches 7 cm in stem diameter
+tree1_t=_Aspen (Sapling)
+tree2=_Oak (Old)
+tree2_m=_Oak (Mature)
+tree2_s=_Oak (Pole)
+tree2_t=_Oak (Sapling)
+tree3=_Spruce (Old)
+tree3_m=_Spruce (Mature)
+tree3_s=_Spruce (Pole)
+tree3_t=_Spruce (Sapling)
+tree4=_Maple (Old)
+tree4_m=_Maple (Mature)
+tree4_s=_Maple (Pole)
+tree4_t=_Maple (Sapling)
+tree5=_Birch (Old)
+tree5_m=_Birch (Mature)
+tree5_s=_Birch (Pole)
+tree5_t=_Birch (Sapling)
+tree6=_Beech (Old)
+tree6_m=_Beech (Mature)
+tree6_s=_Beech (Pole)
+tree6_t=_Beech (Sapling)
+tree7=_Larch (Old)
+tree7_m=_Larch (Mature)
+tree7_s=_Larch (Pole)
+tree7_t=_Larch (Sapling)
+tree8=_Rowan (Old)
+tree8_m=_Rowan (Mature)
+tree8_s=_Rowan (Pole)
+tree8_t=_Rowan (Sapling)
 
 [critter bob types]
 bunny=_Bunny

=== modified file 'worlds/desert/conf'
--- worlds/desert/conf	2014-02-26 21:20:10 +
+++ worlds/desert/conf	2014-03-08 20:46:35 +
@@ -48,38 +48,43 @@
 stones4=_Stones
 stones5=_Stones
 stones6=_Stones
-tree1=_Palm
-tree1_m=_Palm (medium)
-tree1_s=_Palm (small)
-tree1_t=_Palm (tiny)
-tree2=_Palm
-tree2_m=_Palm (medium)
-tree2_s=_Palm (small)
-tree2_t=_Palm (tiny)
-tree3=_Palm
-tree3_m=_Palm (medium)
-tree3_s=_Palm (small)
-tree3_t=_Palm (tiny)
-tree4=_Palm
-tree4_m=_Palm (medium)
-tree4_s=_Palm (small)
-tree4_t=_Palm (tiny)
-tree5=_Palm
-tree5_m=_Palm (medium)
-tree5_s=_Palm (small)
-tree5_t=_Palm (tiny)
-tree6=_Beech
-tree6_m=_Beech (medium)
-tree6_s=_Beech (small)
-tree6_t=_Beech (tiny)
-tree7=_Larch
-tree7_m=_Larch (medium)
-tree7_s=_Larch (small)
-tree7_t=_Larch (tiny)
-tree8=_Rowan
-tree8_m=_Rowan (medium)
-tree8_s=_Rowan (small)
-tree8_t=_Rowan (tiny)
+
+# TRANSLATORS: Old tree: dominate old growth forest; height growth slows greatly, with majority of productivity in seed production
+tree1=_Palm (Old)
+# TRANSLATORS: Mature tree: over 30 cm diameter, reproductive years begin
+tree1_m=_Palm (Mature)
+# TRANSLATORS: Pole: young trees from 7-30 cm diameter
+tree1_s=_Palm (Pole)
+# TRANSLATORS: Sapling: After the seedling reaches 1 m tall, and until it reaches 7 cm in stem diameter
+tree1_t=_Palm (Sapling)
+tree2=_Palm (Old)
+tree2_m=_Palm (Mature)
+tree2_s=_Palm (Pole)
+tree2_t=_Palm (Sapling)
+tree3=_Palm (Old)
+tree3_m=_Palm (Mature)
+tree3_s=_Palm (Pole)
+tree3_t=_Palm (Sapling)
+tree4=_Palm (Old)
+tree4_m=_Palm (Mature)
+tree4_s=_Palm (Pole)
+tree4_t=_Palm (Sapling)
+tree5=_Palm (Old)
+tree5_m=_Palm (Mature)
+tree5_s=_Palm (Pole)
+tree5_t=_Palm (Sapling)
+tree6=_Beech (Old)
+tree6_m=_Beech (Mature)
+tree6_s=_Beech (Pole)
+tree6_t=_Beech (Sapling)
+tree7=_Larch (Old)
+tree7_m=_Larch (Mature)
+tree7_s=_Larch (Pole)
+tree7_t=_Larch (Sapling)
+tree8=_Rowan (Old)
+tree8_m=_Rowan (Mature)
+tree8_s=_Rowan (Pole)
+tree8_t=_Rowan (Sapling)
 
 [critter bob types]
 bunny=_Bunny

=== modified file 'worlds/greenland/conf'
--- worlds/greenland/conf	2014-02-26 21:20:10 +
+++ worlds/greenland/conf	2014-03-08 20:46:35 +
@@ -43,38 +43,42 @@
 stones4=_Stones
 stones5=_Stones
 stones6=_Stones
-tree1=_Aspen
-tree1_m=_Aspen (

[Widelands-dev] [Merge] lp:~gunchleoc/widelands/i18n-20140308 into lp:widelands

2014-03-09 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/i18n-20140308 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140308/+merge/210081

Some more string fixes
-- 
https://code.launchpad.net/~gunchleoc/widelands/i18n-20140308/+merge/210081
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/i18n-20140308 into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-03-05 18:47:03 +
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-03-09 09:45:53 +
@@ -125,9 +125,9 @@
 
 obj_horsefarm_and_warehouse = {
name = "obj_horsefarm_and_warehouse",
-   title = _"Build a warehouse and a horsefarm",
+   title = _"Build a warehouse and a horse farm",
number = 2,
-   body = objective_text(_"Warehouse and Horsefarm", _(
+   body = objective_text(_"Warehouse and Horse Farm", _(
 [[As your road network gets longer and more complicated, you should employ horses ]] ..
 [[to help out your carriers. Horses are bred at horse farms using water and corn. ]] ..
 [[A warehouse will also help to ensure that your transportation system does not collapse.]]) .. "" ..
@@ -261,12 +261,12 @@
 },
 {
title = _ "Sidolus Speaks",
-   body = sidolus(_
+   body = sidolus(_(
 [[May Satul warm you, Jundlina! I agree with what Loftomor proposes. ]] ..
 [[We need a good supply of building materials for we have to expand our territory swiftly. ]] ..
 [[I will not feel safe on this island as long as we have not seen all its shores it. ]] ..
 [[I brought plenty of good men from Atlantis. The military might is available. ]] ..
-[[We only need some housing to live in.]]
+[[We only need some housing to live in.]])
) ..  new_objectives(obj_expand)
 }
 }

=== modified file 'campaigns/emp02.wmf/scripting/texts.lua'
--- campaigns/emp02.wmf/scripting/texts.lua	2014-02-26 12:53:34 +
+++ campaigns/emp02.wmf/scripting/texts.lua	2014-03-09 09:45:53 +
@@ -169,7 +169,7 @@
 saledus_2 = {
title =_ "Marble on the Mountain",
body= saledus(_"Saledus smiles",
-_([[Lutius, I’ve got good news for you:]] ..
+_([[Lutius, I’ve got good news for you: ]] ..
 [[As I walked to the east, I found a larger mountain.]] ..
 [[I am not absolutely sure – a geologist should check if I am right]] ..
 [[ – but I believe we could mine marble from some places on the mountain.]]) .. "" ..

=== modified file 'campaigns/t02.wmf/scripting/mission_thread_texts.lua'
--- campaigns/t02.wmf/scripting/mission_thread_texts.lua	2014-03-05 18:47:03 +
+++ campaigns/t02.wmf/scripting/mission_thread_texts.lua	2014-03-09 09:45:53 +
@@ -275,9 +275,8 @@
 order_msg_10_bread = {
title=_"The Advisor",
body=khantrukh(_"The elder jumps into the air...", 
-_([[Wisdom commands to seek variety.
-
-North of the great mountain is a large plain – why don’t we use the space Mother Nature gave us and build a farm? ]] .. 
+_([[Wisdom commands to seek variety.]]) .. "" ..
+_([[North of the great mountain is a large plain – why don’t we use the space Mother Nature gave us and build a farm? ]] .. 
 [[I sure would enjoy a freshly baked pitta bread for a change...]])
) .. new_objectives(obj_begin_farming)
 }

=== modified file 'global/militarysites/stronghold.barbarians/conf'
--- global/militarysites/stronghold.barbarians/conf	2013-10-29 10:55:20 +
+++ global/militarysites/stronghold.barbarians/conf	2014-03-09 09:45:53 +
@@ -5,10 +5,10 @@
 buildable=no
 prefer_heroes=false
 occupied_string=
-aggressor_string=_Your Stronghold discovered an aggressor.
-attack_string=_Your Stronghold is under attack.
-defeated_enemy_string=_The enemy defeated your soldiers at the Stronghold
-defeated_you_string=_Your soldiers defeated the enemy at the Stronghold
+aggressor_string=Your Stronghold discovered an aggressor.
+attack_string=Your Stronghold is under attack.
+defeated_enemy_string=The enemy defeated your soldiers at the Stronghold
+defeated_you_string=Your soldiers defeated the enemy at the Stronghold
 
 
 [idle]

=== modified file 'tribes/atlanteans/conf'
--- tribes/atlanteans/conf	2014-03-05 18:47:03 +
+++ tribes/atlanteans/conf	2014-03-09 09:45:53 +
@@ -150,7 +150,7 @@
 donjon.barbarians=_Donjon
 fortress.barbarians=_Fortress
 sentry.barbarians=_Sentry
-stronghold.barbarians=_Stronghold
+stronghold.barbarians=Stronghold
 sentry.empire=_Sentry
 barracks.empire=_Barracks
 barrier.empire=_Barrier

=== modified file 'tribes/barbarians/conf'
--- tribes/barbarians/conf	2014-03-05 18:47:03 +
+++ tribes/barbarians/conf	2014-03-09 09:45:53 +
@@ -219,7 +219,7 @@
 [militarysite types]
 barrier=_Barrier
 sentry=_Sentry
-stronghold=_Stronghold
+stro

Re: [Widelands-dev] [Merge] lp:~mquinson/widelands/cleanup-MilitarySiteDesc into lp:widelands

2014-03-09 Thread GunChleoc
Thanks for cleaning up after me :)
-- 
https://code.launchpad.net/~mquinson/widelands/cleanup-MilitarySiteDesc/+merge/210080
Your team Widelands Developers is requested to review the proposed merge of 
lp:~mquinson/widelands/cleanup-MilitarySiteDesc into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/fix-codechecks into lp:widelands

2014-03-09 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/fix-codechecks into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/fix-codechecks/+merge/210082

Just some code feng shui, no changes in functionality.
-- 
https://code.launchpad.net/~gunchleoc/widelands/fix-codechecks/+merge/210082
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/fix-codechecks into lp:widelands.
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc	2014-03-05 11:59:09 +
+++ src/editor/tools/editor_info_tool.cc	2014-03-09 10:30:28 +
@@ -19,8 +19,9 @@
 
 #include "editor/tools/editor_info_tool.h"
 
+#include 
+
 #include 
-#include 
 
 #include "editor/editorinteractive.h"
 #include "i18n.h"
@@ -51,10 +52,10 @@
 	char buf1[1024];
 	std::string buf = _("Node:");
 	buf += "\n";
-	buf += std::string("• ") + (boost::format(_("Coordinates: (%1$i, %2$i)")) % center.node.x % center.node.y).str() + "\n";
+	buf += std::string("• ") + (boost::format(_("Coordinates: (%1$i, %2$i)"))
+	 % center.node.x % center.node.y).str() + "\n";
 
 	buf += std::string("• ");
-	snprintf(buf1, sizeof(buf1), _("Height: %u"),f.get_height());
 	buf += buf1;
 	buf += std::string("\n");
 
@@ -83,7 +84,7 @@
 	buf += std::string("• ") + (boost::format(_("Caps:%s")) % temp).str() + "\n";
 
 	buf += std::string("• ");
-	snprintf(buf1, sizeof(buf1), _("Owned by %i"),f.get_owned_by());
+	snprintf(buf1, sizeof(buf1), _("Owned by %i"), f.get_owned_by());
 	buf += std::string(buf1) + "\n";
 
 	temp = f.get_immovable() ? _("Has base immovable") : _("No base immovable");
@@ -123,7 +124,8 @@
 	// *** Map info
 	buf += std::string("\n") + _("Map:") + "\n";
 	buf += std::string("• ") + (boost::format(_("Name: %s")) % map.get_name()).str() + "\n";
-	buf += std::string("• ") + (boost::format(_("Size: %1$ix%2$i")) % map.get_width() % map.get_height()).str() + "\n";
+	buf += std::string("• ") + (boost::format(_("Size: %1$ix%2$i"))
+	 % map.get_width() % map.get_height()).str() + "\n";
 
 	buf += std::string("• ");
 	snprintf(buf1, sizeof(buf1), _("Players: %i"), map.get_nrplayers());

=== modified file 'src/editor/ui_menus/editor_main_menu_save_map.cc'
--- src/editor/ui_menus/editor_main_menu_save_map.cc	2014-03-05 11:59:09 +
+++ src/editor/ui_menus/editor_main_menu_save_map.cc	2014-03-09 10:30:28 +
@@ -383,8 +383,8 @@
 	//  Check if file exists. If so, show a warning.
 	if (g_fs->FileExists(complete_filename)) {
 		std::string s =
-			(boost::format(_("A File with the name ‘%s’ already exists. Overwrite?")) % 
-FileSystem::FS_Filename(filename.c_str())).str();
+			(boost::format(_("A File with the name ‘%s’ already exists. Overwrite?"))
+% FileSystem::FS_Filename(filename.c_str())).str();
 		UI::WLMessageBox mbox
 			(&eia(), _("Error Saving Map!!"), s, UI::WLMessageBox::YESNO);
 		if (not mbox.run())

=== modified file 'src/logic/ship.cc'
--- src/logic/ship.cc	2014-03-04 13:24:58 +
+++ src/logic/ship.cc	2014-03-09 10:30:28 +
@@ -565,8 +565,10 @@
 		// Check whether the island was completely surrounded
 		if (get_position() == m_expedition->exploration_start) {
 			std::string msg_head = _("Island Circumnavigated");
-			std::string msg_body = _("An expedition ship sailed around its island without any events.");
-			send_message(game, "exp_island", msg_head, msg_body, "ship_explore_island_cw.png");
+			std::string msg_body = _("An expedition ship sailed around its"
+		 " island without any events.");
+			send_message(game, "exp_island", msg_head, msg_body,
+"ship_explore_island_cw.png");
 			m_ship_state = EXP_WAITING;
 			return start_task_idle(game, descr().main_animation(), 1500);
 		}

=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc	2014-03-04 21:19:45 +
+++ src/logic/worker.cc	2014-03-09 10:30:28 +
@@ -603,9 +603,9 @@
 
 	// NOTE mirroring the above ugly hack.
 	// Avoiding placeholders for the resouce names to avert grammar trouble in translations.
-	std::string out_of_message =_("Out of Resources");
-	if (res_type == "fish") out_of_message =_("Out of Fish");
-	else if (res_type == "stone") out_of_message =_("Out of Stone");
+	std::string out_of_message = _("Out of Resources");
+	if

[Widelands-dev] [Merge] lp:~gunchleoc/widelands/bug-1278583 into lp:widelands

2014-03-09 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/bug-1278583 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1278583 in widelands: "build completion status not translated"
  https://bugs.launchpad.net/widelands/+bug/1278583

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/bug-1278583/+merge/210091

Another small bugfix
-- 
https://code.launchpad.net/~gunchleoc/widelands/bug-1278583/+merge/210091
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/bug-1278583 into lp:widelands.
=== modified file 'src/logic/constructionsite.cc'
--- src/logic/constructionsite.cc	2014-03-03 20:50:30 +
+++ src/logic/constructionsite.cc	2014-03-09 18:35:23 +
@@ -89,7 +89,7 @@
 	unsigned int percent = (get_built_per64k() * 100) >> 16;
 	std::string perc_s =
 		(boost::format("%s")
-		 % UI_FONT_CLR_DARK_HEX % (boost::format(_("%1$i%% built")) % percent).str())
+		 % UI_FONT_CLR_DARK_HEX % (boost::format(_("%i%% built")) % percent).str())
 		 .str();
 	return perc_s;
 }

=== modified file 'src/logic/immovable.cc'
--- src/logic/immovable.cc	2014-03-04 13:24:58 +
+++ src/logic/immovable.cc	2014-03-09 18:35:23 +
@@ -540,7 +540,9 @@
 	if (game.get_ibase()->get_display_flags() & Interactive_Base::dfShowStatistics) {
 		unsigned int percent = (100 * done / total);
 		m_construct_string =
-			(boost::format("%2$i%% built") % UI_FONT_CLR_DARK_HEX % percent).str();
+			(boost::format("%s")
+			 % UI_FONT_CLR_DARK_HEX % (boost::format(_("%i%% built")) % percent).str())
+			 .str();
 		m_construct_string = as_uifont(m_construct_string);
 		dst.blit(pos - Point(0, 48), UI::g_fh1->render(m_construct_string), CM_Normal, UI::Align_Center);
 	}

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/bug-961526 into lp:widelands

2014-03-09 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/bug-961526 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #961526 in widelands: "Articles and %s"
  https://bugs.launchpad.net/widelands/+bug/961526

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/bug-961526/+merge/210092

Fixed an i18n grammar problem
-- 
https://code.launchpad.net/~gunchleoc/widelands/bug-961526/+merge/210092
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/bug-961526 into lp:widelands.
=== modified file 'tribes/barbarians/battlearena/help.lua'
--- tribes/barbarians/battlearena/help.lua	2014-03-05 18:47:03 +
+++ tribes/barbarians/battlearena/help.lua	2014-03-09 18:36:29 +
@@ -52,5 +52,5 @@
 		text_line(_"Experience levels:", "n/a") ..
 	--Production Section
 		rt(h2(_"Production")) ..
-		text_line(_"Performance:", _"If all needed wares are delivered in time, a %1$s can train %2$s for one soldier from 0 to the highest level in %3$s on average.":bformat(_"Battle Arena",_"Evade",_"%1$im%2$is":bformat(1,10)))
+		text_line(_"Performance:", _"If all needed wares are delivered in time, a Battle Arena can train %1$s for one soldier from 0 to the highest level in %2$s on average.":bformat(_"Evade",_"%1$im%2$is":bformat(1,10)))
 }

=== modified file 'tribes/barbarians/trainingscamp/help.lua'
--- tribes/barbarians/trainingscamp/help.lua	2014-03-05 18:47:03 +
+++ tribes/barbarians/trainingscamp/help.lua	2014-03-09 18:36:29 +
@@ -60,5 +60,5 @@
 		text_line(_"Experience levels:", "n/a") ..
 	--Production Section
 		rt(h2(_"Production")) ..
-		text_line(_"Performance:", _"If all needed wares are delivered in time, a %1$s can train one new soldier in %2$s and %3$s to the final level in %4$s on average.":bformat(_"Training Camp",_"Attack",_"Health",_"%1$im%2$is":bformat(4,40)))
+		text_line(_"Performance:", _"If all needed wares are delivered in time, a Training Camp can train one new soldier in %1$s and %2$s to the final level in %3$s on average.":bformat(_"Attack",_"Health",_"%1$im%2$is":bformat(4,40)))
 }

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1290123 into lp:widelands

2014-03-10 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1290123 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1290123 in widelands: "Delete barbarian stronghold"
  https://bugs.launchpad.net/widelands/+bug/1290123

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1290123/+merge/210156

Barbarian stronghold is gone
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1290123/+merge/210156
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1290123 into lp:widelands.
=== removed directory 'global/militarysites/stronghold.barbarians'
=== removed file 'global/militarysites/stronghold.barbarians/conf'
--- global/militarysites/stronghold.barbarians/conf	2014-03-08 20:40:31 +
+++ global/militarysites/stronghold.barbarians/conf	1970-01-01 00:00:00 +
@@ -1,18 +0,0 @@
-size=medium
-max_soldiers=3
-heal_per_second=110
-conquers=7
-buildable=no
-prefer_heroes=false
-occupied_string=
-aggressor_string=Your Stronghold discovered an aggressor.
-attack_string=Your Stronghold is under attack.
-defeated_enemy_string=The enemy defeated your soldiers at the Stronghold
-defeated_you_string=Your soldiers defeated the enemy at the Stronghold
-
-
-[idle]
-pics=../../../tribes/barbarians/stronghold/stronghold_i_??.png
-hotspot=47 44
-playercolor=true
-fps=10

=== removed file 'global/militarysites/stronghold.barbarians/menu.png'
Binary files global/militarysites/stronghold.barbarians/menu.png	2010-12-04 13:52:49 + and global/militarysites/stronghold.barbarians/menu.png	1970-01-01 00:00:00 + differ
=== modified file 'tribes/atlanteans/conf'
--- tribes/atlanteans/conf	2014-03-08 20:40:31 +
+++ tribes/atlanteans/conf	2014-03-10 09:17:08 +
@@ -150,7 +150,6 @@
 donjon.barbarians=_Donjon
 fortress.barbarians=_Fortress
 sentry.barbarians=_Sentry
-stronghold.barbarians=Stronghold
 sentry.empire=_Sentry
 barracks.empire=_Barracks
 barrier.empire=_Barrier

=== modified file 'tribes/barbarians/conf'
--- tribes/barbarians/conf	2014-03-09 21:33:54 +
+++ tribes/barbarians/conf	2014-03-10 09:17:08 +
@@ -219,7 +219,6 @@
 [militarysite types]
 barrier=_Barrier
 sentry=_Sentry
-stronghold=Stronghold
 citadel=_Citadel
 fortress=_Fortress
 donjon=_Donjon

=== removed directory 'tribes/barbarians/stronghold'
=== removed file 'tribes/barbarians/stronghold/conf'
--- tribes/barbarians/stronghold/conf	2014-03-08 20:40:31 +
+++ tribes/barbarians/stronghold/conf	1970-01-01 00:00:00 +
@@ -1,30 +0,0 @@
-size=medium
-max_soldiers=3
-heal_per_second=110
-conquers=7
-prefer_heroes=false
-occupied_string=Your soldiers have occupied your Stronghold
-aggressor_string=Your Stronghold discovered an aggressor.
-attack_string=Your Stronghold is under attack.
-defeated_enemy_string=The enemy defeated your soldiers at the Stronghold
-defeated_you_string=Your soldiers defeated the enemy at the Stronghold
-
-
-# Stronghold was removed from buildable buildings after Build15 and should be removed after Build18
-# See https://bugs.launchpad.net/widelands/+bug/695018#14
-buildable=no
-
-#enhancement=barrier
-#[buildcost]
-#blackwood=3
-#raw_stone=3
-
-[idle]
-pics=stronghold_i_??.png
-hotspot=45 41
-playercolor=true
-fps=10
-
-#[build]
-#pics=stronghold_b_??.png
-#hotspot=47 44

=== removed file 'tribes/barbarians/stronghold/help.lua'
--- tribes/barbarians/stronghold/help.lua	2012-03-17 22:22:38 +
+++ tribes/barbarians/stronghold/help.lua	1970-01-01 00:00:00 +
@@ -1,9 +0,0 @@
-use("aux", "formatting")
-use("aux", "format_help")
-
-set_textdomain("tribe_barbarians")
-
-return {
-	text =
-		rt("image=tribes/barbarians/constructionsite/idle_with_worker_00.png",p(_"The help text of this building is under construction."))
-}
\ No newline at end of file

=== removed file 'tribes/barbarians/stronghold/menu.png'
Binary files tribes/barbarians/stronghold/menu.png	2010-11-30 20:04:25 + and tribes/barbarians/stronghold/menu.png	1970-01-01 00:00:00 + differ
=== removed file 'tribes/barbarians/stronghold/stronghold_b_00.png'
Binary files tribes/barbarians/stronghold/stronghold_b_00.png	2010-11-30 20:04:25 + and tribes/barbarians/stronghold/stronghold_b_00.png	1970-01-01 00:00:00 + differ
=== removed file 'tribes/barbarians/stronghold/stronghold_b_01.png'
Binary files tribes/barbarians/stronghold/stronghold_b_01.png	2010-11-30 20:04:25 + and tribes/barbarians/stronghold/stronghold_b_01.png	1970-01-01 00:00:00 + differ
=== removed file 'tribes/barbarians/stronghold/stronghold_b_02.png'
Binary files tribes/barbarians/stronghold/stronghold_b_02.png	2010-11-30 20:04:25 + and tribes/barbarians/stronghold/stronghold_b_02.png	1970-01-01 00:00:00 + differ
=== removed f

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-999262 into lp:widelands

2014-03-10 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-999262 into 
lp:widelands.

Requested reviews:
  SirVer (sirver)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-999262/+merge/210166

All resource names are now localized in "Out of resources" messages.

Please note that there's an ugly hack in worker.cc:

if (res_type == "stone") res_type = "granit";

I guess this could be fixed in the one_world branch

https://code.launchpad.net/~widelands-dev/widelands/one_world

since this seems to be a conf issue of some sort.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-999262/+merge/210166
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-999262.
=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc	2014-03-09 10:28:39 +
+++ src/logic/worker.cc	2014-03-10 09:56:41 +
@@ -595,24 +595,20 @@
 	if (building.name() == "fish_breeders_house")
 		return;
 
+	// TODO "stone" is defined as "granit" in the worlds
+	if (res_type == "stone") res_type = "granit";
+
 	// Translate the Resource name (if it is defined by the world)
 	const World & world = game.map().world();
 	int32_t residx = world.get_resource(res_type.c_str());
 	if (residx != -1)
 		res_type = world.get_resource(residx)->descname();
 
-	// NOTE mirroring the above ugly hack.
-	// Avoiding placeholders for the resouce names to avert grammar trouble in translations.
-	std::string out_of_message = _("Out of Resources");
-	if (res_type == "fish") out_of_message = _("Out of Fish");
-	else if (res_type == "stone") out_of_message = _("Out of Stone");
-
 	building.send_message
 		(game,
 		 "mine",
-		 out_of_message,
-		 (boost::format(_("The worker of this building cannot find any more resources "
-		 	 "of the following type: %s")) % res_type).str(),
+		 (boost::format(_("Out of %s")) % res_type).str(),
+		 (boost::format(_("The worker of this building cannot find any more %s.")) % res_type).str(),
 		 true,
 		 180, 0);
 }

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1290073 into lp:widelands

2014-03-10 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1290073 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1290073 in widelands: "Training grounds description vs Warrior's axe 
description"
  https://bugs.launchpad.net/widelands/+bug/1290073

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1290073/+merge/210188

- Removed all programs with the tag (only for compatibility with old savegames 
(build13)) from all conf files
- Changed "Ferner" to "Gardener" where it was overlooked
- Fixed an inconsistency in the help files
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1290073/+merge/210188
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1290073 into lp:widelands.
=== modified file 'tribes/atlanteans/armoursmithy/conf'
--- tribes/atlanteans/armoursmithy/conf	2013-07-23 13:40:00 +
+++ tribes/atlanteans/armoursmithy/conf	2014-03-10 11:30:46 +
@@ -26,9 +26,7 @@
 
 [programs]
 produce_steel_shield=_Produce steel shield
-produce_s_shield=_Produce steel shield (only for compatibility with old savegames (build13))
 produce_advanced_shield=_Produce advanced shield
-produce_a_shield=_Produce advanced shield (only for compatibility with old savegames (build13))
 work=_Work
 
 [produce_steel_shield]
@@ -38,13 +36,6 @@
 animate=working 35000
 produce=steel_shield
 
-[produce_s_shield]
-return=skipped unless economy needs steel_shield
-sleep=32000
-consume=iron:2 coal:2
-animate=working 35000
-produce=steel_shield
-
 [produce_advanced_shield]
 return=skipped unless economy needs advanced_shield
 sleep=32000
@@ -52,13 +43,6 @@
 animate=working 45000
 produce=advanced_shield
 
-[produce_a_shield]
-return=skipped unless economy needs advanced_shield
-sleep=32000
-consume=iron:2 coal:2 gold
-animate=working 45000
-produce=advanced_shield
-
 [work]
 call=produce_steel_shield
 call=produce_advanced_shield

=== modified file 'tribes/atlanteans/blackroot_farm/conf'
--- tribes/atlanteans/blackroot_farm/conf	2013-07-23 13:40:00 +
+++ tribes/atlanteans/blackroot_farm/conf	2014-03-10 11:30:46 +
@@ -20,27 +20,17 @@
 
 [programs]
 plant_blackroot=_Plant blackroot
-plant=Plant blackroot (only for compatibility with old savegames (build13))
 harvest_blackroot=_Harvest blackroot
-harvest=Harvest blackroot (only for compatibility with old savegames (build13))
 work=_Work
 
 [plant_blackroot]
 sleep=2
 worker=plant
 
-[plant]
-sleep=2
-worker=plant
-
 [harvest_blackroot]
 sleep=5000
 worker=harvest
 
-[harvest]
-sleep=5000
-worker=harvest
-
 [work]
 call=plant_blackroot
 call=harvest_blackroot

=== modified file 'tribes/atlanteans/dungeon/conf'
--- tribes/atlanteans/dungeon/conf	2013-08-14 19:52:55 +
+++ tribes/atlanteans/dungeon/conf	2014-03-10 11:30:46 +
@@ -37,14 +37,10 @@
 
 [programs]
 sleep=_Sleep
-upgrade_soldier_attack_0=_Upgrade soldier attack 0
-upgrade_attack_0=_Upgrade soldier attack 0 (only for compatibility with old savegames (build13))
-upgrade_soldier_attack_1=_Upgrade soldier attack 1
-upgrade_attack_1=_Upgrade soldier attack 1 (only for compatibility with old savegames (build13))
-upgrade_soldier_attack_2=_Upgrade soldier attack 2
-upgrade_attack_2=_Upgrade soldier attack 2 (only for compatibility with old savegames (build13))
-upgrade_soldier_attack_3=_Upgrade soldier attack 3
-upgrade_attack_3=_Upgrade soldier attack 3 (only for compatibility with old savegames (build13))
+upgrade_soldier_attack_0=_Upgrade soldier attack from level 0 to level 1
+upgrade_soldier_attack_1=_Upgrade soldier attack from level 1 to level 2
+upgrade_soldier_attack_2=_Upgrade soldier attack from level 2 to level 3
+upgrade_soldier_attack_3=_Upgrade soldier attack from level 3 to level 4
 
 [sleep]
 sleep=5000
@@ -57,13 +53,6 @@
 consume=bread smoked_fish,smoked_meat long_trident
 train=soldier attack 0 1
 
-[upgrade_attack_0]
-check_soldier=soldier attack 0
-sleep=3
-check_soldier=soldier attack 0
-consume=bread smoked_fish,smoked_meat long_trident
-train=soldier attack 0 1
-
 [upgrade_soldier_attack_1]
 check_soldier=soldier attack 1
 sleep=3
@@ -71,13 +60,6 @@
 consume=bread smoked_fish,smoked_meat steel_trident
 train=soldier attack 1 2
 
-[upgrade_attack_1]
-check_soldier=soldier attack 1
-sleep=3
-check_soldier=soldier attack 1
-consume=bread smoked_fish,smoked_meat steel_trident
-train=soldier attack 1 2
-
 [upgrade_soldier_attack_2]
 check_soldier=soldier attack 2
 sleep=3
@@ -85,13 +67,6 @@
 consume=bread smoked_fish,smoked_meat double_trident
 train=soldier attack 2 3
 
-[upgrade_attack_2]
-check_soldier=soldier attack 2
-sleep=3
-check_soldier=soldier attack 2
-consume=bread smoked_fish,smoked_meat double_trident
-train=soldier attack 2 3
-
 [upgrade_soldier_attack_3]
 check_soldier=soldier attack 3
 sleep=3
@@ -99,13 +74,6 @@
 consume=bread smoke

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-strings into lp:widelands

2014-03-11 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/fix-strings into lp:widelands 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix-strings/+merge/210465
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix-strings/+merge/210465
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix-strings.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-strings into lp:widelands

2014-03-11 Thread GunChleoc
Yes, I think this looks fine. It would be great to have the kayboad shortcuts 
as a table, but that would take some programming. Let's merge it like it is for 
now.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix-strings/+merge/210465
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix-strings.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/i18n-20140310 into lp:widelands

2014-03-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/i18n-20140310 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/i18n-20140310/+merge/210561

Some more string fixes. Resized Objectives window.
-- 
https://code.launchpad.net/~widelands-dev/widelands/i18n-20140310/+merge/210561
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/i18n-20140310 into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-03-09 09:44:35 +
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-03-12 09:30:41 +
@@ -337,7 +337,7 @@
   title = _"A Man Comes to Jundlina",
   body = opol(p(_(
 [[May Satul warm you, Jundlina. ]] ..
-[[My Name is Opol, and I am the highest weaver of the guild abandoning Atlantis and Lutas with you. ]] ..
+[[My name is Opol, and I am the highest weaver of the guild abandoning Atlantis and Lutas with you. ]] ..
 [[I come with sad news indeed: we have no more spidercloth. Not a single piece is to be found in our warehouses. ]] ..
 [[Could you not help the weavers’ guild by arranging the building of a weaving-mill and a spider farm? ]] ..
 [[The spiders deliver the finest silk and we will produce the finest spidercloth from it.]])) .. p(_(

=== modified file 'campaigns/emp02.wmf/scripting/texts.lua'
--- campaigns/emp02.wmf/scripting/texts.lua	2014-03-09 09:44:35 +
+++ campaigns/emp02.wmf/scripting/texts.lua	2014-03-12 09:30:41 +
@@ -60,8 +60,7 @@
title =_"Build a stonemason and mining infrastructure",
number = 7,
body = objective_text(_"Stonemason and Mining Infrastructure", 
-[[• ]] .. _[[Build a stonemason and then a complete mining and production infrastructure 
-(coal mine and / or charcoal burner, iron ore mine, toolsmithy, weapon smithy, armor smithy and smelting works).]]),
+[[• ]] .. _[[Build a stonemason and then a complete mining and production infrastructure (coal mine and / or charcoal burner, iron ore mine, toolsmithy, weapon smithy, armor smithy and smelting works).]]),
 }
 
 obj_build_Food_infrastructure = {
@@ -71,8 +70,7 @@
body = objective_text(_"Food For Your Miners", 
 [[• ]] .. _([[To produce some sustaining food for our miners, we could build up a tavern. ]] ..
 [[To supply them with some good and strong drinks, we could build up a brewery and a winery.]]) .. "" ..
-[[• ]] .. _([[Of course this means we will need more resources for preparing this food – like fish, meat or bread.]] .. 
-[[To provide these foodstuffs, you would have to build a fisher’s house, a farm, a mill and a bakery.]]) .. "" ..
+[[• ]] .. _([[Of course this means we will need more resources for preparing this food – like fish, meat or bread. To provide these foodstuffs, you would have to build a fisher’s house, a farm, a mill and a bakery.]]) .. "" ..
 [[• ]] .. _[[Maybe you will also need a hunter’s house, a piggery, a vineyard and some wells.]] .. "" ..
 [[→ ]] .. _([[It’s up to you what you want to build. But remember – coal and iron ore mines need beer, ]] ..
 [[marble and gold mines need wine and all mines need at least rations, which are produced out of bread OR meat OR fish.]])),
@@ -234,8 +232,7 @@
posy=1,
body= lutius(
 _([[Today is a proud day. We have fought for our new home and risen victorious.]]) .. "" ..
-_([[There are still a few barbarians hiding on our island, but I am sure that we will find them soon.]] ..
-[[Every barbarian who doesn’t attack us will be put in a boat with the other peaceful ones, and sent back to their country.]]))
+_([[There are still a few barbarians hiding on our island, but I am sure that we will find them soon. Every barbarian who doesn’t attack us will be put in a boat with the other peaceful ones, and sent back to their country.]]))
 ..  objective_text(_"Victory", 
_[[You have established a working economy, trained new soldiers and driven the barbarians from the island.]]
 ),

=== modified file 'src/wui/game_objectives_menu.cc'
--- src/wui/game_objectives_menu.cc	2014-03-10 19:27:00 +
+++ src/wui/game_objectives_menu.cc	2014-03-12 09:30:41 +
@@ -39,7 +39,7 @@
 :
 	UI::UniqueWindow
 		(&plr, "objectives", ®istry,
-		 340,
+		 580,
 		 5 + OBJECTIVE_LIST + 5 + FULL_OBJECTIVE_TEXT + 5 + BUTTON_HEIGHT + 5,
 		 _("Objectives")),
 	list

=== modified file 'tribes/atlanteans/goldore/conf'
--- tribes/atlanteans/goldore/conf	2014-02-24 21:12:30 +
+++ tribes/atlanteans/goldore/conf	2014-03-12 09:30:41 +
@@ -1,4 +1,4 @@
-help=_Gold ore is mined in gold mines and processed to gold in smelting works.
+help=_Gold ore is mined in a goldmine. Smelted in a smelting works, it turns into gold which is used as a precious building materia

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/i18n-20140314 into lp:widelands

2014-03-15 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/i18n-20140314 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/i18n-20140314/+merge/211191

Some more small string fixes.
-- 
https://code.launchpad.net/~widelands-dev/widelands/i18n-20140314/+merge/211191
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/i18n-20140314 into lp:widelands.
=== modified file 'campaigns/emp02.wmf/scripting/texts.lua'
--- campaigns/emp02.wmf/scripting/texts.lua	2014-03-12 09:14:19 +
+++ campaigns/emp02.wmf/scripting/texts.lua	2014-03-16 06:41:40 +
@@ -167,10 +167,7 @@
 saledus_2 = {
title =_ "Marble on the Mountain",
body= saledus(_"Saledus smiles",
-_([[Lutius, I’ve got good news for you: ]] ..
-[[As I walked to the east, I found a larger mountain.]] ..
-[[I am not absolutely sure – a geologist should check if I am right]] ..
-[[ – but I believe we could mine marble from some places on the mountain.]]) .. "" ..
+_([[Lutius, I’ve got good news for you: As I walked to the east, I found a larger mountain. I am not absolutely sure – a geologist should check if I am right – but I believe we could mine marble from some places on the mountain.]]) .. "" ..
 _([[It would be a good source for bolstering our supply of quality marble, ]] ..
 [[beyond the meager quantities available from the quarry. ]] ..
 [[Perhaps you were right when you said that this island was like paradise.]]) .. "" ..

=== modified file 'global/militarysites/barracks.empire/conf'
--- global/militarysites/barracks.empire/conf	2013-10-29 10:55:20 +
+++ global/militarysites/barracks.empire/conf	2014-03-16 06:41:40 +
@@ -5,10 +5,10 @@
 buildable=no
 prefer_heroes=false
 occupied_string=
-aggressor_string=_Your Barracks discovered an aggressor.
-attack_string=_Your Barracks is under attack.
-defeated_enemy_string=_The enemy defeated your soldiers at the Barracks
-defeated_you_string=_Your soldiers defeated the enemy at the Barracks
+aggressor_string=_Your barracks discovered an aggressor.
+attack_string=_Your barracks is under attack.
+defeated_enemy_string=_The enemy defeated your soldiers at the barracks.
+defeated_you_string=_Your soldiers defeated the enemy at the barracks.
 
 
 [idle]

=== modified file 'global/militarysites/barrier.barbarians/conf'
--- global/militarysites/barrier.barbarians/conf	2013-10-29 10:55:20 +
+++ global/militarysites/barrier.barbarians/conf	2014-03-16 06:41:40 +
@@ -5,10 +5,10 @@
 buildable=no
 prefer_heroes=true
 occupied_string=
-aggressor_string=_Your Barrier discovered an aggressor.
-attack_string=_Your Barrier is under attack.
-defeated_enemy_string=_The enemy defeated your soldiers at the Barrier
-defeated_you_string=_Your soldiers defeated the enemy at the Barrier
+aggressor_string=_Your barrier discovered an aggressor.
+attack_string=_Your barrier is under attack.
+defeated_enemy_string=_The enemy defeated your soldiers at the barrier.
+defeated_you_string=_Your soldiers defeated the enemy at the barrier.
 
 
 [idle]

=== modified file 'global/militarysites/barrier.empire/conf'
--- global/militarysites/barrier.empire/conf	2013-10-29 10:55:20 +
+++ global/militarysites/barrier.empire/conf	2014-03-16 06:41:40 +
@@ -5,10 +5,10 @@
 buildable=no
 prefer_heroes=true
 occupied_string=
-aggressor_string=_Your Barrier discovered an aggressor.
-attack_string=_Your Barrier is under attack.
-defeated_enemy_string=_The enemy defeated your soldiers at the Barrier
-defeated_you_string=_Your soldiers defeated the enemy at the Barrier
+aggressor_string=_Your barrier discovered an aggressor.
+attack_string=_Your barrier is under attack.
+defeated_enemy_string=_The enemy defeated your soldiers at the barrier.
+defeated_you_string=_Your soldiers defeated the enemy at the barrier.
 
 
 [idle]

=== modified file 'global/militarysites/castle.atlanteans/conf'
--- global/militarysites/castle.atlanteans/conf	2013-10-29 10:55:20 +
+++ global/militarysites/castle.atlanteans/conf	2014-03-16 06:41:40 +
@@ -5,10 +5,10 @@
 buildable=no
 prefer_heroes=true
 occupied_string=
-aggressor_string=_Your Castle discovered an aggressor.
-attack_string=_Your Castle is under attack.
-defeated_enemy_string=_The enemy defeated your soldiers at the Castle
-defeated_you_string=_Your soldiers defeated the enemy at the Castle
+aggressor_string=_Your castle discovered an aggressor.
+attack_string=_Your castle is under attack.
+defeated_enemy_string=_The enemy defeated your soldiers at the castle.
+defeated_you_string=_Your soldiers defeated the enemy at the castle.
 
 
 [idle]

=== modified file 'global/militarysites/castle.empire/conf'
--- global/militarysites/castle.empire/conf	2013-10-29 10:55:20 +
+++ global/militarysites/castle.empire/conf	2014-03-1

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/mine-symbol into lp:widelands

2014-03-16 Thread GunChleoc
Review: Approve

Thanks for taking care of this bug :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/mine-symbol/+merge/211195
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/mine-symbol into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/bug-1299919 into lp:widelands

2014-04-03 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/bug-1299919 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1299919 in widelands: "AT: %1$u/%2$u in miltary sites"
  https://bugs.launchpad.net/widelands/+bug/1299919

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/bug-1299919/+merge/214005

Small string fix (replaced snprintf with boost::format)
-- 
https://code.launchpad.net/~gunchleoc/widelands/bug-1299919/+merge/214005
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/bug-1299919 into lp:widelands.
=== modified file 'src/wui/soldierlist.cc'
--- src/wui/soldierlist.cc	2014-03-05 11:59:09 +
+++ src/wui/soldierlist.cc	2014-04-03 11:43:49 +
@@ -20,6 +20,7 @@
 #include "wui/soldierlist.h"
 
 #include 
+#include 
 
 #include "container_iterate.h"
 #include "graphic/font.h"
@@ -473,22 +474,14 @@
 		return;
 	}
 
-	uint32_t const  hl = soldier->get_hp_level ();
-	uint32_t const mhl = soldier->get_max_hp_level ();
-	uint32_t const  al = soldier->get_attack_level ();
-	uint32_t const mal = soldier->get_max_attack_level ();
-	uint32_t const  dl = soldier->get_defense_level();
-	uint32_t const mdl = soldier->get_max_defense_level();
-	uint32_t const  el = soldier->get_evade_level  ();
-	uint32_t const mel = soldier->get_max_evade_level  ();
-
-	char buffer[5 * 30];
-	snprintf
-		(buffer, sizeof(buffer),
-		 /** TRANSLATORS: Health, Attack, Defense, Evade */
-		 _("HP: %1$u/%2$u  AT: %3$u/%4$u  DE: %5$u/%6$u  EV: %7$u/%8$u"),
-		 hl, mhl, al, mal, dl, mdl, el, mel);
-	m_infotext.set_text(buffer);
+	m_infotext.set_text(
+		(boost::format(_("HP: %1$u/%2$u  AT: %3$u/%4$u  DE: %5$u/%6$u  EV: %7$u/%8$u"))
+			% soldier->get_hp_level() % soldier->get_max_hp_level()
+			% soldier->get_attack_level() % soldier->get_max_attack_level()
+			% soldier->get_defense_level() % soldier->get_max_defense_level()
+			% soldier->get_evade_level() % soldier->get_max_evade_level()
+		).str()
+	);
 }
 
 void SoldierList::eject(const Soldier * soldier)

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1300724 into lp:widelands

2014-04-07 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1300724 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1300724 in widelands: "Minor string issues"
  https://bugs.launchpad.net/widelands/+bug/1300724

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1300724/+merge/214666

Some minor string fixes
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1300724/+merge/214666
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1300724 into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-04-03 12:16:03 +
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-04-08 06:31:24 +
@@ -82,12 +82,12 @@
title = _ "Build a spider farm and a weaving mill",
number = 3,
body = objective_text(_"Spidercloth Production", _(
-[[The weavers produce spidercloth and tabards in the weaving-mill. ]] ..
+[[The weavers produce spidercloth and tabards in the weaving mill. ]] ..
 [[Spidercloth is needed for the construction of some buildings and clothing, ]] ..
 [[while tabards are the uniforms of soldiers. ]] ..
-[[The weaving-mill needs gold yarn and spideryarn as raw material. ]] ..
+[[The weaving mill needs gold yarn and spideryarn as raw material. ]] ..
 [[Spideryarn is produced by the spider farm, while gold yarn is produced by the gold weaver out of gold.]]) .. "" ..
-[[• ]] .. _[[Build a weaving-mill]] .. "" ..
+[[• ]] .. _[[Build a weaving mill]] .. "" ..
 [[• ]] .. _[[Build a spider farm]] .. "" ..
 [[• ]] .. _[[Build a goldweaver]]
  )
@@ -303,7 +303,7 @@
 .. paragraphdivider() .. _(
 [[But we might find a compromise in between: for me, making bread is a troublesome task. Grinding the blackroot and corn to flour and then baking the bread is tedious and boring; I feel a more industrial approach would be helpful here. I for one would love to just have fresh bread delivered to my house every day.]])
 .. paragraphdivider() .. _(
-[[Oooh and even more important: the smoking of fish and meat to cleanse them and improve their taste is terrible. My house is full of smoke and stinks for weeks afterwards. Don’t you think that this could be done in a special building were the side effects do not matter? I think those two things would be accepted by the people and would reduce the cooking time without taking away the ritual.]]
+[[Oooh and even more important: the smoking of fish and meat to cleanse them and improve their taste is terrible. My house is full of smoke and stinks for weeks afterwards. Don’t you think that this could be done in a special building where the side effects do not matter? I think those two things would be accepted by the people and would reduce the cooking time without taking away the ritual.]]
  ))
 },
 {
@@ -328,7 +328,7 @@
{
   title = _"A Man Comes to Jundlina",
   body = opol(_(
-[[May Satul warm you, Jundlina. My name is Opol, and I am the highest weaver of the guild abandoning Atlantis and Lutas with you. I come with sad news indeed: we have no more spidercloth. Not a single piece is to be found in our warehouses. Could you not help the weavers’ guild by arranging the building of a weaving-mill and a spider farm? The spiders deliver the finest silk and we will produce the finest spidercloth from it.]])
+[[May Satul warm you, Jundlina. My name is Opol, and I am the highest weaver of the guild abandoning Atlantis and Lutas with you. I come with sad news indeed: we have no more spidercloth. Not a single piece is to be found in our warehouses. Could you not help the weavers’ guild by arranging the building of a weaving mill and a spider farm? The spiders deliver the finest silk and we will produce the finest spidercloth from it.]])
 .. paragraphdivider() .. _(
 [[We offer to also produce the tabards for young soldiers and the golden tabards for officers for you in exchange. You will need them for sure as soon as you want to recruit new soldiers.]]))
  },
@@ -336,7 +336,7 @@
 title = _ "Jundlina Replies",
 body = jundlina(_ "Jundlina Replies", _(
 [[May Satul warm you too, Opol. I wanted to delay production of spidercloth, but I understand your urgency. ]] ..
-[[Your suggestion sounds fair to me, I will build your weaving-mill and spider farm. ]] ..
+[[Your suggestion sounds fair to me, I will build your weaving mill and spider farm. ]] ..
 [[I will also build a goldweaver so that the golden tabards you make will not be golden by name alone.]]
 )) ..  new_objectives(obj_spidercloth_production)
  }
@@ -347,7 +347,7 @@
   title = _ "Opol Seeks Out Jundlina",
   body = opol(_(
 [[May Satul warm you, Jundlina! ]] ..
-[[The weaving-mill, goldweaver and spider farm buildings are complete ]] ..
+[[The weaving mill, goldweave

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1290070 into lp:widelands

2014-04-09 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1290070 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1290070 in widelands: "Plateau scenario needs a string fix"
  https://bugs.launchpad.net/widelands/+bug/1290070

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1290070/+merge/215005

String fixes for Plateau scenario
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1290070/+merge/215005
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1290070 into lp:widelands.
=== modified file 'maps/Plateau.wmf/scripting/texts.lua'
--- maps/Plateau.wmf/scripting/texts.lua	2014-04-03 12:46:12 +
+++ maps/Plateau.wmf/scripting/texts.lua	2014-04-09 18:02:04 +
@@ -40,7 +40,7 @@
name = "defeat_jomo",
title =_ "Defeat Jomo",
body = [[• ]] .. _
-[[Defeat Jomo. He will take care of the soldiers’ food supply.]]
+[[Defeat Jomo. He is taking care of the soldiers’ food supply.]]
,
 }
 
@@ -110,7 +110,7 @@
 [[We have discovered enemy positions held by Erwyn to the north and east of the castle. ]] ..
 [[He is known to be a strong warlord and surely commands the strongest warriors. ]] ..
 [[In the south, we caught sight of some food infrastructures guarded by Jomo – a younger warlord – ]] ..
-[[and we should take care of those infrastructures so we can take our cut of the food supply.]]), obj_defeat_erwyn, obj_defeat_jomo),
+[[and we should take care of those infrastructures so we can cut off our enemies’ food supply.]]), obj_defeat_erwyn, obj_defeat_jomo),
 }
 
 briefing_erwyn_defeated = {

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1298309 into lp:widelands

2014-04-14 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1298309 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1298309 in widelands: "Message "We lost a %s to the ocean!" cannot 
easily be translated"
  https://bugs.launchpad.net/widelands/+bug/1298309

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1298309/+merge/215707

2 string fixes for Atlantean campaign + constructionsite/dismantlesite menu 
images for consistency
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1298309/+merge/215707
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1298309 into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/init.lua'
--- campaigns/atl01.wmf/scripting/init.lua	2014-03-25 06:18:48 +
+++ campaigns/atl01.wmf/scripting/init.lua	2014-04-14 17:24:36 +
@@ -73,9 +73,9 @@
 
 function send_building_lost_message(f)
p1:send_message(_"Building lost!",
-  rt(p(
- (_"We lost a %s to the ocean!"):format(f.immovable.descname)
-  )), { field = f, popup = true }
+  rt("image=tribes/atlanteans/".. f.immovable.name .."/menu.png",
+ p(_"We lost a building to the ocean!")
+  ), { field = f, popup = true }
)
 end
 
@@ -93,7 +93,6 @@
local hq = wl.Game().map.player_slots[1].starting_field.immovable
hq:set_workers{shipwright=1}
 
-
-- Place some buildings
prefilled_buildings(p1,
   {"high_tower", first_tower_field.x, first_tower_field.y,

=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-04-03 12:16:03 +
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-04-14 17:24:36 +
@@ -419,7 +419,7 @@
 [[I received an invitation from Sidolus. The first day of training in the newly finished labyrinth will be tomorrow. ]] ..
 [[The dungeon is done as well and will start its work soon. I am looking forward to tomorrow; ]] ..
 [[I am very interested in how our soldiers are trained, and I wonder if the additional workload ]] ..
-[[will keep them from bullying the civil population.]]
+[[will keep them from bullying the civilian population.]]
   ))
}
 }

=== added file 'tribes/atlanteans/constructionsite/menu.png'
Binary files tribes/atlanteans/constructionsite/menu.png	1970-01-01 00:00:00 + and tribes/atlanteans/constructionsite/menu.png	2014-04-14 17:24:36 + differ
=== added file 'tribes/atlanteans/dismantlesite/menu.png'
Binary files tribes/atlanteans/dismantlesite/menu.png	1970-01-01 00:00:00 + and tribes/atlanteans/dismantlesite/menu.png	2014-04-14 17:24:36 + differ
=== added file 'tribes/barbarians/dismantlesite/menu.png'
Binary files tribes/barbarians/dismantlesite/menu.png	1970-01-01 00:00:00 + and tribes/barbarians/dismantlesite/menu.png	2014-04-14 17:24:36 + differ
=== added file 'tribes/empire/constructionsite/menu.png'
Binary files tribes/empire/constructionsite/menu.png	1970-01-01 00:00:00 + and tribes/empire/constructionsite/menu.png	2014-04-14 17:24:36 + differ
=== added file 'tribes/empire/dismantlesite/menu.png'
Binary files tribes/empire/dismantlesite/menu.png	1970-01-01 00:00:00 + and tribes/empire/dismantlesite/menu.png	2014-04-14 17:24:36 + differ
___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1298309 into lp:widelands

2014-04-14 Thread GunChleoc
Done :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1298309/+merge/215707
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1298309 into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/string-fixes into lp:widelands

2014-04-18 Thread GunChleoc
+1
-- 
https://code.launchpad.net/~widelands-dev/widelands/string-fixes/+merge/216424
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/string-fixes into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1322473 into lp:widelands

2014-05-28 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1322473 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1322473 in widelands: " Add Win conditions as an Objective"
  https://bugs.launchpad.net/widelands/+bug/1322473

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1322473/+merge/221235

Initial win condition is now an objective.

Keep the bug open for further future improvements.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1322473/+merge/221235
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1322473 into lp:widelands.
=== modified file 'maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua'
--- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua	2014-03-25 06:18:48 +
+++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua	2014-05-28 13:43:10 +
@@ -239,6 +239,9 @@
disable_unused_buildings()
 
send_to_all(welcome_msg)
+   -- set the objective with the game type for all players
+   -- TODO change this to a broadcast once individual game objectives have been implementes
+   game.players[1]:add_objective("win_conditions", _"Rules", welcome_msg)
 
for idx,plr in ipairs(game.players) do
   run(function() run_island(plr, 1) end)

=== modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua'
--- maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua	2014-03-25 06:18:48 +
+++ maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua	2014-05-28 13:43:10 +
@@ -140,7 +140,9 @@
end
 
send_to_all(welcome_msg:format((ngettext("%i point", "%i points", points_to_win)):format(points_to_win)))
-
+   -- set the objective with the game type for all players
+   -- TODO change this to a broadcast once individual game objectives have been implementes
+   game.players[1]:add_objective("win_conditions", _"Rules", welcome_msg:format((ngettext("%i point", "%i points", points_to_win)):format(points_to_win)))
 
for idx,descr in ipairs(route_descrs) do
   run(wait_for_established_route, descr)

=== modified file 'maps/Plateau.wmf/scripting/init.lua'
--- maps/Plateau.wmf/scripting/init.lua	2014-03-25 06:18:48 +
+++ maps/Plateau.wmf/scripting/init.lua	2014-05-28 13:43:10 +
@@ -22,6 +22,7 @@
sleep(300)
 
send_msg(briefing_1_the_forbidden_island)
+   local o = add_obj(obj_forbidden_island)
 
local map = wl.Game().map
while not p1:seen_field(map:get_field(5,8)) do sleep(2345) end
@@ -47,7 +48,8 @@
scroll_smoothly_to(castle)
 
send_msg(briefing_2_found_ancient_castle)
-   local o = add_obj(obj_capture_ancient_castle)
+   o.done = true
+   o = add_obj(obj_capture_ancient_castle)
 
-- Wait till we conquered the castle
while #p1:get_buildings"castle.atlanteans" < 1 do sleep(2345) end

=== modified file 'maps/Plateau.wmf/scripting/texts.lua'
--- maps/Plateau.wmf/scripting/texts.lua	2014-04-09 17:50:02 +
+++ maps/Plateau.wmf/scripting/texts.lua	2014-05-28 13:43:10 +
@@ -23,6 +23,19 @@
return p1:add_objective(o.name, o.title, _obj(reflow(o.body)), o)
 end
 
+obj_forbidden_island = {
+   name = "forbidden_island",
+   title =_"The Forbidden Island",
+   body = _(
+[[Finally! We have just taken our first step towards victory! ]] ..
+[[Last night, we landed on the forbidden island and defeated the few guards that were watching the ]] ..
+[[north-western part of the island. ]] ..
+[[I am quite sure that none of the other warlords has detected us so far, ]] ..
+[[so we should keep quiet and build up our infrastructure. Soon we will be strong enough to raid their positions.]]),
+}
+
+
+
 obj_capture_ancient_castle = {
name = "capture_ancient_castle",
title =_ "Capture the Ancient Castle",

=== modified file 'scripting/win_condition_functions.lua'
--- scripting/win_condition_functions.lua	2013-08-07 16:58:48 +
+++ scripting/win_condition_functions.lua	2014-05-28 13:43:10 +
@@ -125,3 +125,19 @@
wl.game.report_result(p, 0, make_extra_data(p, wc_name, wc_ver, extra))
end
 end
+
+
+-- RST
+-- .. function:: broadcast_objective(plrs, header, msg, body)
+--
+--:arg plrs:This should be wl.Game().players
+--:arg name:A unique name for the objective
+--:arg title:   The title to be displayed for the objective
+--:arg body:The content text to be displayed for the objective
+--
+--broadcast an objective to all players
+--technically, it is assigned to player1, because all players will see all objectives
+function broadcast_objective(plrs, name, title, body)
+	plrs[1]:add_objective(name, title, body)
+end
+

=== modified file 'scripting/win_conditions/00_endle

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1324137 into lp:widelands

2014-05-29 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1324137 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1324137 in widelands: "Update Lua primer"
  https://bugs.launchpad.net/widelands/+bug/1324137

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353

Added documentation for string design
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1324137 into lp:widelands.
=== modified file 'doc/sphinx/source/tutorial.rst'
--- doc/sphinx/source/tutorial.rst	2013-04-03 09:06:34 +
+++ doc/sphinx/source/tutorial.rst	2014-05-29 10:48:20 +
@@ -269,4 +269,62 @@
 coroutines share the same environment and can therefore use global variables
 to communicate with each other.  
 
+
+Preparing Strings for Translation
+-
+
+When writing your scenario's text, it is important to keep in mind that these will be translated into various languages. This entails that word forms and word order will change, and some languages have more than one plural form. So, here are some pointers for good string design. For examples for the formatting discussed here, have a look at ``maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua`` in the source code.
+
+
+Translator Comments
+^^^
+
+If you have a string where you feel that translators will need a bit of help to understand what it does, you can add a translator comment to it. Translator comments are particularly useful when you are working with placeholders, because you can tell the translator what the placeholder will be replaced with. Translator comments need to be inserted into the code in the line directly above the translation. Each line of a translator comment has to be prefixed by ``-- TRANSLATORS: ``, like this:
+
+.. code-block:: lua
+
+   -- TRANSLATORS: This is just a test string
+   -- TRANSLATORS: With a multiline comment
+   print _ "Hello Word" -- Will print in German: "Hallo Welt"
+
+
+Working with Placeholders
+^
+
+If you have multiple variables in your script that you wish to include dynamically in the same string, please use ordered placeholders to give translators control over the word order. We have implemented a special Lua function for this called ``bformat`` that works just like the ``boost::format`` function in C++. Example:
+
+.. code-block:: lua
+
+   local world = _("world") -- Will print in Gaelic: "saoghal"
+   local hello = _("hello") -- Will print in Gaelic: "halò"
+   -- TRANSLATORS: %1$s = hello, %2$s = world
+   print  (_ "The %1$s is '%2$s'"):bformat(hello, world) -- Will print in Gaelic: "Is 'halò' an saoghal"
+
+
+Numbers in Placeholders
+^^^
+
+Not all languages' number systems work the same as in English. So, mocking up an example with putting Gaelic grammar on an English word for illustration, we would have something like `0 boat`, `1 or 2 bhoat`, `3 boats`, `20 boat`... So, instead of using ``_`` to fetch the translation, any string containing a placeholder that is a number should be fetched with ``ngettext`` instead. First, you fetch the correct plural form, using the number variable and ``ngettext``:
+
+.. code-block:: lua
+
+   pretty_plurals_string = ngettext("There is %s world" , "There are %s worlds", number_of_worlds)
+
+
+Then you still need to format the string with your variable:
+
+.. code-block:: lua
+
+   print pretty_plurals_string:format(number_of_worlds)
+
+If you have a string with multiple numbers in it that would trigger plural forms, split it into separate strings that you can fetch with ``ngettext``. You can then combine them with ``bformat`` and ordered placeholders.
+
+
+Handling Long Strings
+^
+
+If you have a really long string, check if there is a logical place where you could split this into two separate strings for translators. It is easier for translators to translate smaller chunks, and if you should have to change the string later on, e.g. to fix a typo, you will break less stuff. The strings will be put into the translation files in the same order as they appear in the source code, so the context will remain intact for the translators.
+
+Also, please hide all formatting control characers from our translators. This includes HTML tags as well as new lines in the code! For an example, have a look at ``campaigns/atl01.wmf/scripting/texts.lua``
+
 .. vim:ft=rst:spelllang=en:spell

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1322473 into lp:widelands

2014-05-29 Thread GunChleoc
BTW merging this should also make Trunk compile again, because of this line:

=== modified file 'src/logic/cmd_queue.h'
--- src/logic/cmd_queue.h   2014-05-11 12:29:55 +
+++ src/logic/cmd_queue.h   2014-05-28 13:43:10 +
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1322473/+merge/221235
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1322473 into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-05-29 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1293158 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1293158 in widelands: "Odd line in information tool in editor"
  https://bugs.launchpad.net/widelands/+bug/1293158

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434

Got rid of a garbage string
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1293158 into lp:widelands.
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc	2014-03-09 10:28:39 +
+++ src/editor/tools/editor_info_tool.cc	2014-05-29 17:11:57 +
@@ -49,16 +49,11 @@
 	Widelands::Field & f = map[center.node];
 
 	// *** Node info
-	char buf1[1024];
 	std::string buf = _("Node:");
 	buf += "\n";
 	buf += std::string("• ") + (boost::format(_("Coordinates: (%1$i, %2$i)"))
 	 % center.node.x % center.node.y).str() + "\n";
 
-	buf += std::string("• ");
-	buf += buf1;
-	buf += std::string("\n");
-
 	std::string temp = "";
 	Widelands::NodeCaps const caps = f.nodecaps();
 	switch (caps & Widelands::BUILDCAPS_SIZEMASK) {
@@ -83,9 +78,15 @@
 
 	buf += std::string("• ") + (boost::format(_("Caps:%s")) % temp).str() + "\n";
 
-	buf += std::string("• ");
-	snprintf(buf1, sizeof(buf1), _("Owned by %i"), f.get_owned_by());
-	buf += std::string(buf1) + "\n";
+	if(f.get_owned_by() > 0) {
+		buf += std::string("• ");
+		char buf1[1024];
+		snprintf(buf1, sizeof(buf1), _("Owned by: %u"), f.get_owned_by());
+		buf += std::string(buf1) + "\n";
+	}
+	else {
+		buf += std::string("• ") + _("Owned by: —") + "\n";
+	}
 
 	temp = f.get_immovable() ? _("Has base immovable") : _("No base immovable");
 	buf += std::string("• ") + temp + "\n";
@@ -116,8 +117,7 @@
 			).str() + "\n";
 		buf += std::string("• ") + (boost::format(_("Resource amount: %i")) % ramount).str() + "\n";
 	}
-	else
-	{
+	else {
 		buf += std::string("• ") + std::string(_("No resources")) + "\n";
 	}
 
@@ -127,10 +127,13 @@
 	buf += std::string("• ") + (boost::format(_("Size: %1$ix%2$i"))
 	 % map.get_width() % map.get_height()).str() + "\n";
 
-	buf += std::string("• ");
-	snprintf(buf1, sizeof(buf1), _("Players: %i"), map.get_nrplayers());
+	if (map.get_nrplayers() > 0) {
+		buf += std::string("• ") + (boost::format(_("Players: %u")) % map.get_nrplayers()).str() + "\n";
+	}
+	else {
+		buf += std::string("• ") + (boost::format(_("Players: %s")) % "—").str() + "\n";
+	}
 
-	buf += std::string(buf1) + "\n";
 	buf += std::string("• ") + (boost::format(_("Author: %s")) % map.get_author()).str() + "\n";
 	buf += std::string("• ") + (boost::format(_("Descr: %s")) % map.get_description()).str() + "\n";
 

=== modified file 'src/logic/cmd_queue.h'
--- src/logic/cmd_queue.h	2014-05-11 12:29:55 +
+++ src/logic/cmd_queue.h	2014-05-29 17:11:57 +
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #include "logic/queue_cmd_ids.h"
 

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1322473 into lp:widelands

2014-06-05 Thread GunChleoc
Some comments to the comments - I didn't notive this until now :(

Diff comments:

> === modified file 'maps/MP Scenarios/Island 
> Hopping.wmf/scripting/multiplayer_init.lua'
> --- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua   
> 2014-03-25 06:18:48 +
> +++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua   
> 2014-05-28 13:43:10 +
> @@ -239,6 +239,9 @@
> disable_unused_buildings()
>  
> send_to_all(welcome_msg)
> +   -- set the objective with the game type for all players
> +   -- TODO change this to a broadcast once individual game objectives have 
> been implementes
> +   game.players[1]:add_objective("win_conditions", _"Rules", welcome_msg)
>  
> for idx,plr in ipairs(game.players) do
>run(function() run_island(plr, 1) end)
> 
> === modified file 'maps/MP 
> Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua'
> --- maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua
> 2014-03-25 06:18:48 +
> +++ maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua
> 2014-05-28 13:43:10 +
> @@ -140,7 +140,9 @@
> end
>  
> send_to_all(welcome_msg:format((ngettext("%i point", "%i points", 
> points_to_win)):format(points_to_win)))
> -
> +   -- set the objective with the game type for all players
> +   -- TODO change this to a broadcast once individual game objectives have 
> been implementes
> +   game.players[1]:add_objective("win_conditions", _"Rules", 
> welcome_msg:format((ngettext("%i point", "%i points", 
> points_to_win)):format(points_to_win)))
>  
> for idx,descr in ipairs(route_descrs) do
>run(wait_for_established_route, descr)
> 
> === modified file 'maps/Plateau.wmf/scripting/init.lua'
> --- maps/Plateau.wmf/scripting/init.lua   2014-03-25 06:18:48 +
> +++ maps/Plateau.wmf/scripting/init.lua   2014-05-28 13:43:10 +
> @@ -22,6 +22,7 @@
> sleep(300)
>  
> send_msg(briefing_1_the_forbidden_island)
> +   local o = add_obj(obj_forbidden_island)
>  
> local map = wl.Game().map
> while not p1:seen_field(map:get_field(5,8)) do sleep(2345) end
> @@ -47,7 +48,8 @@
> scroll_smoothly_to(castle)
>  
> send_msg(briefing_2_found_ancient_castle)
> -   local o = add_obj(obj_capture_ancient_castle)
> +   o.done = true

Yes, because I am considering the initial objective as resolved - it's a "build 
up your basic economy" message. If you think it doesn't fit the scenario, I'm 
open to suggestions.

> +   o = add_obj(obj_capture_ancient_castle)
>  
> -- Wait till we conquered the castle
> while #p1:get_buildings"castle.atlanteans" < 1 do sleep(2345) end
> 
> === modified file 'maps/Plateau.wmf/scripting/texts.lua'
> --- maps/Plateau.wmf/scripting/texts.lua  2014-04-09 17:50:02 +
> +++ maps/Plateau.wmf/scripting/texts.lua  2014-05-28 13:43:10 +
> @@ -23,6 +23,19 @@
> return p1:add_objective(o.name, o.title, _obj(reflow(o.body)), o)
>  end
>  
> +obj_forbidden_island = {
> +   name = "forbidden_island",
> +   title =_"The Forbidden Island",
> +   body = _(
> +[[Finally! We have just taken our first step towards victory! ]] ..

Not each sentence - I keep logical blocks. If I cange thos now, we will break 
all translations again anyway.

> +[[Last night, we landed on the forbidden island and defeated the few guards 
> that were watching the ]] ..
> +[[north-western part of the island. ]] ..
> +[[I am quite sure that none of the other warlords has detected us so far, ]] 
> ..
> +[[so we should keep quiet and build up our infrastructure. Soon we will be 
> strong enough to raid their positions.]]),
> +}
> +
> +
> +
>  obj_capture_ancient_castle = {
> name = "capture_ancient_castle",
> title =_ "Capture the Ancient Castle",
> 
> === modified file 'scripting/win_condition_functions.lua'
> --- scripting/win_condition_functions.lua 2013-08-07 16:58:48 +
> +++ scripting/win_condition_functions.lua 2014-05-28 13:43:10 +
> @@ -125,3 +125,19 @@
> wl.game.report_result(p, 0, make_extra_data(p, wc_name, wc_ver, 
> extra))
> end
>  end
> +
> +
> +-- RST
> +-- .. function:: broadcast_objective(plrs, header, msg, body)
> +--
> +--:arg plrs:This should be wl.Game().players
> +--:arg name:A unique name for the objective

Which table? I am creating a new objective here and giving it a name, how would 
I get that objective name magically out of a table?

> +--:arg title:   The title to be displayed for the objective
> +--:arg body:The content text to be displayed for the objective
> +--
> +--broadcast an objective to all players
> +--technically, it is assigned to player1, because all players will see 
> all objectives
> +function broadcast_objective(plrs, name, title, body)
> + plrs[1]:add_objective(name, title, body)
> +end
> +
> 
> === modified file 'scripting/win_conditions/00_endless_game.lua'
> --- scripting/win_conditions/00_endless_game.lua  2014-03-25 06:18:48

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-06-05 Thread GunChleoc
Some comments to the nits.

Diff comments:

> === modified file 'src/editor/tools/editor_info_tool.cc'
> --- src/editor/tools/editor_info_tool.cc  2014-03-09 10:28:39 +
> +++ src/editor/tools/editor_info_tool.cc  2014-05-29 17:16:25 +
> @@ -49,16 +49,11 @@
>   Widelands::Field & f = map[center.node];
>  
>   // *** Node info
> - char buf1[1024];
>   std::string buf = _("Node:");
>   buf += "\n";
>   buf += std::string("• ") + (boost::format(_("Coordinates: (%1$i, 
> %2$i)"))
>% center.node.x % center.node.y).str() 
> + "\n";
>  
> - buf += std::string("• ");
> - buf += buf1;
> - buf += std::string("\n");
> -
>   std::string temp = "";
>   Widelands::NodeCaps const caps = f.nodecaps();
>   switch (caps & Widelands::BUILDCAPS_SIZEMASK) {
> @@ -83,9 +78,15 @@
>  
>   buf += std::string("• ") + (boost::format(_("Caps:%s")) % temp).str() + 
> "\n";
>  
> - buf += std::string("• ");
> - snprintf(buf1, sizeof(buf1), _("Owned by %i"), f.get_owned_by());
> - buf += std::string(buf1) + "\n";
> + if(f.get_owned_by() > 0) {
> + buf += std::string("• ");
> + char buf1[1024];
> + snprintf(buf1, sizeof(buf1), _("Owned by: %u"), 
> f.get_owned_by());

I tried this multiple times with copy/paste and double-checking until IÄm blue 
in the face, and it will cut off the strings that follow if I do that, every 
time. I have no idea why, so I left the old code as it is.

> + buf += std::string(buf1) + "\n";
> + }
> + else {
> + buf += std::string("• ") + _("Owned by: —") + "\n";

I am using • for scenario objectives as well, because it looks better. We 
should be consistent throughout the code.

> + }
>  
>   temp = f.get_immovable() ? _("Has base immovable") : _("No base 
> immovable");
>   buf += std::string("• ") + temp + "\n";
> @@ -116,8 +117,7 @@
>   ).str() + "\n";
>   buf += std::string("• ") + (boost::format(_("Resource amount: 
> %i")) % ramount).str() + "\n";
>   }
> - else
> - {
> + else {
>   buf += std::string("• ") + std::string(_("No resources")) + 
> "\n";
>   }
>  
> @@ -127,10 +127,13 @@
>   buf += std::string("• ") + (boost::format(_("Size: %1$ix%2$i"))
>% map.get_width() % 
> map.get_height()).str() + "\n";
>  
> - buf += std::string("• ");
> - snprintf(buf1, sizeof(buf1), _("Players: %i"), map.get_nrplayers());
> + if (map.get_nrplayers() > 0) {
> + buf += std::string("• ") + (boost::format(_("Players: %u")) % 
> map.get_nrplayers()).str() + "\n";
> + }
> + else {
> + buf += std::string("• ") + (boost::format(_("Players: %s")) % 
> "—").str() + "\n";
> + }
>  
> - buf += std::string(buf1) + "\n";
>   buf += std::string("• ") + (boost::format(_("Author: %s")) % 
> map.get_author()).str() + "\n";
>   buf += std::string("• ") + (boost::format(_("Descr: %s")) % 
> map.get_description()).str() + "\n";
>  
> 
> === modified file 'src/logic/cmd_queue.h'
> --- src/logic/cmd_queue.h 2014-05-11 12:29:55 +
> +++ src/logic/cmd_queue.h 2014-05-29 17:16:25 +
> @@ -22,6 +22,7 @@
>  
>  #include 
>  #include 
> +#include 

Yes, fix is in trunk.

I don't know what are C and what are C++ headers here, I'll just go by file 
extension then *lol*

>  
>  #include "logic/queue_cmd_ids.h"
>  
> 


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1324137 into lp:widelands

2014-06-05 Thread GunChleoc
Somments to the suggestions

Diff comments:

> === modified file 'doc/sphinx/source/tutorial.rst'
> --- doc/sphinx/source/tutorial.rst2013-04-03 09:06:34 +
> +++ doc/sphinx/source/tutorial.rst2014-05-29 10:48:20 +
> @@ -269,4 +269,62 @@
>  coroutines share the same environment and can therefore use global variables
>  to communicate with each other.  
>  
> +
> +Preparing Strings for Translation
> +-
> +
> +When writing your scenario's text, it is important to keep in mind that 
> these will be translated into various languages. This entails that word forms 
> and word order will change, and some languages have more than one plural 
> form. So, here are some pointers for good string design. For examples for the 
> formatting discussed here, have a look at ``maps/MP Scenarios/Island 
> Hopping.wmf/scripting/multiplayer_init.lua`` in the source code.
> +
> +
> +Translator Comments
> +^^^
> +
> +If you have a string where you feel that translators will need a bit of help 
> to understand what it does, you can add a translator comment to it. 
> Translator comments are particularly useful when you are working with 
> placeholders, because you can tell the translator what the placeholder will 
> be replaced with. Translator comments need to be inserted into the code in 
> the line directly above the translation. Each line of a translator comment 
> has to be prefixed by ``-- TRANSLATORS: ``, like this:
> +
> +.. code-block:: lua
> +
> +   -- TRANSLATORS: This is just a test string
> +   -- TRANSLATORS: With a multiline comment
> +   print _ "Hello Word" -- Will print in German: "Hallo Welt"
> +
> +
> +Working with Placeholders
> +^
> +
> +If you have multiple variables in your script that you wish to include 
> dynamically in the same string, please use ordered placeholders to give 
> translators control over the word order. We have implemented a special Lua 
> function for this called ``bformat`` that works just like the 
> ``boost::format`` function in C++. Example:
> +
> +.. code-block:: lua
> +
> +   local world = _("world") -- Will print in Gaelic: "saoghal"
> +   local hello = _("hello") -- Will print in Gaelic: "halò"
> +   -- TRANSLATORS: %1$s = hello, %2$s = world
> +   print  (_ "The %1$s is '%2$s'"):bformat(hello, world) -- Will print in 
> Gaelic: "Is 'halò' an saoghal"
> +
> +
> +Numbers in Placeholders
> +^^^
> +
> +Not all languages' number systems work the same as in English. So, mocking 
> up an example with putting Gaelic grammar on an English word for 
> illustration, we would have something like `0 boat`, `1 or 2 bhoat`, `3 
> boats`, `20 boat`... So, instead of using ``_`` to fetch the translation, any 
> string containing a placeholder that is a number should be fetched with 
> ``ngettext`` instead. First, you fetch the correct plural form, using the 
> number variable and ``ngettext``:

But that is not the problem. The problem is the plural pattern, not that we 
have a mass noun in one of the languages. English and German both have 1 vs. 
the rest.

> +
> +.. code-block:: lua
> +
> +   pretty_plurals_string = ngettext("There is %s world" , "There are %s 
> worlds", number_of_worlds)
> +
> +
> +Then you still need to format the string with your variable:
> +
> +.. code-block:: lua
> +
> +   print pretty_plurals_string:format(number_of_worlds)
> +
> +If you have a string with multiple numbers in it that would trigger plural 
> forms, split it into separate strings that you can fetch with ``ngettext``. 
> You can then combine them with ``bformat`` and ordered placeholders.
> +
> +
> +Handling Long Strings
> +^
> +
> +If you have a really long string, check if there is a logical place where 
> you could split this into two separate strings for translators. It is easier 
> for translators to translate smaller chunks, and if you should have to change 
> the string later on, e.g. to fix a typo, you will break less stuff. The 
> strings will be put into the translation files in the same order as they 
> appear in the source code, so the context will remain intact for the 
> translators.

Well, I go with my intuition and common sense on this one. Maybe "multiple 
sentences" is a better criterium?

> +
> +Also, please hide all formatting control characers from our translators. 
> This includes HTML tags as well as new lines in the code! For an example, 
> have a look at ``campaigns/atl01.wmf/scripting/texts.lua``
> +
>  .. vim:ft=rst:spelllang=en:spell
> 


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1324137.

___
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/ListH

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands

2014-06-05 Thread GunChleoc
I think in the code is better, because we would end up with a very big screen 
full of stuff.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1074353 into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1322473 into lp:widelands

2014-06-05 Thread GunChleoc
Fixed everything except for some open questions.

Diff comments:

> === modified file 'maps/MP Scenarios/Island 
> Hopping.wmf/scripting/multiplayer_init.lua'
> --- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua   
> 2014-03-25 06:18:48 +
> +++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua   
> 2014-05-28 13:43:10 +
> @@ -239,6 +239,9 @@
> disable_unused_buildings()
>  
> send_to_all(welcome_msg)

I left this in, because we can't update individual player objectives yet.

> +   -- set the objective with the game type for all players
> +   -- TODO change this to a broadcast once individual game objectives have 
> been implementes

Fixed.

> +   game.players[1]:add_objective("win_conditions", _"Rules", welcome_msg)
>  
> for idx,plr in ipairs(game.players) do
>run(function() run_island(plr, 1) end)
> 
> === modified file 'maps/MP 
> Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua'
> --- maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua
> 2014-03-25 06:18:48 +
> +++ maps/MP Scenarios/Smugglers.wmf/scripting/multiplayer_init.lua
> 2014-05-28 13:43:10 +
> @@ -140,7 +140,9 @@
> end
>  
> send_to_all(welcome_msg:format((ngettext("%i point", "%i points", 
> points_to_win)):format(points_to_win)))
> -
> +   -- set the objective with the game type for all players
> +   -- TODO change this to a broadcast once individual game objectives have 
> been implementes
> +   game.players[1]:add_objective("win_conditions", _"Rules", 
> welcome_msg:format((ngettext("%i point", "%i points", 
> points_to_win)):format(points_to_win)))
>  
> for idx,descr in ipairs(route_descrs) do
>run(wait_for_established_route, descr)
> 
> === modified file 'maps/Plateau.wmf/scripting/init.lua'
> --- maps/Plateau.wmf/scripting/init.lua   2014-03-25 06:18:48 +
> +++ maps/Plateau.wmf/scripting/init.lua   2014-05-28 13:43:10 +
> @@ -22,6 +22,7 @@
> sleep(300)
>  
> send_msg(briefing_1_the_forbidden_island)
> +   local o = add_obj(obj_forbidden_island)
>  
> local map = wl.Game().map
> while not p1:seen_field(map:get_field(5,8)) do sleep(2345) end
> @@ -47,7 +48,8 @@
> scroll_smoothly_to(castle)
>  
> send_msg(briefing_2_found_ancient_castle)
> -   local o = add_obj(obj_capture_ancient_castle)
> +   o.done = true
> +   o = add_obj(obj_capture_ancient_castle)
>  
> -- Wait till we conquered the castle
> while #p1:get_buildings"castle.atlanteans" < 1 do sleep(2345) end
> 
> === modified file 'maps/Plateau.wmf/scripting/texts.lua'
> --- maps/Plateau.wmf/scripting/texts.lua  2014-04-09 17:50:02 +
> +++ maps/Plateau.wmf/scripting/texts.lua  2014-05-28 13:43:10 +
> @@ -23,6 +23,19 @@
> return p1:add_objective(o.name, o.title, _obj(reflow(o.body)), o)
>  end
>  
> +obj_forbidden_island = {
> +   name = "forbidden_island",
> +   title =_"The Forbidden Island",

Fixed.

> +   body = _(
> +[[Finally! We have just taken our first step towards victory! ]] ..
> +[[Last night, we landed on the forbidden island and defeated the few guards 
> that were watching the ]] ..
> +[[north-western part of the island. ]] ..
> +[[I am quite sure that none of the other warlords has detected us so far, ]] 
> ..
> +[[so we should keep quiet and build up our infrastructure. Soon we will be 
> strong enough to raid their positions.]]),
> +}
> +
> +
> +
>  obj_capture_ancient_castle = {
> name = "capture_ancient_castle",
> title =_ "Capture the Ancient Castle",
> 
> === modified file 'scripting/win_condition_functions.lua'
> --- scripting/win_condition_functions.lua 2013-08-07 16:58:48 +
> +++ scripting/win_condition_functions.lua 2014-05-28 13:43:10 +
> @@ -125,3 +125,19 @@
> wl.game.report_result(p, 0, make_extra_data(p, wc_name, wc_ver, 
> extra))
> end
>  end
> +
> +
> +-- RST
> +-- .. function:: broadcast_objective(plrs, header, msg, body)
> +--
> +--:arg plrs:This should be wl.Game().players

Fixed.

> +--:arg name:A unique name for the objective
> +--:arg title:   The title to be displayed for the objective
> +--:arg body:The content text to be displayed for the objective
> +--
> +--broadcast an objective to all players

Fixed.

> +--technically, it is assigned to player1, because all players will see 
> all objectives
> +function broadcast_objective(plrs, name, title, body)
> + plrs[1]:add_objective(name, title, body)
> +end
> +
> 
> === modified file 'scripting/win_conditions/00_endless_game.lua'
> --- scripting/win_conditions/00_endless_game.lua  2014-03-25 06:18:48 
> +
> +++ scripting/win_conditions/00_endless_game.lua  2014-05-28 13:43:10 
> +
> @@ -18,7 +18,8 @@
>   func = function()
>   local plrs = wl.Game().players
>  
> - broadcast(plrs, wc_name, wc_desc)
> + -- set the objective with the game type for all players
> + broad

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1324137 into lp:widelands

2014-06-05 Thread GunChleoc
Added some fixes. Some issues are still open.

Diff comments:

> === modified file 'doc/sphinx/source/tutorial.rst'
> --- doc/sphinx/source/tutorial.rst2013-04-03 09:06:34 +
> +++ doc/sphinx/source/tutorial.rst2014-05-29 10:48:20 +
> @@ -269,4 +269,62 @@
>  coroutines share the same environment and can therefore use global variables
>  to communicate with each other.  
>  
> +
> +Preparing Strings for Translation
> +-
> +
> +When writing your scenario's text, it is important to keep in mind that 
> these will be translated into various languages. This entails that word forms 
> and word order will change, and some languages have more than one plural 
> form. So, here are some pointers for good string design. For examples for the 
> formatting discussed here, have a look at ``maps/MP Scenarios/Island 
> Hopping.wmf/scripting/multiplayer_init.lua`` in the source code.

Fixed.

> +
> +
> +Translator Comments
> +^^^
> +
> +If you have a string where you feel that translators will need a bit of help 
> to understand what it does, you can add a translator comment to it. 
> Translator comments are particularly useful when you are working with 
> placeholders, because you can tell the translator what the placeholder will 
> be replaced with. Translator comments need to be inserted into the code in 
> the line directly above the translation. Each line of a translator comment 
> has to be prefixed by ``-- TRANSLATORS: ``, like this:
> +
> +.. code-block:: lua
> +
> +   -- TRANSLATORS: This is just a test string
> +   -- TRANSLATORS: With a multiline comment
> +   print _ "Hello Word" -- Will print in German: "Hallo Welt"

_ has been explained in the Calling conventions above, but I added a new 
section to explain it anyway. Removed the comment.

> +
> +
> +Working with Placeholders
> +^
> +
> +If you have multiple variables in your script that you wish to include 
> dynamically in the same string, please use ordered placeholders to give 
> translators control over the word order. We have implemented a special Lua 
> function for this called ``bformat`` that works just like the 
> ``boost::format`` function in C++. Example:

Fixed - please check that I used the correct syntax for the link.

> +
> +.. code-block:: lua
> +
> +   local world = _("world") -- Will print in Gaelic: "saoghal"
> +   local hello = _("hello") -- Will print in Gaelic: "halò"
> +   -- TRANSLATORS: %1$s = hello, %2$s = world
> +   print  (_ "The %1$s is '%2$s'"):bformat(hello, world) -- Will print in 
> Gaelic: "Is 'halò' an saoghal"
> +
> +
> +Numbers in Placeholders
> +^^^
> +
> +Not all languages' number systems work the same as in English. So, mocking 
> up an example with putting Gaelic grammar on an English word for 
> illustration, we would have something like `0 boat`, `1 or 2 bhoat`, `3 
> boats`, `20 boat`... So, instead of using ``_`` to fetch the translation, any 
> string containing a placeholder that is a number should be fetched with 
> ``ngettext`` instead. First, you fetch the correct plural form, using the 
> number variable and ``ngettext``:
> +
> +.. code-block:: lua
> +
> +   pretty_plurals_string = ngettext("There is %s world" , "There are %s 
> worlds", number_of_worlds)
> +
> +
> +Then you still need to format the string with your variable:
> +
> +.. code-block:: lua
> +
> +   print pretty_plurals_string:format(number_of_worlds)
> +
> +If you have a string with multiple numbers in it that would trigger plural 
> forms, split it into separate strings that you can fetch with ``ngettext``. 
> You can then combine them with ``bformat`` and ordered placeholders.
> +
> +
> +Handling Long Strings
> +^
> +
> +If you have a really long string, check if there is a logical place where 
> you could split this into two separate strings for translators. It is easier 
> for translators to translate smaller chunks, and if you should have to change 
> the string later on, e.g. to fix a typo, you will break less stuff. The 
> strings will be put into the translation files in the same order as they 
> appear in the source code, so the context will remain intact for the 
> translators.
> +
> +Also, please hide all formatting control characers from our translators. 
> This includes HTML tags as well as new lines in the code! For an example, 
> have a look at ``campaigns/atl01.wmf/scripting/texts.lua``
> +
>  .. vim:ft=rst:spelllang=en:spell
> 


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1324137.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-06-05 Thread GunChleoc
Added some fixes + more comments.

Diff comments:

> === modified file 'src/editor/tools/editor_info_tool.cc'
> --- src/editor/tools/editor_info_tool.cc  2014-03-09 10:28:39 +
> +++ src/editor/tools/editor_info_tool.cc  2014-05-29 17:16:25 +
> @@ -49,16 +49,11 @@
>   Widelands::Field & f = map[center.node];
>  
>   // *** Node info
> - char buf1[1024];
>   std::string buf = _("Node:");
>   buf += "\n";
>   buf += std::string("• ") + (boost::format(_("Coordinates: (%1$i, 
> %2$i)"))
>% center.node.x % center.node.y).str() 
> + "\n";
>  
> - buf += std::string("• ");
> - buf += buf1;
> - buf += std::string("\n");
> -
>   std::string temp = "";
>   Widelands::NodeCaps const caps = f.nodecaps();
>   switch (caps & Widelands::BUILDCAPS_SIZEMASK) {
> @@ -83,9 +78,15 @@
>  
>   buf += std::string("• ") + (boost::format(_("Caps:%s")) % temp).str() + 
> "\n";
>  
> - buf += std::string("• ");
> - snprintf(buf1, sizeof(buf1), _("Owned by %i"), f.get_owned_by());
> - buf += std::string(buf1) + "\n";
> + if(f.get_owned_by() > 0) {
> + buf += std::string("• ");

The compiler tells me otherwise; but I removed this in the other instances 
where the compiler let me.

> + char buf1[1024];
> + snprintf(buf1, sizeof(buf1), _("Owned by: %u"), 
> f.get_owned_by());
> + buf += std::string(buf1) + "\n";
> + }
> + else {
> + buf += std::string("• ") + _("Owned by: —") + "\n";

Any pointers for the table thing?

> + }
>  
>   temp = f.get_immovable() ? _("Has base immovable") : _("No base 
> immovable");
>   buf += std::string("• ") + temp + "\n";
> @@ -116,8 +117,7 @@
>   ).str() + "\n";
>   buf += std::string("• ") + (boost::format(_("Resource amount: 
> %i")) % ramount).str() + "\n";
>   }
> - else
> - {
> + else {
>   buf += std::string("• ") + std::string(_("No resources")) + 
> "\n";
>   }
>  
> @@ -127,10 +127,13 @@
>   buf += std::string("• ") + (boost::format(_("Size: %1$ix%2$i"))
>% map.get_width() % 
> map.get_height()).str() + "\n";
>  
> - buf += std::string("• ");
> - snprintf(buf1, sizeof(buf1), _("Players: %i"), map.get_nrplayers());
> + if (map.get_nrplayers() > 0) {
> + buf += std::string("• ") + (boost::format(_("Players: %u")) % 
> map.get_nrplayers()).str() + "\n";
> + }
> + else {
> + buf += std::string("• ") + (boost::format(_("Players: %s")) % 
> "—").str() + "\n";
> + }
>  
> - buf += std::string(buf1) + "\n";
>   buf += std::string("• ") + (boost::format(_("Author: %s")) % 
> map.get_author()).str() + "\n";
>   buf += std::string("• ") + (boost::format(_("Descr: %s")) % 
> map.get_description()).str() + "\n";
>  
> 
> === modified file 'src/logic/cmd_queue.h'
> --- src/logic/cmd_queue.h 2014-05-11 12:29:55 +
> +++ src/logic/cmd_queue.h 2014-05-29 17:16:25 +
> @@ -22,6 +22,7 @@
>  
>  #include 
>  #include 
> +#include 

Fixed.

>  
>  #include "logic/queue_cmd_ids.h"
>  
> 


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/one_world into lp:widelands

2014-06-10 Thread GunChleoc
For the translations, the best thing to keep as much as we can is to use the 
msgmerge utility - I guess you are already using this when integrating updates 
from Launchpad? We could do something like the following:

1. reconfigure our script for xgettext to collect all world-related strings 
into one .pot catalog, e.g. worlds/worlds.pot.

2. Grab the current Launchpad translations

3. Use msgmerge to merge the 4 old worlds into one, creating a new po file in 
the process. Something like this:

msgmerge -o worlds/de.po world-blackland/de.po worlds/worlds.pot
msgmerge -o worlds/de.po world-desert/de.po worlds/worlds.pot
msgmerge -o worlds/de.po world-greenland/de.po worlds/worlds.pot
msgmerge -o worlds/de.po world-winterland/de.po worlds/worlds.pot

I think it would be a good idea to test this with German, because more than one 
of us speak the language, and we could open the resulting worlds/de.po and have 
a look if everything's OK.
-- 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/one_world into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/one_world into lp:widelands

2014-06-10 Thread GunChleoc
Review: Needs Fixing merging world catalogues

Commented here: 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708/comments/533683

Set to "Needs fixing", because we still need to work this out and test ;)
-- 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/one_world into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/one_world into lp:widelands

2014-06-11 Thread GunChleoc
Yes, merge them one after the other.

I noticed that the merged translation has a good number of fuzzy strings in it. 
Launchpad will kill these - maybe we should upload a translation archive to the 
homepage to give translators access.

Alternatively, they could download the old world files first and load into 
their tools to fill up the translation memories, so the will get suggestions 
for these strings if they are working offline. for this, we would need to keep 
the old world files around for a bit.
-- 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/one_world.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/one_world into lp:widelands

2014-06-11 Thread GunChleoc
Review: Approve merging world catalogues


-- 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/one_world.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/one_world into lp:widelands

2014-06-12 Thread GunChleoc
We could give translators a heads-up in the forum thread, and I can grab an 
archive in case they need help.

It's not that much as you say, so this should suffice - no need for a big 
announcement on the homepage.

How close are we to the merge, do you want me to go ahead and post something?
-- 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/one_world.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/one_world into lp:widelands

2014-06-17 Thread GunChleoc
I have made an announcement on the forum and am grabbing a translation archive 
today.

Sorry I'm a bit slow reacting to stuff, I'm travelling at the moment ;)
-- 
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/one_world.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/world-stringfix into lp:widelands

2014-07-11 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/world-stringfix into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426

Removed a blank space from tree name + added some translator comments
-- 
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/world-stringfix into lp:widelands.
=== modified file 'world/immovables/trees/cirrus/init.lua'
--- world/immovables/trees/cirrus/init.lua	2014-07-05 14:09:47 +
+++ world/immovables/trees/cirrus/init.lua	2014-07-11 09:52:56 +
@@ -9,7 +9,8 @@
 
 world:new_immovable_type{
name = "cirrus_wasteland_sapling",
-   descname = _ " Cirrus Tree (Sapling)",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
+   descname = _ "Cirrus Tree (Sapling)",
editor_category = "trees_wasteland",
size = "small",
attributes = { "tree_sapling" },
@@ -32,6 +33,7 @@
 
 world:new_immovable_type{
name = "cirrus_wasteland_pole",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Cirrus Tree (Pole)",
editor_category = "trees_wasteland",
size = "small",
@@ -55,6 +57,7 @@
 
 world:new_immovable_type{
name = "cirrus_wasteland_mature",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Cirrus Tree (Mature)",
editor_category = "trees_wasteland",
size = "small",
@@ -78,6 +81,7 @@
 
 world:new_immovable_type{
name = "cirrus_wasteland_old",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Cirrus Tree (Old)",
editor_category = "trees_wasteland",
size = "small",

=== modified file 'world/immovables/trees/liana/init.lua'
--- world/immovables/trees/liana/init.lua	2014-07-05 14:09:47 +
+++ world/immovables/trees/liana/init.lua	2014-07-11 09:52:56 +
@@ -9,6 +9,7 @@
 
 world:new_immovable_type{
name = "liana_wasteland_sapling",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Liana Tree (Sapling)",
editor_category = "trees_wasteland",
size = "small",
@@ -32,6 +33,7 @@
 
 world:new_immovable_type{
name = "liana_wasteland_pole",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Liana Tree (Pole)",
editor_category = "trees_wasteland",
size = "small",
@@ -55,6 +57,7 @@
 
 world:new_immovable_type{
name = "liana_wasteland_mature",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Liana Tree (Mature)",
editor_category = "trees_wasteland",
size = "small",
@@ -81,6 +84,7 @@
 
 world:new_immovable_type{
name = "liana_wasteland_old",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Liana Tree (Old)",
editor_category = "trees_wasteland",
size = "small",

=== modified file 'world/immovables/trees/mushroom_dark/init.lua'
--- world/immovables/trees/mushroom_dark/init.lua	2014-07-05 14:09:47 +
+++ world/immovables/trees/mushroom_dark/init.lua	2014-07-11 09:52:56 +
@@ -9,6 +9,7 @@
 
 world:new_immovable_type{
name = "mushroom_dark_wasteland_sapling",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Dark Mushroom Tree (Sapling)",
editor_category = "trees_wasteland",
size = "small",
@@ -32,6 +33,7 @@
 
 world:new_immovable_type{
name = "mushroom_dark_wasteland_pole",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Dark Mushroom Tree (Pole)",
editor_category = "trees_wasteland",
size = "small",
@@ -55,6 +57,7 @@
 
 world:new_immovable_type{
name = "mushroom_dark_wasteland_mature",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Dark Mushroom Tree (Mature)",
editor_category = "trees_wasteland",
size = "small",
@@ -78,6 +81,7 @@
 
 world:new_immovable_type{
name = "mushroom_dark_wasteland_old",
+   -- TRANSLATORS: This is a fictitious tree. Be creative if you want.
descname = _ "Dark Mushroom Tree (Old)",
editor_category = "trees_wasteland",
size = "small",

=== modified file 'world/immovables/trees/mushroom_green/init.lua'
--- world

[Widelands-dev] [Merge] lp:~hjd/widelands/space-and-tiny-fixes into lp:widelands

2014-07-11 Thread GunChleoc
The proposal to merge lp:~hjd/widelands/space-and-tiny-fixes into lp:widelands 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~hjd/widelands/space-and-tiny-fixes/+merge/226347
-- 
https://code.launchpad.net/~hjd/widelands/space-and-tiny-fixes/+merge/226347
Your team Widelands Developers is requested to review the proposed merge of 
lp:~hjd/widelands/space-and-tiny-fixes into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/world-stringfix into lp:widelands

2014-07-11 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/world-stringfix into 
lp:widelands has been updated.

Description changed to:

Removed a blank space from tree name + added some translator comments

ETA: Already fixed by other merge request, but please merge anyway for the 
added comments.

https://code.launchpad.net/~hjd/widelands/space-and-tiny-fixes/+merge/226347

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426
-- 
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/world-stringfix into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-07-11 Thread GunChleoc
> Still shows a box character under Map:->Players:
> Tested with "Crossing the horizon"

I know, but I haven't the foggiest why. Somebody else will have to fix this.

If nobody wants to take on this branch, can we merge and open a new bug?
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1324137 into lp:widelands

2014-07-11 Thread GunChleoc
I have found a better example for the plural forms (en "cat" = gd "cat"). I 
think this is ready for merging now.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1324137.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands

2014-07-11 Thread GunChleoc
I have started on the NOCOMs.I have added the 3 persist/unpersist objects to 
the test suite (lua_persistence.wmf), but when I run it, it complains about a 
missing init.lua:

bratzbert@museum:~/sources/widelands/bug-1074353$ ./widelands 
--scenario=test/maps/lua_persistence.wmf
Set home directory: /home/bratzbert/.widelands
Adding directory:./.
Adding directory:/usr/share/games/widelands
Adding directory:.
Widelands executable directory: /home/bratzbert/sources/widelands/bug-1074353/
localedir: /home/bratzbert/sources/widelands/bug-1074353/locale
selected language: en
using locale en_US.utf-8
SDL_VIDEODRIVER=&
Graphics: Trying Video driver: 0 x11 SDL_VIDEODRIVER=x11
Graphics: Trying opengl
Graphics: Try to set Videomode 800x600 32 Bit
Graphics: Setting video mode was successful
Graphics: OpenGL: OpenGL enabled
Graphics: OpenGL: Double buffering enabled
Graphics: OpenGL: Max texture size: 8192
Graphics: OpenGL: Number of aux buffers: 0
Graphics: OpenGL: Number of stencil buffer bits: 8
Graphics: OpenGL: Maximum number of textures for multitextures: 8
Graphics: OpenGL: Version 2.1 "2.1 Mesa 10.1.3"
Graphics: OpenGL: Textures may have any size
Graphics: OpenGL: Multitexture capabilities sufficient
 GRAPHICS REPORT 
 VIDEO DRIVER x11
 hw surface possible 0
 window manager available 1
 blitz_hw 0
 blitz_hw_CC 0
 blitz_hw_A 0
 blitz_sw 0
 blitz_sw_CC 0
 blitz_sw_A 0
 blitz_fill 0
 video_mem 0
 vfmt 0x2b4be30
 size 800 600
 END GRAPHICS REPORT 
Graphics: flags: 2
[] Section [global], key 'EXENAME' not used (did you spell the name correctly?)
ERROR: Unused key "1" in LuaTable. Please report as a bug.
Loading the world took 992ms
Reading Elemental Data ... took 0ms
 Reading Player Names And Tribe Data ... took 1ms
 Reading Heights Data ... took 2ms
 Reading Terrain Data ... took 1ms
 Reading Map Objects ... took 0ms
 Reading Player Start Position Data ... took 0ms
 Reading Resources Data ... took 0ms
 Reading Map Extra Data ... took 1ms
 Reading Map Version Data ... took 0ms
 Reading Allowed Worker Types Data ... took 0ms
 Reading Allowed Building Types Data ... took 1ms
 Reading Node Ownership Data ... took 0ms
 Reading Exploration Data ... took 0ms
 Reading Flag Data ... took 1ms
 Reading Road Data ... took 0ms
 Reading Building Data ... took 0ms
 Reading Flagdata Data ... took 1ms
 Reading Roaddata Data ... took 0ms
 Reading Buildingdata Data ... took 0ms
 Second and third phase loading Map Objects ... took 1ms
 Reading Players View Data ... Map_Players_View_Data_Packet::Read: WARNING: 
Could not open "player/1/view/unseen_times_1" for reading. Assuming that the 
game is from an old version without player point of view. Will give player 1 
knowledge of unseen nodes, edges and triangles (but not resources).took 0ms
 Reading Player Message Data ... took 0ms
 Reading Objective Data ... took 1ms
 Reading Scripting Data ... took 0ms
 WL_Map_Loader::load_map_complete() took 23ms
Starting replay writer
Game: Writing Preload Data ... took 0ms
Game: Writing Game Class Data ... took 1ms
Game: Writing Player Info ... took 0ms
Game: Writing Map Data!
Writing Elemental Data ... took 0ms
 Writing Player Names And Tribe Data ... took 1ms
 Writing Port Spaces Data ... took 0ms
 Writing Heights Data ... took 0ms
 Writing Terrain Data ... took 1ms
 Writing Player Start Position Data ... took 0ms
 Writing Player Message Data ... took 1ms
 Writing Resources Data ... took 0ms
 Writing Map Extra Data ... took 0ms
 Writing Map Version ... took 1ms
 Writing Allowed Worker Types Data ... took 0ms
 Writing Flag Data ... took 0ms
 Writing Road Data ... took 1ms
 Writing Building Data ... took 0ms
 Writing Map Objects ... took 0ms
 Writing Node Ownership Data ... took 0ms
 Writing Exploration Data ... took 1ms
 Writing Players Unseen Data ... took 1ms
 Writing Scripting Data ... took 7ms
 Writing Objective Data ... took 0ms
 Map_Saver::save() took 14ms
Game: Writing Map Data took 15ms
Game: Writing Player Economies Info ... took 1ms
Game: Writing Command Queue Data ... took 0ms
Game: Writing Interactive Player Data ... took 0ms
Game_Saver::save() took 17ms
SaveHandler::save_game() took 18ms
Reloading the game from replay
Game: Reading Preload Data ... took 0ms
Game: Reading Game Class Data ... took 1ms
Game: Reading Map Data ... Game: Reading Map Data took 4ms
Game: Reading Player Info ... Game: Reading Player Info took 208ms
Game: Calling Read_Complete()
Reading Elemental Data ... took 1ms
 Reading Player Names And Tribe Data ... took 1ms
 Reading Port Spaces Data ... took 0ms
 Reading Heights Data ... took 1ms
 Reading Terrain Data ... took 0ms
 Reading Map Objects ... took 1ms
 Reading Player Start Position Data ... took 0ms
 Reading Resources Data ... took 1ms
 Reading Map Extra Data ... took 1ms
 Reading Map Version Data ... took 1ms
 Reading Allowed Worker Types Data ... took 0ms
 Reading Allowed Building Types Data ... took 1ms
 Reading Node Ownership Data ... took 1ms
 Reading Exploration Data ... took 1ms
 Reading

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands

2014-07-12 Thread GunChleoc
The last 2 commits are NOCOM(#sirver) comments that need attention.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1074353.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands

2014-07-12 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/bug-1074353 into lp:widelands 
has been updated.

Description changed to:

This is in a mergeable state now, although more work needs to be done, as 
commented in the source code (comments are in lua_map.cc and format_help.lua).

The remaining issues in this bug: 
https://bugs.launchpad.net/widelands/+bug/1074353 have been shifted to new bug 
reports, so it can be closed after merging.

The 3 other related bugs have been fixed and can also be closed.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1074353.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1339861 into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1339861 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1339861 in widelands: "Remove the "Military settings" option"
  https://bugs.launchpad.net/widelands/+bug/1339861

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570

Deleted MilitaryBox from wui
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1339861 into lp:widelands.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/rename_goldweaver into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/rename_goldweaver 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/rename_goldweaver/+merge/226580

Renamed a building to make more sense.
-- 
https://code.launchpad.net/~widelands-dev/widelands/rename_goldweaver/+merge/226580
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/rename_goldweaver into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/init.lua'
--- campaigns/atl01.wmf/scripting/init.lua	2014-04-14 20:01:49 +
+++ campaigns/atl01.wmf/scripting/init.lua	2014-07-12 14:23:42 +
@@ -206,7 +206,7 @@
local o = add_obj(obj_spidercloth_production)
 
while not check_for_buildings(p1, {
-  spiderfarm = 1, goldweaver = 1, ["weaving-mill"] = 1
+  spiderfarm = 1, ["gold-spinning-mill"] = 1, ["weaving-mill"] = 1
}) do sleep(6273) end
o.done = true
 

=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-04-22 08:11:00 +
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-07-12 14:23:42 +
@@ -72,10 +72,22 @@
name = "obj_spidercloth_production",
title = _ "Build a spider farm and a weaving mill",
number = 3,
+<<<<<<< TREE
body = objective_text(_"Spidercloth Production", _[[The weavers produce spidercloth and tabards in the weaving mill. Spidercloth is needed for the construction of some buildings and clothing, while tabards are the uniforms of soldiers. The weaving mill needs gold yarn and spideryarn as raw material. Spideryarn is produced by the spider farm, while gold yarn is produced by the gold weaver out of gold.]] .. paragraphdivider() ..
   listitem_bullet(_[[Build a weaving mill]]) ..
   listitem_bullet(_[[Build a spider farm]]) ..
   listitem_bullet(_[[Build a goldweaver]])
+===
+   body = objective_text(_"Spidercloth Production", _(
+[[The weavers produce spidercloth and tabards in the weaving mill. ]] ..
+[[Spidercloth is needed for the construction of some buildings and clothing, ]] ..
+[[while tabards are the uniforms of soldiers. ]] ..
+[[The weaving mill needs gold yarn and spideryarn as raw material. ]] ..
+[[Spideryarn is produced by the spider farm, while gold yarn is produced by the gold spinning works out of gold.]]) .. "" ..
+[[• ]] .. _[[Build a weaving mill]] .. "" ..
+[[• ]] .. _[[Build a spider farm]] .. "" ..
+[[• ]] .. _[[Build a gold spinning mill]]
+>>>>>>> MERGE-SOURCE
  )
 }
 
@@ -310,7 +322,7 @@
 body = jundlina(_ "Jundlina Replies", _(
 [[May Satul warm you too, Opol. I wanted to delay production of spidercloth, but I understand your urgency. ]] ..
 [[Your suggestion sounds fair to me, I will build your weaving mill and spider farm. ]] ..
-[[I will also build a goldweaver so that the golden tabards you make will not be golden by name alone.]]
+[[I will also build a gold spinning mill so that the golden tabards you make will not be golden by name alone.]]
 )) ..  new_objectives(obj_spidercloth_production)
  }
 }
@@ -320,7 +332,7 @@
   title = _ "Opol Seeks Out Jundlina",
   body = opol(_(
 [[May Satul warm you, Jundlina! ]] ..
-[[The weaving mill, goldweaver and spider farm buildings are complete ]] ..
+[[The weaving mill, gold spinning mill and spider farm buildings are complete ]] ..
 [[and are starting their work at this very moment. The weavers’ guild is very grateful for your support ]] ..
 [[and we will stand by our word and deliver the first tabard very soon.]]
   ))

=== modified file 'tribes/atlanteans/conf'
--- tribes/atlanteans/conf	2014-07-03 07:36:22 +
+++ tribes/atlanteans/conf	2014-07-12 14:23:42 +
@@ -163,7 +163,7 @@
 quarry=_Quarry
 woodcutters_house=_Woodcutter’s House
 foresters_house=_Forester’s House
-goldweaver=_Goldweaver
+gold-spinning-mill=_Gold Spinning Mill
 fishers_house=_Fisher’s House
 fish_breeders_house=_Fish Breeder’s House
 hunters_house=_Hunter’s House

=== renamed directory 'tribes/atlanteans/goldweaver' => 'tribes/atlanteans/gold-spinning-mill'
=== modified file 'tribes/atlanteans/gold-spinning-mill/conf'
--- tribes/atlanteans/goldweaver/conf	2014-07-03 20:06:38 +
+++ tribes/atlanteans/gold-spinning-mill/conf	2014-07-12 14:23:42 +
@@ -30,9 +30,9 @@
 produce=goldyarn
 
 [idle]
-pics=goldweaver_i_??.png  # ???
+pics=gold-spinning-mill_i_??.png  # ???
 hotspot=33 64
 
 [working]
-pics=goldweaver_i_??.png  # ???
+pics=gold-spinning-mill_i_??.png  # ???
 hotspot=33 64

=== renamed file 'tribes/atlanteans/goldweaver/goldweaver_i_00.png' => 'tribes/atlanteans/gold-spinning-mill/gold-spinning-mill_i_00.png'
=== renamed 

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-07-12 Thread GunChleoc
Thanks :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341112 into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1341112 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341112 in widelands: "Editor line abruption in Noise height tool"
  https://bugs.launchpad.net/widelands/+bug/1341112

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1341112/+merge/226586

More space for strings in editor - a small redesign on the noise height tool, 
and made some other tools + the main menu wider. If Gaelic fits, everything 
should fit :P
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341112/+merge/226586
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1341112 into lp:widelands.
=== modified file 'src/editor/ui_menus/editor_main_menu.cc'
--- src/editor/ui_menus/editor_main_menu.cc	2014-06-08 21:47:45 +
+++ src/editor/ui_menus/editor_main_menu.cc	2014-07-12 16:30:30 +
@@ -29,7 +29,7 @@
 #include "ui_fsmenu/fileview.h"
 
 //TODO: these should be defined globally for the whole UI
-#define width 150
+#define width 200
 #define height 20
 #define margin 15
 #define hmargin margin

=== modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc'
--- src/editor/ui_menus/editor_main_menu_map_options.cc	2014-06-18 13:20:33 +
+++ src/editor/ui_menus/editor_main_menu_map_options.cc	2014-07-12 16:30:30 +
@@ -44,7 +44,7 @@
 	:
 	UI::Window
 		(&parent, "map_options",
-		 (parent.get_w() - 200) / 2, (parent.get_h() - 300) / 2, 200, 305,
+		 250, (parent.get_h() - 300) / 2, 200, 305,
 		 _("Map Options"))
 {
 

=== modified file 'src/editor/ui_menus/editor_tool_change_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-06-08 21:47:45 +
+++ src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-07-12 16:30:30 +
@@ -36,7 +36,7 @@
 	 UI::UniqueWindow::Registry  & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 135, 135, _("Height Tools Options")),
+		(parent, registry, 250, 135, _("Height Tools Options")),
 	m_increase_tool(increase_tool),
 	m_change_by_label
 		(this,

=== modified file 'src/editor/ui_menus/editor_tool_change_resources_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2014-06-18 13:20:33 +
+++ src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2014-07-12 16:30:30 +
@@ -43,7 +43,7 @@
 		 UI::UniqueWindow::Registry & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 164, 120, _("Resources")),
+		(parent, registry, 250, 120, _("Resources")),
 	m_change_by_label
 		(this,
 		 hmargin(), vmargin(), get_inner_w() - 2 * hmargin(), BUTTON_HEIGHT,

=== modified file 'src/editor/ui_menus/editor_tool_noise_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-06-08 21:47:45 +
+++ src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-07-12 16:30:30 +
@@ -39,23 +39,24 @@
 	 UI::UniqueWindow::Registry & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 200, 115, _("Noise Height Options")),
+		(parent, registry, 250, 3 * height + 4 * vspacing() + 2 * vmargin(), _("Noise Height Options")),
 	m_noise_tool(noise_tool),
 	m_lower_label
 		(this,
 		 hmargin(),
-		 vmargin(), (get_inner_w() - 2 * hmargin() - spacing()) / 2, height,
-		 UI::Align_BottomLeft),
+		 vmargin(),
+		 width, height,
+		 UI::Align_Left),
 	m_upper_label
 		(this,
-		 get_inner_w() / 2,
-		 vmargin(), m_lower_label.get_w(), height,
-		 UI::Align_BottomLeft),
+		 hmargin(),
+		 m_lower_label.get_y() + m_lower_label.get_h() + 2 * vspacing(),
+		 width, height,
+		 UI::Align_Left),
 	m_lower_decrease
 		(this, "decr_lower",
-		 hmargin() +
-		 (get_inner_w() - 2 * hmargin() - hspacing() - 4 * width) / 4,
-		 m_lower_label.get_y() + m_lower_label.get_h() + vspacing(),
+		 get_inner_w() - 2 * width - hspacing(),
+		 m_lower_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
@@ -63,8 +64,8 @@
 		 0 < noise_tool.get_interval().min),
 	m_lower_increase
 		(this, "incr_lower",
-		 m_lower_decrease.get_x() + m_lower_decrease.get_w(),
-		 m_lower_decrease.get_y(),
+		 get_inner_w() - width - hspacing(),
+		 m_lower_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_up.png"),
@@ -72,11 +73,8 @@
 		 noise_tool.get_interval().min < MAX_FIELD_HEIGHT),
 	m_upper_decrease
 		(this, "decr_upper",
-		 m_lower_decrease.get_x() + width
-		 +
-		 (get_inner_w() - 2 * hmargin() - hspacing() - 4 * width) / 2 +
-		 hspacing(),
-		 m_lower_d

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_world_names into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/fix_world_names into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592

Some of the skeletons are actually seashells, so I did some renaming.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix_world_names into lp:widelands.
=== modified file 'src/map_io/s2map.cc'
--- src/map_io/s2map.cc	2014-07-05 14:22:44 +
+++ src/map_io/s2map.cc	2014-07-12 20:29:25 +
@@ -785,8 +785,8 @@
 			case BOB_STANDING_STONES7: bobname = "sstones7";  break;
 
 			case BOB_SKELETON1:bobname = "skeleton1"; break;
-			case BOB_SKELETON2:bobname = "skeleton2"; break;
-			case BOB_SKELETON3:bobname = "skeleton3"; break;
+			case BOB_SKELETON2:bobname = "seashell2"; break;
+			case BOB_SKELETON3:bobname = "skeleton2"; break;
 
 			case BOB_CACTUS1:
 bobname = m_worldtype != S2_Map_Loader::WINTERLAND ? "cactus1" : "snowman";

=== renamed directory 'world/immovables/skeleton4' => 'world/immovables/seashell1'
=== modified file 'world/immovables/seashell1/init.lua'
--- world/immovables/skeleton4/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/seashell1/init.lua	2014-07-12 20:29:25 +
@@ -1,8 +1,8 @@
 dirname = path.dirname(__file__)
 
 world:new_immovable_type{
-   name = "skeleton4",
-   descname = _ "Skeleton",
+   name = "seashell1",
+   descname = _ "Seashell",
editor_category = "miscellaneous",
size = "none",
attributes = {},

=== renamed directory 'world/immovables/skeleton2' => 'world/immovables/seashell2'
=== modified file 'world/immovables/seashell2/init.lua'
--- world/immovables/skeleton2/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/seashell2/init.lua	2014-07-12 20:29:25 +
@@ -1,8 +1,8 @@
 dirname = path.dirname(__file__)
 
 world:new_immovable_type{
-   name = "skeleton2",
-   descname = _ "Skeleton",
+   name = "seashell2",
+   descname = _ "Seashell",
editor_category = "miscellaneous",
size = "none",
attributes = {},

=== renamed directory 'world/immovables/skeleton3' => 'world/immovables/skeleton2'
=== modified file 'world/immovables/skeleton2/init.lua'
--- world/immovables/skeleton3/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/skeleton2/init.lua	2014-07-12 20:29:25 +
@@ -1,7 +1,7 @@
 dirname = path.dirname(__file__)
 
 world:new_immovable_type{
-   name = "skeleton3",
+   name = "skeleton2",
descname = _ "Skeleton",
editor_category = "miscellaneous",
size = "none",

=== modified file 'world/immovables/track_winter/init.lua'
--- world/immovables/track_winter/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/track_winter/init.lua	2014-07-12 20:29:25 +
@@ -2,6 +2,7 @@
 
 world:new_immovable_type{
name = "track_winter",
+   -- TRANSLATORS: This track is made of footprints in the snow
descname = _ "Track",
editor_category = "miscellaneous",
size = "none",

=== modified file 'world/init.lua'
--- world/init.lua	2014-06-22 10:58:43 +
+++ world/init.lua	2014-07-12 20:29:25 +
@@ -93,10 +93,10 @@
 include "world/immovables/ruin3/init.lua"
 include "world/immovables/ruin4/init.lua"
 include "world/immovables/ruin5/init.lua"
+include "world/immovables/seashell1/init.lua"
+include "world/immovables/seashell2/init.lua"
 include "world/immovables/skeleton1/init.lua"
 include "world/immovables/skeleton2/init.lua"
-include "world/immovables/skeleton3/init.lua"
-include "world/immovables/skeleton4/init.lua"
 include "world/immovables/track_winter/init.lua"
 
 -- Standing Stones

=== modified file 'world/map_generation.lua'
--- world/map_generation.lua	2014-06-10 18:02:00 +
+++ world/map_generation.lua	2014-07-12 20:29:25 +
@@ -111,7 +111,7 @@
   {
  name = "wasteland_doodads",
  immovables = {
-"skeleton1", "skeleton2", "skeleton3", "cactus1",
+"seashell2", "skeleton1", "skeleton2", "cactus1",
 "cactus2", "fallentree", "deadtree1", "deadtree2",
 "deadtree3", "deadtree4"
  },
@@ -299,7 +299,7 @@
   {
 

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1330599 into lp:widelands

2014-07-13 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1330599 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1330599 in widelands: "Forbid SDL integer types in codecheck and remove 
its use"
  https://bugs.launchpad.net/widelands/+bug/1330599

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1330599/+merge/226607

Removed SDL integer data types. Somebody please double-check the new codecheck 
rule; I have not been able to run the codecheck target at all.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1330599/+merge/226607
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1330599 into lp:widelands.
=== added file 'cmake/codecheck/rules/do_not_use_SDL_int'
--- cmake/codecheck/rules/do_not_use_SDL_int	1970-01-01 00:00:00 +
+++ cmake/codecheck/rules/do_not_use_SDL_int	2014-07-13 14:48:31 +
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+"""
+Prefer DEBUG.
+"""
+
+error_msg="Do not use SDL integer data types (Uint8, Sint32 etc.). Instead use C++11 stdint.h types (uint8_t, int32_t etc.)."
+
+regexp=r"""(^Uint[0-9]|Sint[0-9])"""
+
+forbidden = [
+"Uint8",
+"Sint32"
+]
+
+allowed = [
+"uint8_t",
+"int32_t"
+]

=== modified file 'src/editor/editorinteractive.cc'
--- src/editor/editorinteractive.cc	2014-07-05 13:14:42 +
+++ src/editor/editorinteractive.cc	2014-07-13 14:48:31 +
@@ -280,14 +280,14 @@
 	set_need_save(true);
 }
 
-bool Editor_Interactive::handle_mouserelease(Uint8 btn, int32_t x, int32_t y) {
+bool Editor_Interactive::handle_mouserelease(uint8_t btn, int32_t x, int32_t y) {
 	if (btn == SDL_BUTTON_LEFT) {
 		m_left_mouse_button_is_down = false;
 	}
 	return Interactive_Base::handle_mouserelease(btn, x, y);
 }
 
-bool Editor_Interactive::handle_mousepress(Uint8 btn, int32_t x, int32_t y) {
+bool Editor_Interactive::handle_mousepress(uint8_t btn, int32_t x, int32_t y) {
 	if (btn == SDL_BUTTON_LEFT) {
 		m_left_mouse_button_is_down = true;
 	}

=== modified file 'src/editor/editorinteractive.h'
--- src/editor/editorinteractive.h	2014-07-05 16:41:51 +
+++ src/editor/editorinteractive.h	2014-07-13 14:48:31 +
@@ -67,8 +67,8 @@
 
 	//  Handle UI elements.
 	bool handle_key(bool down, SDL_keysym) override;
-	bool handle_mousepress(Uint8 btn, int32_t x, int32_t y) override;
-	bool handle_mouserelease(Uint8 btn, int32_t x, int32_t y) override;
+	bool handle_mousepress(uint8_t btn, int32_t x, int32_t y) override;
+	bool handle_mouserelease(uint8_t btn, int32_t x, int32_t y) override;
 
 	struct Tools {
 		Tools()

=== modified file 'src/graphic/color.cc'
--- src/graphic/color.cc	2014-07-05 14:39:48 +
+++ src/graphic/color.cc	2014-07-13 14:48:31 +
@@ -25,11 +25,11 @@
 RGBColor::RGBColor(uint8_t const R, uint8_t const G, uint8_t const B) :
 	r(R), g(G), b(B) {}
 
-Uint32 RGBColor::map(const SDL_PixelFormat& fmt) const {
+uint32_t RGBColor::map(const SDL_PixelFormat& fmt) const {
 	return SDL_MapRGB(&const_cast(fmt), r, g, b);
 }
 
-void RGBColor::set(SDL_PixelFormat* const fmt, Uint32 const clr) {
+void RGBColor::set(SDL_PixelFormat* const fmt, uint32_t const clr) {
 	SDL_GetRGB(clr, fmt, &r, &g, &b);
 }
 

=== modified file 'src/graphic/colormap.cc'
--- src/graphic/colormap.cc	2013-09-23 20:30:35 +
+++ src/graphic/colormap.cc	2014-07-13 14:48:31 +
@@ -46,9 +46,9 @@
 			if (g > 255) g = 255;
 			if (b > 255) b = 255;
 
-			const Uint32 value =
+			const uint32_t value =
 SDL_MapRGB(&const_cast(format), r, g, b);
-			static_cast(colormap)[(j << 8) | i] = value;
+			static_cast(colormap)[(j << 8) | i] = value;
 		}
 }
 

=== modified file 'src/graphic/image_transformations.cc'
--- src/graphic/image_transformations.cc	2014-07-03 19:26:30 +
+++ src/graphic/image_transformations.cc	2014-07-13 14:48:31 +
@@ -126,13 +126,13 @@
 			 fmt.BitsPerPixel, fmt.Rmask, fmt.Gmask, fmt.Bmask, fmt.Amask);
 		SDL_Rect srcrc =
 			{0, 0,
-			 static_cast(zoomed->w), static_cast(zoomed->h)
+			 static_cast(zoomed->w), static_cast(zoomed->h)
 			};  // For some reason SDL_Surface and SDL_Rect express w,h in different types
 		SDL_Rect dstrc = {0, 0, 0, 0};
 		SDL_SetAlpha(zoomed, 0, 0);
 		SDL_BlitSurface(zoomed, &srcrc, placed, &dstrc); // Updates dstrc
 
-		Uint32 fillcolor = SDL_MapRGBA(zoomed->format, 0, 0, 0, 255);
+		uint32_t fillcolor = SDL_MapRGBA(zoomed->format, 0, 0, 0, 255);
 
 		if (zoomed->w < placed->w) {
 			dstrc.x = zoomed->w;

=== modified file 'src/graphic/render/gamerenderer_sdl.cc'
--- src/graphic/render/gamerenderer_sdl.cc	2014-03-23 18:26:08 +
+++ src/graphic/render/gamerenderer_sdl.cc	2014-07-13 14:48:31 +
@@ -32,7 +

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/editor_tweaks into lp:widelands

2014-07-14 Thread GunChleoc
OK, will do :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/editor_tweaks/+merge/226606
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/editor_tweaks.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_world_names into lp:widelands

2014-07-14 Thread GunChleoc
If it's creating a problem, leave it - it is not that important.

I will add translator comments instead, so translators will know that it's a 
seashell if they're paying attention.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix_world_names.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_world_names into lp:widelands

2014-07-14 Thread GunChleoc
I had another idea: what will heppen if I change just the localization string, 
e.g.

name = "skeleton4",
descname = _ "Seashell",

Will that cause problems?
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix_world_names.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/rename_goldweaver into lp:widelands

2014-07-14 Thread GunChleoc
Yes, I have grepped for "weaver", and also tested the Atlantean campaign.

We have broken the savegames recently with a whole bunch of these, so I think 
one more can't hurt, as long as we do it before Build 19.

I have merged trunk, so the text conflict should be gone now.
-- 
https://code.launchpad.net/~widelands-dev/widelands/rename_goldweaver/+merge/226580
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/rename_goldweaver.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1332627 into lp:widelands

2014-07-14 Thread GunChleoc
I did the change to the macro.

struct ITransportCostCalculator  {
virtual ~ITransportCostCalculator() {}

virtual int32_t calc_cost_estimate(Coords, Coords) const = 0;
DISALLOW_COPY_AND_ASSIGN(ITransportCostCalculator);
TypeName() = default;
};

results in:

[  5%] Building CXX object src/wui/CMakeFiles/wui.dir/actionconfirm.cc.o
In file included from 
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.h:31:0,
 from 
/home/bratzbert/sources/widelands/bug-1332627/src/logic/editor_game_base.h:31,
 from 
/home/bratzbert/sources/widelands/bug-1332627/src/logic/player.h:27,
 from 
/home/bratzbert/sources/widelands/bug-1332627/src/wui/actionconfirm.cc:28:
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:40:15:
 error: ISO C++ forbids declaration of ‘TypeName’ with no type [-fpermissive]
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:40:15:
 error: ‘int Widelands::ITransportCostCalculator::TypeName()’ cannot be 
defaulted


=

struct ITransportCostCalculator  {
virtual ~ITransportCostCalculator() {}

virtual int32_t calc_cost_estimate(Coords, Coords) const = 0;
DISALLOW_COPY_AND_ASSIGN(ITransportCostCalculator);
};

results in:

[ 19%] Building CXX object src/logic/CMakeFiles/logic.dir/map.cc.o
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc: In constructor 
‘Widelands::Map::Map()’:
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc:73:39: error: no 
matching function for call to 
‘Widelands::ITransportCostCalculator::ITransportCostCalculator()’
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc:73:39: note: 
candidate is:
In file included from 
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.h:31:0,
 from 
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc:20:
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:39:2:
 note: Widelands::ITransportCostCalculator::ITransportCostCalculator(const 
Widelands::ITransportCostCalculator&) 
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:39:2:
 note:   candidate expects 1 argument, 0 provided

-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1332627/+merge/226628
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1332627.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_world_names into lp:widelands

2014-07-14 Thread GunChleoc
OK, new branch: 
https://code.launchpad.net/~widelands-dev/widelands/skeletons2seashells

Let's scrap this one.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix_world_names.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/skeletons2seashells into lp:widelands

2014-07-14 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/skeletons2seashells 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/skeletons2seashells/+merge/226725

Some small i18n stuff
-- 
https://code.launchpad.net/~widelands-dev/widelands/skeletons2seashells/+merge/226725
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/skeletons2seashells into lp:widelands.
=== modified file 'world/immovables/skeleton2/init.lua'
--- world/immovables/skeleton2/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/skeleton2/init.lua	2014-07-14 18:11:41 +
@@ -2,7 +2,7 @@
 
 world:new_immovable_type{
name = "skeleton2",
-   descname = _ "Skeleton",
+   descname = _ "Seashell",
editor_category = "miscellaneous",
size = "none",
attributes = {},

=== modified file 'world/immovables/skeleton4/init.lua'
--- world/immovables/skeleton4/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/skeleton4/init.lua	2014-07-14 18:11:41 +
@@ -2,7 +2,7 @@
 
 world:new_immovable_type{
name = "skeleton4",
-   descname = _ "Skeleton",
+   descname = _ "Seashell",
editor_category = "miscellaneous",
size = "none",
attributes = {},

=== modified file 'world/immovables/track_winter/init.lua'
--- world/immovables/track_winter/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/track_winter/init.lua	2014-07-14 18:11:41 +
@@ -2,6 +2,7 @@
 
 world:new_immovable_type{
name = "track_winter",
+   -- TRANSLATORS: This track is made of footprints in the snow
descname = _ "Track",
editor_category = "miscellaneous",
size = "none",

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1332627 into lp:widelands

2014-07-14 Thread GunChleoc
src/wui/unique_window_handler.h creates a linking problem. so I reverted it. 
All the rest are done. Please double-check the codecheck rule.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1332627/+merge/226628
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1332627.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1332627 into lp:widelands

2014-07-14 Thread GunChleoc
I merged it into another branch and it worked :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1332627/+merge/226628
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1332627.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/mapobject_cleanup_worker into lp:widelands

2014-07-14 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/mapobject_cleanup_worker into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341082 in widelands: "Building help: clean up name, descname"
  https://bugs.launchpad.net/widelands/+bug/1341082

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_worker/+merge/226745

MapObject cleanup for the Worker object
-- 
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_worker/+merge/226745
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/mapobject_cleanup_worker into lp:widelands.
=== modified file 'src/economy/idleworkersupply.cc'
--- src/economy/idleworkersupply.cc	2014-06-01 18:00:48 +
+++ src/economy/idleworkersupply.cc	2014-07-14 20:49:30 +
@@ -79,7 +79,7 @@
 void IdleWorkerSupply::get_ware_type(WareWorker & type, Ware_Index & ware) const
 {
 	type = wwWORKER;
-	ware = m_worker.worker_index();
+	ware = m_worker.descr().worker_index();
 }
 
 /**

=== modified file 'src/economy/portdock.cc'
--- src/economy/portdock.cc	2014-07-05 12:17:03 +
+++ src/economy/portdock.cc	2014-07-14 20:49:30 +
@@ -401,7 +401,7 @@
 		it.current->get(owner().egbase(), &ware, &worker);
 
 		if (waretype == wwWORKER) {
-			if (worker && worker->worker_index() == wareindex)
+			if (worker && worker->descr().worker_index() == wareindex)
 count++;
 		} else {
 			if (ware && ware->descr_index() == wareindex)

=== modified file 'src/logic/productionsite.cc'
--- src/logic/productionsite.cc	2014-07-05 14:22:44 +
+++ src/logic/productionsite.cc	2014-07-14 20:49:30 +
@@ -241,7 +241,7 @@
 if (!working_positions()[i].worker) {
 	return false; // no one is in this house
 } else {
-	Ware_Index have = working_positions()[i].worker->worker_index();
+	Ware_Index have = working_positions()[i].worker->descr().worker_index();
 	if (tribe().get_worker_descr(have)->can_act_as(need)) {
 		return true; // he found a lead worker
 	}
@@ -451,7 +451,7 @@
  */
 void ProductionSite::remove_worker(Worker & w)
 {
-	molog("%s leaving\n", w.descname().c_str());
+	molog("%s leaving\n", w.descr().descname().c_str());
 	Working_Position * wp = m_working_positions;
 
 	container_iterate_const(BillOfMaterials, descr().working_positions(), i) {
@@ -509,7 +509,7 @@
 	// needs a worker like the one just arrived. That way it is of course still possible, that the worker is
 	// placed on the slot that originally requested the arrived worker.
 	bool worker_placed = false;
-	Ware_Index idx = w->worker_index();
+	Ware_Index idx = w->descr().worker_index();
 	for (Working_Position * wp = psite.m_working_positions;; ++wp) {
 		if (wp->worker_request == &rq) {
 			if (wp->worker_request->get_index() == idx) {

=== modified file 'src/logic/ship.cc'
--- src/logic/ship.cc	2014-07-14 07:31:18 +
+++ src/logic/ship.cc	2014-07-14 20:49:30 +
@@ -659,7 +659,7 @@
 	worker->set_position(game, cs->get_position());
 	worker->reset_tasks(game);
 	Partially_Finished_Building::request_builder_callback
-		(game, *cs->get_builder_request(), worker->worker_index(), worker, *cs);
+		(game, *cs->get_builder_request(), worker->descr().worker_index(), worker, *cs);
 	m_items.resize(i);
 }
 			}

=== modified file 'src/logic/soldier.cc'
--- src/logic/soldier.cc	2014-07-05 12:48:58 +
+++ src/logic/soldier.cc	2014-07-14 20:49:30 +
@@ -1555,16 +1555,16 @@
 			"happen. No solution for this problem has been "
 			"implemented yet. (bug #536066) (The game has been "
 			"paused.)",
-		 descname().c_str(), serial(), owner().player_number(),
+		 descr().descname().c_str(), serial(), owner().player_number(),
 		 get_position().x, get_position().y,
 		 immovable_position ?
 		 immovable_position->descr().descname().c_str() : ("no"),
-		 opponent.descname().c_str(), opponent.serial(),
+		 opponent.descr().descname().c_str(), opponent.serial(),
 		 opponent.owner().player_number(),
 		 dest.x, dest.y,
 		 immovable_dest ?
 		 immovable_dest->descr().descname().c_str() : ("no"),
-		 descname().c_str());
+		 descr().descname().c_str());
 	owner().add_message
 		(game,
 		 *new Message

=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc	2014-07-06 08:17:24 +
+++ src/logic/worker.cc	2014-07-14 20:49:30 +
@@ -83,7 +83,7 @@
 	Player & player = *get_owner();
 	Ware_Index const wareid(action.iparam1);
 	WareInstance & ware =
-		*new WareInstance(wareid, tribe().get_ware_descr(wareid));
+		*new WareInstance(wareid, descr().tribe().get_ware

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/mapobject_cleanup_building into lp:widelands

2014-07-14 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/mapobject_cleanup_building into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341082 in widelands: "Building help: clean up name, descname"
  https://bugs.launchpad.net/widelands/+bug/1341082

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_building/+merge/226755

MapObject cleanup for the Building object
-- 
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_building/+merge/226755
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/mapobject_cleanup_building into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2014-07-14 07:31:18 +
+++ src/ai/defaultai.cc	2014-07-14 22:50:15 +
@@ -644,7 +644,7 @@
 
 			if (upcast(MilitarySite const, militarysite, building)) {
 const int32_t dist = map.calc_distance(field.coords, immovables.at(i).coords);
-const int32_t radius = militarysite->get_conquers() + 4;
+const int32_t radius = militarysite->descr().get_conquers() + 4;
 const int32_t v = radius - dist;
 
 if (v > 0 and dist > 0) {
@@ -1995,7 +1995,7 @@
 
 	// Check whether building is enhanceable and if wares of the enhanced
 	// buildings are needed. If yes consider an upgrade.
-	std::set enhancements = site.site->enhancements();
+	std::set enhancements = site.site->descr().enhancements();
 	int32_t maxprio = 0;
 	Building_Index enbld = INVALID_INDEX;  // to get rid of this
 	BuildingObserver* bestbld = nullptr;
@@ -2110,7 +2110,7 @@
 	}
 
 	// Check whether building is enhanceable. If yes consider an upgrade.
-	std::set enhancements = site.site->enhancements();
+	std::set enhancements = site.site->descr().enhancements();
 	int32_t maxprio = 0;
 	Building_Index enbld = INVALID_INDEX;
 	BuildingObserver* bestbld = nullptr;
@@ -2240,7 +2240,7 @@
 	bool changed = false;
 	Map& map = game().map();
 	MilitarySite* ms = militarysites.front().site;
-	uint32_t const vision = ms->vision_range();
+	uint32_t const vision = ms->descr().vision_range();
 	FCoords f = map.get_fcoords(ms->get_position());
 	// look if there is any enemy land nearby
 	// FindNodeEnemy find_enemy(player, game());
@@ -2662,7 +2662,7 @@
 
 		MilitarySite* ms = mso->site;
 		Building* target = ms;  // dummy initialisation to silence the compiler
-		uint32_t const vision = ms->vision_range();
+		uint32_t const vision = ms->descr().vision_range();
 		FCoords f = map.get_fcoords(ms->get_position());
 		int32_t chance = 0;
 		uint32_t attackers = 0;

=== modified file 'src/logic/building.cc'
--- src/logic/building.cc	2014-07-05 13:28:20 +
+++ src/logic/building.cc	2014-07-14 22:50:15 +
@@ -505,7 +505,7 @@
 {
 	const bool fire   = burn_on_destroy();
 	const Coords pos  = m_position;
-	const Tribe_Descr & t = tribe();
+	const Tribe_Descr & t = descr().tribe();
 	PlayerImmovable::destroy(egbase);
 	// We are deleted. Only use stack variables beyond this point
 	if (fire)
@@ -551,13 +551,13 @@
 			FORMAT('y', get_position().y);
 			FORMAT
 ('c', '(' << get_position().x << ", " << get_position().y << ')');
-			FORMAT('A', descname());
+			FORMAT('A', descr().descname());
 			FORMAT('a', name());
 			case 'N':
 if (upcast(ConstructionSite const, constructionsite, this))
 	result << constructionsite->building().descname();
 else
-	result << descname();
+	result << descr().descname();
 break;
 			case 'n':
 if (upcast(ConstructionSite const, constructionsite, this))
@@ -887,10 +887,10 @@
 
 	if (see)
 		player.see_area
-			(Area(map.get_fcoords(get_position()), vision_range()));
+			(Area(map.get_fcoords(get_position()), descr().vision_range()));
 	else
 		player.unsee_area
-			(Area(map.get_fcoords(get_position()), vision_range()));
+			(Area(map.get_fcoords(get_position()), descr().vision_range()));
 
 	m_seeing = see;
 }

=== modified file 'src/logic/building.h'
--- src/logic/building.h	2014-07-05 16:41:51 +
+++ src/logic/building.h	2014-07-14 22:50:15 +
@@ -180,8 +180,6 @@
 
 	void load_finish(Editor_Game_Base &) override;
 
-	const Tribe_Descr & tribe() const {return descr().tribe();}
-
 	virtual int32_t  get_type() const override;
 	char const * type_name() const override {return "building";}
 	virtual int32_t  get_size() const override;
@@ -195,7 +193,6 @@
 	virtual PositionList get_positions (const Editor_Game_Base &) const override;
 
 	const std::string & name() const override;
-	const std::string & descname() const {return descr().descname();}
 
 	std::string info_string(const std::string & format);
 	virtual std::

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/mapobject_cleanup_soldier into lp:widelands

2014-07-14 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/mapobject_cleanup_soldier into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341082 in widelands: "Building help: clean up name, descname"
  https://bugs.launchpad.net/widelands/+bug/1341082

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_soldier/+merge/226754

MapObject cleanup for the Soldier object
-- 
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_soldier/+merge/226754
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/mapobject_cleanup_soldier into lp:widelands.
=== modified file 'src/logic/soldier.h'
--- src/logic/soldier.h	2014-07-05 16:41:51 +
+++ src/logic/soldier.h	2014-07-14 22:49:50 +
@@ -193,20 +193,6 @@
 		(const Tribe_Descr &, uint32_t & w, uint32_t & h);
 	void draw_info_icon(RenderTarget &, Point, bool anchor_below) const;
 
-	//  Information function from description.
-	uint32_t get_max_hp_level () const {
-		return descr().get_max_hp_level();
-	}
-	uint32_t get_max_attack_level () const {
-		return descr().get_max_attack_level();
-	}
-	uint32_t get_max_defense_level() const {
-		return descr().get_max_defense_level();
-	}
-	uint32_t get_max_evade_level  () const {
-		return descr().get_max_evade_level();
-	}
-
 	uint32_t get_current_hitpoints() const {return m_hp_current;}
 	uint32_t get_max_hitpoints() const;
 	uint32_t get_min_attack() const;

=== modified file 'src/wui/soldierlist.cc'
--- src/wui/soldierlist.cc	2014-07-13 14:36:19 +
+++ src/wui/soldierlist.cc	2014-07-14 22:49:50 +
@@ -255,9 +255,9 @@
 		// Check whether health and/or level of the soldier has changed
 		Soldier * soldier = icon.soldier.get(egbase());
 		uint32_t level = soldier->get_attack_level();
-		level = level * (soldier->get_max_defense_level() + 1) + soldier->get_defense_level();
-		level = level * (soldier->get_max_evade_level() + 1) + soldier->get_evade_level();
-		level = level * (soldier->get_max_hp_level() + 1) + soldier->get_hp_level();
+		level = level * (soldier->descr().get_max_defense_level() + 1) + soldier->get_defense_level();
+		level = level * (soldier->descr().get_max_evade_level() + 1) + soldier->get_evade_level();
+		level = level * (soldier->descr().get_max_hp_level() + 1) + soldier->get_hp_level();
 
 		uint32_t health = soldier->get_current_hitpoints();
 
@@ -476,10 +476,10 @@
 
 	m_infotext.set_text(
 		(boost::format(_("HP: %1$u/%2$u  AT: %3$u/%4$u  DE: %5$u/%6$u  EV: %7$u/%8$u"))
-			% soldier->get_hp_level() % soldier->get_max_hp_level()
-			% soldier->get_attack_level() % soldier->get_max_attack_level()
-			% soldier->get_defense_level() % soldier->get_max_defense_level()
-			% soldier->get_evade_level() % soldier->get_max_evade_level()
+			% soldier->get_hp_level() % soldier->descr().get_max_hp_level()
+			% soldier->get_attack_level() % soldier->descr().get_max_attack_level()
+			% soldier->get_defense_level() % soldier->descr().get_max_defense_level()
+			% soldier->get_evade_level() % soldier->descr().get_max_evade_level()
 		).str()
 	);
 }

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/mapobject_cleanup_misc into lp:widelands

2014-07-14 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/mapobject_cleanup_misc into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341082 in widelands: "Building help: clean up name, descname"
  https://bugs.launchpad.net/widelands/+bug/1341082

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_misc/+merge/226756

MapObject cleanup for misc objects
-- 
https://code.launchpad.net/~widelands-dev/widelands/mapobject_cleanup_misc/+merge/226756
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/mapobject_cleanup_misc into lp:widelands.
=== modified file 'src/economy/fleet.cc'
--- src/economy/fleet.cc	2014-07-05 12:17:03 +
+++ src/economy/fleet.cc	2014-07-14 22:50:41 +
@@ -661,7 +661,7 @@
 // Check if ship has currently a different destination
 if (dst && dst != &pd)
 	continue;
-if (ship.get_nritems() >= ship.get_capacity())
+if (ship.get_nritems() >= ship.descr().get_capacity())
 	continue;
 
 molog("... ship %u takes care of it\n", ship.serial());

=== modified file 'src/economy/portdock.cc'
--- src/economy/portdock.cc	2014-07-05 12:17:03 +
+++ src/economy/portdock.cc	2014-07-14 22:50:41 +
@@ -349,8 +349,8 @@
 		}
 	}
 
-	if (ship.get_nritems() < ship.get_capacity() && !m_waiting.empty()) {
-		uint32_t nrload = std::min(m_waiting.size(), ship.get_capacity() - ship.get_nritems());
+	if (ship.get_nritems() < ship.descr().get_capacity() && !m_waiting.empty()) {
+		uint32_t nrload = std::min(m_waiting.size(), ship.descr().get_capacity() - ship.get_nritems());
 
 		while (nrload--) {
 			// Check if the item has still a valid destination

=== modified file 'src/logic/bob.cc'
--- src/logic/bob.cc	2014-07-03 19:26:30 +
+++ src/logic/bob.cc	2014-07-14 22:50:41 +
@@ -936,12 +936,12 @@
 void Bob::set_owner(Player * const player)
 {
 	if (m_owner && m_position.field)
-		m_owner->unsee_area(Area(get_position(), vision_range()));
+		m_owner->unsee_area(Area(get_position(), descr().vision_range()));
 
 	m_owner = player;
 
 	if (m_owner != nullptr && m_position.field)
-		m_owner->see_area(Area(get_position(), vision_range()));
+		m_owner->see_area(Area(get_position(), descr().vision_range()));
 }
 
 
@@ -970,10 +970,10 @@
 	*m_linkpprev = this;
 
 	if (m_owner != nullptr) {
-		m_owner->see_area(Area(get_position(), vision_range()));
+		m_owner->see_area(Area(get_position(), descr().vision_range()));
 
 		if (oldposition.field)
-			m_owner->unsee_area(Area(oldposition, vision_range()));
+			m_owner->unsee_area(Area(oldposition, descr().vision_range()));
 	}
 
 	// Since pretty much everything in Widelands eventually results in the

=== modified file 'src/logic/bob.h'
--- src/logic/bob.h	2014-07-05 16:41:51 +
+++ src/logic/bob.h	2014-07-14 22:50:41 +
@@ -244,8 +244,6 @@
 	const FCoords & get_position() const {return m_position;}
 	Bob * get_next_bob() const {return m_linknext;}
 
-	uint32_t vision_range() const {return descr().vision_range();}
-
 	/// Check whether this bob should be able to move onto the given node.
 	///
 	/// \param commit indicates whether this function is called from the

=== modified file 'src/logic/immovable.cc'
--- src/logic/immovable.cc	2014-07-08 05:04:53 +
+++ src/logic/immovable.cc	2014-07-14 22:50:41 +
@@ -729,7 +729,7 @@
 	fw.Unsigned8(header_Immovable);
 	fw.Unsigned8(IMMOVABLE_SAVEGAME_VERSION);
 
-	if (const Tribe_Descr * const tribe = get_owner_tribe())
+	if (const Tribe_Descr * const tribe = descr().get_owner_tribe())
 		fw.String(tribe->name());
 	else
 		fw.CString("world");

=== modified file 'src/logic/immovable.h'
--- src/logic/immovable.h	2014-07-06 08:17:24 +
+++ src/logic/immovable.h	2014-07-14 22:50:41 +
@@ -183,10 +183,6 @@
 	bool construct_ware(Game & game, Ware_Index index);
 	bool construct_remaining_buildcost(Game & game, Buildcost * buildcost);
 
-	Tribe_Descr const * get_owner_tribe() const {
-		return descr().get_owner_tribe();
-	}
-
 	bool is_reserved_by_worker() const;
 	void set_reserved_by_worker(bool reserve);
 

=== modified file 'src/logic/ship.cc'
--- src/logic/ship.cc	2014-07-14 07:31:18 +
+++ src/logic/ship.cc	2014-07-14 22:50:41 +
@@ -352,7 +352,7 @@
 	if (m_ship_state == EXP_SCOUTING) {
 		// Check surrounding fields for port buildspaces
 		std::unique_ptr > temp_port_buildspaces(new std::list());
-		MapRegion > mr(map, Area(position, vision_range()));
+		MapRegion > mr(map, Area(position, descr().vision_range()));
 		bool new_port_space = false;
 		do {
 			if (map.is_port_space(mr.location())) {

=== modified file 'src/logic/ship.h'
--- src/logic/ship.h	2014-07-05 16:41:51 +
+++ src/logic/ship.h	2014-07-14 22:50:41 

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_world_names into lp:widelands

2014-07-14 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/fix_world_names into 
lp:widelands has been updated.

Status: Needs review => Rejected

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix_world_names.

___
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


[Widelands-dev] [Merge] lp:~gunchleoc/widelands/mapobject_cleanup into lp:widelands

2014-07-15 Thread GunChleoc
GunChleoc has proposed merging lp:~gunchleoc/widelands/mapobject_cleanup into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341082 in widelands: "Building help: clean up name, descname"
  https://bugs.launchpad.net/widelands/+bug/1341082

For more details, see:
https://code.launchpad.net/~gunchleoc/widelands/mapobject_cleanup/+merge/226804

More Map_Object_Descr cleanup
-- 
https://code.launchpad.net/~gunchleoc/widelands/mapobject_cleanup/+merge/226804
Your team Widelands Developers is requested to review the proposed merge of 
lp:~gunchleoc/widelands/mapobject_cleanup into lp:widelands.
=== modified file 'src/logic/bob.h'
--- src/logic/bob.h	2014-07-14 22:18:03 +
+++ src/logic/bob.h	2014-07-15 10:58:38 +
@@ -229,7 +229,6 @@
 	virtual int32_t get_type() const override {return BOB;}
 	virtual char const * type_name() const override {return "bob";}
 	virtual Type get_bob_type() const = 0;
-	const std::string & name() const {return descr().name();}
 
 	virtual void init(Editor_Game_Base &) override;
 	virtual void cleanup(Editor_Game_Base &) override;

=== modified file 'src/logic/building.cc'
--- src/logic/building.cc	2014-07-15 05:00:50 +
+++ src/logic/building.cc	2014-07-15 10:58:38 +
@@ -507,17 +507,6 @@
 }
 
 
-/*
-===
-Building::get_ui_anim [virtual]
-
-Return the animation ID that is used for the building in UI items
-(the building UI, messages, etc..)
-===
-*/
-uint32_t Building::get_ui_anim() const {return descr().get_ui_anim();}
-
-
 #define FORMAT(key, value) case key: result << value; break
 std::string Building::info_string(const std::string & format) {
 	std::ostringstream result;

=== modified file 'src/logic/building.h'
--- src/logic/building.h	2014-07-15 05:00:50 +
+++ src/logic/building.h	2014-07-15 10:58:38 +
@@ -179,7 +179,6 @@
 	char const * type_name() const override {return "building";}
 	virtual int32_t  get_size() const override;
 	virtual bool get_passable() const override;
-	virtual uint32_t get_ui_anim () const;
 
 	virtual Flag & base_flag() override;
 	virtual uint32_t get_playercaps() const;

=== modified file 'src/logic/constructionsite.cc'
--- src/logic/constructionsite.cc	2014-07-14 21:52:13 +
+++ src/logic/constructionsite.cc	2014-07-15 10:58:38 +
@@ -245,7 +245,7 @@
 		if (static_cast(game.get_gametime() - m_work_steptime) < 0) {
 			worker.start_task_idle
 (game,
- worker.get_animation("work"),
+ worker.descr().get_animation("work"),
  m_work_steptime - game.get_gametime());
 			m_builder_idle = false;
 			return true;
@@ -301,14 +301,14 @@
 			m_work_steptime = game.get_gametime() + CONSTRUCTIONSITE_STEP_TIME;
 
 			worker.start_task_idle
-(game, worker.get_animation("work"), CONSTRUCTIONSITE_STEP_TIME);
+(game, worker.descr().get_animation("work"), CONSTRUCTIONSITE_STEP_TIME);
 			m_builder_idle = false;
 			return true;
 		}
 	}
 	// The only work we have got for you, is to run around to look cute ;)
 	if (!m_builder_idle) {
-		worker.set_animation(game, worker.get_animation("idle"));
+		worker.set_animation(game, worker.descr().get_animation("idle"));
 		m_builder_idle = true;
 	}
 	worker.schedule_act(game, 2000);

=== modified file 'src/logic/critter_bob.h'
--- src/logic/critter_bob.h	2014-07-05 16:41:51 +
+++ src/logic/critter_bob.h	2014-07-15 10:58:38 +
@@ -71,7 +71,6 @@
 	virtual void init_auto_task(Game &) override;
 
 	void start_task_program(Game &, const std::string & name);
-	const std::string & descname() const {return descr().descname();}
 
 	virtual void save(Editor_Game_Base &, Map_Map_Object_Saver &, FileWrite &) override;
 

=== modified file 'src/logic/dismantlesite.cc'
--- src/logic/dismantlesite.cc	2014-07-14 21:52:13 +
+++ src/logic/dismantlesite.cc	2014-07-15 10:58:38 +
@@ -220,7 +220,7 @@
 	} else if (not m_working) {
 		m_work_steptime = game.get_gametime() + DISMANTLESITE_STEP_TIME;
 		worker.start_task_idle
-			(game, worker.get_animation("work"), DISMANTLESITE_STEP_TIME);
+			(game, worker.descr().get_animation("work"), DISMANTLESITE_STEP_TIME);
 
 		m_working = true;
 	}

=== modified file 'src/logic/partially_finished_building.cc'
--- src/logic/partially_finished_building.cc	2014-07-14 21:52:13 +
+++ src/logic/partially_finished_building.cc	2014-07-15 10:58:38 +
@@ -142,19 +142,6 @@
 
 /*
 ===
-Return the animation for the building that is in construction, as this
-should be more useful to the player.
-===
-*/
-uint32_t Partially_Finished_Building::get_ui_anim() const
-{
-	return m_building->get_animation("idle");
-}
-
-
-
-/*
-===
 Return the completion "percentage", where 2^16 = completely

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342563 into lp:widelands

2014-07-16 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1342563 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1342563 in widelands: "When choosing random tribe and castle village, 
the tribe can be guessed"
  https://bugs.launchpad.net/widelands/+bug/1342563

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981

Renamed a few strings for starting conditions
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1342563 into lp:widelands.
=== modified file 'tribes/atlanteans/scripting/sc00_headquarters_medium.lua'
--- tribes/atlanteans/scripting/sc00_headquarters_medium.lua	2014-03-25 06:18:48 +
+++ tribes/atlanteans/scripting/sc00_headquarters_medium.lua	2014-07-16 09:20:42 +
@@ -7,7 +7,7 @@
 set_textdomain("tribe_atlanteans")
 
 init = {
-   name = _ "Headquarters medium",
+   name = _ "Headquarters",
func =  function(plr, shared_in_start)
 
local sf = wl.Game().map.player_slots[plr.number].starting_field

=== modified file 'tribes/atlanteans/scripting/sc01_castle_village.lua'
--- tribes/atlanteans/scripting/sc01_castle_village.lua	2014-03-25 06:18:48 +
+++ tribes/atlanteans/scripting/sc01_castle_village.lua	2014-07-16 09:20:42 +
@@ -7,7 +7,7 @@
 set_textdomain("tribe_atlanteans")
 
 return {
-   name = _ "Castle village",
+   name = _ "Fortified Village",
func =  function(plr, shared_in_start)
 
local sf = wl.Game().map.player_slots[plr.number].starting_field

=== modified file 'tribes/barbarians/scripting/sc00_headquarters_medium.lua'
--- tribes/barbarians/scripting/sc00_headquarters_medium.lua	2014-03-25 06:18:48 +
+++ tribes/barbarians/scripting/sc00_headquarters_medium.lua	2014-07-16 09:20:42 +
@@ -7,7 +7,7 @@
 set_textdomain("tribe_barbarians")
 
 init = {
-   name = _ "Headquarters medium",
+   name = _ "Headquarters",
func = function(player, shared_in_start)
 
local sf = wl.Game().map.player_slots[player.number].starting_field

=== modified file 'tribes/barbarians/scripting/sc01_citadel_village.lua'
--- tribes/barbarians/scripting/sc01_citadel_village.lua	2014-03-25 06:18:48 +
+++ tribes/barbarians/scripting/sc01_citadel_village.lua	2014-07-16 09:20:42 +
@@ -7,7 +7,7 @@
 set_textdomain("tribe_barbarians")
 
 return {
-   name = _ "Citadel village",
+   name = _ "Fortified Village",
func =  function(plr, shared_in_start)
 
local sf = wl.Game().map.player_slots[plr.number].starting_field

=== modified file 'tribes/empire/scripting/sc00_headquarters_medium.lua'
--- tribes/empire/scripting/sc00_headquarters_medium.lua	2014-03-25 06:18:48 +
+++ tribes/empire/scripting/sc00_headquarters_medium.lua	2014-07-16 09:20:42 +
@@ -7,7 +7,7 @@
 set_textdomain("tribe_empire")
 
 return {
-   name = _ "Headquarters medium",
+   name = _ "Headquarters",
func =  function(p, shared_in_start)
 
local sf = wl.Game().map.player_slots[p.number].starting_field

=== modified file 'tribes/empire/scripting/sc01_castle_village.lua'
--- tribes/empire/scripting/sc01_castle_village.lua	2014-03-25 06:18:48 +
+++ tribes/empire/scripting/sc01_castle_village.lua	2014-07-16 09:20:42 +
@@ -7,7 +7,7 @@
 set_textdomain("tribe_empire")
 
 return {
-   name = _ "Castle village",
+   name = _ "Fortified Village",
func =  function(plr, shared_in_start)
 
local sf = wl.Game().map.player_slots[plr.number].starting_field

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands

2014-07-16 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1341081 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341081 in widelands: "Building help: clean up type() and 
MapObject::type_name() "
  https://bugs.launchpad.net/widelands/+bug/1341081

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1341081/+merge/227107

L_MapObject now has a desc method, so type_name can be accessed through 
L_MapObjectDescription.

The types for Flags and Roads are now faked in the Lua scripts by checking 
their name rather than their type_name (e.g. "while not (f.immovable and 
f.immovable.name == "flag") do sleep(300) end", check Atlanteans campaign + 
Tutorial for examples). This avoids having to get the tribes' Immovable_Descr 
through the Lua interface. If you think this is a problem, I can have a go at 
it though. Otherwise, ready for merging.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341081/+merge/227107
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1341081 into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/init.lua'
--- campaigns/atl01.wmf/scripting/init.lua	2014-07-15 10:02:22 +
+++ campaigns/atl01.wmf/scripting/init.lua	2014-07-16 21:09:18 +
@@ -324,7 +324,7 @@
   if not f.immovable then return end
 
   -- Flags are not so interesting
-  if f.immovable.type == "flag" and
+  if f.immovable.name == "flag" and
  (f.tln.immovable and is_building(f.tln.immovable)) then
  f = f.tln
   end

=== modified file 'campaigns/tutorial01.wmf/scripting/init.lua'
--- campaigns/tutorial01.wmf/scripting/init.lua	2014-07-15 10:02:22 +
+++ campaigns/tutorial01.wmf/scripting/init.lua	2014-07-16 21:09:18 +
@@ -311,7 +311,7 @@
end
 
 -- buildings and constructionsite have a flag
-   if is_building(i) or i.type == "constructionsite" then
+   if is_building(i) or i.descr.type_name == "constructionsite" then
   registered_player_immovables[_fmt(i.fields[1].brn)] = true
end
 end
@@ -350,15 +350,15 @@
 -- Allows constructionsites for the given buildings, all others are invalid
 -- as is any other immovable build by the player
 function allow_constructionsite(i, buildings)
-   if i.type == "constructionsite" then
+   if i.descr.type_name == "constructionsite" then
   if not buildings then return i end
   for idx,n in ipairs(buildings) do
  if i.building == n then return i end
   end
   return false
-   elseif i.type == "flag" then
+   elseif i.name == "flag" then
   local tr = i.fields[1].tln.immovable
-  if tr and tr.type == "constructionsite" then
+  if tr and tr.descr.type_name == "constructionsite" then
  return allow_constructionsite(tr, buildings)
   end
end
@@ -442,7 +442,7 @@
blocker:lift_blocks()
 
-- Wait for flag
-   while not (f.immovable and f.immovable.type == "flag") do sleep(300) end
+   while not (f.immovable and f.immovable.name == "flag") do sleep(300) end
o.done = true
 
sleep(300)
@@ -506,7 +506,7 @@
 
local function _rip_road()
   for idx,f in ipairs(cs.fields[1].brn:region(2)) do
- if f.immovable and f.immovable.type == "road" then
+ if f.immovable and f.immovable.name == "road" then
 click_on_field(f)
 click_on_panel(wl.ui.MapView().windows.
field_action.buttons.destroy_road, 300)
@@ -671,7 +671,7 @@
local function _find_nearby_flag()
   for i=2,8 do
  for idx, f in ipairs(conquer_field:region(i)) do
-if f.immovable and f.immovable.type == "flag" then
+if f.immovable and f.immovable.name == "flag" then
return f
 end
  end

=== modified file 'scripting/format_help.lua'
--- scripting/format_help.lua	2014-07-15 10:02:22 +
+++ scripting/format_help.lua	2014-07-16 21:09:18 +
@@ -331,23 +331,23 @@
 		image_line("tribes/" .. tribename .. "/" .. resourcename  .. "/menu.png", 1, p(purpose))
 	if (note) then	result = result .. rt(h3(_"Note:")) .. rt(p(note)) end
 
-	if(building_description.type == "productionsite") then
+	if(building_description.type_name == "productionsite") then
 		if(building_description.workarea_radius and building_description.workarea_radius > 0) then
 			result = result .. text_line(_"Working radius:", building_description.workarea_radius)
 		end
 
-	elseif(building_description.type == "warehouse") then
+	elseif(building_description.type_name == "warehouse") then
 		result = result .. rt(h3(_"Healing:")
 			.. p(_"

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342801 into lp:widelands

2014-07-17 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1342801 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1342801 in widelands: "Building help is broken (get_worker_description 
string expected got table)"
  https://bugs.launchpad.net/widelands/+bug/1342801

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162

Applied changes in the Lua interface to format_help.lua + some refactoring
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1342801 into lp:widelands.
=== modified file 'scripting/format_help.lua'
--- scripting/format_help.lua	2014-07-15 10:02:22 +
+++ scripting/format_help.lua	2014-07-17 09:47:14 +
@@ -155,8 +155,8 @@
 --:returns: an rt string with images describing a chain of ware/building dependencies
 --
 function building_help_dependencies_ware(tribename, items, warename)
-	local ware_descr = wl.Game():get_ware_description(tribename, warename)
-	return dependencies(tribename, items, ware_descr.descname)
+	local ware_description = wl.Game():get_ware_description(tribename, warename)
+	return dependencies(tribename, items, ware_description.descname)
 end
 
 
@@ -172,8 +172,8 @@
 --:returns: an rt string with images describing a chain of ware/building dependencies
 --
 function building_help_dependencies_building(tribename, items, buildingname)
-	local building_descr = wl.Game():get_building_description(tribename,buildingname)
-	return dependencies(tribename, items, building_descr.descname)
+	local building_description = wl.Game():get_building_description(tribename,buildingname)
+	return dependencies(tribename, items, building_description.descname)
 end
 
 
@@ -186,14 +186,13 @@
 --:arg tribename: e.g. "barbarians".
 --:arg items: an array with ware and building names,
 --e.g. {"constructionsite", "trunk"}
---:arg warename: the internal name of the ware to use in the title.
+--:arg ware_description: the description of the ware to use in the title.
 --:arg building: the internal name of the building to use in the title.
 --:returns: an rt string with images describing a chain of ware/building dependencies
 --
-function building_help_dependencies_ware_building(tribename, items, warename, buildingname)
-	local building_descr = wl.Game():get_building_description(tribename,buildingname)
-	local ware_descr = wl.Game():get_ware_description(tribename, warename)
-	return dependencies(tribename, items, _"%1$s from: %2$s":bformat(ware_descr.descname, building_descr.descname))
+function building_help_dependencies_ware_building(tribename, items, ware_description, building_description)
+	return dependencies(tribename, items,
+		_"%1$s from: %2$s":bformat(ware_description.descname, building_description.descname))
 end
 
 
@@ -209,8 +208,8 @@
 --:returns: an rt string with images describing a chain of ware/building dependencies
 --
 function building_help_dependencies_resi(tribename, items, warename)
-	local ware_descr = wl.Game():get_ware_description(tribename, warename)
-	return dependencies_resi(tribename, items, ware_descr.descname)
+	local ware_description = wl.Game():get_ware_description(tribename, warename)
+	return dependencies_resi(tribename, items, ware_description.descname)
 end
 
 -- RST
@@ -254,14 +253,14 @@
 		local images = ""
 		local text = ""
 		for countfood, food in pairs(foodlist) do
-			local ware_descr = wl.Game():get_ware_description(tribename, food)
+			local ware_description = wl.Game():get_ware_description(tribename, food)
 			if(countfood > 1) then
 images = images .. ";"
-text = _"%1$s or %2$s":bformat(text, ware_descr.descname)
+text = _"%1$s or %2$s":bformat(text, ware_description.descname)
 			else
-text = ware_descr.descname
+text = ware_description.descname
 			end
-			images = images .. "tribes/" .. tribename .. "/" .. ware_descr.name .. "/menu.png"
+			images = images .. "tribes/" .. tribename .. "/" .. ware_description.name .. "/menu.png"
 		end
 		if(countlist > 1) then
 			text = _"%s and":bformat(text)
@@ -285,7 +284,7 @@
 --:returns: a list weapons images with the producing and receiving building
 --
 function dependencies_training_weapons(tribename, building_description, and_or, weapons, manufacturer)
-	local manufacturer_descr = wl.Game():get_building_description(tribename, manufacturer)
+	local manufacturer_description = wl.Game():get_building_description(tribename, manufacturer)
 	local weaponsstring = ""
 	for count, weapon in pairs(weapons) do
 		if(count > 1) then
@@ -301,9 +300,9 @@
 	elseif (and_or == "or&

[Widelands-dev] [Merge] lp:~hjd/widelands/calculation into lp:widelands

2014-07-17 Thread GunChleoc
The proposal to merge lp:~hjd/widelands/calculation into lp:widelands has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161
-- 
https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161
Your team Widelands Developers is requested to review the proposed merge of 
lp:~hjd/widelands/calculation into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342563 into lp:widelands

2014-07-17 Thread GunChleoc
Done :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1342563.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands

2014-07-18 Thread GunChleoc
tion(char const * const str) const {
> 
> === modified file 'src/logic/worker_descr.h'
> --- src/logic/worker_descr.h  2014-07-11 22:53:34 +
> +++ src/logic/worker_descr.h  2014-07-16 21:09:18 +
> @@ -55,7 +55,7 @@
>const Tribe_Descr &);
>   virtual ~Worker_Descr();
>  
> - std::string type() const override {return "worker";}
> +char const * type_name() const override {return "worker";}
>  
>   virtual Bob & create_object() const override;
>  
> 
> === modified file 'src/map_io/widelands_map_map_object_loader.h'
> --- src/map_io/widelands_map_map_object_loader.h  2014-07-05 16:41:51 
> +
> +++ src/map_io/widelands_map_map_object_loader.h  2014-07-16 21:09:18 
> +
> @@ -64,7 +64,7 @@
>   if (existing != m_objects.end()) {
>   //delete &object; can not do this
>   throw game_data_error
> - ("already loaded (%s)", 
> existing->second->type_name());
> +("already loaded (%s)", 
> existing->second->descr().type_name());
>   }
>   m_objects.insert(std::pair(n, &object));
>   m_loaded_obj[&object] = false;
> @@ -80,7 +80,7 @@
>   else
>   throw game_data_error
>   ("is a %s, expected a %s",
> -  it->second->type_name(), typeid(T).name());
> + it->second->descr().type_name(), typeid(T).name());
>   }
>  
>   int32_t get_nr_unloaded_objects();
> 
> === modified file 'src/map_io/widelands_map_map_object_saver.cc'
> --- src/map_io/widelands_map_map_object_saver.cc  2014-07-05 12:17:03 
> +
> +++ src/map_io/widelands_map_map_object_saver.cc  2014-07-16 21:09:18 
> +
> @@ -61,7 +61,7 @@
>  
>   MapObjectRec rec;
>  #ifndef NDEBUG
> - rec.description  = obj.type_name();
> +rec.description  = obj.descr().type_name();
>   rec.description += " (";
>   rec.description += obj.serial();
>   rec.description += ')';
> 
> === modified file 'src/map_io/widelands_map_object_packet.cc'
> --- src/map_io/widelands_map_object_packet.cc 2014-06-21 10:24:12 +
> +++ src/map_io/widelands_map_object_packet.cc 2014-07-16 21:09:18 +
> @@ -112,7 +112,7 @@
>   try {
>   (*i.current)->load_pointers();
>   } catch (const std::exception & e) {
> - throw wexception("load_pointers for %s: %s", 
> (*i.current)->get_object()->type_name(), e.what());
> +throw wexception("load_pointers for %s: %s", 
> (*i.current)->get_object()->descr().type_name(), e.what());
>   }
>   }
>  
> @@ -121,7 +121,7 @@
>   try {
>   (*i.current)->load_finish();
>   } catch (const std::exception & e) {
> - throw wexception("load_finish for %s: %s", 
> (*i.current)->get_object()->type_name(), e.what());
> +throw wexception("load_finish for %s: %s", 
> (*i.current)->get_object()->descr().type_name(), e.what());
>   }
>   
> (*i.current)->mol().mark_object_as_loaded(*(*i.current)->get_object());
>   }
> 
> === modified file 'src/scripting/lua_map.cc'
> --- src/scripting/lua_map.cc  2014-07-16 06:05:23 +
> +++ src/scripting/lua_map.cc  2014-07-16 21:09:18 +
> @@ -562,7 +562,7 @@
>   switch  (mo->get_type()) {
>   case Map_Object::BUILDING:
>   {
> - const char * type_name = mo->type_name();
> +const char * type_name = mo->descr().type_name();
>   if (!strcmp(type_name, "constructionsite"))
>   return CAST_TO_LUA(ConstructionSite);
>   else if (!strcmp(type_name, "productionsite"))
> @@ -606,6 +606,9 @@
>   else if (is_a(ProductionSite_Descr, desc)) {
>   return CAST_TO_LUA(ProductionSite_Descr, 
> L_ProductionSiteDescription);
>   }
> + else if (is_a(ConstructionSite_Descr, desc)) {
> + return CAST_TO_LUA(ConstructionSite_Descr, 
> L_ConstructionSiteDescription);
> + }
>   else if (is_a(Warehouse_Descr, desc)) {
>   return CAST_TO_LUA(Warehouse_Descr, L_WarehouseDescription);
>   }
> @@ -1023,7 +1026,7 @@
>  const PropertyType 
> L_MapObjectDescription:

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-999262_part2 into lp:widelands

2014-07-18 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-999262_part2 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #999262 in widelands: "Immovable attribs (e.g. stone) are not 
translatable"
  https://bugs.launchpad.net/widelands/+bug/999262

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-999262_part2/+merge/227348

Fixed the ugly hack in Worker::informPlayer

- Renamed the "stone" attrib to match the World's "granite" resource
- Added a new optional [resources] section to ProductionSite conf files to 
handle "out of resource" messages.

The following building types now use these new message texts:

- Mines
- Fishers' buildings
- Quarries
- Wells
- Hunters' buildings
- Lumberjacks'/Woodcutters' buildings
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-999262_part2/+merge/227348
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-999262_part2 into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2014-07-17 12:34:35 +
+++ src/ai/defaultai.cc	2014-07-18 15:23:43 +
@@ -596,7 +596,7 @@
 		// stones are not renewable, we will count them only if previous state si nonzero
 		if (field.stones_nearby_ > 0) {
 
-			int32_t const stone_attr = Map_Object_Descr::get_attribute_id("stone");
+			int32_t const stone_attr = Map_Object_Descr::get_attribute_id("granite");
 			field.stones_nearby_ = 0;
 
 			for (uint32_t j = 0; j < immovables.size(); ++j) {
@@ -1872,7 +1872,7 @@
 		if (map.find_immovables(
 		   Area(map.get_fcoords(site.site->get_position()), radius),
 		   nullptr,
-		   FindImmovableAttribute(Map_Object_Descr::get_attribute_id("stone"))) == 0) {
+ FindImmovableAttribute(Map_Object_Descr::get_attribute_id("granite"))) == 0) {
 			// destruct the building and it's flag (via flag destruction)
 			// the destruction of the flag avoids that defaultAI will have too many
 			// unused roads - if needed the road will be rebuild directly.

=== modified file 'src/logic/production_program.cc'
--- src/logic/production_program.cc	2014-07-16 08:23:42 +
+++ src/logic/production_program.cc	2014-07-18 15:23:43 +
@@ -1312,13 +1312,13 @@
 void ProductionProgram::ActMine::informPlayer
 	(Game & game, ProductionSite & ps) const
 {
+	assert(strcmp(ps.descr().m_needs_resource_title.c_str(), "") != 0);
+	assert(strcmp(ps.descr().m_needs_resource_message.c_str(), "") != 0);
 	ps.send_message
 		(game,
 		 "mine",
-		 _("Main Vein Exhausted"),
-		 _
-		 ("This mine’s main vein is exhausted. Expect strongly diminished returns on investment. "
-		  "You should consider enhancing, dismantling or destroying it."),
+		 ps.descr().m_needs_resource_title,
+		 ps.descr().m_needs_resource_message,
 		 true,
 		 60 * 60 * 1000,
 		 0);

=== modified file 'src/logic/productionsite.cc'
--- src/logic/productionsite.cc	2014-07-15 10:02:22 +
+++ src/logic/productionsite.cc	2014-07-18 15:23:43 +
@@ -60,6 +60,24 @@
 	:
 	Building_Descr(_name, _descname, directory, prof, global_s, _tribe)
 {
+	std::cout << "XX ";
+	std::cout << _name;
+	std::cout << "\n";
+	Section * const section = prof.get_section("resources");
+	if (section != nullptr)
+	{
+		m_needs_resource_title = section->get_string("needs_resource_title", "");
+		m_needs_resource_message = section->get_string("needs_resource_message", "");
+		std::cout << m_needs_resource_title;
+		std::cout << "\n";
+		std::cout << m_needs_resource_message;
+		std::cout << "\n";
+	}
+	else
+	{
+		m_needs_resource_title = "";
+		m_needs_resource_message = "";
+	}
 	while
 		(Section::Value const * const op = global_s.get_next_val("output"))
 		try {

=== modified file 'src/logic/productionsite.h'
--- src/logic/productionsite.h	2014-07-11 22:53:34 +
+++ src/logic/productionsite.h	2014-07-18 15:23:43 +
@@ -89,6 +89,9 @@
 	typedef std::map Programs;
 	const Programs & programs() const {return m_programs;}
 
+	std::string m_needs_resource_title;
+	std::string m_needs_resource_message;
+
 
 private:
 	BillOfMaterials m_working_positions;

=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc	2014-07-17 09:15:53 +
+++ src/logic/worker.cc	2014-07-18 15:23:43 +
@@ -23,8 +23,6 @@
 #include 
 #include 
 
-#include 
-
 #include "base/macros.h"
 #include "base/wexception.h"
 #include "economy/economy.h"
@@ -597,34 +595,23 @@
 void Worker::informPlayer
 	(Game & game, Building & building, std::string res_type) cons

Re: [Widelands-dev] [Merge] lp:~wl-zocker/widelands/bug-1341662 into lp:widelands

2014-07-18 Thread GunChleoc
I did a bit of grepping...

Do we want to add the wildboar to one of the critter lists in 
world/map_generation.lua?

Do we still need to parse critters into the tribe? I found this line:
src/logic/tribe.cc: PARSE_MAP_OBJECT_TYPES_BEGIN("critter 
bob")

-- 
https://code.launchpad.net/~wl-zocker/widelands/bug-1341662/+merge/227395
Your team Widelands Developers is requested to review the proposed merge of 
lp:~wl-zocker/widelands/bug-1341662 into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~wl-zocker/widelands/bug-1341662 into lp:widelands

2014-07-18 Thread GunChleoc
> I see no reason why the wildboar should not be in map_generation.lua. I did
> not know of this file and now I know it, I do not understand it.

That' because it was defined in the tribe rather than the world file I guess
-- 
https://code.launchpad.net/~wl-zocker/widelands/bug-1341662/+merge/227395
Your team Widelands Developers is requested to review the proposed merge of 
lp:~wl-zocker/widelands/bug-1341662 into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-999262_part2 into lp:widelands

2014-07-19 Thread GunChleoc
Well, it's completely configurable and I'm open to suggestions. We could also 
make the frequency of messages configurable, so lumberjacks and hunters will 
only pop up once in a while.

Since I don't play often, I'm happy to hear from code illiterates as to what 
would be appropriate :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-999262_part2/+merge/227348
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-999262_part2 into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~wl-zocker/widelands/bug-1341662 into lp:widelands

2014-07-20 Thread GunChleoc
> I added the wildboar to map_generation.lua. It seems to work, so I probably
> did the right thing :)

Looks good to me


> I noticed that some animals appear twice in the list. Is this to increase the
> probability of their appearance or simply some leavings from the one_world
> merge (that can be removed)?

I have no idea


> Regarding src/logic/tribe.cc: Is it just deleting a few lines?

I think deleting these lines will do the job for now:

PARSE_MAP_OBJECT_TYPES_BEGIN("critter bob")
m_bobs.add
(new Critter_Bob_Descr
(_name, _descname, path, prof, 
global_s,  this));
PARSE_MAP_OBJECT_TYPES_END;

This will prevent Widelands to look for critter bobs in the tribe. I don't know 
what will happen to oxen/donkeys/horses though, so I guess we need to leave 
this in after all. You could test this by removing the lines and then check if 
you can produce these animals.
-- 
https://code.launchpad.net/~wl-zocker/widelands/bug-1341662/+merge/227395
Your team Widelands Developers is requested to review the proposed merge of 
lp:~wl-zocker/widelands/bug-1341662 into lp:widelands.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-999262_part2 into lp:widelands

2014-07-20 Thread GunChleoc
Thanks! Now that I have QT Creator, the code is so much easier to navigate.

I fixed the commented stuff, now I still need to implement the delays for the 
messages. So, please wait with merging until I give you a shout.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-999262_part2/+merge/227348
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-999262_part2.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands

2014-07-20 Thread GunChleoc
(is_a(ProductionSite_Descr, desc)) {
>   return CAST_TO_LUA(ProductionSite_Descr, 
> L_ProductionSiteDescription);
>   }
> + else if (is_a(ConstructionSite_Descr, desc)) {
> + return CAST_TO_LUA(ConstructionSite_Descr, 
> L_ConstructionSiteDescription);
> + }
>   else if (is_a(Warehouse_Descr, desc)) {
>   return CAST_TO_LUA(Warehouse_Descr, L_WarehouseDescription);
>   }
> @@ -1023,7 +1026,7 @@
>  const PropertyType 
> L_MapObjectDescription::Properties[] = {
>   PROP_RO(L_MapObjectDescription, descname),
>   PROP_RO(L_MapObjectDescription, name),
> - PROP_RO(L_MapObjectDescription, type),
> + PROP_RO(L_MapObjectDescription, type_name),
>   {nullptr, nullptr, nullptr},
>  };
>  
> @@ -1059,8 +1062,8 @@
>  
>   (RO) the name of the building, e.g. building.
>  */
> -int L_MapObjectDescription::get_type(lua_State * L) {
> - lua_pushstring(L, get()->type());
> +int L_MapObjectDescription::get_type_name(lua_State * L) {
> +lua_pushstring(L, get()->type_name());
>   return 1;
>  }
>  
> @@ -1289,6 +1292,24 @@
>   return 1;
>  }
>  
> +/* RST
> +ConstructionSiteDescription
> +--
> +
> +.. class:: ConstructionSiteDescription
> +
> +A static description of a tribe's constructionsite, so it can be used in 
> help files
> +without having to access an actual building on the map.
> +See also class BuildingDescription and class MapObjectDescription for 
> more properties.
> +*/
> +const char L_ConstructionSiteDescription::className[] = 
> "ConstructionSiteDescription";
> +const MethodType 
> L_ConstructionSiteDescription::Methods[] = {
> + {nullptr, nullptr},
> +};
> +const PropertyType 
> L_ConstructionSiteDescription::Properties[] = {
> + {nullptr, nullptr, nullptr},
> +};
> +
>  
>  /* RST
>  ProductionSiteDescription
> @@ -1706,7 +1727,7 @@
>   if (std::string(get()->name()) ==
>   
> std::string(tribe.get_ware_descr(ware_index)->name())) {
>   lua_pushint32(L, index++);
> - upcasted_building_descr_to_lua(L, 
> tribe.get_building_descr(i));
> + 
> upcasted_building_descr_to_lua(L, tribe.get_building_descr(i));
>   lua_rawset(L, -3);
>   }
>   }
> @@ -1745,7 +1766,7 @@
>   if (std::string(get()->name()) ==
>   
> std::string(tribe.get_ware_descr(ware_amount.first)->name())) {
>   lua_pushint32(L, index++);
> - upcasted_building_descr_to_lua(L, 
> tribe.get_building_descr(i));
> + 
> upcasted_building_descr_to_lua(L, tribe.get_building_descr(i));
>   lua_rawset(L, -3);
>   }
>   }
> @@ -1892,10 +1913,9 @@
>  };
>  const PropertyType L_MapObject::Properties[] = {
>   PROP_RO(L_MapObject, __hash),
> + PROP_RO(L_MapObject, descr),
> + PROP_RO(L_MapObject, name),
>   PROP_RO(L_MapObject, serial),
> - PROP_RO(L_MapObject, type),
> - PROP_RO(L_MapObject, name),
> - PROP_RO(L_MapObject, descname),
>   {nullptr, nullptr, nullptr},
>  };
>  
> @@ -1944,17 +1964,6 @@
>   return 1;
>  }
>  
> -/* RST
> - .. attribute:: type
> -
> - (RO) the type name of this map object. You can determine with 
> what kind
> - of object you cope by looking at this attribute. Some example 
> types:
> - immovable, flag, road, productionsite, warehouse, 
> militarysite...
> -*/
> -int L_MapObject::get_type(lua_State * L) {
> - lua_pushstring(L, get(L, get_egbase(L))->type_name());
> - return 1;
> -}
>  
>  /* RST
>   .. attribute:: name
> @@ -1967,19 +1976,43 @@
>   return 1;
>  }
>  
> +// use the dynamic type of BuildingDescription
> +#define CAST_TO_LUA(klass, lua_klass) to_lua \
> + (L, new lua_klass(static_cast(desc)))
> +
>  /* RST
> - .. attribute:: descname
> +.. attribute:: descr
>  
> - (RO) The descriptive (and translated) name of this Map Object. 
> Use this
> - in messages to the player instead of name.
> +(RO) The description object for this immovable, e.g. 
> BuildingDescription.
>  */
> -int L_MapObject::get_descname(lua_State * L) {
> - lua_pushstring(L, get(L, get_egbase(L))->descr().descname().c_str());
> - return 1;
> +int L_MapObject::get_descr(lua_State * L) {
> + //TODO(GunChleoc) Flag_Descr would be nice for getting the type of 
> immovables,
> + // at the moment the type for these can be faked by using their name 
> instead
> + const Map_Object_Descr* desc = &get(L, get_egbase(L))->descr();
> + assert(desc != nullptr);
> +
> + if (is_a(MilitarySite_Descr, desc)) {
> + return CAST_TO_LUA(MilitarySite_Descr, 
> L_MilitarySiteDescription);
> + }
> + else if (is_a(TrainingSite_Descr, desc)) {
> + return CAST_TO_LUA(TrainingSite_Descr, 
> L_TrainingSiteDescription);
> + }
> + else if (is_a(ProductionSite_Descr, desc)) {
> + return CAST_TO_LUA(ProductionSite_Descr, 
> L_ProductionSiteDescription);
> + }
> + else if (is_a(Warehouse_Descr, desc)) {
> + return CAST_TO_LUA(Warehouse_Descr, L_WarehouseDescription);
> + }
> + else if (is_a(ConstructionSite_Descr, desc)) {
> + return CAST_TO_LUA(ConstructionSite_Descr, 
> L_ConstructionSiteDescription);
> + }
> + else if (is_a(Building_Descr, desc)) {
> + return CAST_TO_LUA(Building_Descr, L_BuildingDescription);
> + }
> + return CAST_TO_LUA(Map_Object_Descr, L_MapObjectDescription);
>  }
>  
> -
> -
> +#undef CAST_TO_LUA
>  
>  /*
>   ==
> @@ -3982,6 +4015,11 @@
>   add_parent(L);
>   lua_pop(L, 1); // Pop the meta table
>  
> + register_class(L, "map", true);
> + add_parent(L);
> + add_parent(L);
> + lua_pop(L, 1); // Pop the meta table
> +
>   register_class(L, "map", true);
>   add_parent(L);
>   add_parent(L);
> 
> === modified file 'src/scripting/lua_map.h'
> --- src/scripting/lua_map.h   2014-07-16 08:23:42 +
> +++ src/scripting/lua_map.h   2014-07-19 09:00:26 +
> @@ -112,7 +112,7 @@
>* Properties
>*/
>   int get_name(lua_State *);
> - int get_type(lua_State *);
> + int get_type_name(lua_State *);
>   int get_descname(lua_State *);
>  
>   /*
> @@ -189,6 +189,36 @@
>  };
>  
>  
> +class L_ConstructionSiteDescription : public L_BuildingDescription {
> +public:
> + LUNA_CLASS_HEAD(L_ConstructionSiteDescription);
> +
> + virtual ~L_ConstructionSiteDescription() {}
> +
> + L_ConstructionSiteDescription() {}
> + L_ConstructionSiteDescription(const Widelands::ConstructionSite_Descr* 
> const constructionsitedescr)
> + : L_BuildingDescription(constructionsitedescr) {
> + }
> + L_ConstructionSiteDescription(lua_State* L) : L_BuildingDescription(L) {
> + }
> +
> + /*
> +  * Properties
> +  */
> +
> + /*
> +  * Lua methods
> +  */
> +
> + /*
> +  * C methods
> +  */
> +
> +private:
> + CASTED_GET_DESCRIPTION(ConstructionSite_Descr);
> +};
> +
> +
>  class L_ProductionSiteDescription : public L_BuildingDescription {
>  public:
>   LUNA_CLASS_HEAD(L_ProductionSiteDescription);
> @@ -428,10 +458,9 @@
>* attributes
>*/
>   int get___hash(lua_State *);
> + int get_descr(lua_State *);
> + int get_name(lua_State *);
>   int get_serial(lua_State *);
> - int get_type(lua_State *);
> - int get_name(lua_State *);
> - int get_descname(lua_State *);
>  
>   /*
>* Lua Methods
> 


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341081/+merge/227107
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1341081.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands

2014-07-20 Thread GunChleoc
> Also, your editor formats source code quite differently to the codebase, so
> there are a lot of style checker warnings. Don't you get style warnings during
> compile?

It's a matter of setting up the editor to confirm with our code formatting 
standards - which I can't find a reference for. I don't even know if we're 
supposed to use tabs or blank space for indentation, but it did look like we're 
using tabs.

The codecheck warnings are hidden behind the "check to see if codecheck needs 
to run" messages, so everything rushes by so fast I can't notice if there are 
any. I guess I will have to run the python workaround somebody gave me.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341081/+merge/227107
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1341081.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-999262_part2 into lp:widelands

2014-07-21 Thread GunChleoc
OK, all done and ready for merging :)

The delay parameters might need some more tweaking, we'll just have to see how 
it behaves in a real game.

Buildings with message delay are hunters, lumberjacks and wells.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-999262_part2/+merge/227348
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-999262_part2.

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands

2014-07-21 Thread GunChleoc
Thanks for the info.

I am looking forward to Ninja :D
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341081/+merge/227107
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1341081.

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/string_fix_headquarters into lp:widelands

2014-07-21 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/string_fix_headquarters into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/string_fix_headquarters/+merge/227543

Small string fix
-- 
https://code.launchpad.net/~widelands-dev/widelands/string_fix_headquarters/+merge/227543
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/string_fix_headquarters into lp:widelands.
=== modified file 'tribes/atlanteans/headquarters/help.lua'
--- tribes/atlanteans/headquarters/help.lua	2014-05-27 14:14:14 +
+++ tribes/atlanteans/headquarters/help.lua	2014-07-21 12:39:15 +
@@ -13,7 +13,7 @@
 	building_help_lore_string("atlanteans", building_description, _[[Text needed]], _[[Source needed]]) ..
 	--General Section
 	building_help_general_string("atlanteans", building_description, "carrier",
-		_"Accomodation for your people. Also stores your wares and tools.",
+		_"Accommodation for your people. Also stores your wares and tools.",
 		_"The headquarters is your main building." .. "" .. _[[Text needed]]) ..
 
 	--Building Section

=== modified file 'tribes/barbarians/headquarters/help.lua'
--- tribes/barbarians/headquarters/help.lua	2014-04-18 10:08:08 +
+++ tribes/barbarians/headquarters/help.lua	2014-07-21 12:39:15 +
@@ -13,7 +13,7 @@
 	building_help_lore_string("barbarians", building_description, _[[Text needed]], _[[Source needed]]) ..
 	--General Section
 	building_help_general_string("barbarians", building_description, "carrier",
-		_"Accomodation for your people. Also stores your wares and tools.",
+		_"Accommodation for your people. Also stores your wares and tools.",
 		_"The headquarters is your main building." .. "" .. _[[Text needed]]) ..
 
 	--Building Section

=== modified file 'tribes/barbarians/headquarters_interim/help.lua'
--- tribes/barbarians/headquarters_interim/help.lua	2014-04-18 10:08:08 +
+++ tribes/barbarians/headquarters_interim/help.lua	2014-07-21 12:39:15 +
@@ -13,7 +13,7 @@
 	building_help_lore_string("barbarians", building_description, _[[Text needed]], _[[Source needed]]) ..
 	--General Section
 	building_help_general_string("barbarians", building_description, "carrier",
-		_"Accomodation for your people. Also stores your wares and tools.",
+		_"Accommodation for your people. Also stores your wares and tools.",
 		_"The headquarters is your main building." .. "" .. _[[Text needed]]) ..
 
 	--Building Section

=== modified file 'tribes/empire/headquarters/help.lua'
--- tribes/empire/headquarters/help.lua	2014-05-26 20:36:01 +
+++ tribes/empire/headquarters/help.lua	2014-07-21 12:39:15 +
@@ -13,7 +13,7 @@
 	building_help_lore_string("empire", building_description, _[[Text needed]], _[[Source needed]]) ..
 	--General Section
 	building_help_general_string("empire", building_description, "carrier",
-		_"Accomodation for your people. Also stores your wares and tools.",
+		_"Accommodation for your people. Also stores your wares and tools.",
 		_"The headquarters is your main building." .. "" .. _[[Text needed]]) ..
 
 	--Building Section

=== modified file 'tribes/empire/headquarters_shipwreck/help.lua'
--- tribes/empire/headquarters_shipwreck/help.lua	2014-05-26 20:36:01 +
+++ tribes/empire/headquarters_shipwreck/help.lua	2014-07-21 12:39:15 +
@@ -13,7 +13,7 @@
 	building_help_lore_string("empire", building_description, _[[Text needed]], _[[Source needed]]) ..
 	--General Section
 	building_help_general_string("empire", building_description, "carrier",
-		_"Although this ship ran aground, it still serves as accomodation for your people. It also stores your wares and tools.",
+		_"Although this ship ran aground, it still serves as accommodation for your people. It also stores your wares and tools.",
 		_"The headquarters shipwreck is your main building." .. "" .. _[[Text needed]]) ..
 
 	--Building Section

___
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


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1322741 into lp:widelands

2014-07-21 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1322741 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1322741 in widelands: "text issue: fps statistics overlaps with xz 
coordinates"
  https://bugs.launchpad.net/widelands/+bug/1322741

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1322741/+merge/227626

Debug overlay: Made FPS string smaller and moved coordinate information to 
bottom right.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1322741/+merge/227626
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1322741 into lp:widelands.
=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc	2014-07-16 06:41:27 +
+++ src/wui/interactive_base.cc	2014-07-21 19:59:45 +
@@ -401,12 +401,12 @@
 ===
 */
 void Interactive_Base::draw_overlay(RenderTarget& dst) {
-	// Blit node information when in debug mode.
-	if (get_display_flag(dfDebug) or not dynamic_cast(&egbase())) {
-		static format node_format("%3i %3i");
+	// Blit node information when in debug mode or if the chat window is on.
+	if (get_display_flag(dfDebug) || !dynamic_cast(&egbase())) {
+		static format node_format("(%i, %i)");
 		const std::string node_text = as_uifont
-			((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_BIG);
-		dst.blit(Point(5, 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_Left);
+			((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_SMALL);
+		dst.blit(Point(get_w() - 5, get_h() - 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_BottomRight);
 	}
 
 	// Blit FPS when in debug mode.
@@ -415,8 +415,8 @@
 		const std::string fps_text = as_uifont
 			((fps_format %
 			  (1000.0 / m_frametime) % (1000.0 / (m_avg_usframetime / 1000)))
-			 .str(), UI_FONT_SIZE_BIG);
-		dst.blit(Point(90, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
+			 .str(), UI_FONT_SIZE_SMALL);
+		dst.blit(Point(5, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
 	}
 }
 

___
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


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341674 into lp:widelands

2014-07-22 Thread GunChleoc
Unless someone can come up with a smart shell script that puts bzr blame and 
codecheck together, a lot of work.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341674/+merge/227693
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1341674 into lp:widelands.

___
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


  1   2   3   4   5   6   7   8   9   10   >