RigsofRods
Soft-body Physics Simulation
|
Game scripting subsystem using AngelScript. More...
Data Structures | |
class | RoR::GameScript |
Proxy class that can be called by script functions. More... | |
class | RoR::LocalStorage |
A class that allows scripts to store data persistently. More... | |
class | OgreScriptBuilder |
struct | RoR::ScriptUnit |
Represents a loaded script and all associated resources/handles. More... | |
struct | RoR::LoadScriptRequest |
struct | RoR::ScriptCallbackArgs |
class | RoR::ScriptEngine |
This class represents the angelscript scripting interface. More... | |
class | RoR::CReadonlyScriptDictView< T > |
class | RoR::CReadonlyScriptArrayView< T > |
Typedefs | |
typedef std::map< ScriptUnitId_t, ScriptUnit > | RoR::ScriptUnitMap |
typedef BitMask_t | RoR::GetFuncFlags_t |
Flags for RoR::ScriptEngine::getFunctionByDeclAndLogCandidates() More... | |
Enumerations | |
enum | RoR::ScriptCategory { RoR::ScriptCategory::INVALID, RoR::ScriptCategory::ACTOR, RoR::ScriptCategory::TERRAIN, RoR::ScriptCategory::CUSTOM } |
Note: Either of these can be loaded from script using game.pushMessage(MSG_APP_LOAD_SCRIPT_REQUESTED...) More... | |
Functions | |
void | RoR::RegisterActor (AngelScript::asIScriptEngine *engine) |
defined in ActorAngelscript.cpp More... | |
void | RoR::RegisterVehicleAi (AngelScript::asIScriptEngine *engine) |
defined in VehicleAiAngelscript.cpp More... | |
void | RoR::RegisterInputEngine (AngelScript::asIScriptEngine *engine) |
Registers RoR::InputEngine, defined in InputEngineAngelscript.cpp. More... | |
void | RoR::RegisterConsole (AngelScript::asIScriptEngine *engine) |
Registers RoR::Console, defined in ConsoleAngelscript.cpp. More... | |
void | RoR::RegisterLocalStorage (AngelScript::asIScriptEngine *engine) |
Registers RoR::LocalStorage, defined in LocalStorageAngelscript.cpp. More... | |
void | RoR::RegisterGameScript (AngelScript::asIScriptEngine *engine) |
Registers RoR::GameScript, defined in GameScriptAngelscript.cpp. More... | |
void | RoR::RegisterScriptEvents (AngelScript::asIScriptEngine *engine) |
Registers enum scriptEvents, defined in ScriptEventsAngelscript.cpp. More... | |
void | RoR::RegisterImGuiBindings (AngelScript::asIScriptEngine *engine) |
defined in ImGuiAngelscript.cpp More... | |
void | RoR::RegisterOgreObjects (AngelScript::asIScriptEngine *engine) |
defined in OgreAngelscript.cpp More... | |
void | RoR::RegisterTerrain (AngelScript::asIScriptEngine *engine) |
Registers RoR::Terrain, defined in TerrainAngelscript.cpp. More... | |
void | RoR::RegisterProceduralRoad (AngelScript::asIScriptEngine *engine) |
defined in ProceduralRoadAngelscript.cpp More... | |
void | RoR::RegisterGenericFileFormat (AngelScript::asIScriptEngine *engine) |
defined in GenericFileFormatAngelscript.cpp More... | |
void | RoR::RegisterMessageQueue (AngelScript::asIScriptEngine *engine) |
Registers enum MsgType, defined in MsgQueueAngelscript.cpp. More... | |
void | RoR::RegisterSoundScript (AngelScript::asIScriptEngine *engine) |
defined in SoundScriptAngelscript.cpp More... | |
void | RoR::RegisterCacheSystem (AngelScript::asIScriptEngine *engine) |
defined in CacheSystemAngelscript.cpp More... | |
void | RoR::TRIGGER_EVENT_ASYNC (scriptEvents type, int arg1, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="") |
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED ) invoke script function eventCallbackEx() , if registered, otherwise fall back to eventCallback() More... | |
const char * | RoR::ScriptCategoryToString (ScriptCategory c) |
template<typename T > | |
AngelScript::CScriptArray * | RoR::VectorToScriptArray (const std::vector< T > &vec, const std::string &decl) |
template<typename T , typename U > | |
AngelScript::CScriptArray * | RoR::MapToScriptArray (std::map< T, U > &map, const std::string &decl) |
template<typename ItorT > | |
AngelScript::CScriptArray * | RoR::IterableMapToScriptArray (ItorT begin, ItorT end, const std::string &decl) |
template<typename ItorT > | |
AngelScript::CScriptArray * | RoR::IterableListToScriptArray (ItorT begin, ItorT end, const std::string &decl) |
template<typename T > | |
bool | RoR::GetValueFromScriptDict (const std::string &log_msg, AngelScript::CScriptDictionary *dict, bool required, std::string const &key, const char *decl, T &out_value) |
template<class A , class B > | |
B * | RoR::ScriptRefCast (A *a) |
template<class A , class B > | |
B * | RoR::ScriptRefCastNoCount (A *a) |
Variables | |
const GetFuncFlags_t | RoR::GETFUNCFLAG_OPTIONAL = 0 |
Only logs warning if candidate is found, to help modder find a typo. More... | |
const GetFuncFlags_t | RoR::GETFUNCFLAG_REQUIRED = BITMASK(1) |
Always logs warning that function was not found. More... | |
const GetFuncFlags_t | RoR::GETFUNCFLAG_SILENT = BITMASK(2) |
Never logs. More... | |
const std::string | RoR::GETFUNC_DEFAULTEVENTCALLBACK_SIGFMT = "void {}(int, string, string, int)" |
const std::string | RoR::GETFUNC_DEFAULTEVENTCALLBACK_NAME = "defaultEventCallback" |
Game scripting subsystem using AngelScript.
typedef BitMask_t RoR::GetFuncFlags_t |
Flags for RoR::ScriptEngine::getFunctionByDeclAndLogCandidates()
Definition at line 106 of file ScriptEngine.h.
typedef std::map<ScriptUnitId_t, ScriptUnit> RoR::ScriptUnitMap |
Definition at line 88 of file ScriptEngine.h.
|
strong |
Note: Either of these can be loaded from script using game.pushMessage(MSG_APP_LOAD_SCRIPT_REQUESTED...)
Definition at line 58 of file ScriptEngine.h.
bool RoR::GetValueFromScriptDict | ( | const std::string & | log_msg, |
AngelScript::CScriptDictionary * | dict, | ||
bool | required, | ||
std::string const & | key, | ||
const char * | decl, | ||
T & | out_value | ||
) |
Definition at line 108 of file ScriptUtils.h.
AngelScript::CScriptArray* RoR::IterableListToScriptArray | ( | ItorT | begin, |
ItorT | end, | ||
const std::string & | decl | ||
) |
AngelScript::CScriptArray* RoR::IterableMapToScriptArray | ( | ItorT | begin, |
ItorT | end, | ||
const std::string & | decl | ||
) |
Definition at line 78 of file ScriptUtils.h.
AngelScript::CScriptArray* RoR::MapToScriptArray | ( | std::map< T, U > & | map, |
const std::string & | decl | ||
) |
Definition at line 59 of file ScriptUtils.h.
void RoR::RegisterActor | ( | AngelScript::asIScriptEngine * | engine | ) |
void RoR::RegisterCacheSystem | ( | AngelScript::asIScriptEngine * | engine | ) |
void RoR::RegisterConsole | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers RoR::Console, defined in ConsoleAngelscript.cpp.
void RoR::RegisterGameScript | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers RoR::GameScript, defined in GameScriptAngelscript.cpp.
void RoR::RegisterGenericFileFormat | ( | AngelScript::asIScriptEngine * | engine | ) |
void RoR::RegisterImGuiBindings | ( | AngelScript::asIScriptEngine * | engine | ) |
defined in ImGuiAngelscript.cpp
Definition at line 53 of file ImGuiAngelscript.cpp.
void RoR::RegisterInputEngine | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers RoR::InputEngine, defined in InputEngineAngelscript.cpp.
void RoR::RegisterLocalStorage | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers RoR::LocalStorage, defined in LocalStorageAngelscript.cpp.
void RoR::RegisterMessageQueue | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers enum MsgType, defined in MsgQueueAngelscript.cpp.
void RoR::RegisterOgreObjects | ( | AngelScript::asIScriptEngine * | engine | ) |
defined in OgreAngelscript.cpp
Definition at line 683 of file OgreAngelscript.cpp.
void RoR::RegisterProceduralRoad | ( | AngelScript::asIScriptEngine * | engine | ) |
void RoR::RegisterScriptEvents | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers enum scriptEvents, defined in ScriptEventsAngelscript.cpp.
void RoR::RegisterSoundScript | ( | AngelScript::asIScriptEngine * | engine | ) |
defined in SoundScriptAngelscript.cpp
Definition at line 30 of file SoundScriptAngelscript.cpp.
void RoR::RegisterTerrain | ( | AngelScript::asIScriptEngine * | engine | ) |
Registers RoR::Terrain, defined in TerrainAngelscript.cpp.
void RoR::RegisterVehicleAi | ( | AngelScript::asIScriptEngine * | engine | ) |
const char * RoR::ScriptCategoryToString | ( | ScriptCategory | c | ) |
B* RoR::ScriptRefCast | ( | A * | a | ) |
Definition at line 269 of file ScriptUtils.h.
B* RoR::ScriptRefCastNoCount | ( | A * | a | ) |
Definition at line 286 of file ScriptUtils.h.
|
inline |
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED
) invoke script function eventCallbackEx()
, if registered, otherwise fall back to eventCallback()
Definition at line 51 of file ScriptEngine.h.
AngelScript::CScriptArray* RoR::VectorToScriptArray | ( | const std::vector< T > & | vec, |
const std::string & | decl | ||
) |
Definition at line 42 of file ScriptUtils.h.
const std::string RoR::GETFUNC_DEFAULTEVENTCALLBACK_NAME = "defaultEventCallback" |
Definition at line 113 of file ScriptEngine.h.
const std::string RoR::GETFUNC_DEFAULTEVENTCALLBACK_SIGFMT = "void {}(int, string, string, int)" |
Definition at line 112 of file ScriptEngine.h.
const GetFuncFlags_t RoR::GETFUNCFLAG_OPTIONAL = 0 |
Only logs warning if candidate is found, to help modder find a typo.
Definition at line 107 of file ScriptEngine.h.
const GetFuncFlags_t RoR::GETFUNCFLAG_REQUIRED = BITMASK(1) |
Always logs warning that function was not found.
Definition at line 108 of file ScriptEngine.h.
const GetFuncFlags_t RoR::GETFUNCFLAG_SILENT = BITMASK(2) |
Never logs.
Definition at line 109 of file ScriptEngine.h.