ships and items never have multi-stage builds.

we are going to make sure of this soon.
This commit is contained in:
Enno Rehling 2018-04-30 23:23:48 +02:00
parent e0cae602dd
commit b44e4e747d
4 changed files with 0 additions and 9 deletions

View File

@ -642,7 +642,6 @@ message *msg_materials_required(unit * u, order * ord,
int maxbuild(const unit * u, const construction * cons) int maxbuild(const unit * u, const construction * cons)
/* calculate maximum size that can be built from available material */ /* calculate maximum size that can be built from available material */
/* !! ignores maximum objectsize and improvements... */
{ {
int c; int c;
int maximum = INT_MAX; int maximum = INT_MAX;

View File

@ -328,7 +328,6 @@ int shipspeed(const ship * sh, const unit * u)
assert(u->ship == sh); assert(u->ship == sh);
assert(u == ship_owner(sh)); assert(u == ship_owner(sh));
assert(sh->type->construction); assert(sh->type->construction);
assert(sh->type->construction->improvement == NULL); /* sonst ist construction::size nicht ship_type::maxsize */
k = sh->type->range; k = sh->type->range;
if (sh->size != sh->type->construction->maxsize) if (sh->size != sh->type->construction->maxsize)
@ -396,10 +395,6 @@ int shipcapacity(const ship * sh)
{ {
int i = sh->type->cargo; int i = sh->type->cargo;
/* sonst ist construction:: size nicht ship_type::maxsize */
assert(!sh->type->construction
|| sh->type->construction->improvement == NULL);
if (sh->type->construction && sh->size != sh->type->construction->maxsize) if (sh->type->construction && sh->size != sh->type->construction->maxsize)
return 0; return 0;

View File

@ -847,7 +847,6 @@ static void drifting_ships(region * r)
/* Kapitän da? Beschädigt? Genügend Matrosen? /* Kapitän da? Beschädigt? Genügend Matrosen?
* Genügend leicht? Dann ist alles OK. */ * Genügend leicht? Dann ist alles OK. */
assert(sh->type->construction->improvement == NULL); /* sonst ist construction::size nicht ship_type::maxsize */
if (captain && sh->size == sh->type->construction->maxsize if (captain && sh->size == sh->type->construction->maxsize
&& enoughsailors(sh, crew_skill(sh)) && cansail(r, sh)) { && enoughsailors(sh, crew_skill(sh)) && cansail(r, sh)) {
shp = &sh->next; shp = &sh->next;
@ -1669,7 +1668,6 @@ static bool ship_ready(const region * r, unit * u, order * ord)
return false; return false;
} }
if (u->ship->type->construction) { if (u->ship->type->construction) {
assert(!u->ship->type->construction->improvement); /* sonst ist construction::size nicht ship_type::maxsize */
if (u->ship->size != u->ship->type->construction->maxsize) { if (u->ship->size != u->ship->type->construction->maxsize) {
cmistake(u, ord, 15, MSG_MOVE); cmistake(u, ord, 15, MSG_MOVE);
return false; return false;

View File

@ -1803,7 +1803,6 @@ nr_ship(struct stream *out, const region *r, const ship * sh, const faction * f,
if (wrptr(&bufp, &size, bytes) != 0) if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER(); WARN_STATIC_BUFFER();
assert(sh->type->construction->improvement == NULL); /* sonst ist construction::size nicht ship_type::maxsize */
if (sh->size != sh->type->construction->maxsize) { if (sh->size != sh->type->construction->maxsize) {
bytes = snprintf(bufp, size, ", %s (%d/%d)", bytes = snprintf(bufp, size, ", %s (%d/%d)",
LOC(f->locale, "nr_undercons"), sh->size, LOC(f->locale, "nr_undercons"), sh->size,