Break lines more tastefully.
This commit is contained in:
parent
fcc0162188
commit
5b4b3a13cb
40 changed files with 220 additions and 229 deletions
|
@ -192,8 +192,9 @@ assemble_dist_paths(struct distinfo *distptrs)
|
|||
/* now, get the dist sector */
|
||||
dist = getsectp(sp->sct_dist_x, sp->sct_dist_y);
|
||||
if (dist == NULL) {
|
||||
logerror("Bad dist sect %d,%d for %d,%d !\n", sp->sct_dist_x,
|
||||
sp->sct_dist_y, sp->sct_x, sp->sct_y);
|
||||
logerror("Bad dist sect %d,%d for %d,%d !\n",
|
||||
sp->sct_dist_x, sp->sct_dist_y,
|
||||
sp->sct_x, sp->sct_y);
|
||||
continue;
|
||||
}
|
||||
/* Now, get the best distribution path over roads */
|
||||
|
|
|
@ -102,9 +102,9 @@ do_feed(struct sctstr *sp, struct natstr *np, short *vec,
|
|||
needed = ldround((double)(1 + etu * people * eatrate), 1);
|
||||
|
||||
/* Now, find some food */
|
||||
vec[I_FOOD] = supply_commod(sp->sct_own, sp->sct_x,
|
||||
sp->sct_y, I_FOOD, needed);
|
||||
|
||||
vec[I_FOOD] = supply_commod(sp->sct_own,
|
||||
sp->sct_x, sp->sct_y,
|
||||
I_FOOD, needed);
|
||||
}
|
||||
}
|
||||
starved = feed_people(vec, etu, &needed);
|
||||
|
|
|
@ -129,8 +129,8 @@ upd_land(struct lndstr *lp, int etus,
|
|||
if (np->nat_priorities[PRI_LBUILD] == 0 || np->nat_money < 0)
|
||||
return;
|
||||
if (lp->lnd_effic < LAND_MINEFF || !landrepair(lp, np, bp, etus)) {
|
||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
|
||||
lp->lnd_y);
|
||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
|
||||
lp->lnd_x, lp->lnd_y);
|
||||
lp->lnd_own = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -147,8 +147,8 @@ upd_land(struct lndstr *lp, int etus,
|
|||
if ((eff = lp->lnd_effic - etus / 5) < LAND_MINEFF) {
|
||||
wu(0, lp->lnd_own,
|
||||
"%s lost to lack of maintenance\n", prland(lp));
|
||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
|
||||
lp->lnd_y);
|
||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
|
||||
lp->lnd_x, lp->lnd_y);
|
||||
lp->lnd_own = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -328,8 +328,8 @@ do_mob_ship(struct shpstr *sp, int etus)
|
|||
if ((d - (int)d) > 0.0)
|
||||
d++;
|
||||
need = (int)d;
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x,
|
||||
sp->shp_y, I_PETROL, need);
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
|
||||
I_PETROL, need);
|
||||
sp->shp_fuel += newfuel * 5;
|
||||
}
|
||||
|
||||
|
@ -347,8 +347,8 @@ do_mob_ship(struct shpstr *sp, int etus)
|
|||
if ((d - (int)d) > 0.0)
|
||||
d++;
|
||||
need = (int)d;
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x,
|
||||
sp->shp_y, I_OIL, need);
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
|
||||
I_OIL, need);
|
||||
sp->shp_fuel += newfuel * 50;
|
||||
}
|
||||
|
||||
|
@ -444,8 +444,8 @@ do_mob_land(struct lndstr *lp, int etus)
|
|||
if ((d - (int)d) > 0.0)
|
||||
d++;
|
||||
need = (int)d;
|
||||
newfuel = supply_commod(lp->lnd_own, lp->lnd_x,
|
||||
lp->lnd_y, I_PETROL, need);
|
||||
newfuel = supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
|
||||
I_PETROL, need);
|
||||
lp->lnd_fuel += newfuel * 5;
|
||||
}
|
||||
|
||||
|
@ -461,8 +461,8 @@ do_mob_land(struct lndstr *lp, int etus)
|
|||
if ((d - (int)d) > 0.0)
|
||||
d++;
|
||||
need = (int)d;
|
||||
newfuel = supply_commod(lp->lnd_own, lp->lnd_x,
|
||||
lp->lnd_y, I_OIL, need);
|
||||
newfuel = supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
|
||||
I_OIL, need);
|
||||
lp->lnd_fuel += newfuel * 50;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,8 +219,8 @@ auto_fuel_ship(struct shpstr *sp)
|
|||
d++;
|
||||
need = (int)d;
|
||||
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x,
|
||||
sp->shp_y, I_PETROL, need);
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
|
||||
I_PETROL, need);
|
||||
add_fuel += newfuel * 5;
|
||||
if (add_fuel > maxfuel)
|
||||
add_fuel = maxfuel;
|
||||
|
@ -238,8 +238,8 @@ auto_fuel_ship(struct shpstr *sp)
|
|||
d++;
|
||||
need = (int)d;
|
||||
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x,
|
||||
sp->shp_y, I_OIL, need);
|
||||
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
|
||||
I_OIL, need);
|
||||
add_fuel = newfuel * 50;
|
||||
if (add_fuel > maxfuel)
|
||||
add_fuel = maxfuel;
|
||||
|
|
|
@ -113,8 +113,8 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
|
|||
/* nplane is unsigned... */
|
||||
if (shp->shp_nplane > 0)
|
||||
shp->shp_nplane--;
|
||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
|
||||
pp->pln_y);
|
||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
|
||||
pp->pln_x, pp->pln_y);
|
||||
pp->pln_own = 0;
|
||||
continue;
|
||||
}
|
||||
|
@ -135,8 +135,8 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
|
|||
if ((eff = pp->pln_effic - etus / 5) < PLANE_MINEFF) {
|
||||
wu(0, pp->pln_own,
|
||||
"%s lost to lack of maintenance\n", prplane(pp));
|
||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
|
||||
pp->pln_y);
|
||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
|
||||
pp->pln_x, pp->pln_y);
|
||||
pp->pln_own = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -132,8 +132,8 @@ upd_ship(struct shpstr *sp, int etus,
|
|||
if (np->nat_priorities[PRI_SBUILD] == 0 || np->nat_money < 0)
|
||||
return;
|
||||
if (sp->shp_effic < SHIP_MINEFF || !shiprepair(sp, np, bp, etus)) {
|
||||
makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x,
|
||||
sp->shp_y);
|
||||
makelost(EF_SHIP, sp->shp_own, sp->shp_uid,
|
||||
sp->shp_x, sp->shp_y);
|
||||
sp->shp_own = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -147,8 +147,8 @@ upd_ship(struct shpstr *sp, int etus,
|
|||
if ((eff = sp->shp_effic - etus / 5) < SHIP_MINEFF) {
|
||||
wu(0, sp->shp_own,
|
||||
"%s lost to lack of maintenance\n", prship(sp));
|
||||
makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x,
|
||||
sp->shp_y);
|
||||
makelost(EF_SHIP, sp->shp_own, sp->shp_uid,
|
||||
sp->shp_x, sp->shp_y);
|
||||
sp->shp_own = 0;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue