added global function to gate defs
This commit is contained in:
parent
518deaca68
commit
43b4db151f
@ -123,5 +123,5 @@ function llr(){
|
||||
|
||||
//resetAllOpCallFunc();
|
||||
exec("./lualogic.cs");
|
||||
schedule(3000, 0, lualogic_connect, 25000);
|
||||
schedule(1000, 0, lualogic_connect, 25000);
|
||||
}
|
||||
|
@ -95,7 +95,6 @@ function LuaLogicTCP::onLine(%this, %line)
|
||||
for(%i=0; %i<%argc; %i++){
|
||||
%data = nextToken(%data, av, "\t");
|
||||
%argv[%i] = lualogic_collapseescape(%av);
|
||||
//talk("argv[" @ %i @ "] = " @ %argv[%i]);
|
||||
}
|
||||
|
||||
if(isObject(%brick)){
|
||||
|
@ -5,14 +5,10 @@ function lualogic_registergatedefinition(%data){
|
||||
//handled automatically now
|
||||
}
|
||||
|
||||
function lualogic_registergatedefinition_auto(%data)
|
||||
{
|
||||
function lualogic_registergatedefinition_auto(%data){
|
||||
if(!isObject(%data))
|
||||
return;
|
||||
|
||||
//if(%data.luaLogic_isRegistered)
|
||||
//return;
|
||||
|
||||
%id = %data.getID();
|
||||
|
||||
if((%idx = $LuaLogic::GateDefinitionIDX[%id]) $= "")
|
||||
@ -22,24 +18,25 @@ function lualogic_registergatedefinition_auto(%data)
|
||||
$LuaLogic::NumGateDefintions++;
|
||||
}
|
||||
|
||||
%numports = %data.numLogicPorts;
|
||||
|
||||
%def = %id @ ";" @
|
||||
%data.logicUIName @ ";" @
|
||||
%data.logicUIDesc @ ";" @
|
||||
lualogic_expandescape(%data.logicInit) @ ";" @
|
||||
lualogic_expandescape(%data.logicUpdate) @ ";" @
|
||||
lualogic_expandescape(%data.logicInput) @ ";" @
|
||||
(%ports = %data.numLogicPorts)
|
||||
lualogic_expandescape(%data.logicGlobal) @ ";" @
|
||||
%numports
|
||||
;
|
||||
|
||||
for(%i = 0; %i < %ports; %i++)
|
||||
for(%i = 0; %i < %numports; %i++)
|
||||
{
|
||||
%def = %def @ ";" @ %data.logicPortType[%i] @ ";" @ %data.logicPortPos[%i] @ ";" @ %data.logicPortDir[%i]
|
||||
@ ";" @ (%data.logicPortCauseUpdate[%i] == true) @ ";" @ %data.logicPortUIName[%i];
|
||||
}
|
||||
|
||||
$LuaLogic::GateDefintion[%idx] = %def;
|
||||
|
||||
//%data.luaLogic_isRegistered = true;
|
||||
}
|
||||
|
||||
function lualogic_registerAllGateDefinitions(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user