See
olterraincontainer::Open; the Open function only returns true if you actually place or remove an item in the container. If you just look inside of it it doesn't even count as an action (the same applies to itemcontainers, such as chests).
truth olterraincontainer::Open(character* Opener)
{
if(!Opener->IsPlayer())
return false;
truth Success;
switch(game::KeyQuestion(CONST_S("Do you want to (t)ake something from or (p)ut something in this container? [t,p]"), KEY_ESC, 3, 't', 'p', KEY_ESC))
{
case 't':
case 'T':
Success = GetContained()->TakeSomethingFrom(Opener, GetName(DEFINITE));
break;
case 'p':
case 'P':
Success = GetContained()->PutSomethingIn(Opener, GetName(DEFINITE), GetStorageVolume(), 0);
break;
default:
return false;
}
if(Success)
Opener->DexterityAction(Opener->OpenMultiplier() * 5);
return Success;
}
Note that "TakeSomethingFrom" and "PutSomethingIn" will only return true if you actually complete the action.