]> git.pond.sub.org Git - empserver/commitdiff
retreat lretreat: Deprecate pseudo-condition 'c'
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 10 Jan 2015 13:16:00 +0000 (14:16 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:49 +0000 (08:20 +0100)
It's redundant; retreat path 'h' cancels orders just fine.  Document
that instead.  'c' still works, and I don't plan to break it as long
as it doesn't get in the way, which seems unlikely.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
info/lretreat.t
info/retreat.t
src/lib/commands/retr.c
tests/retreat/journal.log

index 8037f5df39396f2917ba673b1cd2e1529e72536b..aafeefe4f9f6fa44f8f54d3be76f4bd1f37b7053 100644 (file)
@@ -4,12 +4,16 @@
 .SY "lretreat <UNIT/ARMY> <PATH> <CONDITIONS>"
 .SY "lretreat <UNIT/ARMY> q"
 The lretreat command allows you to examine or modify the retreat
-paths and conditions of your land units.
+orders of your land units.
 .s1
 The first argument selects land units to view or give orders for.
 If an army designation is given when specifying orders, the orders
 apply to all members of that army.
 .s1
+Retreat orders consist of a retreat path and conditions.
+.s1
+A retreat path 'h' orders the ships not to retreat.
+.s1
 With 'q' instead of a retreat path, the current retreat paths and
 conditions will be listed.
 The report format contains the following fields:
@@ -66,7 +70,6 @@ Retreat conditions are:
                        when it is fired upon, and no friendly
                        units/sectors (including the unit itself)
                        are able to fire back at the aggressor.
-       c               Cancel retreat order
 .fi
 .s1
 For example, if the cavalry above was fired at, it would attempt to
index a445aa99d1dacb9549cbd49dc5f9c3cee96a9feb..3200228908970654d44a2cc824cb05166ea92208 100644 (file)
@@ -4,12 +4,16 @@
 .SY "retreat <SHIP/FLEET> <PATH> <CONDITIONS>"
 .SY "retreat <SHIP/FLEET> q"
 The retreat command allows you to examine or modify the retreat
-paths and conditions of your ships.
+orders of your ships
 .s1
 The first argument selects ships to view or give orders for.
 If a fleet designation is given when specifying orders, the orders
 apply to all members of that fleet.
 .s1
+Retreat orders consist of a retreat path and conditions.
+.s1
+A retreat path 'h' orders the ships not to retreat.
+.s1
 With 'q' instead of a retreat path, the current retreat paths and
 conditions will be listed.
 The report format contains the following fields:
@@ -71,7 +75,6 @@ Retreat conditions are:
                        ships/sectors (including the ship itself) are
                        able to fire back at the aggressor
        u               Retreat upon a failed boarding attempt
-       c               Cancel retreat order
 .fi
 .s1
 For example, if the battleship above was fired at, it would attempt to
index 0a81581f5bfffa66cb71326babbeff48f763a681..2504da5055a04d17ce928d102cae56748583bb3e 100644 (file)
@@ -114,7 +114,8 @@ retreat(int type)
        }
        for (i--; i >= 0 && pq[i] == dirch[DIR_STOP]; i--)
            pq[i] = 0;
-
+    }
+    if (pq && *pq) {
     again:
        fl = getstarg(player->argp[3],
                      "Retreat conditions ('?' to list available ones)? ",
@@ -125,6 +126,7 @@ retreat(int type)
        for (i = 0; fl[i]; i++) {
            ch = tolower(fl[i]);
            if (ch == 'c') {
+               /* Deprecated, but keeping it around doesn't hurt */
                *pq = 0;
                break;
            }
@@ -135,7 +137,6 @@ retreat(int type)
                           rflagsc[j],
                           symbol_by_value(1 << j, retreat_flags));
                }
-               pr("c\tcancel retreat order\n");
                goto again;
            }
            p = strchr(rflagsc, ch);
index dfd7a8aff7327605b5b8596d56affc5da08b314c..f084bbe125008535f67c01f311a3c62360b45a9e 100644 (file)
@@ -43,7 +43,6 @@
     Play#1 output Play#1 1 b   retreat when bombed
     Play#1 output Play#1 1 d   retreat when depth-charged
     Play#1 output Play#1 1 u   retreat when boarded
-    Play#1 output Play#1 1 c   cancel retreat order
     Play#1 output Play#1 4 Retreat conditions ('?' to list available ones)?
     Play#1 input junk
     Play#1 output Play#1 1 Bad retreat condition 'j'
     Play#1 output Play#1 1 i   retreat when injured
     Play#1 output Play#1 1 h   retreat when helpless
     Play#1 output Play#1 1 b   retreat when bombed
-    Play#1 output Play#1 1 c   cancel retreat order
     Play#1 output Play#1 4 Retreat conditions ('?' to list available ones)?
     Play#1 input junk
     Play#1 output Play#1 1 Bad retreat condition 'j'