EgtExecutor 1.6v3 :

- aggiunta KeepFixture ed estesa KeepRawPart.
This commit is contained in:
Dario Sassi
2016-10-17 07:57:36 +00:00
parent cd50f887b8
commit cd1e810cf1
3 changed files with 46 additions and 5 deletions
+22 -2
View File
@@ -453,12 +453,14 @@ LuaModifyRawPartHeight( lua_State* L)
static int
LuaKeepRawPart( lua_State* L)
{
// 1 parametro : nRawId
// 1 o 2 parametri : nRawId [, nSouPhase]
int nRawId ;
LuaCheckParam( L, 1, nRawId)
int nSouPhase = 0 ;
LuaGetParam( L, 2, nSouPhase) ;
LuaClearStack( L) ;
// confermo il grezzo nella fase corrente della macchinata corrente
bool bOk = ExeKeepRawPart( nRawId) ;
bool bOk = ExeKeepRawPart( nRawId, nSouPhase) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
@@ -840,6 +842,23 @@ LuaAddFixture( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaKeepFixture( lua_State* L)
{
// 1 o 2 parametri : nFxtId [, nSouPhase]
int nFxtId ;
LuaCheckParam( L, 1, nFxtId)
int nSouPhase = 0 ;
LuaGetParam( L, 2, nSouPhase) ;
LuaClearStack( L) ;
// confermo il bloccaggio nella fase corrente della macchinata corrente
bool bOk = ExeKeepFixture( nFxtId, nSouPhase) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaRemoveFixture( lua_State* L)
@@ -2799,6 +2818,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableRef", LuaGetTableRef) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableArea", LuaGetTableArea) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtAddFixture", LuaAddFixture) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtKeepFixture", LuaKeepFixture) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveFixture", LuaRemoveFixture) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetFirstFixture", LuaGetFirstFixture) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextFixture", LuaGetNextFixture) ;