Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Data Structures | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
ScriptEngine.h File Reference
#include "AngelScriptBindings.h"
#include "Application.h"
#include "GameContext.h"
#include "GameScript.h"
#include "InterThreadStoreVector.h"
#include "ScriptEvents.h"
#include <Ogre.h>
#include "scriptdictionary/scriptdictionary.h"
#include "scriptbuilder/scriptbuilder.h"
#include <map>

Go to the source code of this file.

Data Structures

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...
 

Namespaces

namespace  RoR
 

Macros

#define DEFAULT_TERRAIN_SCRIPT   "default.as"
 

Typedefs

typedef std::map< ScriptUnitID_t, ScriptUnitRoR::ScriptUnitMap
 
typedef BitMask_t RoR::GetFuncFlags_t
 Flags for RoR::ScriptEngine::getFunctionByDeclAndLogCandidates()
 

Enumerations

enum class  RoR::ScriptCategory {
  RoR::ScriptCategory::INVALID , RoR::ScriptCategory::ACTOR , RoR::ScriptCategory::TERRAIN , RoR::ScriptCategory::GADGET ,
  RoR::ScriptCategory::CUSTOM
}
 Note: Either of these can be loaded from script using game.pushMessage(MSG_APP_LOAD_SCRIPT_REQUESTED...) More...
 
enum  RoR::ScriptRetCode {
  RoR::SCRIPTRETCODE_SUCCESS = AngelScript::asSUCCESS , RoR::SCRIPTRETCODE_AS_ERROR = AngelScript::asERROR , RoR::SCRIPTRETCODE_AS_CONTEXT_ACTIVE = AngelScript::asCONTEXT_ACTIVE , RoR::SCRIPTRETCODE_AS_CONTEXT_NOT_FINISHED = AngelScript::asCONTEXT_NOT_FINISHED ,
  RoR::SCRIPTRETCODE_AS_CONTEXT_NOT_PREPARED = AngelScript::asCONTEXT_NOT_PREPARED , RoR::SCRIPTRETCODE_AS_INVALID_ARG = AngelScript::asINVALID_ARG , RoR::SCRIPTRETCODE_AS_NO_FUNCTION = AngelScript::asNO_FUNCTION , RoR::SCRIPTRETCODE_AS_NOT_SUPPORTED = AngelScript::asNOT_SUPPORTED ,
  RoR::SCRIPTRETCODE_AS_INVALID_NAME = AngelScript::asINVALID_NAME , RoR::SCRIPTRETCODE_AS_NAME_TAKEN = AngelScript::asNAME_TAKEN , RoR::SCRIPTRETCODE_AS_INVALID_DECLARATION = AngelScript::asINVALID_DECLARATION , RoR::SCRIPTRETCODE_AS_INVALID_OBJECT = AngelScript::asINVALID_OBJECT ,
  RoR::SCRIPTRETCODE_AS_INVALID_TYPE = AngelScript::asINVALID_TYPE , RoR::SCRIPTRETCODE_AS_ALREADY_REGISTERED = AngelScript::asALREADY_REGISTERED , RoR::SCRIPTRETCODE_AS_MULTIPLE_FUNCTIONS = AngelScript::asMULTIPLE_FUNCTIONS , RoR::SCRIPTRETCODE_AS_NO_MODULE = AngelScript::asNO_MODULE ,
  RoR::SCRIPTRETCODE_AS_NO_GLOBAL_VAR = AngelScript::asNO_GLOBAL_VAR , RoR::SCRIPTRETCODE_AS_INVALID_CONFIGURATION = AngelScript::asINVALID_CONFIGURATION , RoR::SCRIPTRETCODE_AS_INVALID_INTERFACE = AngelScript::asINVALID_INTERFACE , RoR::SCRIPTRETCODE_AS_CANT_BIND_ALL_FUNCTIONS = AngelScript::asCANT_BIND_ALL_FUNCTIONS ,
  RoR::SCRIPTRETCODE_AS_LOWER_ARRAY_DIMENSION_NOT_REGISTERED = AngelScript::asLOWER_ARRAY_DIMENSION_NOT_REGISTERED , RoR::SCRIPTRETCODE_AS_WRONG_CONFIG_GROUP = AngelScript::asWRONG_CONFIG_GROUP , RoR::SCRIPTRETCODE_AS_CONFIG_GROUP_IS_IN_USE = AngelScript::asCONFIG_GROUP_IS_IN_USE , RoR::SCRIPTRETCODE_AS_ILLEGAL_BEHAVIOUR_FOR_TYPE = AngelScript::asILLEGAL_BEHAVIOUR_FOR_TYPE ,
  RoR::SCRIPTRETCODE_AS_WRONG_CALLING_CONV = AngelScript::asWRONG_CALLING_CONV , RoR::SCRIPTRETCODE_AS_BUILD_IN_PROGRESS = AngelScript::asBUILD_IN_PROGRESS , RoR::SCRIPTRETCODE_AS_INIT_GLOBAL_VARS_FAILED = AngelScript::asINIT_GLOBAL_VARS_FAILED , RoR::SCRIPTRETCODE_AS_OUT_OF_MEMORY = AngelScript::asOUT_OF_MEMORY ,
  RoR::SCRIPTRETCODE_AS_MODULE_IS_IN_USE = AngelScript::asMODULE_IS_IN_USE , RoR::SCRIPTRETCODE_UNSPECIFIED_ERROR = -1001 , RoR::SCRIPTRETCODE_ENGINE_NOT_CREATED = -1002 , RoR::SCRIPTRETCODE_CONTEXT_NOT_CREATED = -1003 ,
  RoR::SCRIPTRETCODE_SCRIPTUNIT_NOT_EXISTS = -1004 , RoR::SCRIPTRETCODE_SCRIPTUNIT_NO_MODULE = -1005 , RoR::SCRIPTRETCODE_FUNCTION_NOT_EXISTS = -1006
}
 Common return codes for script manipulation funcs (add/get/delete | funcs/variables) More...
 

Functions

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()
 
const char * RoR::ScriptCategoryToString (ScriptCategory c)
 

Variables

const GetFuncFlags_t RoR::GETFUNCFLAG_OPTIONAL = 0
 Only logs warning if candidate is found, to help modder find a typo.
 
const GetFuncFlags_t RoR::GETFUNCFLAG_REQUIRED = BITMASK(1)
 Always logs warning that function was not found.
 
const GetFuncFlags_t RoR::GETFUNCFLAG_SILENT = BITMASK(2)
 Never logs.
 
const std::string RoR::GETFUNC_DEFAULTEVENTCALLBACK_SIGFMT = "void {}(int, string, string, int)"
 
const std::string RoR::GETFUNC_DEFAULTEVENTCALLBACK_NAME = "defaultEventCallback"
 

Detailed Description

Author
Thomas Fischer
Date
24th of February 2009

Definition in file ScriptEngine.h.

Macro Definition Documentation

◆ DEFAULT_TERRAIN_SCRIPT

#define DEFAULT_TERRAIN_SCRIPT   "default.as"

Definition at line 30 of file ScriptEngine.h.