.s1
<SECT> represents an assembly point, where all of the planes in the
mission meet before proceeding on to the target sector.
-The assembly point must be owned by you, and must not be more than
+The assembly point must be owned by you or an ally, or you or an ally
+must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
Route is a normal empire path specification. You may also give a
.s1
<SECT> represents an assembly point, where all of the planes in the
mission meet before proceeding on to the target sector.
-The assembly point must be owned by you, and must not be more than
+The assembly point must be owned by you or an ally, or you or an ally
+must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
<COMMODITY> is the name of a commodity which is to be carried along
.s1
<SECT> represents an assembly point, where all of the planes in the
mission meet before proceeding on to the target sector.
-The assembly point must be owned by you, and must not be more than
+The assembly point must be owned by you or an ally, or you or an ally
+must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
<COMMODITY> is the name of a commodity which is to be carried along
.s1
<SECT> represents an assembly point, where all of the planes in the
mission meet before proceeding on to the target sector.
-The assembly point must be owned by you, and must not be more than
+The assembly point must be owned by you or an ally, or you or an ally
+must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
Route is a normal empire path specification. You may also give a
.s1
<SECT> represents an assembly point, where all of the planes in the
mission meet before proceeding on to the target sector.
-The assembly point must be owned by you, and must not be more than
+The assembly point must be owned by you or an ally, or you or an ally
+must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
Route is a normal empire path specification. You may also give a
.s1
<SECT> represents an assembly point, where all of the planes in the
mission meet before proceeding on to the target sector.
-The assembly point must be owned by you, and must not be more than
+The assembly point must be owned by you or an ally, or you or an ally
+must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
Route is a normal empire path specification. You may also give a
{
char *p;
coord x, y;
+ struct nstr_item ni;
+ struct shpstr ship;
p = getstarg(input, "assembly point? ", buf);
if (!p || *p == 0)
return NULL;
if (!sarg_xy(p, &x, &y) || !getsect(x, y, ap_sect))
return NULL;
- if (ap_sect->sct_own && ap_sect->sct_own != player->cnum &&
- getrel(getnatp(ap_sect->sct_own), player->cnum) != ALLIED) {
- pr("Assembly point not owned by you or an ally!\n");
- return NULL;
+
+ /* over own or allied sector is fine */
+ if (ap_sect->sct_own == player->cnum
+ || getrel(getnatp(ap_sect->sct_own), player->cnum) == ALLIED)
+ return ap_sect;
+
+ /* over own or allied ship is fine */
+ snxtitem_xy(&ni, EF_SHIP, x, y);
+ while (nxtitem(&ni, &ship)) {
+ if (ship.shp_effic < SHIP_MINEFF || ship.shp_own == 0)
+ continue;
+ if (ship.shp_own == player->cnum
+ || getrel(getnatp(ship.shp_own), player->cnum) == ALLIED)
+ return ap_sect;
}
- return ap_sect;
+
+ pr("Assembly point not owned by you or an ally!\n");
+ return NULL;
}
int