]> git.pond.sub.org Git - empserver/commitdiff
(cou_ca, nat_ca, ef_init_srv): Make selectors relations and rejects
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 18 May 2006 19:20:16 +0000 (19:20 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 18 May 2006 19:20:16 +0000 (19:20 +0000)
visible to mortals in cou_ca[].

src/lib/global/nsc.c
src/lib/subs/fileinit.c

index ee730314225d4a2dd20c50213e47932f5c8949aa..5b14ce30dfb33256737ce1003c0a6b13980b1bb5 100644 (file)
@@ -487,19 +487,21 @@ struct castr trade_ca[] = {
 
 struct castr nat_ca[] = {
     /*
-     * Keep selectors cnum, stat and cname at the beginning.
-     * ef_init_srv() makes their copies in cou_ca[] accessible for
-     * mortals.
+     * Keep selectors cnum, stat, cname, relations and rejects at the
+     * beginning.  ef_init_srv() makes their copies in cou_ca[]
+     * accessible for mortals.
      * It should also make tech, research, education and happiness
      * available, but can't express the obfuscation necessary for
      * foreign levels.
-     * It should also make relations available, but can't express how
-     * to obey HIDDEN.
      */
     {NSC_NATID, 0, 0, fldoff(natstr, nat_cnum), "cnum", EF_NATION},
     {NSC_SITYPE(nat_status), 0, 0, fldoff(natstr, nat_stat), "stat",
      EF_NATION_STATUS},
     {NSC_STRINGY, 0, 20, fldoff(natstr, nat_cnam), "cname", EF_BAD},
+    {NSC_HIDDEN, 0, MAXNOC, fldoff(natstr, nat_relate), "relations",
+     EF_NATION_RELATIONS},
+    {NSC_UCHAR, 0, MAXNOC, fldoff(natstr, nat_rejects), "rejects",
+     EF_BAD},
     {NSC_STRINGY, NSC_DEITY, 20, fldoff(natstr, nat_pnam), "passwd", EF_BAD},
     {NSC_STRINGY, 0, 32, fldoff(natstr, nat_hostaddr), "ip", EF_BAD},
     {NSC_STRINGY, 0, 512, fldoff(natstr, nat_hostname), "hostname", EF_BAD},
@@ -527,13 +529,9 @@ struct castr nat_ca[] = {
      EF_BAD},
     {NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_HLEV]), "happiness",
      EF_BAD},
-    {NSC_HIDDEN, 0, MAXNOC, fldoff(natstr, nat_relate), "relations",
-     EF_NATION_RELATIONS},
-    /* should show mortals whether there's contact (obvious from relations?) */
+    /* mortals know there's contact (relations show), but not how strong */
     {NSC_UCHAR, NSC_DEITY, MAXNOC, fldoff(natstr, nat_contact), "contacts",
      EF_BAD},
-    {NSC_UCHAR, 0, MAXNOC, fldoff(natstr, nat_rejects), "rejects",
-     EF_BAD},
     /* FIXME nat_priorities[] */
     {NSC_LONG, NSC_BITS, 0, fldoff(natstr, nat_flags), "flags",
      EF_NATION_FLAGS},
index 0f13a7370cad1db5367f54d70e6739b035169a15..57ed53e1de933481940c5fea12e255ca79b30788 100644 (file)
@@ -73,7 +73,7 @@ ef_init_srv(void)
 
     for (i = 0; nat_ca[i].ca_name; i++) {
        cou_ca[i] = nat_ca[i];
-       cou_ca[i].ca_flags |= NSC_CONST | (i < 3 ? 0 : NSC_DEITY);
+       cou_ca[i].ca_flags |= NSC_CONST | (i < 5 ? 0 : NSC_DEITY);
     }
     cou_ca[i] = nat_ca[i];