mult *= 3;
/* cost = -(mult * etus * dmin(0.0, money_land * LND_COST(lcp->l_cost, lp->lnd_tech - lcp->l_tech)));*/
cost = -(mult * etus * dmin(0.0, money_land * lcp->l_cost));
- if ((np->nat_priorities[PRI_LMAINT] == 0 ||
- np->nat_money < cost) && !player->simulation) {
+ if ((np->nat_priorities[PRI_LMAINT] == 0 || np->nat_money < cost)
+ && !player->simulation) {
if ((eff = lp->lnd_effic - etus / 5) < LAND_MINEFF) {
wu(0, lp->lnd_own,
"%s lost to lack of maintenance\n", prland(lp));
} else {
np->nat_money -= cost;
}
-/* Mil costs are now part of regular mil costs, not maint costs */
-/* np->nat_money += (int) (money_mil * etus * lnd_getmil(lp));*/
/* Grab more stuff */
if ((opt_NOFOOD == 0) && !player->simulation)
resupply_commod(lp, I_FOOD);
- getvec(VT_ITEM, vec, (s_char *)lp, EF_LAND);
if (!player->simulation) {
+ getvec(VT_ITEM, vec, (s_char *)lp, EF_LAND);
if ((n = feed_land(lp, vec, etus, &needed, 1)) > 0) {
wu(0, lp->lnd_own, "%d starved in %s%s\n",
n, prland(lp),
if (np->nat_level[NAT_TLEV] < sp->shp_tech * 0.85)
mult = 2;
cost = -(mult * etus * dmin(0.0, money_ship * mp->m_cost));
- if ((np->nat_priorities[PRI_SMAINT] == 0 ||
- np->nat_money < cost) && !player->simulation) {
+ if ((np->nat_priorities[PRI_SMAINT] == 0 || np->nat_money < cost)
+ && !player->simulation) {
if ((eff = sp->shp_effic - etus / 5) < SHIP_MINEFF) {
wu(0, sp->shp_own,
"%s lost to lack of maintenance\n", prship(sp));
np->nat_money -= cost;
}
- getvec(VT_ITEM, vec, (s_char *)sp, EF_SHIP);
+ if (!player->simulation) {
+ getvec(VT_ITEM, vec, (s_char *)sp, EF_SHIP);
+ sectp = getsectp(sp->shp_x, sp->shp_y);
- sectp = getsectp(sp->shp_x, sp->shp_y);
- if (((mp->m_flags & M_OIL) && (sectp->sct_type == SCT_WATER))
- && !player->simulation) {
- /*
- * take care of oil production
- */
- oil_gained = roundavg((vec[I_CIVIL] * etus / 10000.0)
- * sectp->sct_oil);
- vec[I_OIL] += oil_gained;
- max_oil = vl_find(V_OIL, mp->m_vtype, mp->m_vamt, mp->m_nv);
- if (vec[I_OIL] > max_oil)
- vec[I_OIL] = max_oil;
- product = &pchr[P_OIL];
- if (product->p_nrdep != 0 && oil_gained > 0) {
- resource = ((s_char *)sectp) + product->p_nrndx;
- *resource -= roundavg(oil_gained *
- product->p_nrdep / 100.0);
+ if ((mp->m_flags & M_OIL) && sectp->sct_type == SCT_WATER) {
+ /*
+ * take care of oil production
+ */
+ oil_gained = roundavg((vec[I_CIVIL] * etus / 10000.0)
+ * sectp->sct_oil);
+ vec[I_OIL] += oil_gained;
+ max_oil = vl_find(V_OIL, mp->m_vtype, mp->m_vamt, mp->m_nv);
+ if (vec[I_OIL] > max_oil)
+ vec[I_OIL] = max_oil;
+ product = &pchr[P_OIL];
+ if (product->p_nrdep != 0 && oil_gained > 0) {
+ resource = ((s_char *)sectp) + product->p_nrndx;
+ *resource -= roundavg(oil_gained *
+ product->p_nrdep / 100.0);
+ }
+ }
+ if ((mp->m_flags & M_FOOD) && sectp->sct_type == SCT_WATER) {
+ vec[I_FOOD] += ((vec[I_CIVIL] * etus) / 1000.0)
+ * sectp->sct_fertil;
}
- }
- if (((mp->m_flags & M_FOOD) && (sectp->sct_type == SCT_WATER))
- && !player->simulation) {
- sectp = getsectp(sp->shp_x, sp->shp_y);
- vec[I_FOOD] += ((vec[I_CIVIL] * etus) / 1000.0)
- * sectp->sct_fertil;
- }
-/* Military costs are now part of regular military costs, not ship costs */
-/* np->nat_money += (int) (etus * vec[I_MILIT] * money_mil);*/
- if (!player->simulation) {
if ((n = feed_ship(sp, vec, etus, &needed, 1)) > 0) {
wu(0, sp->shp_own, "%d starved on %s\n", n, prship(sp));
if (n > 10)