AnssiR66 / AlanStdLib

The Standard Library for ALAN Interactive Fiction Language
Other
6 stars 2 forks source link

DOOR Verbs Giving for Granted that All Doors are Simple "Doors" #122

Closed tajmone closed 2 years ago

tajmone commented 3 years ago

I've noticed that in lib_classes.i various verbs for the door class contain explicit references to a "door". E.g.:

  VERB look_behind
    DOES ONLY
      IF THIS IS NOT open
        THEN "You cannot look behind the"
          IF THIS IS NOT plural
            THEN "door - it is closed."
            ELSE "doors - they are closed."
          END IF.
        ELSE "You notice nothing special behind the door"
          IF THIS IS NOT plural
            THEN "."
            ELSE "$$s."
          END IF.
      END IF.
  END VERB look_behind.

Similar verbs should be edited, references to "door(s)" should be replaced with the instance's actual NAME, because the door class could be used to implement many different types of doors — e.g. gates, trap doors, safety hatches, and even magic portals or black holes.

Other verbs, like look_under are very door-specific:

  VERB look_under
    DOES ONLY
      IF THIS IS NOT open
        THEN "The gap under the closed door"
          IF THIS IS plural
            THEN "$$s"
          END IF.
          "is so narrow that you can't see anything
           of what lies on the other side."
        ELSE "You notice nothing special under the door"
          IF THIS IS plural
            THEN "$$s."
            ELSE "."
          END IF.
      END IF.
  END VERB look_under.

so they might not apply to all types of doors (e.g. trap doors, which are at the ground level, and don't have an "under gap" at all). Such verbs will probably need to be overridden by end users, if they implement non-standard doors; but his is something worth mentioning both in the sources documentation as well as in the StdLib Manual.

AnssiR66 commented 3 years ago

Yes, a mention of this should be added to the manual. Shall I do it, or do you wish to?

tajmone commented 3 years ago

Yes, a mention of this should be added to the manual. Shall I do it, or do you wish to?

Let's postpone this, and just keep it annotated. We're too tight on the ETA and will barely make it. I'd rather focus on a few issues relating to code we're already working on right now, and keep going ahead wit the checklist of #117.

As long as we keep all the pending work well annotated, we can safely resume work after the holidays.