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


DIG (IN) singleDobj (WITH singleIobj)

Syntax

Related actions: BREAK dobjList; STRIKE dobjList.

Default minimal behavior

>dig
What do you want to dig in?

>dig floor
What do you want to dig in it with?

>dig floor with book
You have no reason to dig in that.

dig matches VerbRule(Dig) which invokes DigAction. [TODO]

Summary of library references to digging

actions.t

Short description

DefineTAction(Dig)

Defines class DigAction: TAction

DefineTIAction(DigWith)

Defines class DigWithAction: TIAction
When "ALL" is used as the indirect object, it is limited to what is in the actor's inventory.

Note: DefineTAction(name) and DefineTIAction(name) are macros defined in adv3.h.

Note: TAction and TIAction are classes defined in action.t.

precond.t

Short description

objHeld: PreCondition The object must be held. A recursive TAKE command is implied.
touchObj: TouchObjCondition Pre-condition: actor must be able to touch the object.

thing.t

Short description

Thing.dobjFor(Dig)

By default, one can only dig things that one can touch. Also, it makes as much sense to dig an object as any other. Finally, most digging requires a tool, so the action is rerouted to DigWith via askForIobj(DigWith); this can be overridden for something like a sandy beach that can be dug without a tool.

askForIobj(newAction) is a macro defined in adv3.h. askForIobj(DigWith) expands to (DigWithAction.retryWithMissingIobj(gAction)).

Thing.dobjFor(DigWith) By default, one can only dig things that one can touch. However, it is illogical to dig most things, e.g.: 'You have no reason to dig in that.'
Thing.iobjFor(DigWith) When digging with something, it must be held by the actor. Further, it is illogical to dig with most things since they'd be ineffective, e.g.: 'You see no way to use that as a shovel.'

en_us\en_us.t

Short description

VerbRule(Dig)

Associates the grammars "dig singleDobj" and "dig in singleDobj" with DigAction.

VerbRule(DigWith)

Associates the grammars "dig singleDobj with singleIobj" and "dig in singleDobj with singleIobj" with DigWithAction.

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

Note: DigAction and DigWithAction are defined in actions.t (see above).

en_us\msg_neu.t

Short description

playerActionMessages.cannotDig '{You/he} {have} no reason to dig in {that dobj/him}. '
playerActionMessages.cannotDigWith '{You/he} see{s} no way to use {that dobj/him} as a shovel. '