(buil): Return RET_FAIL on insufficient tech for bridge instead of
literal 2 (which is RET_SYN). Return RET_SYN on incorrect first argument.
This commit is contained in:
parent
2a3da4916e
commit
90bddc6541
1 changed files with 3 additions and 3 deletions
|
@ -168,7 +168,7 @@ buil(void)
|
||||||
case 'b':
|
case 'b':
|
||||||
if (natp->nat_level[NAT_TLEV] + 0.005 < buil_bt) {
|
if (natp->nat_level[NAT_TLEV] + 0.005 < buil_bt) {
|
||||||
pr("Building a span requires a tech of %.0f\n", buil_bt);
|
pr("Building a span requires a tech of %.0f\n", buil_bt);
|
||||||
return 2;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
|
@ -179,7 +179,7 @@ buil(void)
|
||||||
if (natp->nat_level[NAT_TLEV] + 0.005 < buil_tower_bt) {
|
if (natp->nat_level[NAT_TLEV] + 0.005 < buil_tower_bt) {
|
||||||
pr("Building a tower requires a tech of %.0f\n",
|
pr("Building a tower requires a tech of %.0f\n",
|
||||||
buil_tower_bt);
|
buil_tower_bt);
|
||||||
return 2;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
|
@ -211,7 +211,7 @@ buil(void)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr("You can't build that!\n");
|
pr("You can't build that!\n");
|
||||||
return RET_FAIL;
|
return RET_SYN;
|
||||||
}
|
}
|
||||||
if (what != 'b' && what != 't') {
|
if (what != 'b' && what != 't') {
|
||||||
if (player->argp[4]) {
|
if (player->argp[4]) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue