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/base_wire_entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ if CLIENT then
local name
if CPPI then
local owner = self:CPPIGetOwner()
name = string.format("(%s)", (isentity(owner) and owner:IsPlayer()) and owner:GetName() or "World")
name = string.format("(%s)", IsValid(owner) and owner:Nick() or "World")
else
name = "(" .. self:GetPlayerName() .. ")"
end
Expand Down
12 changes: 9 additions & 3 deletions lua/wire/client/text_editor/wire_expression2_editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1461,10 +1461,16 @@ Text here]# ]]

local label = vgui.Create("DLabel", panel)
local idx = v:EntIndex()

local ownerStr
if CPPI and v:CPPIGetOwner():GetName() ~= nick then
ownerStr = string.format("Owner: %s | Code Author: %s", v:CPPIGetOwner():GetName(), nick)

if CPPI then
local owner = self:CPPIGetOwner()

if IsValid(owner) and owner:Nick() ~= nick then
ownerStr = string.format("Owner: %s | Code Author: %s", owner:GetName(), nick)
else
ownerStr = "Owner: " .. nick
end
else
ownerStr = "Owner: " .. nick
end
Expand Down
Loading