made gates with no uiname not display info when clicked
This commit is contained in:
parent
0137af9d21
commit
7f1c5ea417
@ -41,6 +41,9 @@ datablock fxDTSBrickData(LogicGate_EventGate_Data : brick1x1fData)
|
|||||||
isLogicGate = true;
|
isLogicGate = true;
|
||||||
isLogicEventGate = true;
|
isLogicEventGate = true;
|
||||||
|
|
||||||
|
logicUIName = "";
|
||||||
|
logicUIDesc = "Special gate which can be used to trigger events and use events to control its output.";
|
||||||
|
|
||||||
logicInput = lualogic_readfile($LuaLogic::Path @ "bricks/special/EventGate-input.lua" );
|
logicInput = lualogic_readfile($LuaLogic::Path @ "bricks/special/EventGate-input.lua" );
|
||||||
logicUpdate = lualogic_readfile($LuaLogic::Path @ "bricks/special/EventGate-update.lua");
|
logicUpdate = lualogic_readfile($LuaLogic::Path @ "bricks/special/EventGate-update.lua");
|
||||||
|
|
||||||
@ -50,14 +53,14 @@ datablock fxDTSBrickData(LogicGate_EventGate_Data : brick1x1fData)
|
|||||||
logicPortPos[0] = "0 0 0";
|
logicPortPos[0] = "0 0 0";
|
||||||
logicPortDir[0] = "0";
|
logicPortDir[0] = "0";
|
||||||
logicPortCauseUpdate[0] = true;
|
logicPortCauseUpdate[0] = true;
|
||||||
logicPortUIName[0] = "";
|
logicPortUIName[0] = "Input";
|
||||||
logicPortUIDesc[0] = "";
|
logicPortUIDesc[0] = "Input which triggers the onPower input events";
|
||||||
|
|
||||||
logicPortType[1] = 0;
|
logicPortType[1] = 0;
|
||||||
logicPortPos[1] = "0 0 0";
|
logicPortPos[1] = "0 0 0";
|
||||||
logicPortDir[1] = "2";
|
logicPortDir[1] = "2";
|
||||||
logicPortUIName[1] = "";
|
logicPortUIName[1] = "Output";
|
||||||
logicPortUIDesc[1] = "";
|
logicPortUIDesc[1] = "Output controlled by the setPowerState output event";
|
||||||
};
|
};
|
||||||
lualogic_registergatedefinition("LogicGate_EventGate_Data");
|
lualogic_registergatedefinition("LogicGate_EventGate_Data");
|
||||||
|
|
||||||
|
@ -189,10 +189,13 @@ package LuaLogic_Bricks
|
|||||||
%data = %hit.getDataBlock();
|
%data = %hit.getDataBlock();
|
||||||
if(%data.isLogic)
|
if(%data.isLogic)
|
||||||
{
|
{
|
||||||
if(%data.isLogicInput)
|
if(%data.isLogicInput){
|
||||||
%data.Logic_onInput(%hit, %hitPos, %hitNorm, %client);
|
%data.Logic_onInput(%hit, %hitPos, %hitNorm, %client);
|
||||||
else
|
}else{
|
||||||
lualogic_send("GINFO;" @ %client @ ";" @ %hit);
|
if(%data.isLogicWire || %data.logicUIName!$=""){
|
||||||
|
lualogic_send("GINFO;" @ %client @ ";" @ %hit);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user