bugfix: schiffsbau mit schaffenstrunk

This commit is contained in:
Enno Rehling 2004-01-23 23:27:16 +00:00
parent 2edb0c7100
commit 9fbe85c618
1 changed files with 6 additions and 5 deletions

View File

@ -899,15 +899,16 @@ build_ship(unit * u, ship * sh, int want)
{
const construction * construction = sh->type->construction;
int size = (sh->size * DAMAGE_SCALE - sh->damage) / DAMAGE_SCALE;
int can = u->number * effskill(u, SK_SHIPBUILDING) / construction->minskill;
int n;
#if 0
int can = u->number * effskill(u, SK_SHIPBUILDING) / construction->minskill;
if (want > 0) can = min(want, can);
can = min(can, construction->maxsize+sh->damage); /* 100% bauen + 100% reparieren */
can = build(u, construction, size, can);
#endif
int can = build(u, construction, size, want);
if((n=construction->maxsize - sh->size)>0 && can>0) {
if(can>=n) {
if ((n=construction->maxsize - sh->size)>0 && can>0) {
if (can>=n) {
sh->size += n;
can -= n;
}