intfiction.org

The Interactive Fiction Community Forum
It is currently Tue Jun 18, 2013 1:18 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jan 26, 2012 12:36 pm 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 904
When an OpenableContainer is empty and the player tries 'look in suitcase', the output is "You see nothing unusual in the suitcase." This is obviously wrong -- it should say, "The suitcase is empty."

I thought the problem might be because I'm using the extension custmsg.t, so I removed that from the project and recompiled. I get the same output as before.

Looking at the library code for Openable, it's not at all clear to me how this message is being generated. How can I fix it? Thanks!


Top
 Profile Send private message  
 
PostPosted: Thu Jan 26, 2012 2:49 pm 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 695
This should do what you need:

Code:
examineInterior()
{
    defaultReport('Looks empty. ');
    inherited();
}

What we've done is provide our own defaultReport, which will take precedence over any defaultReport generated by the base implementation of examineInterior().


Top
 Profile Send private message  
 
PostPosted: Thu Jan 26, 2012 2:57 pm 
Offline

Joined: Tue Apr 27, 2010 1:02 pm
Posts: 798
You can also change it at the source.

Code:
modify thingLookInLister
   showListEmpty(pov, parent) {
      gMessageParams(parent);
      defaultDescReport('{The parent/him} {is} empty. ');
   }
;


Edit to add:

The reason for the default wording is that the contents list might be empty for some other reason - namely that it contains a hidden object, or that there's not enough light to see an obscured object inside. A categorical assertion that the container is empty may therefore be false and mislead the player.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group