Actionclass | action.t[157], en_us.t[8119] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Modified in en_us.t[8119]:
Language-specific Action modifications.
class
Action : BasicProd
Action
BasicProd
object
Action
CommandActorAction
EventAction
IAction
AgainAction
predicate(Again)
ConvIAction
GoodbyeAction
predicate(Goodbye)
HelloAction
predicate(Hello)
NoAction
predicate(No)
YesAction
predicate(Yes)
DebugAction
ExitsAction
predicate(Exits)
GetOutAction
predicate(GetOut)
GoBackAction
predicate(GoBack)
InventoryAction
predicate(Inventory)
InventoryTallAction
predicate(InventoryTall)
InventoryWideAction
predicate(InventoryWide)
JumpAction
predicate(Jump)
JumpOffIAction
predicate(JumpOffI)
LieAction
predicate(Lie)
LiteralAction
OopsAction
predicate(Oops)
SpecialTopicAction
predicate(SpecialTopic)
LookAction
predicate(Look)
NoteDarknessAction
OopsIAction
predicate(OopsOnly)
predicate(EmptySpecialTopic)
SenseImplicitAction
ListenImplicitAction
predicate(ListenImplicit)
SmellImplicitAction
predicate(SmellImplicit)
SitAction
predicate(Sit)
SleepAction
predicate(Sleep)
StandAction
predicate(Stand)
SystemAction
AboutAction
predicate(About)
CreditsAction
predicate(Credits)
ExitsModeAction
predicate(ExitsMode)
FileOpAction
RecordAction
predicate(Record)
RecordEventsAction
predicate(RecordEvents)
RecordStringAction
predicate(RecordString)
RecordEventsStringAction
predicate(RecordEventsString)
ReplayAction
ReplayStringAction
predicate(ReplayQuiet)
predicate(ReplayString)
SaveAction
predicate(Save)
SaveStringAction
predicate(SaveString)
ScriptAction
predicate(Script)
ScriptStringAction
predicate(ScriptString)
FootnoteAction
predicate(Footnote)
FootnotesAction
FootnotesFullAction
predicate(FootnotesFull)
FootnotesMediumAction
predicate(FootnotesMedium)
FootnotesOffAction
predicate(FootnotesOff)
FootnotesStatusAction
predicate(FootnotesStatus)
FullScoreAction
predicate(FullScore)
HintAction
predicate(Hint)
HintsOffAction
predicate(HintsOff)
InstructionsAction
predicate(instructions)
NotifyAction
predicate(Notify)
NotifyOffAction
predicate(NotifyOff)
NotifyOnAction
predicate(NotifyOn)
PauseAction
predicate(Pause)
QuitAction
predicate(Quit)
RecordOffAction
predicate(RecordOff)
RestartAction
predicate(Restart)
RestoreAction
predicate(Restore)
RestoreStringAction
predicate(RestoreString)
RestoreDefaultsAction
predicate(RestoreDefaults)
SaveDefaultsAction
predicate(SaveDefaults)
ScoreAction
predicate(Score)
ScriptOffAction
predicate(ScriptOff)
TerseAction
predicate(Terse)
TipModeAction
predicate(TipsOff)
predicate(TipsOn)
TopicsAction
predicate(Topics)
UndoAction
predicate(Undo)
VerboseAction
predicate(Verbose)
VersionAction
predicate(Version)
TopicAction
TravelAction
AftAction
DownAction
EastAction
ForeAction
InAction
predicate(In)
NorthAction
NortheastAction
NorthwestAction
OutAction
predicate(Out)
PortAction
predicate(Port)
predicate(Travel)
SouthAction
SoutheastAction
SouthwestAction
StarboardAction
predicate(Starboard)
TravelDirAction
UpAction
WestAction
VagueTravelAction
predicate(VagueTravel)
WaitAction
predicate(Wait)
YellAction
predicate(Yell)
TAction
AttackAction
predicate(Attack)
BoardAction
predicate(Board)
BreakAction
predicate(Break)
BurnAction
predicate(Burn)
CleanAction
predicate(Clean)
ClimbAction
predicate(Climb)
ClimbDownAction
predicate(ClimbDown)
predicate(ClimbDownWhat)
ClimbUpAction
predicate(ClimbUp)
predicate(ClimbUpWhat)
CloseAction
predicate(Close)
ConsultAction
predicate(Consult)
CutAction
DetachAction
predicate(Detach)
DigAction
predicate(Dig)
DoffAction
predicate(Doff)
DrinkAction
predicate(Drink)
DropAction
predicate(Drop)
EatAction
predicate(Eat)
EnterAction
predicate(Enter)
ExamineAction
predicate(Examine)
ExtinguishAction
predicate(Extinguish)
FastenAction
predicate(Fasten)
FeelAction
predicate(Feel)
FlipAction
predicate(Flip)
FollowAction
predicate(Follow)
GetOffOfAction
predicate(GetOffOf)
GetOutOfAction
predicate(GetOutOf)
GoThroughAction
predicate(GoThrough)
JumpOffAction
predicate(JumpOff)
JumpOverAction
predicate(JumpOver)
KissAction
predicate(Kiss)
LieOnAction
predicate(LieOn)
LightAction
predicate(Light)
ListenToAction
predicate(ListenTo)
LiteralTAction
EnterOnAction
predicate(EnterOn)
predicate(EnterOnWhat)
SetToAction
predicate(SetTo)
TurnToAction
predicate(TurnTo)
TypeLiteralOnAction
predicate(TypeLiteralOn)
predicate(TypeLiteralOnWhat)
LockAction
predicate(Lock)
LookBehindAction
predicate(LookBehind)
LookInAction
predicate(LookIn)
LookThroughAction
predicate(LookThrough)
LookUnderAction
predicate(LookUnder)
MoveAction
predicate(Move)
OpenAction
predicate(Open)
PlugInAction
predicate(PlugIn)
PourAction
predicate(Pour)
PullAction
predicate(Pull)
PushAction
predicate(Push)
PushTravelAction
PushTravelDirAction
predicate(PushTravelDir)
PushAftAction
PushDownAction
PushEastAction
PushForeAction
PushInAction
PushNorthAction
PushNortheastAction
PushNorthwestAction
PushOutAction
PushPortAction
PushSouthAction
PushSoutheastAction
PushSouthwestAction
PushStarboardAction
PushUpAction
PushWestAction
PushTravelViaIobjAction
PushTravelClimbDownAction
predicate(PushTravelClimbDown)
PushTravelClimbUpAction
predicate(PushTravelClimbUp)
PushTravelEnterAction
predicate(PushTravelEnter)
PushTravelGetOutOfAction
predicate(PushTravelGetOutOf)
PushTravelThroughAction
predicate(PushTravelThrough)
ReadAction
predicate(Read)
RemoveAction
predicate(Remove)
ScrewAction
predicate(Screw)
SearchAction
predicate(Search)
SetAction
predicate(Set)
SitOnAction
predicate(SitOn)
SmellAction
predicate(Smell)
StandOnAction
predicate(StandOn)
StrikeAction
predicate(Strike)
SwitchAction
predicate(Switch)
TakeAction
predicate(Take)
TalkToAction
predicate(TalkTo)
predicate(TalkToWhat)
TasteAction
predicate(Taste)
ThrowAction
predicate(Throw)
ThrowDirAction
predicate(ThrowDir)
predicate(ThrowDirDown)
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)
TopicTAction
AskVagueAction
predicate(AskVague)
predicate(TellVague)
ConsultAboutAction
predicate(ConsultAbout)
predicate(ConsultWhatAbout)
ConvTopicTAction
AskAboutAction
predicate(AskAbout)
predicate(AskAboutImplicit)
predicate(AskAboutWhat)
AskForAction
predicate(AskFor)
predicate(AskWhomFor)
TellAboutAction
predicate(TellAbout)
predicate(TellAboutImplicit)
predicate(TellAboutWhat)
TellVagueAction
TravelViaAction
EnTravelVia
TurnAction
predicate(Turn)
TurnOffAction
predicate(TurnOff)
TurnOnAction
predicate(TurnOn)
TypeOnAction
predicate(TypeOn)
UnfastenAction
predicate(Unfasten)
UnlockAction
predicate(Unlock)
UnplugAction
predicate(Unplug)
UnscrewAction
predicate(Unscrew)
WearAction
predicate(Wear)
actionTime
afterActionMainList
beforeAfterObjs
defaultForRecursion
extraMessageParams
implicitMsg
includeInUndo
isImplicit
isRepeatable
iterationCanceled
originalAction
parentAction
preCond
predicateNounPhrases
pronounOverride
remappedFrom
showDefaultReports
synthParamID
verbFlags
verifiedOkay
Inherited from BasicProd
:
firstTokenIndex
isSpecialResponseMatch
lastTokenIndex
actionOfKind
addBeforeAfterObj
afterAction
afterActionMain
announceActionObject
announceAllDefaultObjects
announceDefaultObject
beforeAction
beforeActionMain
cacheMultiObjectAnnouncements
callAfterActionMain
callCatchAllProp
callPreConditions
callVerifyPreCond
callVerifyProp
cancelIteration
checkAction
checkPreConditions
checkRemapping
combineRemappedVerifyResults
createActionFrom
createActionInstance
createTopicQualifierResolver
doAction
doActionOnce
execAction
filterAmbiguousWithVerify
filterFacets
filterPluralWithVerify
finishResolveList
getAnaphoricBinding
getCurrentObjects
getDefaultWithVerify
getEnteredVerbPhrase
getImplicitPhrase
getInfPhrase
getMatchForRole
getMessageParam
getNotifyTable
getObjectForRole
getObjPreCondDescList
getObjPreConditions
getObjResponseProd
getOriginalAction
getOrigTokenList
getOtherObjectRole
getParticiplePhrase
getPreCondDescList
getPreCondPropForRole
getPredicate
getPronounOverride
getQuestionInf
getRemappedFrom
getRemapPropForRole
getResolvedObjList
getResolveInfo
getRoleFromIndex
getSimpleSynonymRemap
getSortedVerifyResults
getVerbPhrase
getVerifyPropForRole
initTentative
isConversational
isNestedIn
isPartOf
isRemapped
makeResolveInfo
makeResolveInfoList
maybeAnnounceDefaultObject
maybeAnnounceImplicit
maybeAnnounceMultiObject
noMatch
notifyBeforeAfter
objListPronoun
preAnnounceActionObject
recalcSenseContext
repeatAction
resetAction
resolveAction
resolvedObjectsInScope
runBeforeNotifiers
saveActionForAgain
setCurrentObjects
setImplicit
setMessageParam
setMessageParams
setNested
setObjectMatches
setOriginalAction
setPronounOverride
setRemapped
setResolvedObjects
spPrefix
spSuffix
synthMessageParam
verifyAction
verifyHandlersExist
whatObj
whatTranslate
withVerifyResults
zeroActionTime
Inherited from BasicProd
:
canResolveTo
getOrigText
setOrigTokenList
actionTime | action.t[1298] |
afterActionMainList | action.t[1291] |
beforeAfterObjs | action.t[2254] |
defaultForRecursion | action.t[504] |
extraMessageParams | action.t[642] |
implicitMsg | action.t[543] |
includeInUndo | action.t[656] |
isImplicit | action.t[512] |
isRepeatable | action.t[649] |
iterationCanceled | action.t[204] |
originalAction | action.t[540] |
parentAction | action.t[527] |
Note that while all implicit commands are nested, not all nested commands are implicit. A nested command may simply be a component of another command, or another command may be handled entirely by running a different command as a nested command. In any case, a nested but non-implicit command does not appear to the player as a separate command; it is simply part of the original command.
preCond | action.t[2403] |
predicateNounPhrases | action.t[834] |
The base Action is intransitive, so it doesn't have any noun-phrase slots, hence this is an empty list.
pronounOverride | action.t[1021] |
remappedFrom | action.t[534] |
showDefaultReports | action.t[550] |
synthParamID | action.t[633] |
verbFlags | en_us.t[8411] |
verifiedOkay | action.t[2968] |
actionOfKind (cls) | action.t[162] |
addBeforeAfterObj (obj) | action.t[2243] |
afterAction ( ) | action.t[1812] |
afterActionMain ( ) | action.t[1196] |
announceActionObject (info, numberInList, whichObj) | action.t[1600] |
We announce an object under several circumstances:
- If we are iterating through multiple objects, we'll show the current object to show the player the individual step in the command being performed.
- If 'all' was used to specify the object, we'll announce it even if only one object is involved, to make it clear to the player exactly what we chose as a match.
- If we are executing the command on a single object, and the object was chosen through disambiguation of a set of ambiguous choices, and some of the discarded possibilities were logical but less so than the chosen object, we'll show the assumption we made. In such cases, our assumption is not necessarily correct, so we'll tell the user about our choice explicitly by way of confirmation - this gives the user a better chance of noticing quickly if our assumption was incorrect.
- If we supplied a default for a missing noun phrase in the player's command, we'll show what we chose. Since the player didn't say what they meant, we'll make it plain that we're providing an assumption about what we thought they must have meant.
'info' is the ResolveInfo object describing this resolved object, and 'numberInList' is the total number of objects we're iterating over for this object function (direct object, indirect object, etc). 'whichObj' is one of the object function constants (DirectObject, IndirectObject, etc) describing which object we're mentioning; the language-specific message generator might use this in conjunction with the action to include a preposition with the displayed phrase, for example, or choose an appropriate inflection.
announceAllDefaultObjects (allResolved) | en_us.t[8289] |
announceDefaultObject (obj, whichObj, resolvedAllObjects) | en_us.t[8276] |
'resolvedAllObjects' indicates where we are in the command processing: this is true if we've already resolved all of the other objects in the command, nil if not. We use this information to get the phrasing right according to the situation.
beforeAction ( ) | action.t[1776] |
beforeActionMain ( ) | action.t[1187] |
cacheMultiObjectAnnouncements (lst, whichObj) | action.t[1674] |
callAfterActionMain (obj) | action.t[1279] |
Each object is only registered once. If a caller attempts to register the same object repeatedly, we'll simply ignore the repeated requests.
This is a convenient way to implement a collective follow-up to the parts of an iterated action. Since repeated registrations are ignored, each handler for an iterated object (such as a "dobjFor" action() handler) can register its follow-up handler without worrying about redundant registration. Then, when the overall action is completed for each iterated object involved, the follow-up handler will be invoked, and it can do any final work for the overall action. For example, the follow-up handler could display a message summarizing the iterated parts of the action; or, it could even scan the transcript for particular messages and replace them with a summary.
callCatchAllProp (obj, actionProp, defProp, allProp) | action.t[1946] |
actionProp is the custom per-object/per-action property that we normally invoke to process the action. For example, if we're processing verification for the direct object of Take, this would be &verifyDobjTake.
defProp is the default property that corresponds to actionProp. This is the per-object/default-action property that we invoke when the object doesn't provide a "more specialized" version of actionProp - that is, if the object doesn't define or inherit actionProp at a point in its class hierarchy that is more specialized than the point at which it defines defProp, we'll call defProp. If there is a more specialized definition of actionProp for the object, it effectively overrides the default handler, so we do not invoke the default handler.
allProp is the catch-all property corresponding to actionProp. We invoke this property in all cases.
Returns true if there is indeed a Default property that overrides the action, nil if not.
callPreConditions (lst, allowImplicit) | action.t[2338] |
callVerifyPreCond (resultSoFar) | action.t[1896] |
callVerifyProp (obj, verProp, preCondProp, remapProp, resultSoFar, whichObj) | action.t[1984] |
We call verification directly on the object, and we also call verification on the object's preconditions.
If resultSoFar is non-nil, it is a VerifyResultList that has the results so far - this can be used for multi-object verifications to gather all of the verification results for all of the objects into a single result list. If resultSoFar is nil, we'll create a new result list.
cancelIteration ( ) | action.t[201] |
Note that this doesn't cause a jump out of the current code, so it's not like 'exit' or the other termination signals. Instead, this simply tells the action to proceed normally for the remainder of the processing for the current object, and then act as though there were no more objects to iterate over, ending the command normally. If you want to cut off the remainder of the execution cycle for the current object, you can use 'exit' (for example) immediately after calling this method.
checkAction ( ) | action.t[1791] |
Intransitive actions don't generally have to do anything in the 'check' phase, since they can simply do any necessary checks in the 'execute' phase that runs immediately after 'check'. This phase is separated out from 'execute' mostly for the benefit of transitive actions, where the 'check' phase gives the involved objects a chance to object to the action.
checkPreConditions (allowImplicit) | action.t[2292] |
This should check all of the conditions that must be met for the action to proceed. If any pre-condition can be met by running an implicit command first, that implicit command should be executed here. If any pre-condition cannot be met, this routine should notify the actor and throw an ExitSignal.
Returns true if any implicit commands are executed, nil if not. Implicit commands can only be attempted if allowImplicit is true; if this is nil, a precondition must simply fail (by displaying an appropriate failure report and using 'exit') without attempting an implicit command if its assertion does not hold.
checkRemapping ( ) | action.t[1851] |
combineRemappedVerifyResults (lst, role) | action.t[2520] |
createActionFrom (orig) | action.t[275] |
createActionInstance ( ) | action.t[235] |
The generic actions defined in the library are always subclassed by language-specific library modules, because the language modules have to define the grammar rules for the verbs - we can't define the grammar rules generically because the verbs wouldn't be reusable for non-English translations if we did. As a result, library code referring to one of the library verbs by name, say TakeAction, doesn't get a language-specific subclass of the verb, but just gets the language-independent base class.
However, to make full use of an Action object in a recursive command, we do need a final language-specific subclass - without this, we won't be able to generate text describing the command, for example. This method bridges this gap by finding a suitable language-specific subclass of the given action, then creating an instance of that subclass rather than an instance of the base class.
By default, we'll take any subclass of this action that is itself a class. However, if any subclass has the property defaultForRecursion set to true, we'll use that class specifically - this lets the language module designate a particular subclass to use as the default for recursive commands, which might be desirable in cases where the language module defines more than one subclass of an action.
createTopicQualifierResolver (issuingActor, targetActor) | action.t[2951] |
doAction (issuingActor, targetActor, targetActorPhrase, countsAsIssuerTurn) | action.t[1097] |
doActionOnce ( ) | action.t[1326] |
Subclasses generally won't override this method, but will instead override the methods that implement the individual steps in the execution sequence.
execAction ( ) | action.t[1802] |
Intransitive actions must do all of their work in this routine. In most cases, transitive actions will delegate processing to one or more of the objects involved in the command - for example, most single-object commands will call a method in the direct object to carry out the command.
filterAmbiguousWithVerify (lst, requiredNum, verProp, preCondProp, remapProp, whichObj, np) | action.t[2574] |
This is the typical way that we disambiguate a list of objects, but this is merely a service routine, so individual actions can choose to use this or other mechanisms as appropriate.
filterFacets (lst) | action.t[2776] |
filterPluralWithVerify (lst, verProp, preCondProp, remapProp, whichObj, np) | action.t[2738] |
finishResolveList (lst, whichObj, np, requiredNum) | action.t[2411] |
getAnaphoricBinding (typ) | action.t[960] |
Actions of two or more objects should set this if possible to the resolved object list for the previous noun phrase, as a ResolveInfo list.
The tricky part is that some actions will resolve noun phrases in a different order than they appear in the actual command grammar; similarly, it's also possible that some non-English languages use cataphoric pronouns (i.e., pronouns that refer to noun phrases that appear later in the sentence). To allow for these cases, return an empty list here if a binding is grammatically possible but not yet available because of the resolution order, and note internally that the parser asked us for an anaphoric binding. Afterwards, the action's resolver method must go back and perform *another* resolve pass on the noun phrase production that requested the anaphor binding.
'typ' is the PronounType specifier for the corresponding ordinary pronoun. For 'himself', for example, typ will be PronounHim.
getCurrentObjects ( ) | action.t[2266] |
By default, an action has no objects roles at all, so we'll just return an empty list.
getDefaultWithVerify (resolver, verProp, preCondProp, remapProp, whichObj, np) | action.t[2838] |
getEnteredVerbPhrase ( ) | action.t[718] |
For example, if the player typed PUT BOOK AND PENCIL IN BOX, the canonical phrasing we return would be "put (dobj) in (iobj)".
getImplicitPhrase (ctx) | en_us.t[8303] |
This comes in two forms: if the context indicates we're only attempting the action, we'll return an infinitive phrase ("open the box") for use in a larger participle phrase describing the attempt ("trying to..."). Otherwise, we'll be describing the action as actually having been performed, so we'll return a present participle phrase ("opening the box").
getInfPhrase ( ) | en_us.t[8320] |
getMatchForRole (role) | action.t[856] |
getMessageParam (objName) | action.t[558] |
getNotifyTable ( ) | action.t[2175] |
getObjectForRole (role) | action.t[853] |
getObjPreCondDescList (obj, preCondProp, checkArg, whichObj) | action.t[2314] |
getObjPreConditions (obj, preCondProp, whichObj) | action.t[2060] |
getObjResponseProd (resolver) | action.t[2975] |
getOriginalAction ( ) | action.t[391] |
It's important to note that an implied action does NOT count as a nested or replacement action for the purposes of this method. That is, if a command A triggers an implied action B, which triggers a nested action C, and then after that command A itself triggers a nested action D, then
A.getOriginalAction -> A
B.getOriginalAction -> B (B is implied, not nested)
C.getOriginalAction -> C (C is nested within B)
D.getOriginalAction -> A (D is nested within A)
The purpose of the original action is to tell us, mainly for reporting purposes, what we're really trying to do with the action. This allows reports to hide the internal details of how the action is carried out, and instead say what the action was meant to do from the player's perspective.
getOrigTokenList ( ) OVERRIDDEN | action.t[2924] |
getOtherObjectRole (role) | action.t[850] |
getParticiplePhrase ( ) | en_us.t[8359] |
getPreCondDescList ( ) | action.t[2303] |
getPreCondPropForRole (role) | action.t[865] |
getPredicate ( ) | action.t[811] |
Language libraries must override this to return the original match tree object if Actions are separate from predicate match trees.
(The 'predicate' is simply the grammar match tree object for the entire verb phrase from the player's actual command entry text that matched this Action. For example, in "BOB, TAKE BOX", the predicate is the match tree for the "TAKE BOX" part. In "BOB, TAKE BOX AND GO NORTH", the predicate for the Take action is still the "TAKE BOX" part. For "BOB, TAKE BOX AND BOOK AND GO NORTH", the predicate for the Take action is "TAKE BOX AND BOOK" - the full verb phrase includes any multiple-object lists in the original command.)
getPronounOverride (typ) | action.t[992] |
getQuestionInf (which) | en_us.t[8345] |
For example, for the verb UNLOCK <dobj> WITH <iobj>, if the unknown is the direct object, the phrase we'd return would be "unlock": this would plug into contexts such as "what do you want to unlock." If the indirect object is the unknown for the same verb, the phrase would be "unlock it with", which would plug in as "what do you want to unlock it with".
Note that we are NOT to include the infinitive complementizer (i.e., "to") as part of the phrase we generate, since the complementizer isn't used in some contexts where the infinitive conjugation is needed (for example, "what should I <infinitive>").
getRemappedFrom ( ) | action.t[430] |
getRemapPropForRole (role) | action.t[871] |
getResolvedObjList (which) | action.t[1686] |
getResolveInfo (obj, oldRole) | action.t[883] |
getRoleFromIndex (idx) | action.t[842] |
getSimpleSynonymRemap (obj, role, remapProp) | action.t[451] |
A simple synonym remapping is a remapTo that applies the same verb to a new object in the same role. For example, if we remap OPEN DESK to OPEN DRAWER, then the drawer is the simple synonym remapping for the desk in an OPEN command. A remapping is considered a simple synonym remapping only if we're remapping to the same action, AND the new object is in the same action role as the original object was.
If there's no simple synonym remapping, we'll return nil.
getSortedVerifyResults (lst, verProp, preCondProp, remapProp, whichObj, np, requiredNum) | action.t[2432] |
getVerbPhrase (inf, ctx) | en_us.t[8375] |
'ctx' is a GetVerbPhraseContext object, which lets us keep track of antecedents when we're stringing together multiple verb phrases. 'ctx' can be nil if the verb phrase is being used in isolation.
getVerifyPropForRole (role) | action.t[859] |
initTentative (issuingActor, targetActor, whichObj) | action.t[1837] |
isConversational (issuingActor) | action.t[703] |
Bob, hello
Bob, goodbye
Bob, tell me about the planet
Bob, yes
Bob, no
("Tell me about..." is a little different from the others. We treat it as conversational because it means the same thing as "ask Bob about...", which we consider conversational because it would be rendered in real life as a question. In other words, the action involves the issuing actor stating the question, which means that issuing actor is the one doing the physical work of the action. "Tell me about..." could be seen as an order, but it seems more appropriate to view it as simply an alternative way of phrasing a question.)
The issuing actor is passed as a parameter because some actions are conversational only in some cases; "tell me about the planet" is conversational, but "tell Bill about the planet" isn't, since the latter doesn't ask Bob a question but orders Bob to talk to Bill.
When the issuing actor and target actor are the same, this is irrelevant. The purpose of this is to distinguish orders given to another character from conversational overtures directed to the other character, so if the command is coming from the player and bound for the player character, there's obviously no conversation going on.
Note also that, contrary to what one might think at first glance, a command like ASK ABOUT is NOT conversational; it's a command to ask someone about something, and isn't itself a conversational overture. The act of asking is itself a conversational overture, but the asking is the *result* of the command, not the command itself. An action is only conversational if the action itself is a conversational overture. So, "BOB, HELLO" is conversational; "BOB, ASK BILL ABOUT COMPUTER" is not, because it orders Bob to do something.
isNestedIn (action) | action.t[337] |
isPartOf (action) | action.t[407] |
isRemapped ( ) | action.t[429] |
makeResolveInfo (val) | action.t[1024] |
makeResolveInfoList (val) | action.t[1039] |
maybeAnnounceDefaultObject (lst, which, allResolved) | action.t[1700] |
maybeAnnounceImplicit ( ) | action.t[1540] |
maybeAnnounceMultiObject (info, numberInList, whichObj) | action.t[1643] |
noMatch (msgObj, actor, txt) | en_us.t[8405] |
notifyBeforeAfter (prop) | action.t[2160] |
objListPronoun (objList) | en_us.t[8183] |
preAnnounceActionObject (info, mainList, whichObj) | action.t[1744] |
We'll announce the object only if it's marked as defaulted or unclearly disambiguated, and then only if the other list will be announcing its objects as multi-action objects. However, we do not pre-announce anything for a remapped action, because we'll show the full action description for each individually announced object, so we don't need or want a separate announcement for the group.
Returns true if we did any pre-announcing, nil otherwise. If we return true, the caller should not re-announce this object during the iteration, since our pre-announcement is common to all iterations.
recalcSenseContext ( ) | action.t[1531] |
repeatAction (lastTargetActor, lastTargetActorPhrase, lastIssuingActor, countsAsIssuerTurn) | action.t[178] |
resetAction ( ) | action.t[169] |
resolveAction (issuingActor, targetActor) | en_us.t[8149] |
This approach ('grammar predicate' matches are based on Action subclasses) works well for languages like English that encode the role of each phrase in the word order of the sentence.
Languages that encode phrase roles using case markers or other devices tend to be freer with word order. As a result, 'predicate' grammars for such languages should generally not attempt to capture all possible word orderings for a given action, but should instead take the complementary approach of capturing the possible overall sentence structures independently of verb phrases, and plug in a verb phrase as a component, just like noun phrases plug into the English grammar. In these cases, the match objects will NOT be Action subclasses; the Action objects will instead be buried down deeper in the match tree. Hence, resolveAction() must be defined on whatever class is used to construct 'predicate' grammar matches, instead of on Action, since Action will not be a 'predicate' match.
resolvedObjectsInScope ( ) | action.t[925] |
This routine is meant for use only for actions built programmatically using setResolvedObjects(). In particular, we assume that we have only one object in each slot. For normal parser-built actions, this check isn't necessary, because the parser only resolves objects that are in scope in the first place.
runBeforeNotifiers ( ) | action.t[1507] |
saveActionForAgain (issuingActor, countsAsIssuerTurn, targetActor, targetActorPhrase) | action.t[1065] |
setCurrentObjects (lst) | action.t[2275] |
setImplicit (msgProp) | action.t[299] |
setMessageParam (objName, obj) | action.t[590] |
setMessageParams ([lst]) | action.t[607] |
setNested ( ) | action.t[326] |
setObjectMatches ( ) | action.t[913] |
The arguments to this routine can either be match tree objects, which we'll plug into our grammar tree in the respective roles exactly as given; or they can be ResolveInfo objects giving the desired resolutions, in which case we'll build the appropriate kind of PreResolvedProd for each one. The types can be freely mixed.
setOriginalAction (action) | action.t[363] |
An action has an original action if it's a nested or replacement action for an action.
setPronounOverride (typ, val) | action.t[976] |
One example of where this is useful is in global action remapping cases where the target actor changes in the course of the remapping. For example, if we remap BOB, GIVE ME YOUR BOOK to ASK BOB FOR YOUR BOOK, the YOUR qualifier should still refer to Bob even though the command is no longer addressing Bob directly. This routine can be used in this case to override the meaning of 'you' so that it refers to Bob.
setRemapped (orig) | action.t[426] |
setResolvedObjects ( ) | action.t[898] |
This method is used to set up an action to be performed programmatically, rather than based on parsed input. Since there's no parsed input in such cases, the objects are specified directly by the programmatic caller.
spPrefix (str) | en_us.t[8414] |
spSuffix (str) | en_us.t[8415] |
synthMessageParam (obj) | action.t[618] |
verifyAction ( ) | action.t[1824] |
verifyHandlersExist (objList, propList, result) | action.t[2120] |
Each entry in objList is an object involved in the action. For each entry in objList, there must be *THREE* entries in propList: a verify property, a check property, and an action property. If any of these three properties is defined on the corresponding object, we'll allow the command to proceed. If we can find none of the given handler properties on any of our objects, we'll add an "illogical" verify result.
whatObj (which) | en_us.t[8158] |
whatTranslate (txt) | en_us.t[8169] |
withVerifyResults (resultsSoFar, obj, func) | action.t[1861] |
zeroActionTime ( ) | action.t[1308] |