Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Oct 13, 2016
1 parent 2c9742c commit 24ba5d5
Show file tree
Hide file tree
Showing 155 changed files with 24,932 additions and 0 deletions.
Binary file added backgrounds/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/blocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/death_point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/ring1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/ring2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/ring3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/run_point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/trigger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/materials/lambda/vehicle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions content/scripts/sentences-hl1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// keep clean
Binary file added content/sound/lambda/death.mp3
Binary file not shown.
65 changes: 65 additions & 0 deletions entities/effects/lambda_blood_explosion.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
function EFFECT:Init( data )

local size = 64
local ply = data:GetEntity()

self:SetCollisionBounds( Vector( -size,-size,-size ), Vector( size,size,size ) )
self:SetAngles( data:GetNormal():Angle() + Angle( 0.01, 0.01, 0.01 ) )

self.Pos = data:GetOrigin()
self.Normal = data:GetNormal()
self.Magnitude = data:GetMagnitude()
self.Alpha = 1
self.Player = ply
--self.Force = data:GetVelocity()
self:SetPos( data:GetOrigin() )

local emitter = ParticleEmitter(ply:GetPos())
self.Emitter = emitter
self:AddEffects(EF_NODRAW)

end

function EFFECT:Think( )

local emitter = self.Emitter
local ply = self.Player

for i = 0, 3 do
local particle = emitter:Add("particle/smokesprites_000"..math.random(1,9), self.Pos)
particle:SetVelocity( self.Normal * self.Magnitude )
particle:SetDieTime(0.2)
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( 10 )
particle:SetEndSize( 50 )
--particle:SetRoll( math.Rand(150, 360) )
--particle:SetRollDelta( math.Rand(-1, 1) )
particle:SetAirResistance( 0 )
--particle:SetGravity( Vector( math.Rand( -200 , 200 ), math.Rand( -200 , 200 ), math.Rand( 10 , 100 ) ) )
particle:SetColor( 64, 0, 0 )
end

local particle = emitter:Add("particle/smokesprites_000"..math.random(1,9), self.Pos)
particle:SetVelocity( self.Normal * self.Magnitude )
particle:SetDieTime(1.2)
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( 10 )
particle:SetEndSize( 150 )
--particle:SetRoll( math.Rand(150, 360) )
--particle:SetRollDelta( math.Rand(-1, 1) )
particle:SetAirResistance( 0 )
--particle:SetGravity( Vector( math.Rand( -200 , 200 ), math.Rand( -200 , 200 ), math.Rand( 10 , 100 ) ) )
particle:SetColor( 64, 0, 0 )

self:Remove()

end

function EFFECT:OnRemove()
--self.Emitter:Finish()
end

function EFFECT:Draw()
end
71 changes: 71 additions & 0 deletions entities/effects/lambda_death.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
EFFECT.Mat1 = Material( "lambda/death_point.png" )

function EFFECT:Init( data )

local size = 64
local ply = data:GetEntity()

self:SetCollisionBounds( Vector( -size,-size,-size ), Vector( size,size,size ) )
self:SetAngles( data:GetNormal():Angle() + Angle( 0.01, 0.01, 0.01 ) )

self.Pos = data:GetOrigin()
self.Normal = data:GetNormal()
self.Alpha = 1
self.Player = ply

self.Direction = data:GetScale()
self.Size = data:GetRadius()
self.Axis = data:GetOrigin()
self.Dist = 0

self:SetPos( data:GetOrigin() )
self.PlayerName = ply:Nick()

end

function EFFECT:Think( )

local speed = FrameTime()

if not IsValid(self.Player) then
return false
end

if self.Player:Alive() then
return false
end

self.Alpha = self.Alpha - speed * 0.08
self.Dist = math.sin(CurTime() * 5) * 5

if (self.Alpha < 0 ) then return false end

return true

end

function EFFECT:Render( )

if (self.Alpha < 0 ) then return end

local Normal = self.Normal
local dir = Normal:Angle()
local ply = LocalPlayer()
local ang = ply:GetPos() - self:GetPos()
local dist = ply:GetPos():Distance(self:GetPos())

local signsize = math.Clamp(dist / 20, self.Size / 2, self.Size * 5)
local offset_z = math.Clamp(dist / 20, 50, 200)

cam.IgnoreZ(true)

render.SetMaterial( self.Mat1 )
render.DrawQuadEasy( self:GetPos() + (dir:Forward() * (offset_z + self.Dist)) ,
ang,
signsize, signsize,
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ),
180)

cam.IgnoreZ(false)

end
86 changes: 86 additions & 0 deletions entities/effects/lambda_pointer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
EFFECT.Mat1 = Material( "lambda/ring1.png" )
EFFECT.Mat2 = Material( "lambda/ring2.png" )
EFFECT.Mat3 = Material( "lambda/ring3.png" )
EFFECT.Mat4 = Material( "lambda/run_point.png" )

function EFFECT:Init( data )

local size = 64
local ply = data:GetEntity()

if ply.LastPointer and IsValid(ply.LastPointer) then
ply.LastPointer:Remove()
end
ply.LastPointer = self

