]> granicus.if.org Git - nethack/commitdiff
Give a hint that containers are looted instead of opened
authorPasi Kallinen <paxed@alt.org>
Thu, 2 Jun 2016 15:11:35 +0000 (18:11 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 2 Jun 2016 15:11:41 +0000 (18:11 +0300)
include/extern.h
src/lock.c
src/pickup.c

index 4b58776f5747caaf302f6126396a03321d0eaf64..e21ba04ec01bcf31e2477fd514b2770a2ed91515 100644 (file)
@@ -1769,6 +1769,7 @@ E int FDECL(query_objlist, (const char *, struct obj **, int,
                             menu_item **, int, boolean (*)(OBJ_P)));
 E struct obj *FDECL(pick_obj, (struct obj *));
 E int NDECL(encumber_msg);
+E int FDECL(container_at, (int, int, BOOLEAN_P));
 E int NDECL(doloot);
 E boolean FDECL(container_gone, (int (*)(OBJ_P)));
 E boolean NDECL(u_handsy);
index f899f9a0b2b53796d2bf53eb66a421a8789c72e6..6770556a6e74c939dbcb5a13a09db7584fbd35a3 100644 (file)
@@ -618,6 +618,9 @@ int x, y;
             There("is no obvious way to open the drawbridge.");
         else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
             pline_The("drawbridge is already open.");
+        else if (container_at(cc.x, cc.y, TRUE))
+            pline("%s like something lootable over there.",
+                  Blind ? "Feels" : "Seems");
         else
             You("%s no door there.", Blind ? "feel" : "see");
         return res;
index c83bb8deb68c89096d680c18f393f240e76b3a87..7131428e0e924873e6827414dcc407d9bb89eb1f 100644 (file)
@@ -39,7 +39,6 @@ STATIC_DCL int FDECL(traditional_loot, (BOOLEAN_P));
 STATIC_DCL int FDECL(menu_loot, (int, BOOLEAN_P));
 STATIC_DCL char FDECL(in_or_out_menu, (const char *, struct obj *, BOOLEAN_P,
                                        BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
-STATIC_DCL int FDECL(container_at, (int, int, BOOLEAN_P));
 STATIC_DCL boolean FDECL(able_to_loot, (int, int, BOOLEAN_P));
 STATIC_DCL boolean NDECL(reverse_loot);
 STATIC_DCL boolean FDECL(mon_beside, (int, int));
@@ -1513,7 +1512,7 @@ encumber_msg()
 }
 
 /* Is there a container at x,y. Optional: return count of containers at x,y */
-STATIC_OVL int
+int
 container_at(x, y, countem)
 int x, y;
 boolean countem;