The routine OnStage() (in the WorldModel.i6t template) is defined as:
[ OnStage O set x;
if (O ofclass K1_room) rfalse; ! room check #1
if (set < 0) {
while (metaclass(O) == Object) {
if (O ofclass K1_room) rtrue; ! room check #2
if (O ofclass K9_region) rfalse;
if (O ofclass K4_door) rtrue;
if (O ofclass K7_backdrop) { if (O has absent) rfalse; rtrue; }
x = O.component_parent; if (x) { O = x; continue; }
x = parent(O); if (x) { O = x; continue; }
rfalse;
}
}
...
Iāve added two comments to places where the class of the object being tested is checked to see whether it is a room.
It looks like the second check shouldnāt be there. First, it doesnāt look like it can ever have an effect because the first check takes precedence. Second, there is relevant commentary in WWI 8.10 Removing things from play:
Note that āon-stageā and āoff-stageā apply only to things. Rooms, directions and regions are the stage itself: so it makes no sense to ask the question of whether they are āon-ā or āoff-ā.
Is there a purpose or function to the second check that Iām not seeing?
If O is inside a container, O will be set to that container and then the loop continues. Same for supporters, components, etc. O walks up the chain of holders until it reaches either a room (on-stage) or an object whose holder is nothing (off-stage).
(Or a backdrop or door or region, which are special cases. Looks like the routine has no concept of off-stage doors, which makes sense ā the Standard Rules donāt allow doors to be off-stage.)
If one asks whether rooms, regions, or directions are off-stage, itās true. And if you ask whether theyāre offstage, itās false. I figure itās not a bug given itās explicitly undefined behavior.
These are the definitions:
Definition: Something is on-stage rather than off-stage if I6 routine "OnStage"
makes it so (it is indirectly in one of the rooms).
Definition: Something is offstage if it is off-stage.
It says something. So thereās an implicit if it is a thing and in front of the conditional. For a non-thing, the result for both is always false ā it doesnāt even get as far as checking the I6 OnStage routine.
And false for the first means off-stage and false for the second means not offstage.
One would get consistent false (as in not indicating being on stage) results for room, region, direction with this:
Definition: An object is offstage if it is off-stage.
Thank you, zarf. I was too tired when I was trying to think it through the first time, obviously⦠but hey ā it looks like I got my first really thoughtless post in early this year!
I note that the reliance on absent for defining whether a backdrop is on-stage means that āan on-stage backdropā is synonymous with āa not absent backdropā instead of āa backdrop that is currently located on-stageā (as it means for other kinds of things) or even āa backdrop that is ready to be placed on-stage the next time itās neededā (since itās possible for a backdrop with a routine-based .found_in to be counted as on-stage even if it will not be present in any room under current conditions).
And thank you, Zed for the amusing sidebar regarding the hyphenated vs. non-hyphenated versions of the adjective. I think that the inconsistency you noted counts as a minor bug despite the undefined behavior.
Probably most importantly, a backdrop can be on-stage and nowhere at the same time, since being nowhere depends on the location of something and the location of a backdrop is poorly-defined. So, donāt use āif (a-backdrop) is/is not nowhereā- always use āif (a backdrop) is on-stage/off-stageā.