missing altar drop messages
Most callers of dropx did not check for altars, but should have. Rather than add such checks, I moved the check from drop to dropx. I also found several callers of dropx that could generate out-of-order messages for some cases (not new) and fixed them. FYI - callers of dropy don't seem to want altar checks or already do them.
This commit is contained in:
@@ -329,6 +329,7 @@ non-moving monster are not affected by liquid
|
||||
'A' command wouldn't remove cursed item from quiver or alternate weapon slot
|
||||
'A' command behaved differently depending on menustyle when non-weapons were
|
||||
present in the quiver or alternate weapon inventory slots
|
||||
most cases of the hero dropping things need to check for dropping on an altar
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1768,9 +1768,9 @@ struct obj *obj;
|
||||
char buf[BUFSZ];
|
||||
|
||||
if (Glib) {
|
||||
dropx(obj);
|
||||
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
||||
makeplural(body_part(FINGER)));
|
||||
dropx(obj);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1778,9 +1778,9 @@ struct obj *obj;
|
||||
if ((obj->cursed || Fumbling) && !rn2(2)) {
|
||||
check_unpaid(obj);
|
||||
obj->spe--;
|
||||
dropx(obj);
|
||||
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
||||
makeplural(body_part(FINGER)));
|
||||
dropx(obj);
|
||||
return;
|
||||
}
|
||||
otmp = getobj(lubricables, "grease");
|
||||
|
||||
12
src/do.c
12
src/do.c
@@ -492,10 +492,8 @@ register struct obj *obj;
|
||||
hitfloor(obj);
|
||||
return(1);
|
||||
}
|
||||
if (IS_ALTAR(levl[u.ux][u.uy].typ)) {
|
||||
doaltarobj(obj); /* set bknown */
|
||||
} else
|
||||
if(flags.verbose) You("drop %s.", doname(obj));
|
||||
if (!IS_ALTAR(levl[u.ux][u.uy].typ) && flags.verbose)
|
||||
You("drop %s.", doname(obj));
|
||||
}
|
||||
dropx(obj);
|
||||
return(1);
|
||||
@@ -514,7 +512,11 @@ register struct obj *obj;
|
||||
if (obj->oclass == COIN_CLASS) flags.botl = 1;
|
||||
freeinv(obj);
|
||||
#endif
|
||||
if (!u.uswallow && ship_object(obj, u.ux, u.uy, FALSE)) return;
|
||||
if (!u.uswallow) {
|
||||
if (ship_object(obj, u.ux, u.uy, FALSE)) return;
|
||||
if (IS_ALTAR(levl[u.ux][u.uy].typ))
|
||||
doaltarobj(obj); /* set bknown */
|
||||
}
|
||||
dropy(obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,9 +84,9 @@ register struct obj *pen;
|
||||
You("need hands to be able to write!");
|
||||
return 0;
|
||||
} else if (Glib) {
|
||||
dropx(pen);
|
||||
pline("%s from your %s.",
|
||||
Tobjnam(pen, "slip"), makeplural(body_part(FINGER)));
|
||||
dropx(pen);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user