]> granicus.if.org Git - nethack/commitdiff
couple of #tipping bits (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 22 Feb 2007 05:16:58 +0000 (05:16 +0000)
committernethack.rankin <nethack.rankin>
Thu, 22 Feb 2007 05:16:58 +0000 (05:16 +0000)
     Adjust some post-3.4.3 code.  Give feedback if you try to use #tip
on a statue--since it's a form of container, simple "nothing happens"
seems inappropriate.  (Unfortunately, the alternative used here isn't
much better.)  Also, you can use #tip to empty an inventory container
while swallowed; it was giving inappropriate levitation and drop-on-altar
behavior in that situation.

src/pickup.c

index 6a4c3f4e3f3fcbaebc68e879303117c21db3ec05..a67f9e9c70f8df40ef7835cf7b78bfc9d19d0a68 100644 (file)
@@ -2642,6 +2642,8 @@ dotip()
     /* anything not covered yet */
     if (cobj->oclass == POTION_CLASS)  /* can't pour potions... */
        pline_The("%s %s securely sealed.", xname(cobj), otense(cobj, "are"));
+    else if (cobj->otyp == STATUE)
+       pline("Nothing interesting happens.");
     else
        pline(nothing_happens);
     return 0;
@@ -2732,6 +2734,7 @@ struct obj *box;  /* or bag */
        int held = carried(box);
        long loss = 0L;
 
+       if (u.uswallow) highdrop = altarizing = FALSE;
        box->cknown = 1;
        pline("%s out%c",
              box->cobj->nobj ? "Objects spill" : "An object spills",