self:SetCollisionBounds( Vector( -size,-size,-size ), Vector( size,size,size ) )
self:SetAngles( data:GetNormal():Angle() + Angle( 0.01, 0.01, 0.01 ) )

self.Pos = data:GetOrigin()
self.Normal = data:GetNormal()
self.Alpha = 1

self.Direction = data:GetScale()
self.Size = data:GetRadius()
self.Axis = data:GetOrigin()
self.Dist = 0

self:SetPos( data:GetOrigin() )

end

function EFFECT:Think( )

local speed = FrameTime()

self.Alpha = self.Alpha - speed * 0.16
self.Dist = math.sin(CurTime() * 5) * 5

if (self.Alpha < 0 ) then return false end

return true

end

function EFFECT:Render( )

if (self.Alpha < 0 ) then return end

local Normal = self.Normal
local dir = Normal:Angle()
local ply = LocalPlayer()
local ang = ply:GetPos() - self:GetPos()
local dist = ply:GetPos():Distance(self:GetPos())

render.SetMaterial( self.Mat1 )
render.DrawQuadEasy( self:GetPos() + Normal,
Normal:GetNormalized() * self.Direction,
self.Size, self.Size,
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ),
-(self.Alpha * 400) )

render.SetMaterial( self.Mat2 )
render.DrawQuadEasy( self:GetPos() + Normal,
Normal:GetNormalized() * self.Direction,
self.Size, self.Size,
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ),
(self.Alpha * 500) )

render.SetMaterial( self.Mat3 )
render.DrawQuadEasy( self:GetPos() + Normal,
Normal:GetNormalized() * self.Direction,
self.Size, self.Size,
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ),
-(self.Alpha * 800) )

local signsize = math.Clamp(dist / 20, self.Size / 2, self.Size * 5)
local offset_z = math.Clamp(dist / 20, 50, 200)

render.SetMaterial( self.Mat4 )
render.DrawQuadEasy( self:GetPos() + (dir:Forward() * (offset_z + self.Dist)) ,
ang,
signsize, signsize,
Color( 255, 255, 255, (self.Alpha ^ 1.1) * 255 ),
180)

end
60 changes: 60 additions & 0 deletions entities/entities/env_hudhint_.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
if SERVER then

util.AddNetworkString("LambdaHintText")

SF_HUDHINT_ALLPLAYERS = 1

ENT.Base = "lambda_entity"
ENT.Type = "point"

DEFINE_BASECLASS( "lambda_entity" )

function ENT:PreInitialize()

BaseClass.PreInitialize(self)

self:SetInputFunction("ShowHudHint", self.InputShowHudHint)
self:SetInputFunction("HideHudHint", self.InputHideHudHint)
self.Message = ""

end

function ENT:Initialize()

BaseClass.Initialize(self)

self:AddSpawnFlags(SF_HUDHINT_ALLPLAYERS)

end

function ENT:KeyValue(key, val)

BaseClass.KeyValue(self, key, val)

if key == "message" then
self.Message = val
end

end

function ENT:InputShowHudHint(data, activator, caller)

return self:Command(data, activator, caller)

end

function ENT:InputHideHudHint(data, activator, caller)

return self:Command(data, activator, caller)

end

function ENT:Command(data, activator, caller)
-- Stub
end

else -- CLIENT



end
27 changes: 27 additions & 0 deletions entities/entities/env_message_.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
if SERVER then

ENT.Base = "lambda_entity"
ENT.Type = "point"

DEFINE_BASECLASS( "lambda_entity" )

function ENT:PreInitialize()

BaseClass.PreInitialize(self)
--self:SetInputFunction("ShowMessage", self.InputCommand)

end

function ENT:Initialize()

BaseClass.Initialize(self)

end

function ENT:KeyValue(key, val)

BaseClass.KeyValue(self, key, val)

end

end
59 changes: 59 additions & 0 deletions entities/entities/info_npc_spawn_destination.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
local DbgPrint = GetLogging("NPC")

if SERVER then

ENT.Base = "base_point"
ENT.ReuseDelay = 0
ENT.RenameNPC = nil
ENT.TimeNextAvailable = 0

DEFINE_BASECLASS( "base_point" )

function ENT:PreInitialize()

self:SetupOutput("OnSpawnNPC")

end

function ENT:KeyValue(key, val)

if key:iequals("ReuseDelay") then
self.ReuseDelay = tonumber(val)
elseif key:iequals("RenameNPC") then
self.RenameNPC = val
end

return BaseClass.KeyValue(self, key, val)

end

function ENT:Initialize()

self.TimeNextAvailable = CurTime()

BaseClass.Initialize(self)

end

function ENT:IsAvailable()

if self.TimeNextAvailable > CurTime() then
return false
end

return true

end

function ENT:OnSpawnedNPC(ent)

if self.RenameNPC ~= nil and self.RenameNPC ~= "" then
ent:SetName(self.RenameNPC)
end

self:FireOutputs("OnSpawnNPC", ent, self)
self.TimeNextAvailable = CurTime() + self.ReuseDelay

end

end
5 changes: 5 additions & 0 deletions entities/entities/lambda_checkpoint.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ENT.Base = "base_point"
ENT.Type = "point"

function ENT:Initialize()
end
Loading

0 comments on commit 24ba5d5

Please sign in to comment.