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
7 changes: 2 additions & 5 deletions lua/entities/gmod_wire_expression2/cl_init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include('shared.lua')

Check warning on line 1 in lua/entities/gmod_wire_expression2/cl_init.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'double quoted strings' and 'single quoted strings'

local Trace, Error = E2Lib.Debug.Trace, E2Lib.Debug.Error

Check warning on line 3 in lua/entities/gmod_wire_expression2/cl_init.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: Trace

Expand All @@ -13,7 +13,7 @@
end

local errors = {}
local code = file.Read("expression2/" .. e2 .. ".txt")

Check warning on line 16 in lua/entities/gmod_wire_expression2/cl_init.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'double quoted strings' and 'single quoted strings'

if not code then
return { Error.new("Could not find include '" .. e2 .. ".txt'") }
Expand Down Expand Up @@ -156,7 +156,7 @@
if not data then return end

local txt = data.txt .. "\nauthor: " .. self:GetPlayerName()
local err = data.error -- this isn't used (yet), might do something with it later

Check warning on line 159 in lua/entities/gmod_wire_expression2/cl_init.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: err
local w_total, yoffset = 0, pos.min.y

-------------------
Expand Down Expand Up @@ -200,7 +200,7 @@
-- fancy percent bar

local softquota_width = w * 0.7
local quota_width = softquota_width * math.min(prfbench/e2_softquota,1) + (w - softquota_width + 1) * (prfcount/e2_hardquota)
local quota_width = math.min(softquota_width * math.min(prfbench/e2_softquota,1) + (w - softquota_width + 1) * (prfcount/e2_hardquota), w)

local y = yoffset
surface.SetDrawColor(0, 170, 0, 255)
Expand All @@ -213,10 +213,7 @@
surface.DrawRect( pos.min.x + pos.edgesize, y, quota_width, 20 )

surface.SetDrawColor(0, 0, 0)
surface.DrawLine( pos.min.x + pos.edgesize, y, pos.min.x + pos.edgesize + w, y )
surface.DrawLine( pos.min.x + pos.edgesize + w, y, pos.min.x + pos.edgesize + w, y + 20 )
surface.DrawLine( pos.min.x + pos.edgesize + w, y + 20, pos.min.x + pos.edgesize, y + 20 )
surface.DrawLine( pos.min.x + pos.edgesize, y + 20, pos.min.x + pos.edgesize, y )
surface.DrawOutlinedRect(pos.min.x + pos.edgesize, y, w, 20)

yoffset = yoffset + 20

Expand Down
Loading