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::NWN::ScriptContainer::ScriptContainer | ( | ) |
Definition at line 102 of file container.cpp.
Engines::NWN::ScriptContainer::~ScriptContainer | ( | ) |
Definition at line 105 of file container.cpp.
|
protected |
Definition at line 118 of file container.cpp.
References _scripts, and Engines::NWN::kScriptMAX.
Referenced by readScripts(), and Engines::NWN::Module::unloadModule().
const Common::UString & Engines::NWN::ScriptContainer::getScript | ( | Script | script | ) | const |
Definition at line 108 of file container.cpp.
References _scripts, and Engines::NWN::kScriptMAX.
Referenced by hasScript(), and runScript().
bool Engines::NWN::ScriptContainer::hasScript | ( | Script | script | ) | const |
Definition at line 114 of file container.cpp.
References Common::UString::empty(), and getScript().
Referenced by Engines::NWN::Door::click(), and Engines::NWN::Creature::click().
|
protected |
Definition at line 123 of file container.cpp.
References _scripts, ARRAYSIZE, clearScripts(), Aurora::GFF3Struct::getString(), Engines::NWN::kScriptNames, Engines::NWN::ScriptName::name, and Engines::NWN::ScriptName::script.
Referenced by Engines::NWN::Area::loadARE(), Engines::NWN::Module::loadModule(), Engines::NWN::Waypoint::loadProperties(), Engines::NWN::Situated::loadProperties(), Engines::NWN::Item::loadProperties(), and Engines::NWN::Creature::loadProperties().
|
protected |
Definition at line 134 of file container.cpp.
References _scripts, and Engines::NWN::kScriptMAX.
bool Engines::NWN::ScriptContainer::runScript | ( | Script | script, |
const Aurora::NWScript::ObjectReference | owner = Aurora::NWScript::ObjectReference() , |
||
const Aurora::NWScript::ObjectReference | triggerer = Aurora::NWScript::ObjectReference() |
||
) |
Definition at line 139 of file container.cpp.
References getScript().
Referenced by Engines::NWN::Placeable::activate(), Engines::NWN::Door::click(), Engines::NWN::Creature::click(), Engines::NWN::Placeable::close(), Engines::NWN::Door::close(), Engines::NWN::Placeable::deactivate(), Engines::NWN::Module::enter(), Engines::NWN::Module::enterArea(), Engines::NWN::Module::handleActions(), Engines::NWN::Door::open(), Engines::NWN::Placeable::open(), runScript(), and Engines::NWN::Module::unloadModule().
|
static |
Definition at line 145 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 152 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().