Create nukes at the tech level permitted by research
The tech level is visible to players, but currently has no effect.
This commit is contained in:
parent
df07e45b70
commit
316436bcfa
1 changed files with 5 additions and 8 deletions
|
@ -183,19 +183,16 @@ buil(void)
|
||||||
if (type >= 0) {
|
if (type >= 0) {
|
||||||
np = &nchr[type];
|
np = &nchr[type];
|
||||||
rqtech = np->n_tech;
|
rqtech = np->n_tech;
|
||||||
if (rqtech > tlev
|
if (drnuke_const > MIN_DRNUKE_CONST)
|
||||||
|| (drnuke_const > MIN_DRNUKE_CONST &&
|
tlev = (tlev < (rlev / drnuke_const) ? (int)tlev :
|
||||||
np->n_tech * drnuke_const > rlev))
|
(int)(rlev / drnuke_const));
|
||||||
|
if (rqtech > tlev)
|
||||||
type = -1;
|
type = -1;
|
||||||
}
|
}
|
||||||
if (type < 0) {
|
if (type < 0) {
|
||||||
int tt = tlev;
|
|
||||||
if (drnuke_const > MIN_DRNUKE_CONST)
|
|
||||||
tt = (tlev < (rlev / drnuke_const) ? (int)tlev :
|
|
||||||
(int)(rlev / drnuke_const));
|
|
||||||
pr("You can't build that!\n");
|
pr("You can't build that!\n");
|
||||||
pr("Use `show nuke build %d' to show types you can build.\n",
|
pr("Use `show nuke build %d' to show types you can build.\n",
|
||||||
tt);
|
tlev);
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue