>OPEN LID
The lid is now open.
>OPEN LID
Too late for that.
>CLOSE LID
The lid covers the keyhole.
>CLOSE LID
The lid covers the keyhole.
So PLID-FCNdoes check if the lid is already open if you try to open it, but has no similar check for when you try to close it:
<COND (<VERB? OPEN RAISE MOVE>
<COND (<FSET? ,PRSO ,OPENBIT>
<TELL <RANDOM-ELEMENT ,DUMMY> CR>)
(T <TELL "The lid is now open." CR>)>
<FSET ,PRSO ,OPENBIT>)
(<VERB? CLOSE LOWER>
<COND (<FIRST? <COND (<EQUAL? ,HERE ,DREARY-ROOM>
,KEYHOLE-2)
(T ,KEYHOLE-1)>>
<TELL "The keyhole is occupied." CR>)
(T
<TELL "The lid covers the keyhole." CR>
<FCLEAR ,PRSO ,OPENBIT>)>)
So
PLID-FCN
does check if the lid is already open if you try to open it, but has no similar check for when you try to close it: