]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/prod.c
Sectors need space for items, deliveries and distribution thresholds.
[empserver] / src / lib / commands / prod.c
index 21d2bffb3a1eefd4fb223389f8ef8f9b9886afa6..6b78a7d5dde319268a1257921247a4fe0490b1e2 100644 (file)
@@ -264,8 +264,7 @@ prod(void)
            if (*amount == 0)
                totcomp++;
            else {
-               used = min(used, (int)(getvar((int)*comp, (s_char *)&sect,
-                                             EF_SECTOR) / *amount));
+               used = min(used, sect.sct_item[(int)*comp] / *amount);
                totcomp += *amount;
            }
            ++comp;
@@ -293,8 +292,7 @@ prod(void)
            if (real < 0.0)
                real = 0.0;
            /* production backlog? */
-           if ((there =
-                getvar((int)vtype, (s_char *)&sect, EF_SECTOR)) >= 9999) {
+           if ((there = sect.sct_item[vtype]) >= 9999) {
                there = 9999;
            }
            act = min(act, (9999 - there));