diff --git a/lua/wire/client/node_editor/nodeeditor.lua b/lua/wire/client/node_editor/nodeeditor.lua index bfc4facb23..24429d9224 100644 --- a/lua/wire/client/node_editor/nodeeditor.lua +++ b/lua/wire/client/node_editor/nodeeditor.lua @@ -453,6 +453,9 @@ function Editor:InitComponents() local node2 = node:AddNode(gate.name or "No name found :(") node2.name = gate.name node2.action = action + if gate.description then + node2:SetTooltip(gate.description) + end function node2:DoClick() editor.SelectedInMenu = { type = type, gate = self.action } end diff --git a/lua/wire/cpu_gates/memory.lua b/lua/wire/cpu_gates/memory.lua index 3b43e741db..50719f9177 100644 --- a/lua/wire/cpu_gates/memory.lua +++ b/lua/wire/cpu_gates/memory.lua @@ -4,6 +4,7 @@ local i = 1 CPUGateActions["memory-program-counter-edge-trigger"] = { order = i, name = "Program Counter (Edge Triggered)", + description = "A program counter that supports loading from addresses, resetting, and incrementing when Clock changes and isnt 0", inputs = {"Increment", "Load", "LoadAddress", "Reset", "Clock"}, outputs = {"Address"}, output = function(gate, Increment, Load, LoadAddress, Reset, Clock) @@ -33,6 +34,7 @@ i = i + 1 CPUGateActions["memory-register"] = { order = i, name = "Register", + description = "Updates its value from Data when Clock isnt 0", inputs = {"Data", "Clock"}, output = function(gate, Data, Clock) if (Clock ~= 0) then @@ -49,6 +51,7 @@ i = i + 1 CPUGateActions["memory-register-edge-trigger"] = { order = i, name = "Register (Edge Triggered)", + description = "Updates its value from Data when Clock changes and isnt 0", inputs = {"Data", "Clock"}, output = function(gate, Data, Clock) local clock = (Clock ~= 0) diff --git a/lua/wire/cpu_gates/selection.lua b/lua/wire/cpu_gates/selection.lua index 00f27aecde..d70fb8f727 100644 --- a/lua/wire/cpu_gates/selection.lua +++ b/lua/wire/cpu_gates/selection.lua @@ -4,6 +4,7 @@ local i = 1 CPUGateActions["selection-2-mux"] = { order = i, name = "2-to-1 Mux", + description = "Selects a value out of 2 choices and outputs 1", inputs = {"Select", "A", "B"}, output = function(gate, S, ...) local s = math.floor(S) @@ -20,6 +21,7 @@ i = i + 1 CPUGateActions["selection-4-mux"] = { order = i, name = "4-to-1 Mux", + description = "Selects a value out of 4 choices and outputs 1", inputs = {"Select", "A", "B", "C", "D"}, output = function(gate, S, ...) local s = math.floor(S) @@ -36,6 +38,7 @@ i = i + 1 CPUGateActions["selection-8-mux"] = { order = i, name = "8-to-1 Mux", + description = "Selects a value out of 8 choices and outputs 1", inputs = {"Select", "A", "B", "C", "D", "E", "F", "G", "H"}, output = function(gate, S, ...) local s = math.floor(S) @@ -52,6 +55,7 @@ i = i + 1 CPUGateActions["selection-16-mux"] = { order = i, name = "16-to-1 Mux", + description = "Selects a value out of 16 choices and outputs 1", inputs = {"Select", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"}, output = function(gate, S, ...) local s = math.floor(S) @@ -68,6 +72,7 @@ i = i + 1 CPUGateActions["selection-2-demux"] = { order = i, name = "1-to-2 Demux", + description = "Depending on what Select is, routes In to a specific output", inputs = {"Select", "In"}, outputs = {"A", "B"}, output = function(gate, S, I) @@ -87,6 +92,7 @@ i = i + 1 CPUGateActions["selection-4-demux"] = { order = i, name = "1-to-4 Demux", + description = "Depending on what Select is, routes In to a specific output", inputs = {"Select", "In"}, outputs = {"A", "B", "C", "D"}, output = function(gate, S, I) @@ -106,6 +112,7 @@ i = i + 1 CPUGateActions["selection-8-demux"] = { order = i, name = "1-to-8 Demux", + description = "Depending on what Select is, routes In to a specific output", inputs = {"Select", "In"}, outputs = {"A", "B", "C", "D", "E", "F", "G", "H"}, output = function(gate, S, I) @@ -125,6 +132,7 @@ i = i + 1 CPUGateActions["selection-16-demux"] = { order = i, name = "1-to-16 Demux", + description = "Depending on what Select is, routes In to a specific output", inputs = {"Select", "In"}, outputs = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"}, output = function(gate, S, I) diff --git a/lua/wire/fpga_gates/constants.lua b/lua/wire/fpga_gates/constants.lua index 996ebd5d01..10688c4a9d 100644 --- a/lua/wire/fpga_gates/constants.lua +++ b/lua/wire/fpga_gates/constants.lua @@ -44,6 +44,7 @@ i = i + 1 FPGAGateActions["entity-self"] = { order = i, name = "Self", + description = "Gets this FPGA", inputs = {}, outputs = {"Out"}, outputtypes = {"ENTITY"}, @@ -57,6 +58,7 @@ i = i + 1 FPGAGateActions["entity-owner"] = { order = i, name = "Owner", + description = "Gets you!", inputs = {}, outputs = {"Out"}, outputtypes = {"ENTITY"}, @@ -69,6 +71,7 @@ i = i + 1 FPGAGateActions["server-tickrate"] = { order = i, name = "Tickrate", + description = "Gets the server tickrate", inputs = {}, outputs = {"Out"}, outputtypes = {"NORMAL"}, diff --git a/lua/wire/fpga_gates/execution.lua b/lua/wire/fpga_gates/execution.lua index 5a8186f7d9..a2b95c7da3 100644 --- a/lua/wire/fpga_gates/execution.lua +++ b/lua/wire/fpga_gates/execution.lua @@ -5,6 +5,7 @@ i = i + 1 FPGAGateActions["execution-delta"] = { order = i, name = "Execution Delta", + description = "Gets the time since the last execution of this FPGA", inputs = {}, outputs = {"Out"}, outputtypes = {"NORMAL"}, @@ -19,6 +20,7 @@ i = i + 1 FPGAGateActions["execution-count"] = { order = i, name = "Execution Count", + description = "Gets the amount of times this FPGA has executed", inputs = {}, outputs = {"Out"}, outputtypes = {"NORMAL"}, @@ -33,6 +35,7 @@ i = i + 1 FPGAGateActions["execution-last-normal"] = { order = i, name = "Last Normal", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"NORMAL"}, outputs = {"Out"}, @@ -55,6 +58,7 @@ i = i + 1 FPGAGateActions["execution-last-vector"] = { order = i, name = "Last Vector", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"VECTOR"}, outputs = {"Out"}, @@ -77,6 +81,7 @@ i = i + 1 FPGAGateActions["execution-last-angle"] = { order = i, name = "Last Angle", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"ANGLE"}, outputs = {"Out"}, @@ -99,6 +104,7 @@ i = i + 1 FPGAGateActions["execution-last-string"] = { order = i, name = "Last String", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"STRING"}, outputs = {"Out"}, @@ -121,6 +127,7 @@ i = i + 1 FPGAGateActions["execution-timed-last-normal"] = { order = i, name = "Timed Last Normal", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"NORMAL"}, outputs = {"Out"}, @@ -141,6 +148,7 @@ i = i + 1 FPGAGateActions["execution-timed-last-vector"] = { order = i, name = "Timed Last Vector", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"VECTOR"}, outputs = {"Out"}, @@ -162,6 +170,7 @@ i = i + 1 FPGAGateActions["execution-timed-last-angle"] = { order = i, name = "Timed Last Angle", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"ANGLE"}, outputs = {"Out"}, @@ -183,6 +192,7 @@ i = i + 1 FPGAGateActions["execution-timed-last-string"] = { order = i, name = "Timed Last String", + description = "Outputs what A was last execution", inputs = {"A"}, inputtypes = {"STRING"}, outputs = {"Out"}, @@ -204,6 +214,7 @@ i = i + 1 FPGAGateActions["execution-previous-normal"] = { order = i, name = "Previous Normal", + description = "Outputs what A was last tick", inputs = {"A"}, inputtypes = {"NORMAL"}, outputs = {"Out"}, @@ -228,6 +239,7 @@ i = i + 1 FPGAGateActions["execution-previous-vector"] = { order = i, name = "Previous Vector", + description = "Outputs what A was last tick", inputs = {"A"}, inputtypes = {"VECTOR"}, outputs = {"Out"}, @@ -252,6 +264,7 @@ i = i + 1 FPGAGateActions["execution-previous-angle"] = { order = i, name = "Previous Angle", + description = "Outputs what A was last tick", inputs = {"A"}, inputtypes = {"ANGLE"}, outputs = {"Out"}, @@ -276,6 +289,7 @@ i = i + 1 FPGAGateActions["execution-previous-string"] = { order = i, name = "Previous String", + description = "Outputs what A was last tick", inputs = {"A"}, inputtypes = {"STRING"}, outputs = {"Out"},