TActionclass | action.t[1542], english.t[5475], signals.t[336], sysrules.t[476]

A TAction is an action that applies to a single direct object. Other action classes that apply to more than one object, such as TIAction, inherit from this class so some of the code needs to take that into account.

`class TAction : Action`

Superclass Tree (in declaration order)

`TAction`
`Action`
`ReplaceRedirector`
`Redirector`
`object`

Subclass Tree

`TAction`
`LiteralTAction`
`NumericTAction`
`TIAction`
`TIAAction`
`TopicTAction`

Global Objects

`Attach Attack Board Break Burn Clean Climb ClimbDown ClimbUp Close Cut Detach Dig Doff Drink Drop Eat Enter Examine ExamineOrGoTo Extinguish Fasten Feel Flip Follow GetOff GetOutOf GiveToImplicit GoAlong GoNear GoThrough GoTo JumpOff JumpOver Kiss LieIn LieOn Light ListenTo Lock LookBehind LookIn LookThrough LookUnder Move Open PlugIn Pour Pull Purloin Push PushTravelDir Read Remove Screw Search Set ShowToImplicit SitIn SitOn SmellSomething StandIn StandOn Strike SwitchOff SwitchOn SwitchVague Take TalkTo Taste Throw ThrowDir TravelVia Turn TypeOnVague Unfasten Unlock Unplug Unscrew Wear`

Summary of Properties

`actionList announceMultiAction announceMultiCheck announceMultiVerify aqinfo curDobj curObj dqinfo gActor haltOnMessageInCheck iqinfo lastVerifyMsg reportFailureAfterSuccess reportList signal verifyTab`

Inherited from `Action` :
`actionFailed advanceOnFailure againRepeatsParse allowAll extraMessageParams failCheckMsg implicitTimeTaken includeInUndo isImplicit isRepeatable oldRoom parentAction parentAllowAll preCond redirectParent reportImplicitActions scopeList spellingPriority synthParamID timeTaken turnsTaken unhides verifyObj wasIlluminated`

``

``

Summary of Methods

`addVerifyResult check checkAction checkPreCond doAction doActionOnce execAction execCycle execResolvedAction getAll getMessageParam getVerbPhrase getVerbPhrase1 makeScopeUniversal reportAction reset resolvedObjectsInScope setResolvedObjects`

Inherited from `Action` :
`acknowledgeNotifyStatus addExtraScopeItems addImplicitTime advanceTime afterAction announceObject beforeAction buildImplicitActionAnnouncement buildScopeList checkActionPreconditions commandNotPresent exec execGroup getAllUnhidden implicitAnnouncement scoreObjects setMessageParam setMessageParams spPrefix spSuffix synthMessageParam turnSequence verify verifyObjRole wrapObjectsNP`

Inherited from `ReplaceRedirector` :
`redirect`

Inherited from `Redirector` :
`doInstead doNested doOtherAction`

Properties

`actionList` | `action.t[1554]`

A list of the direct objects of this action that make it to the action stage.

`announceMultiAction` | `action.t[1576]`

set this property to true if you want to announce the object before the action result when there's more than one object. If the action routine summarizes the result at the end you don't want to do this so you should then set this to nil.

`announceMultiCheck` | `action.t[1757]`

Flag: do we want the object name to appear before a check stage failure message if multiple objects are involved in the action. By default we do, otherwise it might not be clear which object the message referes to.

`announceMultiVerify` | `action.t[2042]`

Flag, do we want to announce the object name before the verify message in cases where there's more direct object in the command? By default we don't since verify messages generally make it clear enough which objects they refer to.

`aqinfo` | `action.t[1613]`

no description available

`curDobj` | `action.t[1579]`

The current direct object of this action

`curObj` | `action.t[1586]`

The current object being processed (in a TAction, always the curDObj; in a TI Action either the curDobj or the curIOoj).

`dqinfo` | `action.t[1611]`

Information to allow the DEBUG ACTIONS command to express a complete topic phrase

`gActor` | `sysrules.t[527]`

Set the current actor to the player character at the start of the game (to ensure we have a current actor defined).

`haltOnMessageInCheck` | `action.t[1789]`

This flag is used internally by the library to track whether the output of any text from a check() should stop the action, which it normally should. Game code should not directly override this property or change its value, other than indrectly via the noHalt() function.

`iqinfo` | `action.t[1612]`

no description available

`lastVerifyMsg` | `action.t[1568]`

Store the last verify failure message so that if we get several identical ones in a row, we don't keep repeating them

