TIAction class | action.t[3935], en_us.t[8600]

Transitive-with-indirect Action class - this is an action that takes both a direct and indirect object. We subclass the basic one-object action to add the indirect object handling.

Modified in en_us.t[8600]:
English-specific additions for two-object verbs.

`class TIAction : TAction`

Superclass Tree (in declaration order)

`TIAction`
`TAction`
`Action`
`BasicProd`
`object`
`Resolver`
`object`

Subclass Tree

`TIAction`
`AttachToAction`
`predicate(AttachTo)`
`predicate(AttachToWhat)`
`AttackWithAction`
`predicate(AttackWith)`
`BurnWithAction`
`predicate(BurnWith)`
`CleanWithAction`
`predicate(CleanWith)`
`CutWithAction`
`predicate(CutWith)`
`predicate(CutWithWhat)`
`DetachFromAction`
`predicate(DetachFrom)`
`DigWithAction`
`predicate(DigWith)`
`FastenToAction`
`predicate(FastenTo)`
`GiveToAction`
`predicate(GiveTo)`
`predicate(GiveToType2)`
`predicate(GiveToWhom)`
`LockWithAction`
`predicate(LockWith)`
`MoveToAction`
`predicate(MoveTo)`
`MoveWithAction`
`predicate(MoveWith)`
`PlugIntoAction`
`predicate(PlugInto)`
`predicate(PlugIntoWhat)`
`PourIntoAction`
`predicate(PourInto)`
`PourOntoAction`
`predicate(PourOnto)`
`PushTravelViaIobjAction`
`PushTravelClimbDownAction`
`predicate(PushTravelClimbDown)`
`PushTravelClimbUpAction`
`predicate(PushTravelClimbUp)`
`PushTravelEnterAction`
`predicate(PushTravelEnter)`
`PushTravelGetOutOfAction`
`predicate(PushTravelGetOutOf)`
`PushTravelThroughAction`
`predicate(PushTravelThrough)`
`PutBehindAction`
`predicate(PutBehind)`
`PutInAction`
`predicate(PutIn)`
`predicate(PutInWhat)`
`PutOnAction`
`predicate(PutOn)`
`PutUnderAction`
`predicate(PutUnder)`
`ScrewWithAction`
`predicate(ScrewWith)`
`ShowToAction`
`predicate(ShowTo)`
`predicate(ShowToType2)`
`predicate(ShowToWhom)`
`TakeFromAction`
`predicate(TakeFrom)`
`ThrowAtAction`
`predicate(ThrowAt)`
`ThrowToAction`
`predicate(ThrowTo)`
`predicate(ThrowToType2)`
`TurnWithAction`
`predicate(TurnWith)`
`UnfastenFromAction`
`predicate(UnfastenFrom)`
`UnlockWithAction`
`predicate(UnlockWith)`
`UnplugFromAction`
`predicate(UnplugFrom)`
`UnscrewWithAction`
`predicate(UnscrewWith)`

Global Objects

(none)

Summary of Properties

`actionIobjProp askIobjResponseProd checkIobjProp execFirst iobjCur_ iobjInfoCur_ iobjList_ iobjMatch iobjResolver_ isPrepositionalPhrasing lastObjList_ needAnaphoricBinding_ omitIobjInDobjQuery preCondIobjProp predicateNounPhrases remapIobjProp resolveFirst resolveFirstEmpty tentativeDobj_ tentativeIobj_ verIobjProp`

Inherited from `TAction` :
`actionAllowsAll actionDobjProp actor_ askDobjResponseProd checkDobjProp dobjCur_ dobjInfoCur_ dobjList_ dobjMatch dobjResolver_ issuer_ preCondDobjProp remapDobjProp verDobjProp whichMessageObject`

Inherited from `Action` :
`actionTime afterActionMainList beforeAfterObjs defaultForRecursion extraMessageParams implicitMsg includeInUndo isImplicit isRepeatable iterationCanceled originalAction parentAction preCond pronounOverride remappedFrom showDefaultReports synthParamID verbFlags verifiedOkay`

Inherited from `BasicProd` :
`firstTokenIndex isSpecialResponseMatch lastTokenIndex`

Inherited from `Resolver` :
`action_ equivs_ isGlobalScope isSubResolver scope_ whichObject`

Summary of Methods

