/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
- * Ken Stevens, Steve McClure
+ * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Ken Stevens, Steve McClure, Markus Armbruster
*
- * This program is free software; you can redistribute it and/or modify
+ * Empire is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ---
*
* Jeff Bailey, 1990
* Steve McClure, 1996
* Ron Koenderink, 2005-2009
- * Markus Armbruster, 2006-2008
+ * Markus Armbruster, 2006-2010
*/
#include <config.h>
{
if (tlev < buil_tower_bt)
return;
- pr("Bridge Towers require %g tech, %d hcm, 0 workers,\n",
+ pr("Bridge towers require %g tech, %d hcm, 0 workers,\n",
buil_tower_bt, buil_tower_bh);
pr("%d available workforce, and cost $%g\n",
(SCT_BLD_WORK(0, buil_tower_bh) * SCT_MINEFF + 99) / 100,
{
int i, first;
- pr("sector type cost to des cost for 1%% eff lcms for 1%% hcms for 1%%\n");
+ pr(" desig build 100%% eff maint\n"
+ "sector type $ lcm hcm $ $\n");
for (i = 0; dchr[i].d_name; i++) {
if (dchr[i].d_mnem == 0)
continue;
- if (dchr[i].d_cost < 0)
+ if (dchr[i].d_mob0 < 0)
continue;
- if ((dchr[i].d_cost > 0) || (dchr[i].d_build != 1) ||
- (dchr[i].d_lcms > 0) || (dchr[i].d_hcms > 0)) {
- pr("%-14c %-14d %-17d %-14d %d\n",
- dchr[i].d_mnem, dchr[i].d_cost, dchr[i].d_build,
- dchr[i].d_lcms, dchr[i].d_hcms);
- }
+ if (dchr[i].d_cost <= 0 && dchr[i].d_build == 1
+ && dchr[i].d_lcms == 0 && dchr[i].d_hcms == 0
+ && dchr[i].d_maint == 0)
+ continue; /* the usual, skip */
+ pr("%c %-21.21s", dchr[i].d_mnem, dchr[i].d_name);
+ if (dchr[i].d_cost < 0)
+ pr(" can't");
+ else
+ pr(" %5d", dchr[i].d_cost);
+ pr(" %5d%5d %5d %5d\n",
+ 100 * dchr[i].d_lcms,
+ 100 * dchr[i].d_hcms,
+ 100 * dchr[i].d_build,
+ dchr[i].d_maint * etu_per_update);
}
- pr("other 0 1 0 0\n");
+ pr("any other 0 0 0 100 0\n");
first = 1;
for (i = 0; intrchr[i].in_name; i++) {
if (rpt[i].r_newspage == N_NOTUSED)
continue;
pr("%-2d %-20.20s %4d\n", rpt[i].r_uid,
- page_headings[rpt[i].r_newspage].name, rpt[i].r_good_will);
+ page_headings[rpt[i].r_newspage].name, rpt[i].r_good_will);
for (j = 0; j < NUM_RPTS; j++)
pr(" %s\n", rpt[i].r_newstory[j]);
}
(time->tm_isdst ? tzi.DaylightBias : tzi.StandardBias));
nn = _snprintf(buf + n, sizeof(buf) - n, " %+03d%02d",
- time_offset/60, abs(time_offset) % 60);
+ time_offset / 60, abs(time_offset) % 60);
if (CANT_HAPPEN(nn <= 0 || nn + n >= sizeof(buf)))
buf[0] = 0;
#else
size_t n = strftime(buf, sizeof(buf), "%a, %d %b %Y %T %z",
- localtime(&t));
+ localtime(&t));
if (CANT_HAPPEN(n == 0))
buf[0] = 0;
#endif