# # Patch name: dark_inventory # Patch version: 1 # Author's name: T. Alexander Popiel # Author's email: popiel@colorado.edu # Version of PennMUSH: PennMUSH 1.6.5.p3 # Date patch made: 19 July 1996 # Author is willing to support (yes/no): NO # Patch format: context diff # # # This is a contributed PennMUSH patch. Its use is subject to the # same restrictions found in PennMUSH's hdrs/copyrite.h file. # # No warranty is given for this patch. It is not necessarily going # to work on your system, with any version of PennMUSH other than # the one above, etc. # # If the author given above was willing to support the patch, you # should write to the author if you have any questions or problems. Do # *NOT* send email messages to Javelin or any PennMUSH mailing list about # this patch! # # Below this line is the author's description of the patch, # followed by the patch itself. If the patch is in context diff # format, you'll probably apply it by typing: patch < patchfile # in your top-level MUSH directory, unless instructed otherwise # below. # This patch causes the 'inventory' command to obey the DARK flag on carried objects, and the 'examine' command to do likewise for non-admin. Note that I personally am very dubious about changing the 'examine' command in this way. This patch made by request for Doyce Testerman *** src/look.c 1996/07/16 22:54:15 1.1 --- src/look.c 1996/07/19 22:48:59 *************** *** 695,701 **** else notify(player, "Contents:"); DOLIST(content, Contents(thing)) { ! if (ok || controls(player, content) || (!Dark(content) && IS(content, TYPE_PLAYER, PLAYER_CONNECT))) notify(player, object_header(player, content)); } --- 695,701 ---- else notify(player, "Contents:"); DOLIST(content, Contents(thing)) { ! if ((ok && Hasprivs(player)) || controls(player, content) || (!Dark(content) && IS(content, TYPE_PLAYER, PLAYER_CONNECT))) notify(player, object_header(player, content)); } *************** *** 801,815 **** dbref player; { dbref thing; ! if ((thing = Contents(player)) == NOTHING) { ! notify(player, "You aren't carrying anything."); ! } else { ! notify(player, "You are carrying:"); ! DOLIST(thing, thing) { ! notify(player, unparse_object(player, thing)); } } ! do_score(player); } --- 801,822 ---- dbref player; { dbref thing; ! ! /* check to see if there is anything there */ ! DOLIST(thing, Contents(player)) { ! if (can_see(player, thing, 1)) { ! /* something exists! show him everything */ ! notify(player, "You are carrying:"); ! DOLIST(thing, Contents(player)) { ! if (can_see(player, thing, 1)) { ! notify(player, unparse_object(player, thing)); ! } ! } ! do_score(player); ! return; /* we're done */ } } ! notify(player, "You aren't carrying anything."); do_score(player); }