[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tads3] UnderSurface - Second Thoughts



> 2) For objects that start life hidden under something, a mix-in class
> defined thus:

What about a more general HiddenItem class?
(Also, the object will never be listed if it has no sight-presence, right?)

class HiddenItem: object
    sightPresence = nil
    discover()
    {
        sightPresence = true;
    }
;

Then modify the Surface, Container and Underside classes to call
discover() on their contents when looking on/in/under and/or
searching the item, before listing the contents:

foreach (local obj in contents) obj.discover();

---

Of course, the ideal solution would check the current actor, and allow
any object to be hidden in a HiderObject (or whatever.)
Then you could have an NPC go looking for a certain object, and allow
the player to HIDE objects from the NPC.

That is, I think the library should provide hooks for keeping track of
which actors had discovered the item, and which actors haven't - 
isDiscoveredBy(actor) - even if it only keeps track of the PC by default
(like seen and known.)

It sounds like the hiding is something you could do in the hiding
container's transSensingIn method, by checking the current POV-
However, the POV is not available there. Hmm.

Søren J. Løvborg
kwi@it.dk