Skip to content

Commit

Permalink
Merge pull request #2778 from danmackey/master
Browse files Browse the repository at this point in the history
Angelscript: added function 'getSectionConfig()' to 'BeamClass'
  • Loading branch information
Petr Ohlídal authored Aug 22, 2021
2 parents f041c1e + 9a14b4e commit d3cb00f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/angelscript/BeamClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions source/main/scripting/ScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ void ScriptEngine::init()
result = engine->RegisterObjectMethod("BeamClass", "void scaleTruck(float)", AngelScript::asMETHOD(Actor,scaleTruck), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0);
result = engine->RegisterObjectMethod("BeamClass", "string getTruckName()", AngelScript::asMETHOD(Actor,getTruckName), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0);
result = engine->RegisterObjectMethod("BeamClass", "string getTruckFileName()", AngelScript::asMETHOD(Actor,getTruckFileName), 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,getTruckType), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0);
result = engine->RegisterObjectMethod("BeamClass", "void reset(bool)", AngelScript::asMETHOD(Actor,reset), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0);
result = engine->RegisterObjectMethod("BeamClass", "void parkingbrakeToggle()", AngelScript::asMETHOD(Actor,parkingbrakeToggle), AngelScript::asCALL_THISCALL); ROR_ASSERT(result>=0);
Expand Down

0 comments on commit d3cb00f

Please # to comment.