Skip to content

Commit 68412ef

Browse files
committed
entity's nicename states the model used if not edited
1 parent cfee8d2 commit 68412ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/pac3/core/client/parts/model/entity.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ function PART:GetNiceName()
6969
class_name = ent:GetClass()
7070
end
7171

72+
if str ~= "" then
73+
return (str and str:gsub("%d", "") or "error") .. " " .. class_name .. " model"
74+
elseif IsValid(self:GetOwner()) then
75+
str = "[" .. string.GetFileFromFilename(string.StripExtension(self:GetOwner():GetModel())) .. "] "
76+
return str .. class_name .. " model"
77+
end
7278
return (str and str:gsub("%d", "") or "error") .. " " .. class_name .. " model"
7379
end
7480

0 commit comments

Comments
 (0)