if SERVER then
	AddCSLuaFile()
end

DEFINE_BASECLASS("base_gmodentity")

ENT.PrintName = "Bell"
ENT.Editable = true
ENT.Base = "base_gmodentity"
ENT.AutomaticFrameAdvance = true

function ENT:SetupDataTables()
	self:NetworkVar("String", 0, "Label", {KeyName = "lbl", Edit = {type = "Generic", order = 2, title = "#tool.bell.text"}})
end

function ENT:GetOverlayText()
	local text = self:GetLabel()
	text = string.gsub(text, "\\", "")
	text = string.sub(text, 0, 20)
	if (text == "") then return "" end
	local txt =  "\"" .. text .. "\""
	if (txt == "") then return "" end
	if game.SinglePlayer() then return txt end
	return txt .. "\n(" .. self:GetPlayerName() .. ")"
end