Fixed automatic registration to not break gate datablock transmission
This commit is contained in:
@@ -11,7 +11,9 @@ function lualogic_escapelogicfunction(%text){
|
||||
}
|
||||
|
||||
function lualogic_registergatedefinition(%data){
|
||||
lualogic_registergatedefinition_auto(%data);
|
||||
//lualogic_registergatedefinition_auto(%data);
|
||||
|
||||
//handled automatically now
|
||||
}
|
||||
|
||||
function lualogic_registergatedefinition_auto(%data)
|
||||
@@ -19,8 +21,8 @@ function lualogic_registergatedefinition_auto(%data)
|
||||
if(!isObject(%data))
|
||||
return;
|
||||
|
||||
if(%data.luaLogic_isRegistered)
|
||||
return;
|
||||
//if(%data.luaLogic_isRegistered)
|
||||
//return;
|
||||
|
||||
%id = %data.getID();
|
||||
|
||||
@@ -48,10 +50,12 @@ function lualogic_registergatedefinition_auto(%data)
|
||||
|
||||
$LuaLogic::GateDefintion[%idx] = %def;
|
||||
|
||||
%data.luaLogic_isRegistered = true;
|
||||
//%data.luaLogic_isRegistered = true;
|
||||
}
|
||||
|
||||
function lualogic_registerAllGateDefinitions(){
|
||||
echo("LuaLogic: Registering gate definitions");
|
||||
|
||||
for(%dbidx=0; %dbidx<DatablockGroup.getCount(); %dbidx++){
|
||||
%db = DatablockGroup.getObject(%dbidx);
|
||||
if(%db.isLogic && %db.isLogicGate){
|
||||
@@ -60,7 +64,7 @@ function lualogic_registerAllGateDefinitions(){
|
||||
}
|
||||
}
|
||||
|
||||
lualogic_registerAllGateDefinitions();
|
||||
schedule(1, 0, lualogic_registerAllGateDefinitions);
|
||||
|
||||
function lualogic_print(%text)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user