Hiding an inventory possession

I had a similar problem recently; this thread may be of interest.

I ended up doing this:

[code]A thing can be listable or unlistable. A thing is usually listable.

Instead of taking inventory:
if the player is carrying no listable things:
say "You are empty-handed. ";
else:
now all things enclosed by the player are unmarked for listing;
now all listable things carried by the player are marked for listing;
say "You are carrying ";
list the contents of the player, as a sentence, listing marked items only, tersely, including contents;
say ". ";
if the player is wearing a listable thing:
now all things enclosed by the player are unmarked for listing;
now all listable things worn by the player are marked for listing;
say "You are wearing ";
list the contents of the player, as a sentence, listing marked items only, including all contents;
say “.”;
else:
say “You are wearing nothing but [a smile].”[/code]

So now I can just define anything I don’t want printed when taking inventory as unlistable. This may not be the most efficient solution, but it gets the job done and doesn’t have any side effects from moving the object.

(In my case this was because I wanted the message if you’re not wearing anything to be “You are wearing nothing but a smile” and also allow for the smartass player to try removing the smile.)