]> git.pond.sub.org Git - empserver/commitdiff
Make add always reset the country
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 30 Oct 2011 17:46:24 +0000 (18:46 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2011 10:47:05 +0000 (11:47 +0100)
Before, add reset the country only when adding a player or a visitor.
When adding a deity or deleting a country, it set just nat_cnam,
nat_pnam and nat_state.  Has always been that way.

Because of that, a newly minted deity country could inherit all kinds
of crap from a previous user of its country number: origin, realms,
relations, telegrams, ...  Harmless if the country number has never
been used before, which is how add is generally used.

When adding a deity country, initial levels (start_education, ...) now
apply, relations start NEUTRAL instead of AT_WAR, and the usual
initial nation flags are set.

Reset on delete as well, just to get rid of the special case.

src/lib/commands/add.c

index 6bb4fdc6bf18576e4a15709e4a92ddd0d1ab6c6e..eb8a5541786d011b24d441d836f828ef068fbd28 100644 (file)
@@ -112,12 +112,7 @@ add(void)
     }
     strcpy(natp->nat_cnam, cntryname);
     strcpy(natp->nat_pnam, pname);
-    if (stat == STAT_NEW || stat == STAT_VIS)
-       nat_reset(natp, stat, 0, 0);
-    else {
-       natp->nat_stat = stat;
-       pr("No special initializations done...\n");
-    }
+    nat_reset(natp, stat, 0, 0);
     putnat(natp);
     return 0;
 }