2007-02-04 01:16:06 +00:00
|
|
|
AddCSLuaFile( "cl_init.lua" )
|
|
|
|
AddCSLuaFile( "shared.lua" )
|
|
|
|
include('shared.lua')
|
|
|
|
|
|
|
|
ENT.WireDebugName = "Screen"
|
|
|
|
|
2007-09-03 11:42:24 +00:00
|
|
|
ENT.ValueA = 0
|
|
|
|
ENT.ValueB = 0
|
|
|
|
|
2007-02-04 01:16:06 +00:00
|
|
|
function ENT:Initialize()
|
|
|
|
self.Entity:PhysicsInit( SOLID_VPHYSICS )
|
|
|
|
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
|
|
|
|
self.Entity:SetSolid( SOLID_VPHYSICS )
|
|
|
|
|
|
|
|
self.Inputs = Wire_CreateInputs(self.Entity, { "A", "B" })
|
|
|
|
end
|
|
|
|
|
2007-09-03 11:42:24 +00:00
|
|
|
function ENT:Think()
|
|
|
|
if self.ValueA then
|
|
|
|
self:SetDisplayA( self.ValueA )
|
|
|
|
self.ValueA = nil
|
|
|
|
end
|
|
|
|
|
|
|
|
if self.ValueB then
|
|
|
|
self:SetDisplayB( self.ValueB )
|
|
|
|
self.ValueB = nil
|
|
|
|
end
|
|
|
|
|
|
|
|
self:NextThink(CurTime() + 0.05)
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
2007-02-04 01:16:06 +00:00
|
|
|
function ENT:Use()
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:TriggerInput(iname, value)
|
|
|
|
if (iname == "A") then
|
2007-09-03 11:42:24 +00:00
|
|
|
self.ValueA = value
|
2007-02-04 01:16:06 +00:00
|
|
|
elseif (iname == "B") then
|
2007-09-03 11:42:24 +00:00
|
|
|
self.ValueB = value
|
2007-02-04 01:16:06 +00:00
|
|
|
end
|
|
|
|
end
|
2007-03-22 03:27:52 +00:00
|
|
|
|
2007-05-06 06:47:48 +00:00
|
|
|
function ENT:Setup(SingleValue, SingleBigFont, TextA, TextB, LeftAlign, Floor)
|
2007-03-22 03:27:52 +00:00
|
|
|
// Extra stuff for Wire Screen (TheApathetic)
|
|
|
|
self:SetTextA(TextA)
|
|
|
|
self:SetTextB(TextB)
|
|
|
|
self:SetSingleBigFont(SingleBigFont)
|
|
|
|
|
2007-05-06 06:47:48 +00:00
|
|
|
//LeftAlign (TAD2020)
|
|
|
|
self:SetLeftAlign(LeftAlign)
|
|
|
|
//Floor (TAD2020)
|
|
|
|
self:SetFloor(Floor)
|
|
|
|
|
2007-03-22 03:27:52 +00:00
|
|
|
// Put it here to update inputs if necessary (TheApathetic)
|
|
|
|
self:SetSingleValue(SingleValue)
|
|
|
|
end
|