From 4186778cbd5a211cb876b527622e47e40f9fd653 Mon Sep 17 00:00:00 2001 From: Danny Mackey Date: Fri, 20 Aug 2021 19:24:34 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9CAngelscript:=20added=20function?= =?UTF-8?q?=20'getSectionConfig()'=20to=20'BeamClass'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main/scripting/ScriptEngine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/main/scripting/ScriptEngine.cpp b/source/main/scripting/ScriptEngine.cpp index e7ffc24f9d..82e7aa622e 100644 --- a/source/main/scripting/ScriptEngine.cpp +++ b/source/main/scripting/ScriptEngine.cpp @@ -190,6 +190,7 @@ void ScriptEngine::init() result = engine->RegisterObjectMethod("BeamClass", "void scaleTruck(float)", AngelScript::asMETHOD(Actor,ScaleActor), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0); result = engine->RegisterObjectMethod("BeamClass", "string getTruckName()", AngelScript::asMETHOD(Actor,GetActorDesignName), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0); result = engine->RegisterObjectMethod("BeamClass", "string getTruckFileName()", AngelScript::asMETHOD(Actor,GetActorFileName), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0); + result = engine->RegisterObjectMethod("BeamClass", "string getSectionConfig()", AngelScript::asMETHOD(Actor, GetSectionConfig), AngelScript::asCALL_THISCALL); ROR_ASSERT(result >= 0); result = engine->RegisterObjectMethod("BeamClass", "int getTruckType()", AngelScript::asMETHOD(Actor,GetActorType), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0); result = engine->RegisterObjectMethod("BeamClass", "void reset(bool)", AngelScript::asFUNCTION(AS_RequestActorReset), AngelScript::asCALL_CDECL_OBJFIRST); ROR_ASSERT(result>=0); result = engine->RegisterObjectMethod("BeamClass", "void parkingbrakeToggle()", AngelScript::asMETHOD(Actor,ToggleParkingBrake), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0); From 96ee940e8f37444b634295826fa5bc653b323619 Mon Sep 17 00:00:00 2001 From: Danny Mackey Date: Fri, 20 Aug 2021 19:29:02 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9A=20Added=20doc=20for=20'BeamCla?= =?UTF-8?q?ss.getSectionConfig()'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/angelscript/BeamClass.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/angelscript/BeamClass.h b/doc/angelscript/BeamClass.h index 98faa7cdda..0c7355059b 100644 --- a/doc/angelscript/BeamClass.h +++ b/doc/angelscript/BeamClass.h @@ -10,6 +10,11 @@ class BeamClass * Gets the name of the truck. */ string getTruckName(); + + /** + * Gets the name of the loaded section for a truck. + */ + string getSectionConfig(); /** * Resets the truck.