update: Drop produce() return value and parameters work, amount

Since changing *sp is safe now, we can move the update of
sp->sct_avail into produce().  This frees the return value; use it to
return the amount produced.  Drop the parameters.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-06-04 08:12:12 +02:00
parent 688c8b736b
commit 0efa8fa7a1
3 changed files with 10 additions and 13 deletions

View file

@ -704,8 +704,7 @@ extern int upd_slmilcosts(natid, int);
extern void prepare_sects(int, struct bp *);
extern int bank_income(struct sctstr *, int);
/* produce.c */
extern int produce(struct natstr *, struct sctstr *, int, int,
int, int *, int *);
extern int produce(struct natstr *, struct sctstr *, int, int, int *);
extern int prod_materials_cost(struct pchrstr *, short[], int *);
extern int prod_resource_limit(struct pchrstr *, unsigned char *);
extern double prod_eff(int, float);