Comment 14 for bug 1507923

Revision history for this message
Jens Beyer (qcumber-some) wrote :

=== modified file 'src/logic/production_program.cc'
--- src/logic/production_program.cc 2015-08-02 08:24:52 +0000
+++ src/logic/production_program.cc 2015-10-25 19:00:28 +0000
@@ -811,7 +811,7 @@
 {
        switch (m_feature) {
                case SEAFARING: {
- if (game.map().get_port_spaces().size() > 1) // we need at least two port build spaces
+ if (game.map().allows_seafaring()) // we need at least two port build spaces
                                return ps.program_step(game, 0);
                        else {
                                ps.set_production_result("No use for ships on this map!");

This change from revision 7538 caused this bug.

GunChleoc, I don't know how those changes to map.cc/map.h/production_program.cc are related to the commit message "UI overhaul of editor: load/save map, map options and set origin tool."
Could it be that it has been done by accident?

On a seemingly related note, I had more than one look at Map::allows_seafaring() and I still could not see the side effect of this method. I guess it is manipulating a vector/list or its contents somehow unsuspectedly.