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


EAT dobjList

Syntax

Default minimal behavior

>eat
What do you want to eat?

>eat floor
The floor does not appear to be edible.

eat matches VerbRule(Eat) which invokes EatAction. [TODO]

[Q: Why is there no implicit attempt at taking the floor? Does objHeld not work the way I thought it does? Does it only attempt the TAKE if the object isn't illogical to eat?]

Summary of library references to eating

actions.t

Short description

DefineTAction(Eat)

Defines class EatAction: TAction

Note: DefineTAction(name) is a macro defined in adv3.h.

Note: TAction is a class defined in action.t.

objects.t

Short description

class Food: Thing By default, a Food item must be held before one can attempt to eat it (this precondition is inherited from Thing), and it is logical to eat it. When a Food item is eaten, the player sees a bland acknowledgement (e.g.: 'You eat the banana.') and the item is removed from play.

precond.t

Short description

objHeld: PreCondition The object must be held. A recursive TAKE command is implied.

thing.t

Short description

Thing.dobjFor(Eat) By default, an object must be held before one can attempt to eat it, and even then, most things cannot be eaten because it's illogical (e.g.: 'Your wallet does not appear to be edible.').

en_us\en_us.t

Short description

VerbRule(Eat)

Associates the grammar "eat dobjList" with EatAction.

Note: VerbRule(tag) is a macro defined in en_us.h.

Note: EatAction is defined in actions.t (see above).

en_us\msg_neu.t

Short description

playerActionMessages.cannotEat '{The dobj/he} do{es} not appear to be edible. '
playerActionMessages.okayEat '{You/he} eat{s} {the dobj/him}. '