]> git.pond.sub.org Git - empserver/commitdiff
fairland: Tweak progress messages
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 8 Aug 2020 11:34:02 +0000 (13:34 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 09:41:36 +0000 (10:41 +0100)
"fairland: unstable drift -- try increasing DRIFT_MAX" is confusing:
it looks like an error, but isn't, and increasing DRIFT_MAX requires a
recompile.  I'm not sure it can happen.  Replace by just "unstable
drift".

"fairland: error -- continent %c had no room to grow!" is pretty
redundant: it's always followed by "Only managed to grow %d out of %d
sectors."  and then "ERROR: World not large enough to hold
continents".  All it adds is which of the continents failed to grow,
and that's not actionable.  Drop the message.

The message sequence "designating sectors...", "adding resources...",
"setting coastal flags...", and "writing to sectors file..." is a bit
of a lie as these four tasks aren't actually done one after the other.
Replace by just "writing to sectors file..."

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/util/fairland.c
tests/fairland/no-spike.out
tests/fairland/plain.out
tests/fairland/spike.out
tests/fairland/stunted.out

index c3ef00d1cc16910f3926a4bb573e92723a1254fb..b01ddb25c75f3635f34471d5de7c23c658871e2a 100644 (file)
@@ -294,7 +294,7 @@ main(int argc, char *argv[])
            qprint("\ntry #%d (out of %d)...\n", i + 1, NUMTRIES);
        qprint("placing capitals...\n");
        if (!drift())
-           qprint("fairland: unstable drift -- try increasing DRIFT_MAX\n");
+           qprint("unstable drift\n");
        qprint("growing continents...\n");
        grow_continents();
     } while (fl_status && ++i < NUMTRIES);
@@ -307,11 +307,10 @@ main(int argc, char *argv[])
     grow_islands();
     qprint("\nelevating land...\n");
     create_elevations();
-    qprint("designating sectors...\n");
-    qprint("adding resources...\n");
+
+    qprint("writing to sectors file...\n");
     if (!write_newcap_script())
        exit(1);
-
     if (chdir(gamedir)) {
        fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno));
        exit(EXIT_FAILURE);
@@ -319,7 +318,6 @@ main(int argc, char *argv[])
     if (!ef_open(EF_SECTOR, EFF_MEM | EFF_NOTIME))
        exit(1);
     write_sects();
-    qprint("writing to sectors file...\n");
     if (!ef_close(EF_SECTOR))
        exit(1);
 
@@ -761,11 +759,8 @@ grow_one_sector(int c)
        ++coast_search;
     } while (!done && coast_search < COAST_SEARCH_MAX &&
             (secs == 1 || x != sx || y != sy));
-    if (!done && c < nc) {
-       qprint("fairland: error -- continent %c had no room to grow!\n",
-              numletter[c % 62]);
+    if (!done && c < nc)
        fl_status |= STATUS_NO_ROOM;
-    }
     return done;
 }
 
@@ -1266,7 +1261,6 @@ set_coastal_flags(void)
     int i, j;
     struct sctstr *sp;
 
-    qprint("setting coastal flags...\n");
     for (i = 0; i < nc; ++i) {
        for (j = 0; j < sc; j++) {
            sp = getsectp(sectx[i][j], secty[i][j]);
index 9c629fb4cb63f0c4a0d23f2c5c9a8257eb5b6b26..472de3febfaa51e4b9b71abff3b468d52aec4a7d 100644 (file)
@@ -17,9 +17,6 @@ placing capitals...
 growing continents...
 growing islands: 1(3) 2(8) 3(13) 4(7) 5(10) 6(10) 7(2) 8(8) 9(14) 10(17) 11(13) 12(15) 13(9) 14(8) 15(3)
 elevating land...
-designating sectors...
-adding resources...
-setting coastal flags...
 writing to sectors file...
 
 . . . % . . . % . . . . . . . . % % . % . . . . . . . . . . . .
index b8ab267aa337ee369bc73ed45b5b42a0f0367736..20f8bcacdf6df0456c1fe225fa39bf8221648715 100644 (file)
@@ -17,9 +17,6 @@ placing capitals...
 growing continents...
 growing islands: 1(15) 2(21) 3(11) 4(13) 5(9)
 elevating land...
-designating sectors...
-adding resources...
-setting coastal flags...
 writing to sectors file...
 
 . . . . . . . . . . . . . . . . . . # # # . . . . . . . . . . .
index 9efb39285647b441f165df4effed2a514fdc6e1e..b641431a1b2759124214f0533451abbacd0572aa 100644 (file)
@@ -17,9 +17,6 @@ placing capitals...
 growing continents...
 growing islands: 1(30) 2(10) 3(26) 4(22) 5(20) 6(16) 7(29) 8(6)
 elevating land...
-designating sectors...
-adding resources...
-setting coastal flags...
 writing to sectors file...
 
 . b b # # # . . . . % % . . . # . % % ^ % . . . . . . . . . . .
index 6e1b6edec67d0d66a83cde64bbd4946b99e4fadd..fc3eb3f5b31d9349bda1055ad1f7f003ce300f8e 100644 (file)
@@ -15,13 +15,11 @@ World dimensions: 64x32
 seed is 1
 placing capitals...
 growing continents...
-fairland: error -- continent h had no room to grow!
 Only managed to grow 33 out of 37 sectors.
 
 try #2 (out of 10)...
 placing capitals...
 growing continents...
-fairland: error -- continent h had no room to grow!
 Only managed to grow 31 out of 37 sectors.
 
 try #3 (out of 10)...
@@ -29,9 +27,6 @@ placing capitals...
 growing continents...
 growing islands: 1(14) 2(20) 3(11) 4(16) 5(14) 6(8) 7(2) 8(3) 9(4) 10(5) 11(14) 12(3)
 elevating land...
-designating sectors...
-adding resources...
-setting coastal flags...
 writing to sectors file...
 
 . . # # # # . . % . . . . % % % % . . . . . . # # # # # # . . %