[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1801767-tutorial2-ai into lp:widelands

2018-11-05 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1801767-tutorial2-ai into lp:widelands.

Commit message:
Use empty AI in tutorial 2

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1801767 in widelands: "Tutorial 2 (warfare): AI abandons sentry"
  https://bugs.launchpad.net/widelands/+bug/1801767

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1801767-tutorial2-ai/+merge/358363
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1801767-tutorial2-ai into lp:widelands.
=== modified file 'data/campaigns/tutorial02_warfare.wmf/player_names'
--- data/campaigns/tutorial02_warfare.wmf/player_names	2014-10-26 09:05:11 +
+++ data/campaigns/tutorial02_warfare.wmf/player_names	2018-11-06 05:58:07 +
@@ -12,5 +12,5 @@
 [player_2]
 name="Sparring Partner"
 tribe="empire"
-ai=
+ai=empty
 closeable="false"

___
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-1769426-libreadline into lp:widelands

2018-11-05 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1769426-libreadline into lp:widelands.

Commit message:
Add libreadline7.dll to Inno Setup script. Some Windows machines seem to need 
it.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1769426 in widelands: "Some windows machines complain about missing 
libreadline7.dll"
  https://bugs.launchpad.net/widelands/+bug/1769426

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1769426-libreadline/+merge/358362

Not tested - let's wait for AppVeyor. I have an e-mail contact with an affected 
machine.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1769426-libreadline into lp:widelands.
=== modified file 'utils/win32/innosetup/Widelands.iss'
--- utils/win32/innosetup/Widelands.iss	2018-09-18 13:52:22 +
+++ utils/win32/innosetup/Widelands.iss	2018-11-06 05:57:30 +
@@ -140,6 +140,7 @@
 Source: {#DLLFolder}\libiconv-2.dll;DestDir: {app};Flags: ignoreversion;   Components: "Widelands"
 Source: {#DLLFolder}\libgraphite2.dll;  DestDir: {app};Flags: ignoreversion;   Components: "Widelands"
 Source: {#DLLFolder}\libpcre-1.dll; DestDir: {app};Flags: ignoreversion;   Components: "Widelands"
+Source: {#DLLFolder}\libreadline7.dll;  DestDir: {app};Flags: ignoreversion;   Components: "Widelands"
 Source: {#BuildFolder}\build\src\widelands.exe;   DestDir: {app};Flags: ignoreversion;   Components: "Widelands"
 Source: {#BuildFolder}\ChangeLog; DestDir: {app};Flags: ignoreversion; DestName: ChangeLog.txt;  Components: "Widelands"
 Source: {#BuildFolder}\COPYING;   DestDir: {app};Flags: ignoreversion; DestName: COPYING.txt;Components: "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/number_of_cpus into lp:widelands

2018-11-05 Thread GunChleoc
Review: Approve

Thanks!

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/number_of_cpus/+merge/358352
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/number_of_cpus.

___
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/empire04_unused_key_return_on_dismantle_no_ui into lp:widelands

2018-11-05 Thread GunChleoc
There is no dismantle button in this version, just like in trunk. I have 
checked.

We can wait with merging until you have a little time - there are still other 
bug to fix for Build 20.
-- 
https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui/+merge/358305
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui 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/number_of_cpus into lp:widelands

2018-11-05 Thread Toni Förster
Toni Förster has proposed merging lp:~widelands-dev/widelands/number_of_cpus 
into lp:widelands.

Commit message:
correctly calculate the number of cpus on macOS

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1800814 in widelands: "update.sh script broken since at least 
bzr8903[trunk]"
  https://bugs.launchpad.net/widelands/+bug/1800814

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

This does not fix the linked bug-report but it counts the cpus correctly on 
macOS. 
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/number_of_cpus 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-1800182-focus-save-menu into lp:widelands

2018-11-05 Thread Arty
Or rather than letting the save menu (and possibly some others) deal with 
"let's not accidentally refer key handling to the game window" issues, maybe 
the game window needs a "state" variable to distinguish between "game is 
running normally", "game is paused in background behind some other window" (and 
possibly other states), and then any key handling is suspended in certain 
states.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1800182-focus-save-menu/+merge/358284
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1800182-focus-save-menu.

___
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-1800182-focus-save-menu into lp:widelands

2018-11-05 Thread Arty
That keypresses affect the game window from the save menu is a more general 
issue that should be resolved. Sure, the name edit box grabs the keys when it 
has the focus, but as soon as the filename table is focued (which happends 
naturally when someone selects a name there), key handling (aside from a few 
keys like Up/Down) seems to be referred to the game window in the background.

We should generally prevent that. (Not necessarily in this branch.) Maybe it's 
enough to have the LoadOrSave table simply grab the keys instead of referring 
the key handling to something else. Hard to say right now, I haven't even 
checked which route the key handling takes to end up at the game window.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1800182-focus-save-menu/+merge/358284
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1800182-focus-save-menu.

___
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/empire04_unused_key_return_on_dismantle_no_ui into lp:widelands

2018-11-05 Thread hessenfarmer
I am not sure whether this fix or the other branch has any influence on the 
Scenario, and I can't test this at least until next monday. 
In the current implementation I managed to have the buildings in the right 
state some should be dismantable, some not. Some should be enhanceable, some 
not or only after a quest has been fulfillled. This state of the Scenario most 
probably is affected by these changes. If so the text is not matching the 
gameplay properly, so I recommend to postpone the whole thing to b21.

If you wan't to have it anyway it is your decision. I will have a look as soon 
as I have time for this.  
-- 
https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui/+merge/358305
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui 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/empire04_unused_key_return_on_dismantle into lp:widelands

2018-11-05 Thread GunChleoc
I'll create another branch then that only loads the backend bits (r8907), 
without the UI - we can expect bug reports for the log message, so I'll want 
that clean for Build 20.
-- 
https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle.

___
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/terrain_affinity_as_int into lp:widelands

2018-11-05 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/terrain_affinity_as_int into lp:widelands.

Commit message:
Fix desyncs caused by floating point arithmetic

- Floating point arithmetic can become inconsistent across 
platforms/compilers/hardware
- Upscale terrain affinity constants to turn them into ints
- Upscale the result of the affinity calculation and then use std::floor to cut 
it off at
  largely reduced precision for consistent rounding behavior. This should fix 
inconsistencies
  with double rounding and rounding direction.
- Catch a possible division by 0.


Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1800338 in widelands: "Shipnames mismatch in multiplayer"
  https://bugs.launchpad.net/widelands/+bug/1800338

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

Fix cross-platform desyncs caused by floating point arithmetic. Further reading:

https://randomascii.wordpress.com/2012/03/21/intermediate-floating-point-precision/

https://arxiv.org/abs/cs/0701192

Test savegame:

https://bugs.launchpad.net/widelands/+bug/1800338/comments/3

With this savegame, I can cause a multiplayer desync on the same machine by 
compiling one copy of Widelands with GCC and another copy with Clang. The 
desync happens before the ship finishes building. With this branch, the desync 
is gone.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/terrain_affinity_as_int into lp:widelands.
=== modified file 'data/tribes/immovables/berry_bushes/blueberry/init.lua'
--- data/tribes/immovables/berry_bushes/blueberry/init.lua	2018-02-17 15:41:29 +
+++ data/tribes/immovables/berry_bushes/blueberry/init.lua	2018-11-05 08:10:25 +
@@ -2,9 +2,9 @@
 
 terrain_affinity = {
preferred_temperature = 45, -- Temperature is in arbitrary units.
-   preferred_humidity = 0.75,  -- In percent (1 being very wet).
-   preferred_fertility = 0.4,  -- In percent (1 being very fertile).
-   pickiness = 0.15,   -- Lower means it is less picky, i.e. it can deal better.
+   preferred_humidity = 750,   -- Values between 0 and 1000 (1000 being very wet).
+   preferred_fertility = 400,  -- Values between 0 and 1000 (1000 being very fertile).
+   pickiness = 15, -- Lower means it is less picky, i.e. it can deal better.
 }
 
 tribes:new_immovable_type {

=== modified file 'data/tribes/immovables/berry_bushes/currant_black/init.lua'
--- data/tribes/immovables/berry_bushes/currant_black/init.lua	2018-02-17 15:41:29 +
+++ data/tribes/immovables/berry_bushes/currant_black/init.lua	2018-11-05 08:10:25 +
@@ -2,9 +2,9 @@
 
 terrain_affinity = {
preferred_temperature = 120,
-   preferred_humidity = 0.1,
-   preferred_fertility = 0.2,
-   pickiness = 0.5,
+   preferred_humidity = 100,
+   preferred_fertility = 200,
+   pickiness = 50,
 }
 
 tribes:new_immovable_type {

=== modified file 'data/tribes/immovables/berry_bushes/currant_red/init.lua'
--- data/tribes/immovables/berry_bushes/currant_red/init.lua	2018-02-17 15:41:29 +
+++ data/tribes/immovables/berry_bushes/currant_red/init.lua	2018-11-05 08:10:25 +
@@ -2,9 +2,9 @@
 
 terrain_affinity = {
preferred_temperature = 95,
-   preferred_humidity = 0.55,
-   preferred_fertility = 0.45,
-   pickiness = 0.4,
+   preferred_humidity = 550,
+   preferred_fertility = 450,
+   pickiness = 40,
 }
 
 tribes:new_immovable_type {

=== modified file 'data/tribes/immovables/berry_bushes/desert_hackberry/init.lua'
--- data/tribes/immovables/berry_bushes/desert_hackberry/init.lua	2018-02-17 15:41:29 +
+++ data/tribes/immovables/berry_bushes/desert_hackberry/init.lua	2018-11-05 08:10:25 +
@@ -2,9 +2,9 @@
 
 terrain_affinity = {
preferred_temperature = 170, -- Temperature is in arbitrary units.
-   preferred_humidity = 0.05,   -- In percent (1 being very wet).
-   preferred_fertility = 0.05,  -- In percent (1 being very fertile).
-   pickiness = 0.3, -- Lower means it is less picky, i.e. it can deal better.
+   preferred_humidity = 50, -- Values between 0 and 1000 (1000 being very wet).
+   preferred_fertility = 50,-- Values between 0 and 1000 (1000 being very fertile).
+   pickiness = 30, -- Lower means it is less picky, i.e. it can deal better.
 }
 
 tribes:new_immovable_type {

=== modified file 'data/tribes/immovables/berry_bushes/juniper/init.lua'
--- data/tribes/immovables/berry_bushes/juniper/init.lua	2018-04-21 15:27:00 +
+++ data/tribes/immovables/berry_bushes/juniper/init.lua	2018-11-05 08:10:25 +
@@ -2,9 +2,9 @@
 
 terrain_affinity = {
preferred_temperature = 115,
-   preferred_humidity = 0.6,
-   preferred_fertility = 0.2,
-   pickiness = 0.15,
+   preferred_humidity = 600,
+   preferred_fertility = 200,
+   pickiness = 15,
 }
 
 tribes:new_immovable_type {

=== modified file 'data/tribes/immovables/berry_bushes/raspberry/init.lua'
---