#include <Scripts.h>
Inherits MemoryPoolObject, and Snapshot.
Static Public Member Functions | |
| static void | WriteScriptDataChunk (DataChunkOutput &chunkWriter, Script *pScript) |
| static Script * | ParseScript (DataChunkInput &file, unsigned short version) |
| static Bool | ParseScriptFromListDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| static Bool | ParseScriptFromGroupDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| AsciiString | m_scriptName |
| Short name. | |
| AsciiString | m_comment |
| Long comment. | |
| AsciiString | m_conditionComment |
| Long comment about conditions. | |
| AsciiString | m_actionComment |
| Long comment about actions. | |
| Int | m_delayEvaluationSeconds |
| Number of seconds to delay evaluation. | |
| Bool | m_isActive |
| If true, script is enabled. If false, disabled. | |
| Bool | m_isOneShot |
| If true, script is made not active after executing the m_action actions. | |
| Bool | m_isSubroutine |
| If true, script is a subroutine. | |
| Bool | m_easy |
| Applies to easy campaign. | |
| Bool | m_normal |
| Applies to normal campaign. | |
| Bool | m_hard |
| Applies to Hard campaign. | |
| OrCondition * | m_condition |
| First in a list of ORed clauses. | |
| ScriptAction * | m_action |
| First in a list of actions executed if the conditions are true. | |
| ScriptAction * | m_actionFalse |
| First in a list of actions executed if the conditions are false. | |
| Script * | m_nextScript |
| Next in the list of scripts. | |
| UnsignedInt | m_frameToEvaluateAt |
| When to evaluate the conditions next, if m_delayEvaluationSeconds>0. | |
| Bool | m_hasWarnings |
| Runtime flag used by the editor only. | |
| AsciiString | m_conditionTeamName |
| Runtime name used by ScriptEngine only. | |
| Real | m_conditionTime |
| Amount of time (cum) to evaluate conditions. | |
| Real | m_curTime |
| Amount of time (cum) to evaluate conditions. | |
| Int | m_conditionExecutedCount |
| Number of times conditions evaluated. | |
This is a script, in a linked list of scripts. The m_condition list is evaluated, and if one of the or clauses is true, the m_action list is executed. .
| Script::Script | ( | void | ) |
Ctor - initializes members.
Definition at line 911 of file Scripts.cpp.
|
protectedvirtual |
| void Script::deleteAction | ( | ScriptAction * | pAct | ) |
Script::deleteAction - delete pAct from the action list.
Definition at line 1137 of file Scripts.cpp.
| void Script::deleteFalseAction | ( | ScriptAction * | pAct | ) |
Script::deleteFalseAction - delete pAct from the false action list.
Definition at line 1160 of file Scripts.cpp.
| void Script::deleteOrCondition | ( | OrCondition * | pCond | ) |
Script::deleteOrCondition - delete pCond from the or condition list.
Definition at line 1114 of file Scripts.cpp.
| Script * Script::duplicate | ( | void | ) | const |
Script::duplicate - Creates a full, "deep" copy of script. Condition list and action list is duplicated as well. Note - just the script, doesn't duplicate a list of scripts. m_nextScript is NULL on the copy.
Definition at line 1003 of file Scripts.cpp.
| Script * Script::duplicateAndQualify | ( | const AsciiString & | qualifier, |
| const AsciiString & | playerTemplateName, | ||
| const AsciiString & | newPlayerName ) const |
Script::duplicate - Creates a full, "deep" copy of script, with qualifier added to names. Condition list and action list is duplicated as well. Note - just the script, doesn't duplicate a list of scripts. m_nextScript is NULL on the copy.
Definition at line 1041 of file Scripts.cpp.
| OrCondition * Script::findPreviousOrCondition | ( | OrCondition * | curOr | ) |
Script::findPreviousOrCondition - find the OrCondition that immediately proceeds curOr. Input: OrCondition
Definition at line 1331 of file Scripts.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| AsciiString Script::getUiText | ( | void | ) |
Script::getUiText - Creates the string to display in the scripts dialog box.
Definition at line 1183 of file Scripts.cpp.
|
protectedvirtual |
|
static |
Script::ParseScript - read a script chunk. Format is the newer CHUNKY format. See ScriptList::WriteScriptDataChunk for the writer. Input: DataChunkInput
Definition at line 1264 of file Scripts.cpp.
|
static |
Script::ParseScriptFromGroupDataChunk - read a script chunk in a script group. Format is the newer CHUNKY format. See ScriptList::WriteScriptListDataChunk for the writer. Input: DataChunkInput
Definition at line 1316 of file Scripts.cpp.
|
static |
Script::ParseScriptFromListDataChunk - read a script chunk in a script list. Format is the newer CHUNKY format. See ScriptList::WriteScriptListDataChunk for the writer. Input: DataChunkInput
Definition at line 1300 of file Scripts.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void Script::updateFrom | ( | Script * | pSrc | ) |
Updates this from pSrc. pSrc IS MODIFIED - it's guts are removed. jba.
Script::updateFrom - Copies all the data from pSrc into this. Any data in this is deleted (conditions, actions). Note that this guts pSrc, and removes it's conditions and actions. Intended for use in an edit dialog, where pSrc is a copy edited, and if cancelled discarded, and if not cancelled, updated into the real script, then discarded.
Definition at line 1081 of file Scripts.cpp.
|
static |
Script::WriteScriptDataChunk - Writes a Scripts chunk. Format is the newer CHUNKY format. Input: DataChunkInput
Definition at line 1233 of file Scripts.cpp.
|
protectedvirtual |
Xfer method Version Info: 1: Initial version
Implements Snapshot.
Definition at line 975 of file Scripts.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Runtime name used by ScriptEngine only.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |