T3: objInPrep

I have a ComplexContainer that has a subSurface and a subRear. Searching the main object reports “There’s nothing unusual in the stone block.” I changed objInPrep to ‘on’, both in the ComplexContainer itself and in the subSurface – but no dice. I still get ‘in’, not ‘on’.

Not only that, but if I put an object on the stone block, searching it still yields “You see nothing unusual in the stone block,” which is obviously wrong!

Is this a T3 bug? Two of them? Or is it user error?

One issue appears to be this: ComplexContainer has the following line:

dobjFor(LookIn) maybeRemapTo(subContainer != nil, LookIn, subContainer)

This would seem to be exactly wrong for a ComplexContainer that has a subSurface and a subRear, but no subContainer. The library thinks it can’t remap, so it reports “nothing unusual.” When I change the remapTo, I get the correct preposition. Hooray!

Probably I should keep my mouth shut, as you’re much better at this than I am–

But I’m wondering why you’re not using a Surface object?

Would you post your code?

Conrad.

It seems right to me, in that the remap only kicks in if the ComplexContainer has a subContainer defined. Otherwise it falls through to the default Thing behavior, which is to show the object’s lookInDesc. This is where “there’s nothing unusual in X” comes from; you get the same message if you try to look in an actor.

Changing the remap line is probably the easiest way to fix it.

If the player types ‘look in X’, then the default thing behavior makes sense (more or less – I’m not thrilled by “You see nothing unusual” when the object has no contents). But ‘search X’ should certainly remap to the subSurface if there is one, because the contents of the subSurface are in plain view.

It’s a standard ComplexContainer, no fancy code at all. The reason I’m not just using a Surface is because it also has a subRear (in which a certain object is hidden). We need to be able to put things on it and also look behind it.