From: Pasi Kallinen Date: Thu, 2 Jun 2016 15:11:35 +0000 (+0300) Subject: Give a hint that containers are looted instead of opened X-Git-Tag: NetHack-3.6.1_RC01~710 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=984785b13c50d813ed6a655deb667fb51ed5245a;p=nethack Give a hint that containers are looted instead of opened --- diff --git a/include/extern.h b/include/extern.h index 4b58776f5..e21ba04ec 100644 --- a/include/extern.h +++ b/include/extern.h @@ -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); diff --git a/src/lock.c b/src/lock.c index f899f9a0b..6770556a6 100644 --- a/src/lock.c +++ b/src/lock.c @@ -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; diff --git a/src/pickup.c b/src/pickup.c index c83bb8deb..7131428e0 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -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;