RigsofRods
Soft-body Physics Simulation
ScriptEvents.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5 
6  For more information, see http://www.rigsofrods.org/
7 
8  Rigs of Rods is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License version 3, as
10  published by the Free Software Foundation.
11 
12  Rigs of Rods is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #pragma once
22 
23 #include "BitFlags.h"
24 
25 #include <string>
26 
27 namespace RoR {
28 
31 {
34 
37 
46 
49 
53 
59 
63 
65 
66  SE_ALL_EVENTS = 0xffffffff,
68 
69 };
70 
73 {
74  ASMANIP_CONSOLE_SNIPPET_EXECUTED = 0, // 0 for Backwards compatibility.
77 };
78 
80 {
85 };
86 
89 {
91 
95 
99 };
100 
104 {
105  // both `eventCallback()` and `eventCallbackEx()` ...
107  int arg1;
108  // only `eventCallbackEx()` ...
109  int arg2ex;
110  int arg3ex;
111  int arg4ex;
112  std::string arg5ex;
113  std::string arg6ex;
114  std::string arg7ex;
115  std::string arg8ex;
116 };
117 
118 } // namespace RoR
RoR::ASMANIP_SCRIPT_UNLOADING
@ ASMANIP_SCRIPT_UNLOADING
Triggered before unloading the script to let it clean up (important for missions).
Definition: ScriptEvents.h:76
RoR::ScriptEventArgs
Args for eventCallbackEx() queued via MSG_SIM_SCRIPT_EVENT_TRIGGERED See descriptions at enum RoR::sc...
Definition: ScriptEvents.h:103
RoR::SE_TRUCK_ENGINE_FIRE
@ SE_TRUCK_ENGINE_FIRE
triggered when the planes engines start to get on fire, the argument refers to the actor ID of the ve...
Definition: ScriptEvents.h:39
RoR::SE_ANGELSCRIPT_MANIPULATIONS
@ SE_ANGELSCRIPT_MANIPULATIONS
triggered when the user tries to dynamically use the scripting capabilities (prevent cheating) args: ...
Definition: ScriptEvents.h:54
RoR::SE_GENERIC_TRUCK_LINKING_CHANGED
@ SE_GENERIC_TRUCK_LINKING_CHANGED
Triggered when 2 actors become linked or unlinked via ties/hooks/ropes/slidenodes; args: #1 state (1=...
Definition: ScriptEvents.h:64
RoR::angelScriptThreadStatus
angelScriptThreadStatus
Definition: ScriptEvents.h:79
RoR::SE_ANGELSCRIPT_LINECALLBACK
@ SE_ANGELSCRIPT_LINECALLBACK
The diagnostic info directly from AngelScript engine (see SetLineCallback()), args: #1 ScriptUnitID,...
Definition: ScriptEvents.h:56
RoR::SE_GENERIC_MESSAGEBOX_CLICK
@ SE_GENERIC_MESSAGEBOX_CLICK
triggered when the user clicks on a message box button, the argument refers to the button pressed
Definition: ScriptEvents.h:60
RoR::modCacheActivityType
modCacheActivityType
Argument #2 of script event RoR::SE_GENERIC_MODCACHE_ACTIVITY
Definition: ScriptEvents.h:88
RoR::ScriptEventArgs::arg4ex
int arg4ex
Definition: ScriptEvents.h:111
RoR::SE_TRUCK_MOUSE_GRAB
@ SE_TRUCK_MOUSE_GRAB
triggered when the user uses the mouse to interact with the actor, the argument refers to the actor I...
Definition: ScriptEvents.h:52
RoR::SE_GENERIC_MODCACHE_ACTIVITY
@ SE_GENERIC_MODCACHE_ACTIVITY
Triggered when status of modcache changes, args: #1 type, #2 entry number, for other args see RoR::mo...
Definition: ScriptEvents.h:62
RoR::SE_GENERIC_NEW_TRUCK
@ SE_GENERIC_NEW_TRUCK
triggered when the user spawns a new actor, the argument refers to the actor ID
Definition: ScriptEvents.h:47
BITMASK
#define BITMASK(OFFSET)
Definition: BitFlags.h:10
RoR::MODCACHEACTIVITY_NONE
@ MODCACHEACTIVITY_NONE
Definition: ScriptEvents.h:90
RoR::SE_TRUCK_EXIT
@ SE_TRUCK_EXIT
triggered when switching from vehicle mode to person mode, the argument refers to the actor ID of the...
Definition: ScriptEvents.h:36
RoR::ASTHREADSTATUS_NONE
@ ASTHREADSTATUS_NONE
Definition: ScriptEvents.h:81
RoR::SE_TRUCK_TIE_TOGGLE
@ SE_TRUCK_TIE_TOGGLE
triggered when the user toggles ties, the argument refers to the actor ID
Definition: ScriptEvents.h:42
RoR::SE_TRUCK_ENGINE_DIED
@ SE_TRUCK_ENGINE_DIED
triggered when the vehicle's engine dies (from underrev, water, etc), the argument refers to the acto...
Definition: ScriptEvents.h:38
RoR::SE_EVENTBOX_ENTER
@ SE_EVENTBOX_ENTER
Actor or person entered an eventbox; arguments: #1 type, #2 actorID (actor only), #3 node ID (actor o...
Definition: ScriptEvents.h:32
RoR::ASTHREADSTATUS_CURLSTRING_SUCCESS
@ ASTHREADSTATUS_CURLSTRING_SUCCESS
Args of RoR::SE_ANGELSCRIPT_THREAD_STATUS: arg#1 type, arg#2 HTTP code, arg#3 CURLcode,...
Definition: ScriptEvents.h:83
BitFlags.h
Bit operations.
RoR::ASMANIP_CONSOLE_SNIPPET_EXECUTED
@ ASMANIP_CONSOLE_SNIPPET_EXECUTED
Definition: ScriptEvents.h:74
RoR::MODCACHEACTIVITY_BUNDLE_UNLOADED
@ MODCACHEACTIVITY_BUNDLE_UNLOADED
Args: #1 type, #2 entry number.
Definition: ScriptEvents.h:98
RoR::SE_TRUCK_PARKINGBRAKE_TOGGLE
@ SE_TRUCK_PARKINGBRAKE_TOGGLE
triggered when the user toggles the parking brake, the argument refers to the actor ID
Definition: ScriptEvents.h:43
RoR::MODCACHEACTIVITY_BUNDLE_RELOADED
@ MODCACHEACTIVITY_BUNDLE_RELOADED
Args: #1 type, #2 entry number, –, –, #5 rg name.
Definition: ScriptEvents.h:97
RoR::MODCACHEACTIVITY_ENTRY_ADDED
@ MODCACHEACTIVITY_ENTRY_ADDED
Args: #1 type, #2 entry number, –, –, #5 fname, #6 fext.
Definition: ScriptEvents.h:92
RoR::SE_TRUCK_ENTER
@ SE_TRUCK_ENTER
triggered when switching from person mode to vehicle mode, the argument refers to the actor ID of the...
Definition: ScriptEvents.h:35
RoR::SE_NO_EVENTS
@ SE_NO_EVENTS
Definition: ScriptEvents.h:67
RoR::SE_GENERIC_EXCEPTION_CAUGHT
@ SE_GENERIC_EXCEPTION_CAUGHT
Triggered when C++ exception (usually Ogre::Exception) is thrown; #1 ScriptUnitID,...
Definition: ScriptEvents.h:61
RoR::SE_TRUCK_RESET
@ SE_TRUCK_RESET
triggered when the user resets the truck, the argument refers to the actor ID of the vehicle
Definition: ScriptEvents.h:50
RoR::SE_ANGELSCRIPT_MSGCALLBACK
@ SE_ANGELSCRIPT_MSGCALLBACK
The diagnostic info directly from AngelScript engine (see asSMessageInfo), args: #1 ScriptUnitID,...
Definition: ScriptEvents.h:55
RoR::ScriptEventArgs::arg7ex
std::string arg7ex
Definition: ScriptEvents.h:114
RoR::angelScriptManipulationType
angelScriptManipulationType
Argument #2 of script event SE_ANGELSCRIPT_MANIPULATIONS
Definition: ScriptEvents.h:72
RoR::SE_TRUCK_LIGHT_TOGGLE
@ SE_TRUCK_LIGHT_TOGGLE
triggered when the main light is toggled, the argument refers to the actor ID
Definition: ScriptEvents.h:41
RoR::ScriptEventArgs::arg5ex
std::string arg5ex
Definition: ScriptEvents.h:112
RoR::SE_ALL_EVENTS
@ SE_ALL_EVENTS
Definition: ScriptEvents.h:66
RoR::ScriptEventArgs::arg8ex
std::string arg8ex
Definition: ScriptEvents.h:115
RoR::SE_TRUCK_TELEPORT
@ SE_TRUCK_TELEPORT
triggered when the user teleports the truck, the argument refers to the actor ID of the vehicle
Definition: ScriptEvents.h:51
RoR::ScriptEventArgs::type
scriptEvents type
Definition: ScriptEvents.h:106
RoR::SE_TRUCK_TOUCHED_WATER
@ SE_TRUCK_TOUCHED_WATER
triggered when any part of the actor touches water, the argument refers to the actor ID
Definition: ScriptEvents.h:40
RoR::ScriptEventArgs::arg2ex
int arg2ex
Definition: ScriptEvents.h:109
RoR::SE_TRUCK_BEACONS_TOGGLE
@ SE_TRUCK_BEACONS_TOGGLE
triggered when the user toggles beacons, the argument refers to the actor ID
Definition: ScriptEvents.h:44
RoR::SE_EVENTBOX_EXIT
@ SE_EVENTBOX_EXIT
Actor or person left an eventbox; arguments: #1 type, #2 actorID (actor only), #3 unused,...
Definition: ScriptEvents.h:33
RoR::ASMANIP_SCRIPT_LOADED
@ ASMANIP_SCRIPT_LOADED
Triggered after the script's main() completed; may trigger additional processing (for example,...
Definition: ScriptEvents.h:75
RoR::MODCACHEACTIVITY_ENTRY_DELETED
@ MODCACHEACTIVITY_ENTRY_DELETED
Flagged as deleted, managed by shared pointers; Args: #1 type, #2 entry number, –,...
Definition: ScriptEvents.h:94
RoR::ASTHREADSTATUS_CURLSTRING_PROGRESS
@ ASTHREADSTATUS_CURLSTRING_PROGRESS
Args of RoR::SE_ANGELSCRIPT_THREAD_STATUS: arg#1 type, arg#2 percentage, arg#3 unused,...
Definition: ScriptEvents.h:82
RoR::ScriptEventArgs::arg6ex
std::string arg6ex
Definition: ScriptEvents.h:113
RoR::scriptEvents
scriptEvents
This enum describes what events are existing. The script can register to receive events.
Definition: ScriptEvents.h:30
RoR::MODCACHEACTIVITY_BUNDLE_LOADED
@ MODCACHEACTIVITY_BUNDLE_LOADED
Args: #1 type, #2 entry number, –, –, #5 rg name.
Definition: ScriptEvents.h:96
RoR::SE_ANGELSCRIPT_EXCEPTIONCALLBACK
@ SE_ANGELSCRIPT_EXCEPTIONCALLBACK
The diagnostic info directly from AngelScript engine (see SetExceptionCallback()),...
Definition: ScriptEvents.h:57
RoR
Definition: AppContext.h:36
RoR::SE_GENERIC_DELETED_TRUCK
@ SE_GENERIC_DELETED_TRUCK
triggered when the user deletes an actor, the argument refers to the actor ID
Definition: ScriptEvents.h:48
RoR::MODCACHEACTIVITY_ENTRY_MODIFIED
@ MODCACHEACTIVITY_ENTRY_MODIFIED
Args: #1 type, #2 entry number, –, –, #5 fname, #6 fext.
Definition: ScriptEvents.h:93
RoR::SE_ANGELSCRIPT_THREAD_STATUS
@ SE_ANGELSCRIPT_THREAD_STATUS
Sent by background threads (i.e. CURL) when there's something important (like finishing a download)....
Definition: ScriptEvents.h:58
RoR::ScriptEventArgs::arg1
int arg1
Definition: ScriptEvents.h:107
RoR::ASTHREADSTATUS_CURLSTRING_FAILURE
@ ASTHREADSTATUS_CURLSTRING_FAILURE
Args of RoR::SE_ANGELSCRIPT_THREAD_STATUS: arg#1 type, arg#2 HTTP code, arg#3 CURLcode,...
Definition: ScriptEvents.h:84
RoR::SE_TRUCK_CPARTICLES_TOGGLE
@ SE_TRUCK_CPARTICLES_TOGGLE
triggered when the user toggles custom particles, the argument refers to the actor ID
Definition: ScriptEvents.h:45
RoR::ScriptEventArgs::arg3ex
int arg3ex
Definition: ScriptEvents.h:110