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:
Markus Armbruster 2011-04-23 08:05:40 +02:00
parent df07e45b70
commit 316436bcfa

View file

@ -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;