/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
np = getnatp(natnum);
- if (sp->sct_type == SCT_CAPIT && sp->sct_effic >= 60) {
- p_sect[SCT_CAPIT][0]++;
- p_sect[SCT_CAPIT][1] += etu;
- if (!player->simulation)
- np->nat_money -= etu;
- }
-
if (player->simulation) {
/* work on a copy, which will be discarded */
memcpy(buf, sp->sct_item, sizeof(buf));
* they all starved or were plagued off.
*/
if (vec[I_CIVIL] == 0 && vec[I_MILIT] == 0 &&
- !has_units(sp->sct_x, sp->sct_y, sp->sct_own, 0)) {
+ !has_units(sp->sct_x, sp->sct_y, sp->sct_own, NULL)) {
if (!player->simulation) {
makelost(EF_SECTOR, sp->sct_own, 0, sp->sct_x, sp->sct_y);
sp->sct_own = 0;
desig = sp->sct_type;
+ if (dchr[desig].d_maint) {
+ cost = etu * dchr[desig].d_maint;
+ p_sect[SCT_MAINT][0]++;
+ p_sect[SCT_MAINT][1] += cost;
+ if (!player->simulation)
+ np->nat_money -= cost;
+ }
+
if ((sp->sct_effic < 100 || sp->sct_type != sp->sct_newtype) &&
np->nat_money >= 0) {
neweff = upd_buildeff(np, sp, &work, vec, etu, &desig, sctwork,