added more bus bricks

This commit is contained in:
Redo
2020-05-17 08:22:00 -05:00
parent ba94172cc8
commit 74401cd7f6
44 changed files with 78241 additions and 12 deletions

View File

@ -16,6 +16,7 @@ exec($LuaLogic::Path @ "bricks/gates/verticalNOT.cs");
//Inputs
exec($LuaLogic::Path @ "bricks/inputs/switch.cs");
exec($LuaLogic::Path @ "bricks/inputs/button.cs");
exec($LuaLogic::Path @ "bricks/inputs/keyboard.cs");
//Outputs
@ -34,8 +35,10 @@ exec($LuaLogic::Path @ "bricks/math/8bitMultiplier.cs");
exec($LuaLogic::Path @ "bricks/math/8bitDivider.cs");
//Bus
exec($LuaLogic::Path @ "bricks/bus/8BitEnabler.cs");
exec($LuaLogic::Path @ "bricks/bus/8BitBuffer.cs");
exec($LuaLogic::Path @ "bricks/bus/8BitDFlipFlop.cs");
exec($LuaLogic::Path @ "bricks/bus/8BitEnabler.cs");
exec($LuaLogic::Path @ "bricks/bus/bus16.cs");
//Memory
exec($LuaLogic::Path @ "bricks/memory/DFlipFlop.cs");

View File

@ -12,13 +12,22 @@ function serverCmdLST(%client, %time)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
%time = mClampFloat(%time, 0, 999999);
%time = mClampFloat(%time, 1, 10000);
$Pref::Server::LuaLogic::OPT_TICK_TIME = %time/1000;
messageAll('', '\c3%1\c6 has set the logic tick time to \c3%2\c6 millisecond%3.', %client.name, %time, %time == 1 ? "":"s");
lualogic_sendoptions();
}
}
function serverCmdLSM(%client, %mult){
if(%client.isAdmin || %client.isSuperAdmin){
%mult = mFloor(mClamp(%mult, 1, 1000));
$Pref::Server::LuaLogic::OPT_TICK_MULT = %mult;
messageAll('', '\c3%1\c6 has set the logic tick multiplier to \c3%2\c6.', %client.name, %mult);
lualogic_sendoptions();
}
}
function serverCmdLS(%client)
{
if(%client.isAdmin || %client.isSuperAdmin)

View File

@ -25,8 +25,8 @@ function lualogic_registergatedefinition_auto(%data){
%numports = %data.numLogicPorts;
%def = %id @ ";" @
%data.logicUIName @ ";" @
%data.logicUIDesc @ ";" @
lualogic_expandescape(%data.logicUIName) @ ";" @
lualogic_expandescape(%data.logicUIDesc) @ ";" @
lualogic_expandescape(%data.logicInit) @ ";" @
lualogic_expandescape(%data.logicUpdate) @ ";" @
lualogic_expandescape(%data.logicInput) @ ";" @
@ -119,12 +119,12 @@ function lualogic_sendgatedefinitions()
lualogic_send("GD;" @ $LuaLogic::GateDefintion[%i]);
}
function lualogic_sendoptions()
{
lualogic_send("OPT;TICK_ENABLED;" @ $Pref::Server::LuaLogic::OPT_TICK_ENABLED);
lualogic_send("OPT;TICK_TIME;" @ $Pref::Server::LuaLogic::OPT_TICK_TIME);
lualogic_send("OPT;FX_UPDATES;" @ $Pref::Server::LuaLogic::OPT_FX_UPDATES);
lualogic_send("OPT;FX_TIME;" @ $Pref::Server::LuaLogic::OPT_FX_TIME);
function lualogic_sendoptions(){
lualogic_send("OPT;TICK_ENABLED;" @ $Pref::Server::LuaLogic::OPT_TICK_ENABLED);
lualogic_send("OPT;TICK_TIME;" @ $Pref::Server::LuaLogic::OPT_TICK_TIME );
lualogic_send("OPT;FX_UPDATES;" @ $Pref::Server::LuaLogic::OPT_FX_UPDATES );
lualogic_send("OPT;FX_TIME;" @ $Pref::Server::LuaLogic::OPT_FX_TIME );
lualogic_send("OPT;TICK_MULT;" @ $Pref::Server::LuaLogic::OPT_TICK_MULT );
}
function lualogic_savedata(){