]> git.pond.sub.org Git - empserver/commitdiff
(pln_wanted, pln_capable): Rename.
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 2 Nov 2007 19:13:10 +0000 (19:13 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 2 Nov 2007 19:13:10 +0000 (19:13 +0000)
include/prototypes.h
src/lib/subs/mission.c
src/lib/subs/plnsub.c

index f9f869c00b8fd3d0e3609a9812300cdfbaf3f2d6..ed91e7f5145d323b47e60eb948cb8919393be938 100644 (file)
@@ -556,7 +556,7 @@ extern int put_plane_on_ship(struct plnstr *, struct shpstr *);
 extern void pln_dropoff(struct emp_qelem *, struct ichrstr *,
                        coord, coord, void *, int);
 extern void pln_mine(struct emp_qelem *list, struct sctstr *sectp);
-extern int pln_wanted(struct plnstr *, int, int);
+extern int pln_capable(struct plnstr *, int, int);
 extern void pln_sel(struct nstr_item *, struct emp_qelem *,
                    struct sctstr *, int, int, int, int);
 extern int pln_arm(struct emp_qelem *, int, char, struct ichrstr *,
index 44fc6b10c20b9d20b7989f973eb460ccfc826f5f..408aeb33aedfcaa1e3f473ec4d77ffe3bd93942f 100644 (file)
@@ -946,7 +946,7 @@ mission_pln_sel(struct emp_qelem *list, int wantflags, int nowantflags,
            }
        }
 
-       if (!pln_wanted(pp, wantflags, nowantflags)) {
+       if (!pln_capable(pp, wantflags, nowantflags)) {
            emp_remque(qp);
            free(qp);
            continue;
index 50a2092a749ff0099f366bfdb821e9fc4f408c24..f0a8670d5007bc4784f4688c8e8ec4268af0cc7e 100644 (file)
@@ -352,15 +352,15 @@ pln_mine(struct emp_qelem *list, struct sctstr *sectp)
 }
 
 /*
- * Is a plane of PP's type wanted?
- * A plane type is wanted unless
- * - it lacks all of the P_F, P_ESC in wantflags, or
- * - it lacks all of the P_E, P_L, P_K in wantflags, or
- * - it lacks any of the other flags in wantflags, or
- * - it has any of the flags in nowantflags.
+ * Has PP's type capabilities satisfying WANTFLAGS and NOWANTFLAGS?
+ * A plane type is capable unless
+ * - it lacks all of the P_F, P_ESC in WANTFLAGS, or
+ * - it lacks all of the P_E, P_L, P_K in WANTFLAGS, or
+ * - it lacks any of the other capabilities in WANTFLAGS, or
+ * - it has any of the capabilities in NOWANTFLAGS.
  */
 int
-pln_wanted(struct plnstr *pp, int wantflags, int nowantflags)
+pln_capable(struct plnstr *pp, int wantflags, int nowantflags)
 {
     int flags = plchr[(int)pp->pln_type].pl_flags;
 
@@ -427,7 +427,7 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
        range += ap_to_target;
        range *= rangemult;
        pcp = &plchr[(int)plane.pln_type];
-       if (!pln_wanted(&plane, wantflags, nowantflags))
+       if (!pln_capable(&plane, wantflags, nowantflags))
            continue;
        if (plane.pln_range < range) {
            pr("%s out of range (%d:%d)\n",