DEFAULT-Befehl funktioniert wieder nicht

Wenn neue Befehle in old_orders stehen, werden lange Befehle in orders nicht mehr ausgegeben.
Issue: 548
This commit is contained in:
Enno Rehling 2005-06-05 16:48:22 +00:00
parent fa1b0a8efc
commit 448e9e7c09
5 changed files with 5 additions and 1 deletions

View File

@ -778,6 +778,7 @@ cr_output_unit(FILE * F, const region * r,
#ifdef LASTORDER
if (ord==u->lastorder) continue;
#endif
if (u->old_orders && is_repeated(ord)) continue; /* unit has defaults */
if (is_persistent(ord)) {
fwriteorder(F, ord, f->locale);
fputc('\n', F);

View File

@ -247,7 +247,7 @@ get_food(region *r)
int hungry = u->number;
while (donor!=NULL && hungry>0) {
/* alwayy start with the first known uint that may have some blood */
/* always start with the first known unit that may have some blood */
static const struct potion_type * pt_blood;
if (pt_blood==NULL) pt_blood = pt_find("peasantblood");
while (donor!=NULL) {

View File

@ -1603,6 +1603,7 @@ order_template(FILE * F, faction * f)
}
#endif
for (ord = u->orders; ord; ord = ord->next) {
if (u->old_orders && is_repeated(ord)) continue; /* unit has defaults */
if (is_persistent(ord)) {
strcpy(buf, " ");
write_order(ord, u->faction->locale, buf+2, sizeof(buf)-2);

View File

@ -442,6 +442,7 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
++printed;
break;
}
if (printed) break; /* ein DEFAULT reicht */
ord=ord->next;
}
}

View File

@ -1246,6 +1246,7 @@ writeunit(FILE * F, const unit * u)
}
#endif
for (ord = u->orders; ord; ord=ord->next) {
if (u->old_orders && is_repeated(ord)) continue; /* has new defaults */
if (is_persistent(ord)) {
fwriteorder(F, ord, u->faction->locale);
fputc(' ', F);