The Four-Eyed Guide to TADS 3 by David Welbourn index

WEAR dobjList


Related action: DOFF dobjList.

Default minimal behavior

What do you want to wear?

>wear floor
That isn't something you can wear.

wear matches VerbRule(Wear) which invokes WearAction. [TODO]

Summary of library references to wearing clothing


Short description

DefineTAction(Wear) Defines class WearAction: TAction
Note: DefineTAction(name) is a macro defined in adv3.h. Note: TAction is a class defined in action.t.
lister.t Short description
class WearingSublister: WearingLister
actorWearingSublister: WearingSublister
Inventory listings sometimes list worn items separately from carried items; see INVENTORY.
objects.t Short description
class Wearable: Thing The class for wearable objects, that is: clothing, jewellry, etc.
Wearable.isWorn() Returns true if the item is worn by anybody, or nil, otherwise.
Wearable.makeWornBy(actor) Set who's wearing the item. To have no one wear it, call makeWornBy(nil).
Wearable.wornBy Who's wearing the item. Except for setting who's wearing which items at the start of the game, this field should be private; use makeWornBy(actor) instead.
Wearable.isWornBy(actor) Returns true if the item is worn by the actor, or nil, otherwise.
Wearable.getState Returns either wornState or unwornState, as applicable.
Wearable.dobjFor(Wear) dobjFor(Wear) { preCond = [objHeld] verify() { /* make sure the actor isn't already wearing the item */ if (isWornBy(gActor)) illogicalNow(&alreadyWearing); } action() { /* make the item worn and describe what happened */ makeWornBy(gActor); defaultReport(&okayWear); } }
precond.t Short description
thing.t Short description
Thing.dobjFor(Wear) By default, it is illogical to wear most things, e.g.: 'That isn't something you can wear.'
en_us\en_us.t Short description
wornState: ThingState
unwornState: ThingState
Wearable states, used in listings to include 'being worn' or not.
VerbRule(Wear) Associates the grammars "wear dobjList", "don dobjList", "put dobjList on", and "put on dobjList" with WearAction.
Note: VerbRule(tag) is a macro defined in en_us.h. Note: WearAction is defined in actions.t (see above).
en_us\msg_neu.t Short description
playerActionMessages.cannotBeWearing(obj) '{You/he} must take off {the obj/him} before {it actor/he} can do that. '
playerActionMessages.notWearable '{That dobj/he} {is}n\'t something {you/he} can wear. '
playerActionMessages.alreadyWearing '{You\'re} already wearing {it dobj/him}. '
playerActionMessages.okayWear 'Okay, {you\'re} now wearing {the dobj/him}. '
npcActionMessages.okayWear '{You/he} put{s} on {the dobj/him}. '
actorInventoryLister (and subclasses) Figures out how to report an actor's inventory with special care to report carried and worn items appropriately. See INVENTORY.