Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 1 addition & 30 deletions lua/wire/wireshared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ end

local table = table
local pairs_sortvalues = pairs_sortvalues
local ipairs_map = ipairs_map

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -720,34 +719,6 @@ elseif CLIENT then
ents_with_inputs[eid] = nil
ents_with_outputs[eid] = nil
end

local flag = false
function WireLib.TestPorts()
flag = not flag
if flag then
local lasteid = 0
hook.Add("HUDPaint", "wire_ports_test", function()
local ent = LocalPlayer():GetEyeTraceNoCursor().Entity
--if not ent:IsValid() then return end
local eid = IsValid(ent) and ent:EntIndex() or lasteid
lasteid = eid

local text = "ID "..eid.."\nInputs:\n"
for _,name,tp,desc,connected in ipairs_map(ents_with_inputs[eid] or {}, unpack) do

text = text..(connected and "-" or " ")
text = text..string.format("%s (%s) [%s]\n", name, tp, desc)
end
text = text.."\nOutputs:\n"
for _,name,tp,desc in ipairs_map(ents_with_outputs[eid] or {}, unpack) do
text = text..string.format("%s (%s) [%s]\n", name, tp, desc)
end
draw.DrawText(text,"Trebuchet24",10,300,Color(255,255,255,255),0)
end)
else
hook.Remove("HUDPaint", "wire_ports_test")
end
end
end

--[[
Expand Down Expand Up @@ -1530,4 +1501,4 @@ do
end

WireLib.E2Table = E2Table
end
end
Loading