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.
6.5 KiB
6.5 KiB