xoreos
0.0.5
|
#include <container.h>
Public Member Functions | |
ScriptContainer () | |
~ScriptContainer () | |
const Common::UString & | getScript (Script script) const |
bool | hasScript (Script script) const |
bool | runScript (Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Static Public Member Functions | |
static bool | runScript (const Common::UString &script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
static bool | runScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Protected Member Functions | |
void | clearScripts () |
void | readScripts (const Aurora::GFF3Struct &gff) |
void | readScripts (const ScriptContainer &container) |
Private Attributes | |
Common::UString | _scripts [kScriptMAX] |
Definition at line 47 of file container.h.
Engines::NWN2::ScriptContainer::ScriptContainer | ( | ) |
Definition at line 110 of file container.cpp.
Engines::NWN2::ScriptContainer::~ScriptContainer | ( | ) |
Definition at line 113 of file container.cpp.
|
protected |
Definition at line 126 of file container.cpp.
References _scripts, and Engines::NWN2::kScriptMAX.
Referenced by readScripts().
const Common::UString & Engines::NWN2::ScriptContainer::getScript | ( | Script | script | ) | const |
Definition at line 116 of file container.cpp.
References _scripts, and Engines::NWN2::kScriptMAX.
Referenced by hasScript(), and runScript().
bool Engines::NWN2::ScriptContainer::hasScript | ( | Script | script | ) | const |
Definition at line 122 of file container.cpp.
References Common::UString::empty(), and getScript().
Referenced by Engines::NWN2::Door::click(), and Engines::NWN2::Creature::click().
|
protected |
Definition at line 131 of file container.cpp.
References _scripts, ARRAYSIZE, clearScripts(), Aurora::GFF3Struct::getString(), Engines::NWN2::kScriptNames, Engines::NWN2::ScriptName::name, and Engines::NWN2::ScriptName::script.
Referenced by Engines::NWN2::Area::loadARE(), Engines::NWN2::Module::loadModule(), Engines::NWN2::Waypoint::loadProperties(), Engines::NWN2::Situated::loadProperties(), and Engines::NWN2::Creature::loadProperties().
|
protected |
Definition at line 142 of file container.cpp.
References _scripts, and Engines::NWN2::kScriptMAX.
bool Engines::NWN2::ScriptContainer::runScript | ( | Script | script, |
const Aurora::NWScript::ObjectReference | owner = Aurora::NWScript::ObjectReference() , |
||
const Aurora::NWScript::ObjectReference | triggerer = Aurora::NWScript::ObjectReference() |
||
) |
Definition at line 147 of file container.cpp.
References getScript().
Referenced by Engines::NWN2::Placeable::activate(), Engines::NWN2::Door::click(), Engines::NWN2::Creature::click(), Engines::NWN2::Placeable::close(), Engines::NWN2::Door::close(), Engines::NWN2::Placeable::deactivate(), Engines::NWN2::Module::enter(), Engines::NWN2::Module::enterArea(), Engines::NWN2::Module::handleActions(), Engines::NWN2::Module::leave(), Engines::NWN2::Door::open(), Engines::NWN2::Placeable::open(), and runScript().
|
static |
Definition at line 153 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 160 of file container.cpp.
References Common::UString::c_str(), Common::UString::empty(), Common::exceptionDispatcherWarning(), Aurora::NWScript::Variable::getFloat(), Aurora::NWScript::Variable::getInt(), Aurora::NWScript::Variable::getType(), Aurora::NWScript::kTypeFloat, Aurora::NWScript::kTypeInt, and Aurora::NWScript::NCSFile::run().
|
private |
Definition at line 75 of file container.h.
Referenced by clearScripts(), getScript(), and readScripts().