the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

BURGER-MEISTER-ENTER-F can refer to the place with the wrong name #59

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>DATE
Today is 6/3/2051.

>NE
The Bar is closed at this hour, of course.

>WAIT
Time passes...

The sirens hailing the end of curfew are blaring.

>NE
Burger Meister
This is a fast food restaurant serving beef burgers, less-expensive kelp burgers
and soy burgers, and beer. Stools provide ample seating. The only way out is
southwest.

So you were told the Bar was closed, even though it won't turn into a bar until the 2071 simulation.

Here is what BURGER-MEISTER-ENTER-F does:

<ROUTINE BURGER-MEISTER-ENTER-F ()
     <COND (<AND <OR <G? ,STIME 1200>
             <L? ,STIME 420>>
             <NOT <EQUAL? ,SYEAR 2041>>>
        <OF-COURSE ,BURGER-MEISTER>
        <RFALSE>)
           (T
        ,BURGER-MEISTER)>>

The problem here is that it's BURGER-MEISTER-F that sets the name of the place:

     <COND (<EQUAL? .RARG ,M-ENTER>
        <COND (<EQUAL? ,SYEAR 2071>
               <PUTP ,BURGER-MEISTER ,P?SDESC "Bar">)
              (<EQUAL? ,SYEAR 2061>
               <PUTP ,BURGER-MEISTER ,P?SDESC "Burgerworld">)
              (T
               <PUTP ,BURGER-MEISTER ,P?SDESC "Burger Meister">)>

So if you haven't yet entered the place in the current simulation, it will still have the previously set name. Or it may have no name at all set yet, but I haven't tested exactly what happens then.

A similar problem happens in https://github.com/the-infocom-files/amfv/issues/39

Perhaps the name of the restaurant should be set in SIMULATION-ACTION instead?