`reportFailureAfterSuccess` | `action.t[1896]`

Flag: when a command processes multiple direct objects, do we want any failed attempts to be reported after successful ones?

`reportList` | `action.t[1548]`

A list of the direct objects of this action that make it to the report stage.

`signal` | `signals.t[341]`

The signal (if any) )o be emitted by the direct object of this action. [SIGNALS EXTENSION]

`verifyTab` | `action.t[1561]`

A LookupTable containing the verify results for this action. This is keyes on the object being verified, with the value being the worst verify result encountered for that object so far.

Methods

`addVerifyResult (verRes)` | `action.t[2060]`

Add a verify result to this action's verify table. This method is normally called by one of the macros (logical, illogical, logicalRank, etc.) use in an object's verify routine.

`check (obj, checkProp)` | `action.t[1795]`

Call the check method (checkProp) on the appropriate object (obj). Return true to indicate that the action succeeds or nil otherwise

`checkAction (cmd)`OVERRIDDEN | `action.t[1765]`

Run the check phase of the action, both on the direct object and on any preconditions.

`checkPreCond (obj, preCondProp)` | `action.t[1899]`

Run the check stage on the preCondProp of obj

`doAction ( )` | `action.t[2023], signals.t[347]`

Return true to tell our caller we succesfully completed the action.

Modified in signals.t[347]:
If this action defines an associated signal, then have the direct object emit the signal after carrrying out out inherited handling. [SIGNALS EXTENSION]

`doActionOnce ( )` | `action.t[1954]`

Carry out the action phase on the direct object

`execAction (cmd)`OVERRIDDEN | `action.t[1667]`

Execute this action

`execCycle (cmd)`OVERRIDDEN | `action.t[1622]`

Execute the command cycle for this action. This differs from the base Action class in not calling beforeAction directly, since the beforeAction() notifications occur within the execResolvedAction method.

`execResolvedAction ( )` | `action.t[1691]`

Execute this action with a known direct object or objects. Call this method when there's no need to resolve the objects used in the command but we still want it to pass through every stage

`getAll (cmd, role)`OVERRIDDEN | `action.t[2050]`

Return a list of direct objects corresponding to the word ALL in the player's command. By default we return everything in scope that isn't a a Room.

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

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

`getVerbPhrase (inf, ctx)` | `english.t[5477]`

get the verb phrase in infinitive or participle form

`getVerbPhrase1 (inf, vp, dobjText, dobjIsPronoun)` | `english.t[5512]`

Given the text of the direct object phrase, build the verb phrase for a one-object verb. This is a class method that can be used by other kinds of verbs (i.e., non-TActions) that use phrasing like a single object.

'inf' is a flag indicating whether to use the infinitive form (true) or the present participle form (nil); 'vp' is the verbPhrase string; 'dobjText' is the direct object phrase's text; and 'dobjIsPronoun' is true if the dobj text is rendered as a pronoun.

`makeScopeUniversal ( )` | `action.t[2163]`

A convenience method for putting every game object in scope, which may be appropriate for certain commands (not least, certain debugging commands). It's intended to be called from addExtraScopeItems when

`reportAction ( )`OVERRIDDEN | `action.t[2105], sysrules.t[494]`

reportAction() is called only after all the action routines have been run and the list of dobjs acted on is known. It only does anything if the action is not implicit. It can thus be used to summarize a list of identical actions carried out on every object in reportList or to print a report that is not wanted if the action is implicit. By default we call the dobj's reportDobjProp to handle the report.

Note that this method is usually called from the current Command object after its finished iterated over all the direct objects involved in the command.

Modified in sysrules.t[494]:
MODIFIED FOR SYSRULES EXTENSION

reportAction() is called only after all the action routines have been run and the list of dobjs acted on is known. It only does anything if the action is not implicit. It can thus be used to summarize a list of identical actions carried out on every object in reportList or to print a report that is not wanted if the action is implicit. By default we call the dobj's reportDobjProp to handle the report.

Note that this method is usually called from the current Command object after its finished iterated over all the direct objects involved in the command.

This modified version uses the reportRules rulebook to make it easy to insert differently worded summary reports.

`reset ( )` | `action.t[1592]`

Reset values to their starting state when an action is used to execute a new command.

`resolvedObjectsInScope ( )` | `action.t[2129]`

Check whether the resolved objects for this action are in scope

`setResolvedObjects (dobj)` | `action.t[2123]`

install the resolved objects in the action

Adv3Lite Library Reference Manual
Generated on 12/12/2022 from adv3Lite version 1.6