]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/vers.c
Update copyright notice
[empserver] / src / lib / commands / vers.c
index 1be749c45564c234606b807029916b9664d087af..7de563f1a0230783384c3dbfe5c88269f3ad351e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
  *     Thomas Ruschak
  *     Ken Stevens
  *     Steve McClure
- *     Ron Koenderink, 2005
- *     Markus Armbruster, 2005
+ *     Ron Koenderink, 2005-2006
+ *     Markus Armbruster, 2005-2007
  */
 
 #include <config.h>
 
-#include <stdio.h>
-#include <time.h>
-#include "misc.h"
-#include "player.h"
-#include "version.h"
-#include "ship.h"
-#include "optlist.h"
 #include "commands.h"
-#include "file.h"
+#include "nuke.h"
+#include "optlist.h"
+#include "ship.h"
+#include "version.h"
 
 static void show_custom(void);
 static void show_opts(int val);
@@ -65,13 +61,15 @@ vers(void)
     pr("By default, countries use %s coordinate system.\n",
        (players_at_00) ? "the deity's" : "their own");
     pr("\n");
-    pr("An Empire time unit is %d second%s long.\n",
-       s_p_etu, s_p_etu != 1 ? "s" : "");
-    pr("Use the 'update' command to find out the time of the next update.\n");
+    pr("Use the 'show' command to find out the time of the next update.\n");
     pr("The current time is %19.19s.\n", ctime(&now));
     pr("An update consists of %d empire time units.\n", etu_per_update);
     pr("Each country is allowed to be logged in %d minutes a day.\n",
        m_m_p_d);
+    if (*game_days != 0)
+       pr("Game days are %s\n", game_days);
+    if (*game_hours != 0)
+       pr("Game hours are %s\n", game_hours);
     pr("It takes %.2f civilians to produce a BTU in one time unit.\n",
        (1.0 / (btu_build_rate * 100.0)));
     pr("\n");
@@ -95,11 +93,13 @@ vers(void)
 
     pr("Banks pay $%.2f in interest per 1000 gold bars per etu.\n",
        bankint * 1000.0);
-    pr("1000 civilians generate $%.2f, uncompensated workers $%.2f each time unit.\n", 1000.0 * money_civ, 1000.0 * money_uw);
+    pr("1000 civilians generate $%.2f, uncompensated workers $%.2f each time unit.\n",
+       1000.0 * money_civ, 1000.0 * money_uw);
     pr("1000 active military cost $%.2f, reserves cost $%.2f.\n",
        -money_mil * 1000.0, -money_res * 1000.0);
     if (rollover_avail_max)
-       pr("Up to %d avail can roll over an update.\n", rollover_avail_max);
+       pr("Up to %d avail can roll over an update.\n",
+          rollover_avail_max);
     if (opt_SLOW_WAR)
        pr("Declaring war will cost you $%i\n\n", War_Cost);
     pr("Happiness p.e. requires 1 happy stroller per %d civ.\n",
@@ -109,9 +109,11 @@ vers(void)
     pr("Happiness is averaged over %d time units.\n", (int)hap_avg);
     pr("Education is averaged over %d time units.\n", (int)edu_avg);
     if (opt_ALL_BLEED == 0)
-       pr("The technology/research boost you get from your allies is %.2f%%.\n", 100.0 / ally_factor);
+       pr("The technology/research boost you get from your allies is %.2f%%.\n",
+          100.0 / ally_factor);
     else
-       pr("The technology/research boost you get from the world is %.2f%%.\n", 100.0 / ally_factor);
+       pr("The technology/research boost you get from the world is %.2f%%.\n",
+          100.0 / ally_factor);
 
     pr("Nation levels (tech etc.) decline 1%% every %d time units.\n",
        (int)(level_age_rate));
@@ -129,8 +131,8 @@ vers(void)
     }
     pr("\n");
     pr("\t\t\t\tSectors\tShips\tPlanes\tUnits\n");
-    pr("Maximum mobility\t\t%d\t%d\t%d\t%d\n", sect_mob_max,
-       ship_mob_max, plane_mob_max, land_mob_max);
+    pr("Maximum mobility\t\t%d\t%d\t%d\t%d\n",
+       sect_mob_max, ship_mob_max, plane_mob_max, land_mob_max);
     pr("Max mob gain per update\t\t%d\t%d\t%d\t%d\n",
        (int)(sect_mob_scale * (float)etu_per_update),
        (int)(ship_mob_scale * (float)etu_per_update),
@@ -160,27 +162,39 @@ vers(void)
           -(etu_per_update / sect_mob_neg_factor));
     pr("\n");
     if (opt_FUEL)
