]> git.pond.sub.org Git - empserver/blobdiff - src/lib/global/file.c
Update copyright notice
[empserver] / src / lib / global / file.c
index f60077a6ce85abc1a620046ab2b328e658429d21..1104a528b7001393dbf658f4aecf7bef3070dda8 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
  *  file.c: Empire game data file descriptions.
  * 
  *  Known contributors to this file:
- *     Markus Armbruster, 2005
+ *     Markus Armbruster, 2005-2007
  */
 
 #include <config.h>
 
 #include <stddef.h>
-#include "misc.h"
-#include "xy.h"
+#include "commodity.h"
+#include "file.h"
+#include "game.h"
+#include "land.h"
 #include "loan.h"
+#include "lost.h"
+#include "nat.h"
+#include "news.h"
 #include "nsc.h"
 #include "nuke.h"
 #include "plane.h"
-#include "ship.h"
-#include "land.h"
+#include "power.h"
+#include "product.h"
 #include "sect.h"
+#include "ship.h"
+#include "server.h"
 #include "trade.h"
 #include "treaty.h"
-#include "file.h"
-#include "power.h"
-#include "news.h"
-#include "nat.h"
-#include "lost.h"
-#include "product.h"
-
-#include "commodity.h"
-#include "nsc.h"
 
 /* Number of elements in ARRAY.  */
 #define SZ(array) (sizeof(array) / sizeof((array)[0]))
@@ -107,7 +105,7 @@ struct empfile empfile[] = {
 
     /*
      * Keep in mind that player command arguments are matched against
-     * member name; no whitespace please.
+     * values of member name: no whitespace there, please.
      */
 
     /* Dynamic game data */
@@ -143,10 +141,16 @@ struct empfile empfile[] = {
      UNMAPPED_CACHE(struct loststr, EFF_OWNER)},
     {EF_REALM, "realm", "realms", realm_ca,
      UNMAPPED_CACHE(struct realmstr, EFF_OWNER)},
+    {EF_GAME, "game", "game", game_ca,
+     UNMAPPED_CACHE(struct gamestr, 0)},
 
     /* Static game data (configuration) */
-    {EF_SECTOR_CHR, "sect-chr", NULL, dchr_ca,
-     ARRAY_TABLE(dchr, EFF_CFG)},
+    {EF_ITEM, "item", "item.config", ichr_ca,
+     ARRAY_CACHE(ichr, EFF_CFG)},
+    {EF_PRODUCT, "product", "product.config", pchr_ca,
+     ARRAY_CACHE(pchr, EFF_CFG)},
+    {EF_SECTOR_CHR, "sect-chr", "sect.config", dchr_ca,
+     ARRAY_CACHE(dchr, EFF_CFG)},
     {EF_SHIP_CHR, "ship-chr", "ship.config", mchr_ca,
      ARRAY_CACHE(mchr, EFF_CFG)},
     {EF_PLANE_CHR, "plane-chr", "plane.config", plchr_ca,
@@ -157,12 +161,10 @@ struct empfile empfile[] = {
      ARRAY_CACHE(nchr, EFF_CFG)},
     {EF_NEWS_CHR, "news-chr", NULL, rpt_ca,
      ARRAY_TABLE(rpt, EFF_CFG)},
-    {EF_ITEM, "item", NULL, ichr_ca,
-     ARRAY_TABLE(ichr, EFF_CFG)},
-    {EF_INFRASTRUCTURE, "infrastructure", NULL, intrchr_ca,
-     ARRAY_TABLE(intrchr, EFF_CFG)},
-    {EF_PRODUCT, "product", NULL, pchr_ca,
-     ARRAY_TABLE(pchr, EFF_CFG)},
+    {EF_INFRASTRUCTURE, "infrastructure", "infra.config", intrchr_ca,
+     ARRAY_CACHE(intrchr, EFF_CFG)},
+    {EF_UPDATES, "updates", NULL, update_ca,
+     ARRAY_TABLE(update_time, EFF_CFG)},
     {EF_TABLE, "table", NULL, empfile_ca,
      ARRAY_TABLE(empfile, EFF_CFG)},
     {EF_META, "meta", NULL, mdchr_ca,