]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/nsc.c
Update copyright notice
[empserver] / src / lib / common / nsc.c
index 55fc237e64826058817d5bcedabad0995f2a09eb..82bd86c0c72a96681df62d8c86b684973298af1e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@
  *  nsc.c: Empire selection global structures
  *
  *  Known contributors to this file:
- *     Markus Armbruster, 2004-2013
+ *     Markus Armbruster, 2004-2014
  */
 
 /*
@@ -231,26 +231,11 @@ struct castr ship_ca[] = {
 #define CURSTR struct shpstr
     NSC_GENITEM(EF_SHIP, EF_SHIP_CHR),
     {"fleet", fldoff(shp_fleet), NSC_STRINGY, 1, NULL, EF_BAD, 0},
-    {"xstart", fldoff(shp_destx[0]), NSC_XCOORD, 0, NULL, EF_BAD, 0},
-    {"xend", fldoff(shp_destx[1]), NSC_XCOORD, 0, NULL, EF_BAD, 0},
-    {"ystart", fldoff(shp_desty[0]), NSC_YCOORD, 0, NULL, EF_BAD, 0},
-    {"yend", fldoff(shp_desty[1]), NSC_YCOORD, 0, NULL, EF_BAD, 0},
-    {"cargostart", fldoff(shp_tstart), NSC_SITYPE(i_type), TMAX, NULL,
-     EF_ITEM, 0},
-    {"cargoend", fldoff(shp_tend), NSC_SITYPE(i_type), TMAX, NULL,
-     EF_ITEM, 0},
-    {"amtstart", fldoff(shp_lstart), NSC_SHORT, TMAX, NULL, EF_BAD, 0},
-    {"amtend", fldoff(shp_lend), NSC_SHORT, TMAX, NULL, EF_BAD, 0},
-    {"autonav", fldoff(shp_autonav), NSC_UCHAR, 0, NULL, EF_BAD, 0},
     NSC_IVEC(fldoff(shp_item), ""),
     {"pstage", fldoff(shp_pstage), NSC_SHORT, 0, NULL,
      EF_PLAGUE_STAGES, NSC_DEITY},
     {"ptime", fldoff(shp_ptime), NSC_SHORT, 0, NULL, EF_BAD, NSC_DEITY},
     {"access", fldoff(shp_access), NSC_SHORT, 0, NULL, EF_BAD, 0},
-    {"mquota", fldoff(shp_mobquota), NSC_UCHAR, 0, NULL, EF_BAD, 0},
-    {"path", fldoff(shp_path), NSC_STRINGY, MAXSHPPATH, NULL, EF_BAD, 0},
-    /* follow can point to dead ship; avoid ca_table for now */
-    {"follow", fldoff(shp_follow), NSC_INT, 0, NULL, EF_BAD, 0},
     {"name", fldoff(shp_name), NSC_STRINGY, MAXSHPNAMLEN, NULL,
      EF_BAD, 0},
     /* should let builder access xbuilt, ybuilt, but can't express that: */
@@ -407,6 +392,7 @@ struct castr lchr_ca[] = {
 struct castr nuke_ca[] = {
 #define CURSTR struct nukstr
     NSC_GENITEM(EF_NUKE, EF_NUKE_CHR),
+    {"stockpile", fldoff(nuk_stockpile), NSC_STRINGY, 1, NULL, EF_BAD, 0},
     {"plane", fldoff(nuk_plane), NSC_INT, 0, NULL, EF_PLANE, 0},
     {NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0}
 #undef CURSTR
@@ -431,24 +417,6 @@ struct castr nchr_ca[] = {
 #undef CURSTR
 };
 
-struct castr treaty_ca[] = {
-#define CURSTR struct trtstr
-    {"uid", fldoff(trt_uid), NSC_INT, 0, NULL, EF_TREATY, 0},
-    {"timestamp", fldoff(trt_timestamp), NSC_TIME, 0, NULL,
-     EF_BAD, NSC_EXTRA},
-    {"cna", fldoff(trt_cna), NSC_NATID, 0, NULL, EF_NATION, 0},
-    {"cnb", fldoff(trt_cnb), NSC_NATID, 0, NULL, EF_NATION, 0},
-    {"status", fldoff(trt_status), NSC_CHAR, 0, NULL,
-     EF_AGREEMENT_STATUS, 0},
-    {"acond", fldoff(trt_acond), NSC_SHORT, 0, NULL,
-     EF_TREATY_FLAGS, NSC_BITS},
-    {"bcond", fldoff(trt_bcond), NSC_SHORT, 0, NULL,
-     EF_TREATY_FLAGS, NSC_BITS},
-    {"exp", fldoff(trt_exp), NSC_TIME, 0, NULL, EF_BAD, 0},
-    {NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0}
-#undef CURSTR
-};
-
 struct castr loan_ca[] = {
 #define CURSTR struct lonstr
     {"uid", fldoff(l_uid), NSC_INT, 0, NULL, EF_LOAN, 0},
@@ -560,7 +528,7 @@ struct castr cou_ca[] = {
     {"passwd", fldoff(nat_pnam), NSC_STRINGY, 20, NULL,
      EF_BAD, NSC_DEITY | NSC_EXTRA},
     {"ip", fldoff(nat_hostaddr), NSC_STRINGY, 46, NULL, EF_BAD, 0},
-    {"hostname", fldoff(nat_hostname), NSC_STRINGY, 512, NULL, EF_BAD, 0},
+    {"hostname", 0, NSC_STRINGY, 0, NULL, EF_BAD, 0}, /* deprecated */
     {"userid", fldoff(nat_userid), NSC_STRINGY, 32, NULL, EF_BAD, 0},
     {"xcap", fldoff(nat_xcap), NSC_XCOORD, 0, NULL, EF_BAD, 0},
     {"ycap", fldoff(nat_ycap), NSC_YCOORD, 0, NULL, EF_BAD, 0},
@@ -587,8 +555,8 @@ struct castr cou_ca[] = {
      EF_BAD, 0},
     {"happiness", fldoff(nat_level[NAT_HLEV]), NSC_FLOAT, 0, NULL,
      EF_BAD, 0},
-    {"relations", fldoff(nat_relate), NSC_HIDDEN, MAXNOC, NULL,
-     EF_NATION_RELATIONS, NSC_EXTRA},
+    {"relations", fldoff(nat_relate), NSC_UCHAR, MAXNOC, NULL,
+     EF_NATION_RELATIONS, NSC_EXTRA | NSC_HIDDEN},
     /* mortals know there's contact (relations show), but not how strong */
     {"contacts", fldoff(nat_contact), NSC_UCHAR, MAXNOC, NULL,
      EF_BAD, NSC_DEITY | NSC_EXTRA},