`announceAllDefaultObjects announceDefaultObject canIobjResolveTo checkAction checkRemapping copyTentativeObjs createForMissingIobj createIobjResolver doActionMain execAction filterAmbiguousIobj filterPluralIobj getAllIobj getAnaphoricBinding getCurrentObjects getDefaultIobj getIobj getIobjCount getIobjFlags getIobjInfo getIobjResolver getIobjTokens getIobjWords getMatchForRole getMessageParam getObjectForRole getObjResponseProd getOtherMessageObjectPronoun getOtherObjectRole getPreCondDescList getPreCondPropForRole getQuestionInf getRemapPropForRole getResolvedIobjList getResolvedObjList getResolveInfo getRoleFromIndex getTentativeDobj getTentativeIobj getVerbPhrase getVerbPhrase2 getVerifyPropForRole initForMissingDobj initForMissingIobj initTentative needRemappedAnnouncement resetAction resolvedObjectsInScope resolveNouns retryWithAmbiguousIobj retryWithMissingIobj setCurrentObjects setObjectMatches setPronounByInput setResolvedIobj setResolvedObjects testRetryDefaultIobj verifyAction whatObj`

Inherited from `TAction` :
`adjustDefaultObjectPrep canDobjResolveTo construct createDobjResolver createForMissingDobj createForRetry filterAmbiguousDobj filterPluralDobj getAllDobj getDefaultDobj getDobj getDobjCount getDobjFlags getDobjInfo getDobjResolver getDobjTokens getDobjWords getResolvedDobjList getVerbPhrase1 initResolver retryWithAmbiguousDobj retryWithMissingDobj setResolvedDobj testRetryDefaultDobj`

Inherited from `Action` :
`actionOfKind addBeforeAfterObj afterAction afterActionMain announceActionObject beforeAction beforeActionMain cacheMultiObjectAnnouncements callAfterActionMain callCatchAllProp callPreConditions callVerifyPreCond callVerifyProp cancelIteration checkPreConditions combineRemappedVerifyResults createActionFrom createActionInstance createTopicQualifierResolver doAction doActionOnce filterAmbiguousWithVerify filterFacets filterPluralWithVerify finishResolveList getDefaultWithVerify getEnteredVerbPhrase getImplicitPhrase getInfPhrase getNotifyTable getObjPreCondDescList getObjPreConditions getOriginalAction getOrigTokenList getParticiplePhrase getPredicate getPronounOverride getRemappedFrom getSimpleSynonymRemap getSortedVerifyResults isConversational isNestedIn isPartOf isRemapped makeResolveInfo makeResolveInfoList maybeAnnounceDefaultObject maybeAnnounceImplicit maybeAnnounceMultiObject noMatch notifyBeforeAfter objListPronoun preAnnounceActionObject recalcSenseContext repeatAction resolveAction runBeforeNotifiers saveActionForAgain setImplicit setMessageParam setMessageParams setNested setOriginalAction setPronounOverride setRemapped spPrefix spSuffix synthMessageParam verifyHandlersExist whatTranslate withVerifyResults zeroActionTime`

Inherited from `BasicProd` :
`canResolveTo getOrigText setOrigTokenList`

Inherited from `Resolver` :
`allowAll cacheScopeList filterAll filterAmbiguousEquivalents filterAmbiguousNounPhrase filterPluralPhrase filterPossRank getAction getAll getAllDefaults getDefaultObject getPossessiveResolver getPronounDefault getQualifierResolver getRawPronounAntecedent getReflexiveBinding getScopeList getTargetActor matchName objInScope resetResolver resolvePronounAntecedent resolveUnknownNounPhrase selectIndefinite withGlobals`

Properties

`actionIobjProp` | `action.t[5174]`

no description available

`askIobjResponseProd` | `action.t[4087]`

The root production to use to parse missing indirect object responses. By default, this is singleNoun, but individual actions can override this as appropriate.

Note that language modules might want to override this to allow for special responses. For example, in English, most verbs will want to override this with a specialized production that allows the appropriate preposition in the response.

`checkIobjProp` | `action.t[5173]`

no description available

`execFirst` | `action.t[4126]`

Determine which object to call first for action processing. By default, we execute in the same order as we resolve, but this can be overridden if necessary.

`iobjCur_` | `action.t[5149]`

current indirect object being executed

`iobjInfoCur_` | `action.t[5152]`

the full ResolveInfo associated with iobjCur_

`iobjList_` | `action.t[5146]`

the indirect object list

`iobjMatch` | `action.t[5143]`

