EgtExecutor 2.3i2 :

- aggiunta funzione EXE e Lua ChangeTable.
This commit is contained in:
DarioS
2021-09-13 15:49:34 +02:00
parent 5c059cd69d
commit 81ab1253fb
3 changed files with 28 additions and 0 deletions
+10
View File
@@ -955,6 +955,16 @@ ExeGetTableAreaOffset( int nInd, BBox3d& b3AreaOffs)
return pMachMgr->GetTableAreaOffset( nInd, b3AreaOffs) ;
}
//-----------------------------------------------------------------------------
bool
ExeChangeTable( const string& sTable, bool bUpdateDisp)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// imposto la tavola corrente della macchinata corrente
return pMachMgr->ChangeTable( sTable, bUpdateDisp) ;
}
//-----------------------------------------------------------------------------
bool
ExeShowOnlyTable( bool bVal)
BIN
View File
Binary file not shown.
+18
View File
@@ -1025,6 +1025,23 @@ LuaGetTableAreaOffset( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaChangeTable( lua_State* L)
{
// 2 parametri : sTable, bUpdateDisp
string sTable ;
LuaCheckParam( L, 1, sTable)
bool bUpdateDisp ;
LuaCheckParam( L, 2, bUpdateDisp)
LuaClearStack( L) ;
// cambio la tavola corrente
bool bOk = ExeChangeTable( sTable, bUpdateDisp) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaAddFixture( lua_State* L)
@@ -3995,6 +4012,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableRef", LuaGetTableRef) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableArea", LuaGetTableArea) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableAreaOffset", LuaGetTableAreaOffset) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtChangeTable", LuaChangeTable) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtAddFixture", LuaAddFixture) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtKeepFixture", LuaKeepFixture) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveFixture", LuaRemoveFixture) ;