Remove budget priorities:

(budg, player_coms): Remove command arguments.
(PRI_SMAINT, PRI_PMAINT, PRI_LMAINT, PRI_SBUILD, PRI_PBUILD)
(PRI_LBUILD, PRI_MAX): Remove.
(natstr): Remove member nat_priorities.
(add, main): Remove its initialization.
(budg, cal_call, prexpense, prod, update_main, upd_land, upd_plane)
(upd_buildeff, produce_sect, upd_ship): Simplify.
(produce_sect): Last parameter now superflous, remove & simplify.
(change_prio, do_prod): Unused, remove.

(budg): Move land units output down, to match update sequence.
This commit is contained in:
Markus Armbruster 2006-05-29 20:43:30 +00:00
parent 26110320c0
commit 520446ef39
14 changed files with 170 additions and 449 deletions

View file

@ -30,6 +30,7 @@
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998
* Markus Armbruster, 2006
*/
#include <config.h>
@ -101,16 +102,14 @@ upd_plane(struct plnstr *pp, int etus,
int mult, cost, eff;
if (build == 1) {
if (np->nat_priorities[PRI_PBUILD] == 0 || np->nat_money < 0)
return;
planerepair(pp, np, bp, etus);
if (np->nat_money >= 0)
planerepair(pp, np, bp, etus);
} else {
mult = 1;
if (np->nat_level[NAT_TLEV] < pp->pln_tech * 0.85)
mult = 2;
cost = -(mult * etus * MIN(0.0, pcp->pl_cost * money_plane));
if ((np->nat_priorities[PRI_PMAINT] == 0 || np->nat_money < cost)
&& !player->simulation) {
if (np->nat_money < cost && !player->simulation) {
if ((eff = pp->pln_effic - etus / 5) < PLANE_MINEFF) {
wu(0, pp->pln_own,
"%s lost to lack of maintenance\n", prplane(pp));