Restore object | actions.t[2782]

Perform the save, using the filename given in our fname_ parameter, trimmed of quotes.

`Restore : SystemAction`

Superclass Tree (in declaration order)

`Restore`
`SystemAction`
`IAction`
`Action`
`ReplaceRedirector`
`Redirector`
`object`

Summary of Properties

`includeInUndo`

Inherited from `SystemAction` :
`isRepeatable timeTaken turnsTaken`

Inherited from `IAction` :
`againRepeatsParse`

Inherited from `Action` :
`actionFailed advanceOnFailure allowAll extraMessageParams failCheckMsg failedActionCountsAsTurn implicitTimeTaken isConversational isImplicit oldRoom parentAction parentAllowAll preCond redirectParent reportImplicitActions scopeList spellingPriority synthParamID unhides verifyObj wasIlluminated`

``

``

Summary of Methods

`askAndRestore execAction filePromptFailed filePromptFailedMsg performRestore startupRestore`

Inherited from `SystemAction` :
`afterAction exec execCycle getInputFile turnSequence`

Inherited from `IAction` :
`execResolvedAction resolvedObjectsInScope scoreObjects setResolvedObjects`

Inherited from `Action` :
`acknowledgeNotifyStatus addExtraScopeItems addImplicitTime advanceTime announceObject beforeAction buildImplicitActionAnnouncement buildScopeList checkAction checkActionPreconditions commandNotPresent execGroup getAll getAllUnhidden getMessageParam implicitAnnouncement reportAction setMessageParam setMessageParams spPrefix spSuffix synthMessageParam verify verifyObjRole wrapObjectsNP`

Inherited from `ReplaceRedirector` :
`redirect`

Inherited from `Redirector` :
`doInstead doNested doOtherAction`

Properties

`includeInUndo` OVERRIDDEN | `actions.t[2994]`

There's no point in including this in undo. If the command succeeds, it's not undoable itself, and there won't be any undo information in the newly restored state. If the command fails, it won't make any changes to the game state, so there won't be anything to undo.

Methods

`askAndRestore ( )` | `actions.t[2802]`

Ask for a file and try to restore it. Returns true on success, nil on failure. (Failure could indicate that the user chose to cancel out of the file selector, that we couldn't find the file to restore, or that the file isn't a valid saved state file. In any case, we show an appropriate message on failure.)

`execAction (cmd)`OVERRIDDEN | `actions.t[2783]`

no description available

`filePromptFailed ( )` | `actions.t[2997]`

error showing the input file dialog (or character-mode equivalent)

`filePromptFailedMsg (msg)` | `actions.t[3005]`

error showing the input file dialog, with a system error message

`performRestore (fname, code)` | `actions.t[2912]`

Restore a file. 'code' is the restoreCode value for the PostRestoreObject notifications. Returns true on success, nil on failure.

`startupRestore (fname)` | `actions.t[2873]`

Restore a game on startup. This can be called from mainRestore() to restore a saved game directly as part of loading the game. (Most interpreters provide a way of starting the interpreter directly with a saved game to be restored, skipping the intermediate step of running the game and using a RESTORE command.)

Returns true on success, nil on failure. On failure, the caller should simply exit the program. On success, the caller should start the game running, usually using runGame(), after showing any desired introductory messages.

Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0