Check plane efficiency and capabilities earlier in pln_sel()
This way we don't complain about range to assembly point and destination for planes that can't go regardless.
This commit is contained in:
parent
9e0950456d
commit
ce7ab95c3b
1 changed files with 7 additions and 7 deletions
|
@ -504,6 +504,13 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
|
||||||
continue;
|
continue;
|
||||||
if (plane.pln_mobil <= 0)
|
if (plane.pln_mobil <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
if (plane.pln_effic < 40) {
|
||||||
|
pr("%s not efficient enough (must be 40%%)\n",
|
||||||
|
prplane(&plane));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!pln_capable(&plane, wantflags, nowantflags))
|
||||||
|
continue;
|
||||||
if (opt_MARKET) {
|
if (opt_MARKET) {
|
||||||
if (ontradingblock(EF_PLANE, &plane)) {
|
if (ontradingblock(EF_PLANE, &plane)) {
|
||||||
pr("plane #%d inelligible - it's for sale.\n",
|
pr("plane #%d inelligible - it's for sale.\n",
|
||||||
|
@ -517,16 +524,9 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
|
||||||
pr("%s too far from assembly point\n", prplane(&plane));
|
pr("%s too far from assembly point\n", prplane(&plane));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (plane.pln_effic < 40) {
|
|
||||||
pr("%s not efficient enough (must be 40%%)\n",
|
|
||||||
prplane(&plane));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
range += ap_to_target;
|
range += ap_to_target;
|
||||||
range *= rangemult;
|
range *= rangemult;
|
||||||
pcp = &plchr[(int)plane.pln_type];
|
pcp = &plchr[(int)plane.pln_type];
|
||||||
if (!pln_capable(&plane, wantflags, nowantflags))
|
|
||||||
continue;
|
|
||||||
if (plane.pln_range < range) {
|
if (plane.pln_range < range) {
|
||||||
pr("%s out of range (%d:%d)\n",
|
pr("%s out of range (%d:%d)\n",
|
||||||
prplane(&plane), plane.pln_range, range);
|
prplane(&plane), plane.pln_range, range);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue