AnssiR66 / AlanStdLib

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

Actors' Possessions Lists: Mention Non-Clothing Wearables #119

Open tajmone opened 3 years ago

tajmone commented 3 years ago

Since authors are free to implement custom non-clothing wearables (#101), we've already changed the code in lib_messages_runtime.i that lists carried and worn items to add "(being worn)" to any worn item, not just clothing items (as it did before):

  -- The IF blocks in the following group of messages adds "(being worn)" after
  -- every item worn by an actor, when using `LIST actor`. The library uses the
  -- `worn` attribute only for clothing instances, but authors are free to
  -- create custom wearable items (e.g. headphones, VR headset devices, etc.).

  CONTAINS_COMMA: "$01"
    IF parameter1 ISA thing THEN
      IF parameter1 IS worn
        THEN "(being worn)"
      END IF.
    END IF.
    "$$,"
  CONTAINS_AND: "$01"
    IF parameter1 ISA thing THEN
      IF parameter1 IS worn
        THEN "(being worn)"
      END IF.
    END IF.  "and"
  CONTAINS_END: "$01"
    IF parameter1 ISA thing THEN
      IF parameter1 IS worn
        THEN "(being worn)"
      END IF.
    END IF. "."

We now should edit all other code parts in the library that deal with listing separately carried and worn items, so that the list of worn items is no longer restricted to clothing items only but to any thing being worn.

We need to find all the verbs and other code parts that deal with listing actors' possessions, and also decide if (and how) clothing and non-clothing items should be listed separately or not — i.e. mixing in the same list different types of wearables might be inelegant, whereas listing all clothing items before or after other types might look better, if it's in a single list; or maybe we should enforce two separate list altogether?