]> git.pond.sub.org Git - empserver/commitdiff
(produce, prod): Remove some code related to depletion that has no
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 May 2004 17:26:53 +0000 (17:26 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 May 2004 17:26:53 +0000 (17:26 +0000)
effect and makes no sense.

src/lib/commands/prod.c
src/lib/update/produce.c

index 8e676bc8c7fb6f3bbe236e53d15404328d8438cf..7cfd86c646a4c919a319d0edb265c6cdea280f4d 100644 (file)
@@ -80,7 +80,6 @@ prod(void)
     int cost;
     int i;
     int max;                   /* production w/infinate materials */
     int cost;
     int i;
     int max;                   /* production w/infinate materials */
-    double maxtake;
     int nsect;
     double take;
     double mtake;
     int nsect;
     double take;
     double mtake;
@@ -227,11 +226,6 @@ prod(void)
            unit_work++;
            resource = ((s_char *)&sect) + pp->p_nrndx;
            p_e = (*resource * p_e) / 100.0;
            unit_work++;
            resource = ((s_char *)&sect) + pp->p_nrndx;
            p_e = (*resource * p_e) / 100.0;
-           if (pp->p_nrdep > 0) {
-               maxtake = (*resource * 100.0) / pp->p_nrdep;
-               if (p_e > maxtake)
-                   p_e = maxtake;
-           }
        }
        /*
         * production effic.
        }
        /*
         * production effic.
index c2580b10a6759bb9512d38e3ad8b5e6776e1f0b7..5094ea144fc0b849f86edf5d0627f79bf47ef7ed 100644 (file)
@@ -64,7 +64,6 @@ produce(struct natstr *np, struct sctstr *sp, short *vec, int work,
     int output;
     int actual;
     int unit_work;
     int output;
     int actual;
     int unit_work;
-    double depend;
     int item;
     int worker_limit;
     int material_limit;
     int item;
     int worker_limit;
     int material_limit;
@@ -89,12 +88,6 @@ produce(struct natstr *np, struct sctstr *sp, short *vec, int work,
        unit_work++;
        resource = ((s_char *)sp) + product->p_nrndx;
        p_e = (*resource * p_e) / 100.0;
        unit_work++;
        resource = ((s_char *)sp) + product->p_nrndx;
        p_e = (*resource * p_e) / 100.0;
-       if (product->p_nrdep > 0) {
-           /* XXX this looks way wrong */
-           depend = (*resource * 100.0) / product->p_nrdep;
-           if (p_e > depend)
-               p_e = depend;
-       }
     }
     /*
      * determine number that can be made with
     }
     /*
      * determine number that can be made with