the predicate grammar must assign the indirect object production tree to iobjMatch

`iobjResolver_` | `action.t[5155]`

my cached indirect object resolver

`isPrepositionalPhrasing` | `en_us.t[8646]`

For VerbRules: does this verb rule have a prepositional or structural phrasing of the direct and indirect object slots? That is, are the object slots determined by a prepositional marker, or purely by word order? For most English verbs with two objects, the indirect object is marked by a preposition: GIVE BOOK TO BOB, PUT BOOK IN BOX. There are a few English verbs that don't include any prespositional markers for the objects, though, and assign the noun phrase roles purely by the word order: GIVE BOB BOOK, SHOW BOB BOOK, THROW BOB BOOK. We define these phrasings with separate verb rules, which we mark with this property.

We use this in ranking verb matches. Non-prepositional verb structures are especially prone to matching where they shouldn't, because we can often find a way to pick out words to fill the slots in the absence of any marker words. For example, GIVE GREEN BOOK could be interpreted as GIVE BOOK TO GREEN, where GREEN is assumed to be an adjective-ending noun phrase; but the player probably means to give the green book to someone who they assumed would be filled in as a default. So, whenever we find an interpretation that involves a non-prespositional phrasing, we'll use this flag to know we should be suspicious of it and try alternative phrasing first.

Most two-object verbs in English use prepositional markers, so we'll set this as the default. Individual VerbRules that use purely structural phrasing should override this.

`lastObjList_` | `action.t[4500]`

The last object list we resolved. We keep track of this so that we can provide it as the anaphoric binding, if an anaphor binding is requested.

`needAnaphoricBinding_` | `action.t[4508]`

Flag: we have been asked for an anaphoric binding, but we don't have a binding available. We'll check this after resolving the first-resolved noun phrase so that we can go back and re-resolve it again after resolving the other noun phrase.

`omitIobjInDobjQuery` | `en_us.t[8616]`

Flag: omit the indirect object in a query for a missing direct object. For many verbs, if we already know the indirect object and we need to ask for the direct object, the query sounds best when it includes the indirect object: "what do you want to put in it?" or "what do you want to take from it?". This is the default phrasing.

However, the corresponding query for some verbs sounds weird: "what do you want to dig in with it?" or "whom do you want to ask about it?". For such actions, this property should be set to true to indicate that the indirect object should be omitted from the queries, which will change the phrasing to "what do you want to dig in", "whom do you want to ask", and so on.

`preCondIobjProp` | `action.t[5172]`

no description available

`predicateNounPhrases` OVERRIDDEN | `action.t[4322]`

we have a direct and indirect object

`remapIobjProp` | `action.t[5183]`

Action-remap properties for the indirect object. By convention, the remapper properties are named remapDobjAction and remapIobjAction, for the direct and indirect objects, respectively, where Action is replaced by the root name of the action.

`resolveFirst` | `action.t[4107]`

Resolution order - returns DirectObject or IndirectObject to indicate which noun phrase to resolve first in resolveNouns(). By default, we'll resolve the indirect object first, but individual actions can override this to resolve in a non-default order.

`resolveFirstEmpty` | `action.t[4119]`

Empty phrase resolution order. This is similar to the standard resolution order (resolveFirst), but is used only when both the direct and indirect objects are empty phrases.

When both phrases are empty, we will either use a default or prompt interactively for the missing phrase. In most cases, it is desirable to prompt interactively for a missing direct object first, regardless of the usual resolution order.

`tentativeDobj_` | `action.t[5162]`

The tentative direct and indirect object lists. A tentative list is available for the later-resolved object while resolving the earlier-resolved object.

`tentativeIobj_` | `action.t[5163]`

no description available

`verIobjProp` | `action.t[5171]`

Verification and action properties for the indirect object. By convention, the verification method for the indirect object of a two-object action is verIobjXxx; the check method is checkIobjXxx; and the action method is actionIobjXxx.

Methods

`announceAllDefaultObjects (allResolved)`OVERRIDDEN | `en_us.t[8767]`

announce all defaulted objects

`announceDefaultObject (obj, whichObj, resolvedAllObjects)`OVERRIDDEN | `en_us.t[8711]`

announce a default object used with this action

`canIobjResolveTo (obj)` | `action.t[4135]`

Can the indirect object potentially resolve to the given simulation object? This only determines if the object is a *syntactic* match, meaning that it can match at a vocabulary and grammar level. This doesn't test it for logicalness or check that it's an otherwise valid resolution.

