Represent logged in time in seconds rather than minutes

This simplifies things.  In particular, it gets rid of random rounding
in getcommand(), which created a variation in the nightly build
depending on whether the update starts before or after the deity logs
out.

Replace struct natstr member nat_minused by nat_timeused, and update
cou_ca[] accordingly (this affects xdump nat).  Replace player member
minleft by timeleft, and getminleft() by gettimeleft().  Update
getcommand(), daychange(), player_main(), status() accordingly, taking
care not to change player output.  Change edit country key 'u' to work
in seconds.
This commit is contained in:
Ron Koenderink 2008-10-28 08:48:25 -06:00
parent 436328f641
commit 14319b89ec
10 changed files with 40 additions and 42 deletions

View file

@ -564,7 +564,7 @@ struct castr cou_ca[] = {
{"update", fldoff(nat_update), NSC_CHAR, 0, NULL, EF_BAD, 0},
{"tgms", fldoff(nat_tgms), NSC_USHORT, 0, NULL, EF_BAD, 0},
{"ann", fldoff(nat_ann), NSC_USHORT, 0, NULL, EF_BAD, 0},
{"minused", fldoff(nat_minused), NSC_USHORT, 0, NULL, EF_BAD, 0},
{"timeused", fldoff(nat_timeused), NSC_INT, 0, NULL, EF_BAD, 0},
{"btu", fldoff(nat_btu), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"access", fldoff(nat_access), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"milreserve", fldoff(nat_reserve), NSC_LONG, 0, NULL, EF_BAD, 0},