-       pr("For ships and land units, fuelu makes %d mobility.\n\n", fuel_mult);
+       pr("For ships and land units, fuelu makes %d mobility.\n\n",
+          fuel_mult);
     pr("Ships on autonavigation may use %i cargo holds per ship.\n", TMAX);
     if (opt_TRADESHIPS) {
-       pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_1_dist, (float)(trade_1 * 100.0));
-       pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_2_dist, (float)(trade_2 * 100.0));
-       pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_3_dist, (float)(trade_3 * 100.0));
-       pr("Cashing in trade-ships with an ally nets you a %.1f%% bonus.\n", trade_ally_bonus * 100.0);
-       pr("Cashing in trade-ships with an ally nets your ally a %.1f%% bonus.\n\n", trade_ally_cut * 100.0);
+       pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n",
+          trade_1_dist, trade_1 * 100.0);
+       pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n",
+          trade_2_dist, trade_2 * 100.0);
+       pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n",
+          trade_3_dist, trade_3 * 100.0);
+       pr("Cashing in trade-ships with an ally nets you a %.1f%% bonus.\n",
+          trade_ally_bonus * 100.0);
+       pr("Cashing in trade-ships with an ally nets your ally a %.1f%% bonus.\n\n",
+          trade_ally_cut * 100.0);
     }
     if (opt_MARKET) {
-       pr("The tax you pay on selling things on the trading block is %.1f%%\n", (1.00 - tradetax) * 100.0);
-       pr("The tax you pay on buying commodities on the market is %.1f%%\n", (buytax - 1.00) * 100.0);
-       pr("The amount of time to bid on commodities is %d seconds.\n", MARK_DELAY);
-       pr("The amount of time to bid on a unit is %d seconds.\n\n", TRADE_DELAY);
+       pr("The tax you pay on selling things on the trading block is %.1f%%\n",
+          (1.00 - tradetax) * 100.0);
+       pr("The tax you pay on buying commodities on the market is %.1f%%\n",
+          (buytax - 1.00) * 100.0);
+       pr("The amount of time to bid on commodities is %d seconds.\n",
+          MARK_DELAY);
+       pr("The amount of time to bid on a unit is %d seconds.\n\n",
+          TRADE_DELAY);
     }
 
     if (!ef_nelem(EF_NUKE_CHR))
        pr("Nukes are disabled.\n");
     else if (drnuke_const > MIN_DRNUKE_CONST) {
-       pr("In order to build a nuke, you need %1.2f times the tech level in research\n", drnuke_const);
-       pr("\tExample: In order to build a 300 tech nuke, you need %d research\n\n", (int)(300.0 * drnuke_const));
+       pr("In order to build a nuke, you need %1.2f times the tech level in research\n",
+          drnuke_const);
+       pr("\tExample: In order to build a 300 tech nuke, you need %d research\n\n",
+          (int)(300.0 * drnuke_const));
     }
 
     pr("Fire ranges are scaled by %.2f.\n", fire_range_factor);
@@ -188,7 +202,7 @@ vers(void)
     pr("Torpedo damage is 2d%d+%d.\n", torpedo_damage, torpedo_damage - 2);
     pr("The attack factor for para & assault troops is %0.2f.\n",
        assault_penalty);
-    pr("%0.f%% of fallout leaks into each surrounding sector.\n",
+    pr("%.0f%% of fallout leaks into each surrounding sector.\n",
        fallout_spread * 100.0 * MIN(24, etu_per_update));
     pr("Fallout decays by %.0f%% per update\n",
        100.0 - (decay_per_etu + 6.0) * fallout_spread * MIN(24, etu_per_update) * 100.0);
@@ -218,9 +232,9 @@ vers(void)
     show_opts(0);
     pr("\n\nSee \"info Options\" for a detailed list of options and descriptions.\n");
     show_custom();
-    pr("\nThe person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n\n",
+    pr("\nThe person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n",
        privname, privlog);
-    pr("You can get your own copy of the source from "
+    pr("\nYou can get your own copy of the source from "
        "http://www.wolfpackempire.com/\n\n");
     pr("%s", legal);
     return RET_OK;