wiremod-svn-archive/wire/lua/entities/base_wire_entity/shared.lua

39 lines
848 B
Lua
Raw Normal View History

2007-02-04 01:16:06 +00:00
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Wire Entity"
ENT.Author = "Erkle"
ENT.Contact = "ErkleMad@gmail.com"
ENT.Purpose = "Base for all wired SEnts"
ENT.Instructions = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.IsWire = true
2007-05-16 19:44:02 +00:00
function ENT:GetOverlayText()
local name = self.Entity:GetNetworkedString("WireName")
//local txt = self.BaseClass.BaseClass.GetOverlayText(self) or ""
2007-05-16 19:44:02 +00:00
local txt = self.Entity:GetNetworkedBeamString( "GModOverlayText" ) or ""
2007-05-16 19:44:02 +00:00
if ( !SinglePlayer() ) then
local PlayerName = self:GetPlayerName()
txt = txt .. "\n(" .. PlayerName .. ")"
2007-05-16 19:44:02 +00:00
end
2007-02-04 01:16:06 +00:00
if (name) and (name ~= "") then
if (txt == "") then
return "- " .. name .. " -"
end
return "- " .. name .. " -\n" .. txt
end
return txt
2007-05-16 19:44:02 +00:00
end