wiremod-svn-archive/wire/lua/entities/gmod_wire_las_reciever/init.lua

37 lines
771 B
Lua
Raw Normal View History

AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "Laser Reciever"
local MODEL = Model("models/jaanus/wiretool/wiretool_range.mdl")
function ENT:Initialize()
self.Entity:SetModel( MODEL )
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
self.Entity:SetSolid( SOLID_VPHYSICS )
self.Outputs = Wire_CreateOutputs(self.Entity,{"X","Y","Z","Dist"})
end
function ENT:OnRemove()
Wire_Remove(self.Entity)
end
function ENT:Setup()
end
function ENT:ShowOutput(value)
if (value ~= self.PrevOutput) then
self:SetOverlayText( "Laser Reciever" )
self.PrevOutput = value
end
end
function ENT:OnRestore()
Wire_Restored(self.Entity)
end