GOLDOBJ compat (main trunk only)

This patch gives game and savefile compatibility
whether GOLDOBJ is defined or not.

You can build with GOLDOBJ defined or not, and
still load your saved games. Rebuild with the
opposite, and load the same game.

That way GOLDOBJ can be experimented with
more easily.

1. Leave the "you" struct and the "monst"
   struct the same under the hood between
   GOLDOBJ and !GOLDOBJ.

2. Always write out gold as an
   object on the player and monster
   inventory chains.

On a restore of the savefile with GOLDOBJ
not defined,  take the gold objects out of
the inventory chains and put it into u.ugold
or mtmp->mgold as appropriate.

On a restore of the savefile with GOLDOBJ
defined, nothing special is done.
This commit is contained in:
nethack.allison
2003-04-11 22:32:08 +00:00
parent b39599719e
commit e1aa6d5148
7 changed files with 83 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 0
#define EDITLEVEL 1
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2003"