Dialog 0j/01: current room not set the same as previous?

Switching from 0i03 to 0j I’m seeing an issue where the game starts in darkness.

13:51:55 ~/workspaces/dialog/sanddancer-dialog > dgt de -t
Dialog Interactive Debugger (dgdebug) version 0j/01.
Type @help at the game prompt for a brief introduction.
QUERY (program entry point)
| ENTER (program entry point) /usr/local/share/dialog-if/stdlib.dg:4452


| QUERY (update environment around player) /usr/local/share/dialog-if/stdlib.dg:4454
| | ENTER (update environment around player) /usr/local/share/dialog-if/stdlib.dg:649
| | QUERY (recompute visibility) /usr/local/share/dialog-if/stdlib.dg:650
| | | ENTER (recompute visibility) /usr/local/share/dialog-if/stdlib.dg:434
| | | QUERY (current player $) /usr/local/share/dialog-if/stdlib.dg:435
| | | FOUND (current player #knock) /usr/local/share/dialog-if/stdlib.dg:435
| | | QUERY (visibility ceiling of #knock is $) /usr/local/share/dialog-if/stdlib.dg:436
| | | | ENTER (visibility ceiling of #knock is $) /usr/local/share/dialog-if/stdlib.dg:458
| | | | QUERY (#knock has parent $) /usr/local/share/dialog-if/stdlib.dg:459
| | | | FOUND (#knock has parent #pickup-truck) /usr/local/share/dialog-if/stdlib.dg:459
| | | | QUERY (#knock has relation #in) /usr/local/share/dialog-if/stdlib.dg:461
| | | | FOUND (#knock has relation #in) /usr/local/share/dialog-if/stdlib.dg:461
| | | | QUERY (#pickup-truck is opaque) /usr/local/share/dialog-if/stdlib.dg:462
| | | | QUERY (visibility ceiling of #pickup-truck is $) /usr/local/share/dialog-if/stdlib.dg:467
| | | | | ENTER (visibility ceiling of #pickup-truck is $) /usr/local/share/dialog-if/stdlib.dg:458
| | | | | QUERY (#pickup-truck has parent $) /usr/local/share/dialog-if/stdlib.dg:459
| | | | | FOUND (#pickup-truck has parent #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:459
| | | | | QUERY (#pickup-truck has relation #in) /usr/local/share/dialog-if/stdlib.dg:461
| | | | | FOUND (#pickup-truck has relation #in) /usr/local/share/dialog-if/stdlib.dg:461
| | | | | QUERY (#middle-of-nowhere is opaque) /usr/local/share/dialog-if/stdlib.dg:462
| | | | | QUERY (visibility ceiling of #middle-of-nowhere is $) /usr/local/share/dialog-if/stdlib.dg:467
| | | | | | ENTER (visibility ceiling of #middle-of-nowhere is $) /usr/local/share/dialog-if/stdlib.dg:458
| | | | | | QUERY (#middle-of-nowhere has parent $) /usr/local/share/dialog-if/stdlib.dg:459
| | | | | | QUERY ($ = #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:470
| | | | | | FOUND (#middle-of-nowhere = #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:470
| | | | | FOUND (visibility ceiling of #middle-of-nowhere is #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:467
| | | | FOUND (visibility ceiling of #pickup-truck is #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:467
| | | FOUND (visibility ceiling of #knock is #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:436
| | | NOW (current visibility ceiling #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:437
| | | QUERY (light reaches ceiling #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:438
| | | | ENTER (light reaches ceiling #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:449
| | | | QUERY (room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:449
| | | | FOUND (room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:449
| | | | QUERY (inherently dark #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:450
| | | | | ENTER (inherently dark #middle-of-nowhere) src/light.dg:10
| | | | | QUERY (tower vicinity #middle-of-nowhere) src/light.dg:10
| | | | | | ENTER (tower vicinity #middle-of-nowhere) src/sand-dancer.dg:20
| | | | | | QUERY *(around the tower #middle-of-nowhere) src/sand-dancer.dg:21
| | | | | | FOUND (around the tower #middle-of-nowhere) src/sand-dancer.dg:21
| | | | | FOUND (tower vicinity #middle-of-nowhere) src/light.dg:10
| | | | FOUND (inherently dark #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:450
| | | | ENTER (light reaches ceiling #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:452
| | | | QUERY *($ provides light) /usr/local/share/dialog-if/stdlib.dg:453
| | | | | ENTER (#knock provides light) src/light.dg:15
| | | | | QUERY (#emergency-lights is off) src/light.dg:16
| | | | | FOUND (#emergency-lights is off) src/light.dg:16
| | | | | QUERY (#headlights is off) src/light.dg:19
| | | | | QUERY (current room $) src/light.dg:20
| | | | | ENTER (#flashlight provides light) src/staging-area.dg:158
| | | | | QUERY (#flashlight is off) src/staging-area.dg:159
| | | | | FOUND (#flashlight is off) src/staging-area.dg:159
| | | NOW ~(player can see) /usr/local/share/dialog-if/stdlib.dg:441
| | FOUND (recompute visibility) /usr/local/share/dialog-if/stdlib.dg:650
| | QUERY (current player $) /usr/local/share/dialog-if/stdlib.dg:651
| | FOUND (current player #knock) /usr/local/share/dialog-if/stdlib.dg:651
| | QUERY (#knock is in room $) /usr/local/share/dialog-if/stdlib.dg:651
| | | ENTER (#knock is in room #knock) /usr/local/share/dialog-if/stdlib.dg:5718
| | | QUERY (room #knock) /usr/local/share/dialog-if/stdlib.dg:5718
| | | ENTER (#knock is in room $) /usr/local/share/dialog-if/stdlib.dg:5720
| | | QUERY (#knock has parent $) /usr/local/share/dialog-if/stdlib.dg:5721
| | | FOUND (#knock has parent #pickup-truck) /usr/local/share/dialog-if/stdlib.dg:5721
| | | QUERY (#pickup-truck is in room $) /usr/local/share/dialog-if/stdlib.dg:5722
| | | | ENTER (#pickup-truck is in room #pickup-truck) /usr/local/share/dialog-if/stdlib.dg:5718
| | | | QUERY (room #pickup-truck) /usr/local/share/dialog-if/stdlib.dg:5718
| | | | ENTER (#pickup-truck is in room $) /usr/local/share/dialog-if/stdlib.dg:5720
| | | | QUERY (#pickup-truck has parent $) /usr/local/share/dialog-if/stdlib.dg:5721
| | | | FOUND (#pickup-truck has parent #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:5721
| | | | QUERY (#middle-of-nowhere is in room $) /usr/local/share/dialog-if/stdlib.dg:5722
| | | | | ENTER (#middle-of-nowhere is in room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:5718
| | | | | QUERY (room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:5718
| | | | | FOUND (room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:5718
| | | | FOUND (#middle-of-nowhere is in room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:5722
| | | FOUND (#pickup-truck is in room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:5722
| | FOUND (#knock is in room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:651
| | NOW (current room #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:652
| | QUERY (#middle-of-nowhere is visited) /usr/local/share/dialog-if/stdlib.dg:653
| | QUERY (player can see) /usr/local/share/dialog-if/stdlib.dg:653
| | QUERY *(#middle-of-nowhere attracts $) /usr/local/share/dialog-if/stdlib.dg:657
| | | ENTER (#middle-of-nowhere attracts #rain) src/scenes/rainstorm.dg:31
| | | QUERY (#rainstorm is happening) src/scenes/rainstorm.dg:32
| | | ENTER (#middle-of-nowhere attracts #layers-of-sand) src/office-interior.dg:7
| | | QUERY (office interior #middle-of-nowhere) src/office-interior.dg:7
| | | ENTER (#middle-of-nowhere attracts #tire-tracks) src/tower.dg:14
| | | QUERY *(#middle-of-nowhere is one of [#middle-of-nowhere #backtracking]) src/tower.dg:14
| | | FOUND (#middle-of-nowhere is one of [#middle-of-nowhere #backtracking]) src/tower.dg:14
| | FOUND (#middle-of-nowhere attracts #tire-tracks) /usr/local/share/dialog-if/stdlib.dg:657
| | NOW (#tire-tracks has parent #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:658
| | NOW (#tire-tracks has relation #in) /usr/local/share/dialog-if/stdlib.dg:658
| | | ENTER (#middle-of-nowhere attracts $) src/tower.dg:26
| | | QUERY (around the tower #middle-of-nowhere) src/tower.dg:26
| | | FOUND (around the tower #middle-of-nowhere) src/tower.dg:26
| | | QUERY *($ is one of [#desert-sand #sagebrush #tower]) src/tower.dg:26
| | | FOUND (#desert-sand is one of [#desert-sand #sagebrush #tower]) src/tower.dg:26
| | FOUND (#middle-of-nowhere attracts #desert-sand) /usr/local/share/dialog-if/stdlib.dg:657
| | NOW (#desert-sand has parent #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:658
| | NOW (#desert-sand has relation #in) /usr/local/share/dialog-if/stdlib.dg:658
| | | FOUND (#sagebrush is one of [#desert-sand #sagebrush #tower]) src/tower.dg:26
| | FOUND (#middle-of-nowhere attracts #sagebrush) /usr/local/share/dialog-if/stdlib.dg:657
| | NOW (#sagebrush has parent #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:658
| | NOW (#sagebrush has relation #in) /usr/local/share/dialog-if/stdlib.dg:658
| | | FOUND (#tower is one of [#desert-sand #sagebrush #tower]) src/tower.dg:26
| | FOUND (#middle-of-nowhere attracts #tower) /usr/local/share/dialog-if/stdlib.dg:657
| | NOW (#tower has parent #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:658
| | NOW (#tower has relation #in) /usr/local/share/dialog-if/stdlib.dg:658
| | | ENTER (#middle-of-nowhere attracts $) /usr/local/share/dialog-if/stdlib.dg:681
| | | QUERY *(from #middle-of-nowhere go $ to $) /usr/local/share/dialog-if/stdlib.dg:682
| | | | ENTER (from #middle-of-nowhere go #south to #backtracking) src/middle-of-nowhere.dg:48
| | | FOUND (from #middle-of-nowhere go #south to #backtracking) /usr/local/share/dialog-if/stdlib.dg:682
| | | QUERY (direction #backtracking) /usr/local/share/dialog-if/stdlib.dg:683
| | | QUERY (room #backtracking) /usr/local/share/dialog-if/stdlib.dg:684
| | | FOUND (room #backtracking) /usr/local/share/dialog-if/stdlib.dg:684
| | | | ENTER (from #middle-of-nowhere go #north to #crumbling-concrete) src/middle-of-nowhere.dg:49
| | | FOUND (from #middle-of-nowhere go #north to #crumbling-concrete) /usr/local/share/dialog-if/stdlib.dg:682
| | | QUERY (direction #crumbling-concrete) /usr/local/share/dialog-if/stdlib.dg:683
| | | QUERY (room #crumbling-concrete) /usr/local/share/dialog-if/stdlib.dg:684
| | | FOUND (room #crumbling-concrete) /usr/local/share/dialog-if/stdlib.dg:684
| | | | ENTER (from #middle-of-nowhere go $ to #open-desert) src/open-desert.dg:63
| | | | QUERY *($ is one of [#east #west]) src/open-desert.dg:63
| | | | FOUND (#east is one of [#east #west]) src/open-desert.dg:63
| | | FOUND (from #middle-of-nowhere go #east to #open-desert) /usr/local/share/dialog-if/stdlib.dg:682
| | | QUERY (direction #open-desert) /usr/local/share/dialog-if/stdlib.dg:683
| | | QUERY (room #open-desert) /usr/local/share/dialog-if/stdlib.dg:684
| | | FOUND (room #open-desert) /usr/local/share/dialog-if/stdlib.dg:684
| | | | FOUND (#west is one of [#east #west]) src/open-desert.dg:63
| | | FOUND (from #middle-of-nowhere go #west to #open-desert) /usr/local/share/dialog-if/stdlib.dg:682
| | | QUERY (direction #open-desert) /usr/local/share/dialog-if/stdlib.dg:683
| | | QUERY (room #open-desert) /usr/local/share/dialog-if/stdlib.dg:684
| | | FOUND (room #open-desert) /usr/local/share/dialog-if/stdlib.dg:684
| FOUND (update environment around player) /usr/local/share/dialog-if/stdlib.dg:4454
| QUERY (intro) /usr/local/share/dialog-if/stdlib.dg:4455
| | ENTER (intro) src/sand-dancer.dg:6
| | QUERY *($ has parent #knock) src/sand-dancer.dg:8
| | FOUND (#lighter has parent #knock) src/sand-dancer.dg:8
| | QUERY *(#lighter has relation #heldby) src/sand-dancer.dg:8
| | FOUND (#lighter has relation #heldby) src/sand-dancer.dg:8
| | NOW (#lighter is handled) src/sand-dancer.dg:9
| | FOUND (#wallet has parent #knock) src/sand-dancer.dg:8
| | QUERY *(#wallet has relation #heldby) src/sand-dancer.dg:8
| | FOUND (#wallet has relation #heldby) src/sand-dancer.dg:8
| | NOW (#wallet is handled) src/sand-dancer.dg:9
| | FOUND (#jacket has parent #knock) src/sand-dancer.dg:8
| | QUERY *(#jacket has relation #heldby) src/sand-dancer.dg:8
| | FOUND (#emotional-baggage has parent #knock) src/sand-dancer.dg:8
| | QUERY *(#emotional-baggage has relation #heldby) src/sand-dancer.dg:8
| | FOUND (#emotional-baggage has relation #heldby) src/sand-dancer.dg:8
| | NOW (#emotional-baggage is handled) src/sand-dancer.dg:9
| | QUERY (banner) src/sand-dancer.dg:11
| | | ENTER (banner) lib/debug/extra-debug.dg:4
| | FOUND (banner) src/sand-dancer.dg:11
| | QUERY (try [look]) src/sand-dancer.dg:12
| | | ENTER (try [look]) /usr/local/share/dialog-if/stdlib.dg:3402
| | | QUERY (tracing actions) /usr/local/share/dialog-if/stdlib.dg:3403
| | | QUERY (refuse [look]) /usr/local/share/dialog-if/stdlib.dg:3406
| | | | ENTER (refuse [look]) /usr/local/share/dialog-if/stdlib.dg:3422
| | | | QUERY *($ is one of [look]) /usr/local/share/dialog-if/stdlib.dg:3423
| | | | FOUND (@look is one of [look]) /usr/local/share/dialog-if/stdlib.dg:3423
| | | | QUERY (object @look) /usr/local/share/dialog-if/stdlib.dg:3424
| | | QUERY *(before [look]) /usr/local/share/dialog-if/stdlib.dg:3407
| | | QUERY (refuse [look]) /usr/local/share/dialog-if/stdlib.dg:3408
| | | | ENTER (refuse [look]) /usr/local/share/dialog-if/stdlib.dg:3422
| | | | QUERY *($ is one of [look]) /usr/local/share/dialog-if/stdlib.dg:3423
| | | | FOUND (@look is one of [look]) /usr/local/share/dialog-if/stdlib.dg:3423
| | | | QUERY (object @look) /usr/local/share/dialog-if/stdlib.dg:3424
| | | QUERY (instead of [look]) /usr/local/share/dialog-if/stdlib.dg:3409
| | | | ENTER (instead of [look]) src/characters/rabbit.dg:13
| | | | QUERY (#bow-tie is one of [look]) src/characters/rabbit.dg:14
| | | | ENTER (instead of [look]) src/roof.dg:48
| | | | QUERY (current room #roof) src/roof.dg:49
| | | | ENTER (instead of [look]) src/roof.dg:83
| | | | QUERY (current room #roof) src/roof.dg:84
| | | | ENTER (instead of [look]) ../threaded-conversation/lib/tc.dg:578
| | | | QUERY (@look = @discuss) ../threaded-conversation/lib/tc.dg:579
| | | | QUERY (current quip $) ../threaded-conversation/lib/tc.dg:580
| | | | ENTER (instead of [look]) /usr/local/share/dialog-if/stdlib.dg:3434
| | | | QUERY (prevent [look]) /usr/local/share/dialog-if/stdlib.dg:3435
| | | | | ENTER (prevent [look]) src/characters/rabbit.dg:21
| | | | | QUERY (#easter-basket is one of [look]) src/characters/rabbit.dg:22
| | | | | ENTER (prevent [look]) src/memories.dg:16
| | | | | QUERY (@look = @examine) src/memories.dg:17
| | | | | QUERY (#emotional-baggage is one of []) src/memories.dg:18
| | | | | ENTER (prevent [look]) src/memories.dg:216
| | | | | QUERY (@look is one of [brood trade]) src/memories.dg:217
| | | | | QUERY *($ is one of []) src/memories.dg:218
| | | | | ENTER (prevent [look]) src/trading.dg:83
| | | | | QUERY (@look is one of [examine trade]) src/trading.dg:84
| | | | | QUERY *($ is one of []) src/trading.dg:85
| | | | QUERY (perform [look]) /usr/local/share/dialog-if/stdlib.dg:3436
| | | | | ENTER (perform [look]) /usr/local/share/dialog-if/stdlib.dg:949
| | | | | QUERY (current player $) /usr/local/share/dialog-if/stdlib.dg:950
| | | | | FOUND (current player #knock) /usr/local/share/dialog-if/stdlib.dg:950
| | | | | QUERY (current visibility ceiling $) /usr/local/share/dialog-if/stdlib.dg:951
| | | | | FOUND (current visibility ceiling #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:951
| | | | | QUERY (location headline) /usr/local/share/dialog-if/stdlib.dg:952
| | | | | | ENTER (location headline) /usr/local/share/dialog-if/stdlib.dg:4522
| | | | | | QUERY (current player $) /usr/local/share/dialog-if/stdlib.dg:4523
| | | | | | FOUND (current player #knock) /usr/local/share/dialog-if/stdlib.dg:4523
| | | | | | QUERY (player can see) /usr/local/share/dialog-if/stdlib.dg:4524
| | | | | | QUERY (darkness headline) /usr/local/share/dialog-if/stdlib.dg:4532
| | | | | | | ENTER (darkness headline) /usr/local/share/dialog-if/stdlib.dg:4535
In the dark
| | | | | | FOUND (darkness headline) /usr/local/share/dialog-if/stdlib.dg:4532
| | | | | FOUND (location headline) /usr/local/share/dialog-if/stdlib.dg:952
| | | | | QUERY (player can see) /usr/local/share/dialog-if/stdlib.dg:953
| | | | | QUERY (narrate darkness) /usr/local/share/dialog-if/stdlib.dg:959
| | | | | | ENTER (narrate darkness) /usr/local/share/dialog-if/stdlib.dg:4538
You are surrounded by darkness.
| | | | | | QUERY (current visibility ceiling $) /usr/local/share/dialog-if/stdlib.dg:4540
| | | | | | FOUND (current visibility ceiling #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4540
| | | | | | QUERY (notice #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4541
| | | | | | | ENTER (notice #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4127
| | | | | | | QUERY (object #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4128
| | | | | | | FOUND (object #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4128
| | | | | | | QUERY (reveal #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4129
| | | | | | | | ENTER (reveal #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:315
| | | | | | | | NOW ~(#middle-of-nowhere is hidden) /usr/local/share/dialog-if/stdlib.dg:316
| | | | | | | FOUND (reveal #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4129
| | | | | | | QUERY (plural #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4130
| | | | | | | QUERY (pair #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4130
| | | | | | | QUERY (male #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4134
| | | | | | | NOW (narrator's it refers to #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4137
| | | | | | | NOW (narrator's it is protected) /usr/local/share/dialog-if/stdlib.dg:4138
| | | | | | | QUERY (player's it refers to #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4139
| | | | | | FOUND (notice #middle-of-nowhere) /usr/local/share/dialog-if/stdlib.dg:4541
| | | | | FOUND (narrate darkness) /usr/local/share/dialog-if/stdlib.dg:959
| | | | FOUND (perform [look]) /usr/local/share/dialog-if/stdlib.dg:3436
| | | | QUERY *(after [look]) /usr/local/share/dialog-if/stdlib.dg:3437
| | | FOUND (instead of [look]) /usr/local/share/dialog-if/stdlib.dg:3409
| | FOUND (try [look]) src/sand-dancer.dg:12
| FOUND (intro) /usr/local/share/dialog-if/stdlib.dg:4455
| QUERY *(repeat forever) /usr/local/share/dialog-if/stdlib.dg:4456
| FOUND (repeat forever) /usr/local/share/dialog-if/stdlib.dg:4456

| QUERY (read-parse-act) /usr/local/share/dialog-if/stdlib.dg:4456
| | ENTER (read-parse-act) /usr/local/share/dialog-if/stdlib.dg:4471
| | QUERY (deferred commandline $) /usr/local/share/dialog-if/stdlib.dg:4472
| | QUERY (redraw status bar) /usr/local/share/dialog-if/stdlib.dg:4485
| | | ENTER (redraw status bar) /usr/local/share/dialog-if/stdlib.dg:4510
| | FOUND (redraw status bar) /usr/local/share/dialog-if/stdlib.dg:4485
> 

The key is in the middle:

| | | | | QUERY (current room $) src/light.dg:20

That’s from this code:

%% Here's my solution; when the emergency lights are on, or the headlights are on,
%% then Knock provides light!

(#knock provides light)
    (#emergency-lights is on)
    (or)
    {
        (#headlights is on)
        (current room $Room)
        (in range of headlights $Room)
    }

It looks like the query to (current room $) failed.

As a side note: the new warnings in 0j identified that I was missing the query to (current room $), a latent bug.

If I get a chance I can start digging in stdlib.dg to see if something changed since 0j03 that could explain this.

From a quick check, it seems that (update environment around player) will recompute the visibility ceiling before setting (current room $). But in order to recompute the visibility ceiling, it needs to know if the player is in darkness, which depends on ($ provides light). Therefore, you cannot read the value of the global variable from inside that predicate.

I’m not sure if this is sensible behaviour on the part of the library. Will sleep on it.

This was indeed a bug in the standard library. The visibility variables have to be computed later, after setting the current room variable, and also after moving any floating objects (which may provide light) into the current room.

This is now fixed in library version 0.36 (Dialog release announcements).