Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 0 additions & 6 deletions lua/autorun/wire_load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
]]--

if VERSION < 140403 and VERSION > 5 then
-- VERSION > 5 check added June 2013, to address issues regarding the Steampipe update sometimes setting VERSION to 1.
ErrorNoHalt("WireMod: This branch of wiremod only supports Gmod13+.\n")
return
end

if SERVER then
-- this file
AddCSLuaFile("autorun/wire_load.lua")
Expand Down
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_expression2/core/extloader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ local function e2_include_finalize()
for _, info in ipairs(included_files) do
local ok, message = pcall(e2_include_pass2, unpack(info))
if not ok then
WireLib.ErrorNoHalt(string.format("There was an error loading " ..
ErrorNoHalt(string.format("There was an error loading " ..
"the %s extension. Please report this to its developer.\n%s\n",
info[1], message))
end
Expand Down
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_gpu/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ function ENT:Draw(flags)
self:RenderVertex(1024,1024*monitor.RatioX)
self:RenderMisc(pos, ang, res, 1/monitor.RatioX, monitor)
end, debug.traceback)
if not ok then WireLib.ErrorNoHalt(err) end
if not ok then ErrorNoHalt(err) end
if self.In3D2D then self.In3D2D = false cam.End3D2D() end
self.VertexCamSettings = nil
end
Expand Down
6 changes: 3 additions & 3 deletions lua/wire/gpulib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

end

-- Frees an used RT

Check warning on line 113 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of '//' and '--'
local function FreeRT(rt)

for i, RT in pairs( RenderTargetCache ) do
Expand All @@ -125,7 +125,7 @@

end

//

Check warning on line 128 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of '//' and '--'
// Create basic fonts
//
local fontData =
Expand All @@ -150,7 +150,7 @@
})
//
// Create screen textures and materials
//

Check warning on line 153 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of '--' and '//'
WireGPU_matScreen = CreateMaterial("sprites/GPURT","UnlitGeneric",{
["$vertexcolor"] = 1,
["$vertexalpha"] = 1,
Expand All @@ -169,7 +169,7 @@

function GPU:Initialize(no_rendertarget)
if no_rendertarget then return nil end
-- Rendertarget cache management

Check warning on line 172 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of '--' and '//'

-- This should not even happen.
if self.RT then
Expand Down Expand Up @@ -299,7 +299,7 @@
render.SetViewPort(0, 0, 1024, 1024)
cam.Start2D()
local ok, err = xpcall(renderfunction, debug.traceback)
if not ok then WireLib.ErrorNoHalt(err) end
if not ok then ErrorNoHalt(err) end
cam.End2D()
render.SetViewPort(0, 0, oldw, oldh)
render.SetRenderTarget(OldRT)
Expand All @@ -326,7 +326,7 @@
local res = monitor.RS*1024/h
cam.Start3D2D(pos, ang, res)
local ok, err = xpcall(renderfunction, debug.traceback, x, y, w, h, monitor, pos, ang, res)
if not ok then WireLib.ErrorNoHalt(err) end
if not ok then ErrorNoHalt(err) end
cam.End3D2D()
end

Expand Down Expand Up @@ -371,7 +371,7 @@

if postrenderfunction then postrenderfunction(pos, ang, res, aspect, monitor) end
end, debug.traceback)
if not ok then WireLib.ErrorNoHalt(err) end
if not ok then ErrorNoHalt(err) end
cam.End3D2D()

WireGPU_matScreen:SetTexture("$basetexture", OldTex)
Expand Down Expand Up @@ -436,7 +436,7 @@
{ x+w, y+h },
}

local mins, maxs = screen:OBBMins(), screen:OBBMaxs()

Check warning on line 439 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: maxs

Check warning on line 439 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: mins

local timerid = "wire_gpulib_updatebounds"..screen:EntIndex()
local function setbounds()
Expand Down Expand Up @@ -484,7 +484,7 @@

function GPULib.switchscreen(screen, ent)
screen.GPUEntity = ent
umsg.Start("wire_gpulib_setent")

Check warning on line 487 in lua/wire/gpulib.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use net messages.
umsg.Short(screen:EntIndex())
umsg.Short(ent:EntIndex())
umsg.End()
Expand Down
4 changes: 2 additions & 2 deletions lua/wire/timedpairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
local next = next
local pairs = pairs
local unpack = unpack
local pcall = pcall

Check warning on line 22 in lua/wire/timedpairs.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: pcall

local functions = {}
function WireLib.TimedpairsGetTable()
Expand Down Expand Up @@ -52,7 +52,7 @@
local ok, err = xpcall( data.callback, debug.traceback, kv.key, kv.value, unpack(data.args) ) -- DO EET

if not ok then -- oh noes
WireLib.ErrorNoHalt( "Error in Timedpairs '" .. name .. "': " .. err )
ErrorNoHalt( "Error in Timedpairs '" .. name .. "': " .. err )
toremove[#toremove+1] = name
break
elseif err == false then -- They returned false inside the function
Expand All @@ -65,7 +65,7 @@
local ok, err = xpcall( data.endcallback, debug.traceback, kv.key, kv.value, unpack(data.args) )

if not ok then
WireLib.ErrorNoHalt( "Error in Timedpairs '" .. name .. "' (in end function): " .. err )
ErrorNoHalt( "Error in Timedpairs '" .. name .. "' (in end function): " .. err )
end
end
toremove[#toremove+1] = name
Expand All @@ -74,12 +74,12 @@
end
end

for i=1,#toremove do -- Remove all that were flagged for removal

Check warning on line 77 in lua/wire/timedpairs.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of '//' and '--'
functions[toremove[i]] = nil
end
end
if (CLIENT) then
hook.Add("PostRenderVGUI", "WireLib_Timedpairs", Timedpairs) // Doesn't get paused in single player. Can be important for vguis.

Check warning on line 82 in lua/wire/timedpairs.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of '//' and '--'
else
hook.Add("Think", "WireLib_Timedpairs", Timedpairs) // Servers still uses Think.
end
Expand Down
7 changes: 0 additions & 7 deletions lua/wire/wireshared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,6 @@ WireLib.NetQueue = {
setmetatable(WireLib.NetQueue, WireLib.NetQueue)
end

function WireLib.ErrorNoHalt(message)
-- ErrorNoHalt clips messages to 512 characters, so chain calls if necessary
for i=1,#message, 511 do
ErrorNoHalt(message:sub(i,i+510))
end
end

--- Generate a random version 4 UUID and return it as a string.
function WireLib.GenerateUUID()
-- It would be easier to generate this by word rather than by byte, but
Expand Down
Loading