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
2 changes: 1 addition & 1 deletion 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 @@ -111,7 +111,7 @@
end

function ENT:GetGateName()
return self:GetNWString("name", self.name)
return self:GetInstanceName()
end

local h_of_lower = 100 -- height of the lower section (the prfbench/percent bar section)
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
5 changes: 0 additions & 5 deletions lua/entities/gmod_wire_expression2/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ function ENT:Initialize()
end
end

function ENT:SetupDataTables()
self:NetworkVar("Entity", 0, "InstancePlayer")
self:NetworkVar("String", 0, "InstanceName")
end

function ENT:OnRestore()
self:Setup(self.original, self.inc_files, nil, true)
end
Expand Down
6 changes: 5 additions & 1 deletion lua/entities/gmod_wire_expression2/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ ENT.Author = ""
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""

ENT.WireDebugName = "Expression 2"

function ENT:SetupDataTables()
self:NetworkVar("Entity", 0, "InstancePlayer")
self:NetworkVar("String", 0, "InstanceName")
end

CreateConVar("wire_expression2_unlimited", "0", {FCVAR_REPLICATED})
CreateConVar("wire_expression2_quotasoft", "10000", {FCVAR_REPLICATED})
CreateConVar("wire_expression2_quotahard", "100000", {FCVAR_REPLICATED})
Expand Down
2 changes: 1 addition & 1 deletion lua/wire/client/text_editor/wire_expression2_editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ Text here]# ]]
if IsValid(ply) and ply == LocalPlayer() or showall then
local nick
if not ply or not ply:IsValid() then nick = "Unknown" else nick = ply:Nick() end
local name = v:GetNWString("name", "generic")
local name = v:GetGateName()

local singleline = string.match( name, "(.-)\n" )
if singleline then name = singleline .. "..." end
Expand Down
Loading