From: Michael Meyer Date: Wed, 11 Aug 2021 00:21:11 +0000 (-0400) Subject: Fix up msgs when dropping obj on trapdoor X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9358eb13db28e8c7d0d0ffdac89bceb92fcedb8;p=nethack Fix up msgs when dropping obj on trapdoor Messages for dropping an object on a trapdoor or hole seemed to imply they still operate by the rules of a pit (that any object on the same square as the trap is automatically inaccessible). Since this is no longer true for trapdoors and holes as of 1b7c372f, it seems misleading to say an item "tumbles into the hole" even when it doesn't fall through and stays on the current level. Even for an item which really did fall through to the level below, these messages were redundant since they were immediately followed by near-identical messages from down_gate(dokick.c). Limit the "tumbles into the pit" messages to pits only, and rely on the standard down_gate message for items which fall through a trap door or hole. --- diff --git a/src/do.c b/src/do.c index 55ed926bf..802374eba 100644 --- a/src/do.c +++ b/src/do.c @@ -245,14 +245,17 @@ flooreffects(struct obj *obj, int x, int y, const char *verb) res = water_damage(obj, NULL, FALSE) == ER_DESTROYED; } else if (u.ux == x && u.uy == y && (t = t_at(x, y)) != 0 && (uteetering_at_seen_pit(t) || uescaped_shaft(t))) { - if (Blind && !Deaf) - You_hear("%s tumble downwards.", the(xname(obj))); - else - pline("%s %s into %s %s.", The(xname(obj)), - otense(obj, "tumble"), the_your[t->madeby_u], - is_pit(t->ttyp) ? "pit" : "hole"); - if (is_hole(t->ttyp) && ship_object(obj, x, y, FALSE)) + if (is_pit(t->ttyp)) { + if (Blind && !Deaf) + You_hear("%s tumble downwards.", the(xname(obj))); + else + pline("%s into %s pit.", Tobjnam(obj, "tumble"), + the_your[t->madeby_u]); + } else if (ship_object(obj, x, y, FALSE)) { + /* ship_object will print an appropriate "the item falls + * through the hole" message, so no need to do it here. */ res = TRUE; + } } else if (obj->globby) { /* Globby things like puddings might stick together */ while (obj && (otmp = obj_nexto_xy(obj, x, y, TRUE)) != 0) {