`checkAction ( )`OVERRIDDEN | `action.t[4976]`

Check the command.

For a two-object action, this first calls the catch-all 'check' methods (the dobjFor(Default) and dobjFor(All) methods) on the two objects (indirect object first), then calls the 'check' methods for this specific action (direct object first).

`checkRemapping ( )`OVERRIDDEN | `action.t[4935]`

Check for remapping

`copyTentativeObjs ( )` | `action.t[5122]`

Copy one tentative object list to the other. This is useful when an object's verifier for one TIAction wants to forward the call to the other object verifier for a different TIAction.

`createForMissingIobj (orig, asker)` | `action.t[4010]`

Create an instance of this action for retrying a given single-object action with a missing indirect object.

`createIobjResolver (issuingActor, targetActor)` | `action.t[4544]`

Create our indirect object resolver. By default, we'll use a basic indirect object resolver.

`doActionMain ( )`OVERRIDDEN | `action.t[4590]`

Execute the action. We'll run through the execution sequence once for each resolved object in our direct or indirect object list, depending on which one is the list and which one is the singleton.

`execAction ( )`OVERRIDDEN | `action.t[5008]`

Execute the command.

`filterAmbiguousIobj (lst, requiredNum, np)` | `action.t[4560]`

filter an ambiguous indirect object noun phrase

`filterPluralIobj (lst, np)` | `action.t[4569]`

filter a plural phrase

`getAllIobj (actor, scopeList)` | `action.t[4554]`

Resolve 'all' for the indirect object. By default, we'll return everything in the scope list.

`getAnaphoricBinding (typ)`OVERRIDDEN | `action.t[4476]`

Get the anaphoric binding for the noun phrase we're currently resolving.

`getCurrentObjects ( )`OVERRIDDEN | `action.t[5101]`

Get the list of active objects. We have a direct and indirect object.

`getDefaultIobj (np, resolver)` | `action.t[4577]`

get the default indirect object

`getIobj ( )` | `action.t[5072]`

get the current indirect object being executed

`getIobjCount ( )` | `action.t[5081]`

get the number of direct objects

`getIobjFlags ( )` | `action.t[5078]`

get the object resolution flags for the indirect object

`getIobjInfo ( )` | `action.t[5075]`

get the full ResolveInfo associated with the current indirect object

`getIobjResolver (issuingActor, targetActor, reset)` | `action.t[4526]`

get our indirect object resolver, or create one if we haven't already cached one

`getIobjTokens ( )` | `action.t[5084]`

get the original token list of the current indirect object phrase

`getIobjWords ( )` | `action.t[5091]`

get the original words (as a list of strings) of the current iobj

`getMatchForRole (role)`OVERRIDDEN | `action.t[4388]`

get the match tree for the noun phrase in the given role

`getMessageParam (objName)`OVERRIDDEN | `action.t[5057]`

Get a message parameter object for the action. We define 'dobj' as the direct object and 'iobj' as the indirect object, in addition to any inherited targets.

`getObjectForRole (role)`OVERRIDDEN | `action.t[4335]`

get the resolved object in a given role

`getObjResponseProd (resolver)`OVERRIDDEN | `action.t[4090]`

get the missing object response production for a given role

`getOtherMessageObjectPronoun (which)` | `en_us.t[8852]`

Get the pronoun for the message object in the given role.

`getOtherObjectRole (role)`OVERRIDDEN | `action.t[4381]`

get the OtherObject role for the given role

`getPreCondDescList ( )`OVERRIDDEN | `action.t[5041]`

get the precondition descriptor list for the action

`getPreCondPropForRole (role)`OVERRIDDEN | `action.t[4401]`

get the 'preCond' property for a given object role

`getQuestionInf (which)`OVERRIDDEN | `en_us.t[8777]`

show the verb's basic infinitive form for an interrogative

`getRemapPropForRole (role)`OVERRIDDEN | `action.t[4407]`

get the 'remap' property for a given object role

`getResolvedIobjList ( )` | `action.t[4420]`

get the list of resolved indirect objects

`getResolvedObjList (which)`OVERRIDDEN | `action.t[4413]`

get the list of resolved objects in the given role

`getResolveInfo (obj, oldRole)`OVERRIDDEN | `action.t[4342]`

get the ResolveInfo for the given resolved object

