exec.tfile | source file |
Classes Summary | Objects Summary | Functions Summary Details |
TADS 3 Library: command execution
This module defines functions that perform command execution.
AbortImplicitSignal
ExitActionSignal
ExitSignal
GlobalRemapping
MessageResult
RemapActionSignal
_nestedAction
_newAction
_replaceAction
_tryImplicitAction
execNestedAction
executeAction
executeCommand
nestedActionAgain
newActionObj
prepareNestedAction
remapAction
remapActionCreate
remapVerify
resolveAndReplaceAction
withActionEnv
_nestedAction (isReplacement, actor, actionClass, [objs]) | exec.t[1123] |
_newAction (transcriptClass, issuingActor, targetActor, actionClass, [objs]) | exec.t[1065] |
_replaceAction (actor, actionClass, [objs]) | exec.t[1030] |
_tryImplicitAction (issuingActor, targetActor, msgProp, actionClass, [objs]) | exec.t[925] |
Returns true if the action was attempted, whether or not it succeeded, nil if the command was not even attempted. We will not attempt an implied command that verifies as "dangerous," since this means that it should be obvious to the player character that such a command should not be performed lightly.
execNestedAction (isReplacement, isRemapping, actor, action) | exec.t[1151] |
'isReplacement' indicates whether the action is a full replacement or an ordinary nested action. If it's a replacement, then we use the game time taken by the replacement, and set the enclosing action (i.e., the current gAction) to take zero time. If it's an ordinary nested action, then we consider the nested action to take zero time, using the current action's time as the overall command time.
'isRemapping' indicates whether or not this is a remapped action. If we're remapping from one action to another, this will be true; for any other kind of nested or replacement action, this should be nil.
executeAction (targetActor, targetActorPhrase, issuingActor, countsAsIssuerTurn, action) | exec.t[777] |
executeCommand (targetActor, issuingActor, toks, firstInSentence) | exec.t[33] |
If 'firstInSentence' is true, we're at the start of a "sentence." The meaning and effect of this may vary by language. In English, a sentence ends with certain punctuation marks (a period, semicolon, exclamation mark, or question mark), so anything after one of these punctuation marks is the start of a new sentence. Also in English, we can address a command to an explicit target actor using the "actor," prefix syntax, which we can't use except at the start of a sentence.
If the command line consists of multiple commands, we will only actually execute the first command before returning. We'll schedule any additional commands for later execution by putting them into the target actor's pending command queue before we return, but we won't actually execute them.
nestedActionAgain (action) | exec.t[1221] |
newActionObj (transcriptClass, issuingActor, targetActor, actionObj, [objs]) | exec.t[1088] |
If issuingActor is nil, we'll use the current global issuing actor; if that's also nil, we'll use the target actor.
Returns a CommandTranscript object describing the result of the action.
prepareNestedAction (isReplacement, isRemapping, action) | exec.t[1165] |
remapAction (inResolve, oldRole, remapInfo) | exec.t[1437] |
remapActionCreate (inResolve, oldRole, remapInfo) | exec.t[1475] |
remapVerify (oldRole, resultSoFar, remapInfo) | exec.t[1357] |
resolveAndReplaceAction (newAction) | exec.t[1045] |
withActionEnv (actionClass, actor, func) | exec.t[1250] |