added llc command for logic reconnecting
This commit is contained in:
parent
500eff70a9
commit
bde7781d04
@ -1,9 +1,9 @@
|
|||||||
datablock fxDTSBrickData(LogicGate_NAND_Data : LogicGate_OR_Data)
|
datablock fxDTSBrickData(LogicGate_NAND_Data : LogicGate_OR_Data)
|
||||||
{
|
{
|
||||||
uiName = "1x2f NAND";
|
uiName = "1x2f NAND";
|
||||||
iconName = $LuaLogic::Path @ "icons/1x2f NAND";
|
iconName = $LuaLogic::Path @ "icons/1x2f NAND";
|
||||||
logicUIName = "NAND";
|
logicUIName = "NAND";
|
||||||
logicUIDesc = "C is false if A and B are true";
|
logicUIDesc = "C is false if A and B are true";
|
||||||
logicUpdate = "return function(gate) gate.ports[3]:setstate(not (gate.ports[1].state and gate.ports[2].state)) end";
|
logicUpdate = "return function(gate) gate.ports[3]:setstate(not (gate.ports[1].state and gate.ports[2].state)) end";
|
||||||
};
|
};
|
||||||
lualogic_registergatedefinition("LogicGate_NAND_Data");
|
lualogic_registergatedefinition("LogicGate_NAND_Data");
|
||||||
|
@ -116,6 +116,10 @@ package LuaLogic
|
|||||||
};
|
};
|
||||||
activatePackage("LuaLogic");
|
activatePackage("LuaLogic");
|
||||||
|
|
||||||
|
function llc(){
|
||||||
|
lualogic_connect(25000);
|
||||||
|
}
|
||||||
|
|
||||||
function llr(){
|
function llr(){
|
||||||
%path = $LuaLogic::Path;
|
%path = $LuaLogic::Path;
|
||||||
deleteVariables("$LuaLogic*");
|
deleteVariables("$LuaLogic*");
|
||||||
@ -123,5 +127,5 @@ function llr(){
|
|||||||
|
|
||||||
//resetAllOpCallFunc();
|
//resetAllOpCallFunc();
|
||||||
exec("./lualogic.cs");
|
exec("./lualogic.cs");
|
||||||
schedule(1000, 0, lualogic_connect, 25000);
|
schedule(1000, 0, llc);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user