`getRoleFromIndex (idx)`OVERRIDDEN | `action.t[4325]`

get an object role

`getTentativeDobj ( )` | `action.t[5136]`

Get the tentative direct/indirect object resolution lists. A tentative list is available for the later-resolved object while resolving the earlier-resolved object.

`getTentativeIobj ( )` | `action.t[5137]`

no description available

`getVerbPhrase (inf, ctx)`OVERRIDDEN | `en_us.t[8883]`

get the verb phrase in infinitive or participle form

`getVerbPhrase2 (inf, vp, dobjText, dobjIsPronoun, iobjText)` | `en_us.t[8927]`

Get the verb phrase for a two-object (dobj + iobj) phrasing. This is a class method, so that it can be reused by unrelated (i.e., non-TIAction) classes that also use two-object syntax but with other internal structures. This is the two-object equivalent of TAction.getVerbPhrase1().

`getVerifyPropForRole (role)`OVERRIDDEN | `action.t[4395]`

get the 'verify' property for a given object role

`initForMissingDobj (orig)`OVERRIDDEN | `action.t[4040]`

Initialize the action for retrying with a missing direct object.

If we're trying a TIAction, we can only be coming from a TAction (since that's the only kind of original action that can turn into a two-object, at least in the base library). That means the original action already has a direct object. Now, since we're asking for a MISSING direct object, the only possibility is that the original action's direct object is our INDIRECT object. For example: SWEEP WITH BROOM is turning into SWEEP <what> WITH BROOM.

`initForMissingIobj (orig)` | `action.t[4063]`

Initialize the action for retrying with a missing indirect object.

We can only be coming from a TAction, so the TAction will have a direct object already. Simply copy that as our own direct object. For example: UNLOCK DOOR is turning into UNLOCK DOOR WITH <what>.

`initTentative (issuingActor, targetActor, whichObj)`OVERRIDDEN | `action.t[4869]`

initialize tentative resolutions for other noun phrases

`needRemappedAnnouncement (info)` | `action.t[4823]`

Determine if we need to announce this action when the action was remapped, based on the resolution information for one of our objects. We need to announce a remapped action when either object had unclear disambiguation or was defaulted.

`resetAction ( )`OVERRIDDEN | `action.t[3936]`

no description available

`resolvedObjectsInScope ( )`OVERRIDDEN | `action.t[4511]`

check that the resolved objects are in scope

`resolveNouns (issuingActor, targetActor, results)`OVERRIDDEN | `action.t[4145], en_us.t[8649]`

resolve our noun phrases to objects

Modified in en_us.t[8649]:
resolve noun phrases

`retryWithAmbiguousIobj (orig, objs, asker, objPhrase)` | `action.t[3966]`

Retry an action as a two-object action with an ambiguous indirect object. We'll ask which of the given possible objects is intended.

`retryWithMissingIobj (orig, asker)` | `action.t[3955]`

Retry a single-object action as a two-object action. We'll treat the original action's direct object list as our direct object list, and obtain an indirect object using the normal means (first looking for a default, then prompting the player if we can't find a suitable default). 'orig' is the original single-object action.

This routine terminates with 'exit' if it doesn't throw some other error.

`setCurrentObjects (lst)`OVERRIDDEN | `action.t[5107]`

set the current objects

`setObjectMatches (dobj, iobj)`OVERRIDDEN | `action.t[4457]`

manually set the unresolved object noun phrase match trees

`setPronounByInput (lst)` | `action.t[4766]`

Set the pronoun according to the pronoun type actually used in the input. For example, if we said PUT BOX ON IT, we want IT to continue referring to whatever IT referred to before this command - we specifically do NOT want IT to refer to the BOX in this case.

`setResolvedIobj (iobj)` | `action.t[4443]`

set a resolved iobj

`setResolvedObjects (dobj, iobj)`OVERRIDDEN | `action.t[4433]`

Manually set the resolved objects. We'll set our direct and indirect objects.

`testRetryDefaultIobj (orig)` | `action.t[3989]`

Test to see if askForIobj() would find a default indirect object. Returns true if there's a default, nil if not. If this returns true, then askForIobj() will simply take the default and proceed; otherwise, it will have to actually ask the user for the missing information.

`verifyAction ( )`OVERRIDDEN | `action.t[4837]`

Verify the action.

`whatObj (which)`OVERRIDDEN | `en_us.t[8685]`

get the interrogative for one of our objects

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3