adv3Lite: Component and Floor

I have a room with a non-default floor. The floor has a metal grate set into it. What I’m finding (unless I’m mistaken) is that I can’t give a Floor object a Component. When I do this, the game compiles, but I get a run-time error, a nil object reference, when it tries to launch.

I can make the metal grate just a standard Fixture, and I think that will probably be okay. But I suspect this may be an issue in the library code. At a guess, it may be because a Floor has contType = on?

In general there’s probably no good reason to make anything a component of a floor (or any other room part) and it’s probably better to make the grate a Fixture, as you suggest.

That said, I’ve taken a quick look to see what’s going on to cause the run-time error, and I think a change needs to be made in thing.t at line 9221 (which might just cause a problem in other circumstances as well). I’ll make the change for the next release, but in the meantime if anyone wants to patch their own copy of the library the statement:

contents = (gActor.outermostVisibleParent().contents - self)

Needs to be changed to:

contents = (gPlayerChar.outermostVisibleParent().contents - self)

The run-time error occurs because gActor is nil when this expression is first evaluated.