Open eriktorbjorn opened 4 years ago
This is how Wishbringer solved the blank line problem in SCREEN-F
...
(<VERB? EXAMINE LOOK-ON>
<COND (<NOT <ENABLED? ,I-FILM>>
<BLANK-SCREEN>)>
<SETG NO-CR? T>
<RTRUE>)
...and I-FILM
:
<COND (,NO-CR?
<SETG NO-CR? <>>)
(T
<CRLF>)>
I.e. if the film is playing, examining the screen does nothing and the description is printed by I-FILM
, except there is no blank line at the start of the message.
So it could be argued that this is the "Moriarty way". I haven't yet seen if there is any "Trinity way".
Edit: Now I think I've seen the Trinity way. In MAGPIE-F
, it does this:
(<VERB? WATCH LISTEN>
<UNMAKE ,PRSO ,SEEN>
<I-MAGPIE <>>
<RTRUE>)
And I-MAGPIE
does some checking of the SEEN
bit that I haven't yet gotten around to investigating. But it does seem to prevent the double messages.
Note that I-NAGASAKI
has a CR
parameter for this purpose.
The crabs at the Ivy Mike test site behave the same way:
>EXAMINE CRABS
The crabs snap their claws at you.
The alert crabs glare at you with beady little eyes.
That's because CRABS-F
does this:
(<VERB? EXAMINE WATCH>
<UNMAKE ,PRSO ,SEEN>
<I-CRABS <>>
<RTRUE>)
So maybe it's by design?
Actually, there is some code in I-CRABS
that looks like it's meant to prevent the duplicate messages. The CRABS-F
routine always marks the crabs as SEEN
, and I-CRABS
does this:
<ROUTINE I-CRABS ("OPTIONAL" (CR T))
<COND (<OR <NOT <HERE? WSAND>>
<IS? ,CRABS ,SEEN>>
<UNMAKE ,CRABS ,SEEN>
<RFALSE>)
(<ZERO? .CR>
T)
(<PROB 50>
<RFALSE>)
(T
<CRLF>)>
But I forget... does <RFALSE>
here only return from the COND
or does it return from the entire routine?
LANDING-F
too:
>LISTEN TO LANDING
The landing emits a wooden moan of discomfort.
The landing is sagging dangerously. It's not going to last much longer!
(<VERB? WATCH LISTEN CLIMB-OVER CROSS STAND-ON CLIMB-ON
KICK KNOCK HIT MUNG>
<I-MILL <>>
<RTRUE>)
(Also, LANDING-F
has two different cases for LISTEN
. Of course, only this first one is actually used.)
MILK-F
too:
>EXAMINE MILK
Liquid dribbles out of the cracked coconut.
The last drops of milk dribble out of the cracked coconut.
<COND (<VERB? EXAMINE WATCH>
<I-MILK <>>
<RTRUE>)
And MCRANE-F
:
>WATCH CRANE
The giant bird turns to look at you. Though the paper face is utterly
featureless, you somehow get the feeling that it likes you.
The giant bird beckons to you with a friendly wing.
(<VERB? WATCH>
<I-MCRANE <>>
<RTRUE>)
And BOY-F
:
>EXAMINE BOY
The boy pulls the bubble wand out of the dish, puts it to his lips and blows a
big soap bubble.
The boy kicks his feet to the headphone music as the soap bubble bursts with a
flabby pop.
(<VERB? EXAMINE WATCH>
<I-BOY <>>
<RTRUE>)
(At this point, we might as well search the code for '<I- ... <>>' and see what turns up. Of course, even some of the ones I've pointed out may be deliberate.)
Same thing in SHADE-F
:
>WATCH SHADE
The ghostly shades begin to converge on the dory. One by one, they step into the
vessel, hand the oarsman a silver coin, and take a seat.
The last of the shades seats itself in the crowded dory.
(<VERB? WATCH>
<I-STYX <>>
<RTRUE>)
DORY-F
:
(<VERB? WATCH>
<I-STYX <>>
<RTRUE>)
LEMMINGS-F
is another example of where you don't get double messages:
(<VERB? WATCH>
<UNMAKE ,RODENTS ,SEEN>
<I-RODENTS <>>
<RTRUE>)
(<VERB? EXAMINE>
<COND (<IS? ,RODENTS ,CHILLY>
<UNMAKE ,RODENTS ,SEEN>
<I-RODENTS <>>
<RTRUE>)>
I-RODENTS
, like I-CRABS
, checks if RODENTS
has the CHILLY
bit.
LEM-F
also doesn't give a double message:
(<VERB? WATCH>
<COND (<AND <HERE? IN-ORBIT ON-SAT>
<ZERO? ,SUITED?>>
<TELL "It isn't looking well." CR>
<RTRUE>)>
<UNMAKE ,PRSO ,SEEN>
<I-LEM <>>
<RTRUE>)
So it seems there is no standard bit to use to suppress messages in time routines. In I-LEM
the CHILLY
bit is used for other things.
CHARON-F
:
(<VERB? WATCH>
<I-STYX <>>
<RTRUE>)
FILM-F
:
(<VERB? EXAMINE LOOK-INSIDE SEARCH WATCH>
<COND (<HERE? ON-SAT>
<TELL CTHEO " is anchored to the " D ,XRAY
" with the " D ,LUMP ,PERIOD>
<RTRUE>)
(<HERE? IN-SKY IN-ORBIT ON-SAT>
<TELL CTHEO " strains against the ">
<COND (<HERE? IN-SKY>
<TELL "passing wind." CR>
<RTRUE>)>
<TELL "surrounding vacuum." CR>
<RTRUE>)>
<I-BUBBLE-SUIT <>>
<RTRUE>)
I-GIRL
:
(<VERB? WATCH>
<I-GIRL <>>
<RTRUE>)>
F-MEEP
is another example of a routine that doesn't print double messages:
(<VERB? WATCH>
<UNMAKE ,PRSO ,SEEN>
<I-TMEEP <>>
<RTRUE>)
This is probably because "LISTEN" is implemented (by
PLANES-F
) as simply callingI-NAGASAKI
:This is ok if you're outside, because the teachers will catch you and the game will be over. But in the shelter you are safe, and since the
I-NAGASAKI
timer is still running the routine will be called twice. Perhaps simply returnRTRUE
here and let the timer handle it?Though then there would probably be an extra blank line before the response, so
I-NAGASAKI
would have to be slightly modified. Perhaps check<VERB? LISTEN>
? I've seen other games do that in timer routines, so it might work here too. Though it'd probably have to check that the player is listening to the planes and nothing else.