Make GOLDOBJ unconditional.
This commit is contained in:
@@ -146,17 +146,6 @@ boolean quietly;
|
||||
|
||||
for (otmp = invent; otmp; otmp = otmp2) {
|
||||
otmp2 = otmp->nobj;
|
||||
#ifndef GOLDOBJ
|
||||
if (otmp->oclass == COIN_CLASS) {
|
||||
/* in_use gold is created by some menu operations */
|
||||
if (!otmp->in_use) {
|
||||
impossible("inven_inuse: !in_use gold in inventory");
|
||||
}
|
||||
extract_nobj(otmp, &invent);
|
||||
otmp->in_use = FALSE;
|
||||
dealloc_obj(otmp);
|
||||
} else
|
||||
#endif /* GOLDOBJ */
|
||||
if (otmp->in_use) {
|
||||
if (!quietly) pline("Finishing off %s...", xname(otmp));
|
||||
useup(otmp);
|
||||
@@ -441,9 +430,6 @@ boolean ghostly;
|
||||
/* restore monster back pointer */
|
||||
for (obj = mtmp->minvent; obj; obj = obj->nobj)
|
||||
obj->ocarry = mtmp;
|
||||
#ifndef GOLDOBJ /* GOLDOBJ-compatibility */
|
||||
put_gold_back(mtmp);
|
||||
#endif
|
||||
}
|
||||
if (mtmp->mw) {
|
||||
struct obj *obj;
|
||||
@@ -598,9 +584,6 @@ unsigned int *stuckid, *steedid;
|
||||
restore_timers(fd, RANGE_GLOBAL, FALSE, 0L);
|
||||
restore_light_sources(fd);
|
||||
invent = restobjchn(fd, FALSE, FALSE);
|
||||
#ifndef GOLDOBJ /* GOLDOBJ-compatibility */
|
||||
put_gold_back(&youmonst);
|
||||
#endif
|
||||
/* tmp_bc only gets set here if the ball & chain were orphaned
|
||||
because you were swallowed; otherwise they will be on the floor
|
||||
or in your inventory */
|
||||
@@ -1571,29 +1554,4 @@ register unsigned int len;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef GOLDOBJ /* GOLDOBJ-compatibility */
|
||||
/* used to make save & bones files be compatible with GOLDOBJ config;
|
||||
takes all of the gold objects out of the invent or mtmp->minvent
|
||||
chain and puts it into either u.ugold or mtmp->mgold */
|
||||
void
|
||||
put_gold_back(mon)
|
||||
struct monst *mon;
|
||||
{
|
||||
struct obj *goldobj;
|
||||
boolean is_hero = (mon == &youmonst);
|
||||
|
||||
/* there could be two gold objects in invent if a hangup save was
|
||||
performed while gold was in invent for Drop or container access */
|
||||
while ((goldobj = (is_hero ? carrying(GOLD_PIECE) :
|
||||
m_carrying(mon, GOLD_PIECE))) != 0) {
|
||||
extract_nobj(goldobj, is_hero ? &invent : &mon->minvent);
|
||||
if (!goldobj->in_use) {
|
||||
if (is_hero) u.ugold += goldobj->quan;
|
||||
else mon->mgold += goldobj->quan;
|
||||
}
|
||||
dealloc_obj(goldobj);
|
||||
}
|
||||
}
|
||||
#endif /*GOLDOBJ*/
|
||||
|
||||
/*restore.c*/
|
||||
|
||||
Reference in New Issue
Block a user