forked from github/server
Adressen ausgeben, ncith Todesmeldung
This commit is contained in:
parent
e380670a34
commit
9762287e2e
|
@ -1624,12 +1624,12 @@ int
|
||||||
make_cmd(unit * u, struct order * ord)
|
make_cmd(unit * u, struct order * ord)
|
||||||
{
|
{
|
||||||
region * r = u->region;
|
region * r = u->region;
|
||||||
const building_type * btype;
|
const building_type * btype;
|
||||||
const ship_type * stype;
|
const ship_type * stype;
|
||||||
param_t p;
|
param_t p;
|
||||||
int m;
|
int m;
|
||||||
const item_type * itype;
|
const item_type * itype;
|
||||||
const char *s;
|
const char *s;
|
||||||
const struct locale * lang = u->faction->locale;
|
const struct locale * lang = u->faction->locale;
|
||||||
|
|
||||||
if (u->number==0) return 0;
|
if (u->number==0) return 0;
|
||||||
|
@ -1638,24 +1638,24 @@ make_cmd(unit * u, struct order * ord)
|
||||||
skip_token();
|
skip_token();
|
||||||
s = getstrtoken();
|
s = getstrtoken();
|
||||||
|
|
||||||
m = atoi(s);
|
m = atoi(s);
|
||||||
sprintf(buf, "%d", m);
|
sprintf(buf, "%d", m);
|
||||||
if (!strcmp(buf, s)) {
|
if (!strcmp(buf, s)) {
|
||||||
/* first came a want-paramter */
|
/* first came a want-paramter */
|
||||||
s = getstrtoken();
|
s = getstrtoken();
|
||||||
} else {
|
} else {
|
||||||
m = INT_MAX;
|
m = INT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = findparam(s, u->faction->locale);
|
p = findparam(s, u->faction->locale);
|
||||||
|
|
||||||
/* MACHE TEMP kann hier schon gar nicht auftauchen, weil diese nicht in
|
/* MACHE TEMP kann hier schon gar nicht auftauchen, weil diese nicht in
|
||||||
* thisorder abgespeichert werden - und auf den ist getstrtoken() beim
|
* thisorder abgespeichert werden - und auf den ist getstrtoken() beim
|
||||||
* aufruf von make geeicht */
|
* aufruf von make geeicht */
|
||||||
|
|
||||||
if (p == P_ROAD) {
|
if (p == P_ROAD) {
|
||||||
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
||||||
cmistake(u, ord, 275, MSG_PRODUCE);
|
cmistake(u, ord, 275, MSG_PRODUCE);
|
||||||
} else {
|
} else {
|
||||||
direction_t d = finddirection(getstrtoken(), u->faction->locale);
|
direction_t d = finddirection(getstrtoken(), u->faction->locale);
|
||||||
if (d!=NODIRECTION) {
|
if (d!=NODIRECTION) {
|
||||||
|
@ -1669,26 +1669,26 @@ make_cmd(unit * u, struct order * ord)
|
||||||
cmistake(u, ord, 71, MSG_PRODUCE);
|
cmistake(u, ord, 71, MSG_PRODUCE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else if (p == P_SHIP) {
|
} else if (p == P_SHIP) {
|
||||||
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
||||||
cmistake(u, ord, 276, MSG_PRODUCE);
|
cmistake(u, ord, 276, MSG_PRODUCE);
|
||||||
} else {
|
} else {
|
||||||
continue_ship(r, u, m);
|
continue_ship(r, u, m);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else if (p == P_HERBS) {
|
} else if (p == P_HERBS) {
|
||||||
herbsearch(r, u, m);
|
herbsearch(r, u, m);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* since the string can match several objects, like in 'academy' and
|
/* since the string can match several objects, like in 'academy' and
|
||||||
* 'academy of arts', we need to figure out what the player meant.
|
* 'academy of arts', we need to figure out what the player meant.
|
||||||
* This is not 100% safe.
|
* This is not 100% safe.
|
||||||
*/
|
*/
|
||||||
stype = findshiptype(s, lang);
|
stype = findshiptype(s, lang);
|
||||||
btype = findbuildingtype(s, lang);
|
btype = findbuildingtype(s, lang);
|
||||||
itype = finditemtype(s, lang);
|
itype = finditemtype(s, lang);
|
||||||
|
|
||||||
if (itype!=NULL && (btype!=NULL || stype!=NULL)) {
|
if (itype!=NULL && (btype!=NULL || stype!=NULL)) {
|
||||||
if (itype->construction==NULL) {
|
if (itype->construction==NULL) {
|
||||||
|
@ -1714,21 +1714,21 @@ make_cmd(unit * u, struct order * ord)
|
||||||
else stype = NULL;
|
else stype = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stype != NOSHIP) {
|
if (stype != NOSHIP) {
|
||||||
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
||||||
cmistake(u, ord, 276, MSG_PRODUCE);
|
cmistake(u, ord, 276, MSG_PRODUCE);
|
||||||
} else {
|
} else {
|
||||||
create_ship(r, u, stype, m, ord);
|
create_ship(r, u, stype, m, ord);
|
||||||
}
|
}
|
||||||
} else if (btype != NOBUILDING) {
|
} else if (btype != NOBUILDING) {
|
||||||
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
if(r->planep && fval(r->planep, PFL_NOBUILD)) {
|
||||||
cmistake(u, ord, 94, MSG_PRODUCE);
|
cmistake(u, ord, 94, MSG_PRODUCE);
|
||||||
} else {
|
} else {
|
||||||
build_building(u, btype, m, ord);
|
build_building(u, btype, m, ord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (itype!=NULL) {
|
else if (itype!=NULL) {
|
||||||
create_item(u, itype, m);
|
create_item(u, itype, m);
|
||||||
} else {
|
} else {
|
||||||
cmistake(u, ord, 125, MSG_PRODUCE);
|
cmistake(u, ord, 125, MSG_PRODUCE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1995,6 +1995,7 @@ report_plaintext(const char * filename, report_context * ctx)
|
||||||
/* Beschreibung */
|
/* Beschreibung */
|
||||||
|
|
||||||
if (sr->mode==see_unit) {
|
if (sr->mode==see_unit) {
|
||||||
|
anyunits = 1;
|
||||||
describe(F, r, 0, f);
|
describe(F, r, 0, f);
|
||||||
if (!TradeDisabled() && !fval(r->terrain, SEA_REGION) && rpeasants(r)/TRADE_FRACTION > 0) {
|
if (!TradeDisabled() && !fval(r->terrain, SEA_REGION) && rpeasants(r)/TRADE_FRACTION > 0) {
|
||||||
rnl(F);
|
rnl(F);
|
||||||
|
|
Loading…
Reference in New Issue