Skip to content

Commit

Permalink
cleanup all FAF files
Browse files Browse the repository at this point in the history
removes space at the end of lines
removes tab at the end of lines
replaces all tabs with spaces (also mixed cases are treated properly,
i.e. 3*space and 1 tab)
  • Loading branch information
CookieNoob authored and aeoncleanse committed May 6, 2017
1 parent 2e06fe2 commit a416588
Show file tree
Hide file tree
Showing 604 changed files with 77,215 additions and 77,215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,118 +7,118 @@
local NullShell = import('/lua/sim/defaultprojectiles.lua').NullShell
local RandomFloat = import('/lua/utilities.lua').GetRandomFloat
local EffectTemplate = import('/lua/EffectTemplates.lua')

local SIFInainoStrategicMissileEffect01 = '/effects/Entities/SIFInainoStrategicMissileEffect01/SIFInainoStrategicMissileEffect01_proj.bp'
local SIFInainoStrategicMissileEffect02 = '/effects/Entities/SIFInainoStrategicMissileEffect02/SIFInainoStrategicMissileEffect02_proj.bp'
local SIFInainoStrategicMissileEffect03 = '/effects/Entities/SIFInainoStrategicMissileEffect03/SIFInainoStrategicMissileEffect03_proj.bp'
local SIFInainoStrategicMissileEffect04 = '/effects/Entities/SIFInainoStrategicMissileEffect04/SIFInainoStrategicMissileEffect04_proj.bp'

InainoEffectController01 = Class(NullShell) {
local SIFInainoStrategicMissileEffect01 = '/effects/Entities/SIFInainoStrategicMissileEffect01/SIFInainoStrategicMissileEffect01_proj.bp'
local SIFInainoStrategicMissileEffect02 = '/effects/Entities/SIFInainoStrategicMissileEffect02/SIFInainoStrategicMissileEffect02_proj.bp'
local SIFInainoStrategicMissileEffect03 = '/effects/Entities/SIFInainoStrategicMissileEffect03/SIFInainoStrategicMissileEffect03_proj.bp'
local SIFInainoStrategicMissileEffect04 = '/effects/Entities/SIFInainoStrategicMissileEffect04/SIFInainoStrategicMissileEffect04_proj.bp'

InainoEffectController01 = Class(NullShell) {
EffectThread = function(self, Data)
local army = self:GetArmy()
self:ForkThread(self.CreateInitialHit, army)
self:ForkThread(self.CreateInitialBuildup, army)
self:ForkThread(self.CreateGroundFingers )
self:ForkThread(self.CreateInitialFingers )
self:ForkThread(self.MainBlast, army)
end,
end,

CreateInitialHit = function( self, army )
for k, v in EffectTemplate.SIFInainoHit01 do
emit = CreateEmitterAtEntity(self,army,v)
end
end
end,

CreateInitialBuildup = function( self, army )
WaitSeconds(2.0)
for k, v in EffectTemplate.SIFInainoHit02 do
emit = CreateEmitterAtEntity(self,army,v)
end
end
end,

MainBlast = function( self, army )
WaitSeconds(5.00)

-- Create a light for this thing's flash.
CreateLightParticle(self, -1, self:GetArmy(), 160, 14, 'flare_lens_add_03', 'ramp_white_07' )

-- Create our decals
CreateDecal( self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self:GetArmy())
CreateDecal( self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self:GetArmy())

-- Create explosion effects
for k, v in EffectTemplate.SIFInainoDetonate01 do
emit = CreateEmitterAtEntity(self,army,v)
end
self:ShakeCamera( 55, 10, 0, 2.5 )
self:ShakeCamera( 55, 10, 0, 2.5 )

WaitSeconds(0.3)

-- Create upward moving smoke plume
local plume = self:CreateProjectile('/effects/entities/SIFInainoStrategicMissileEffect04/SIFInainoStrategicMissileEffect04_proj.bp', 0, 3, 0, 0, 0, 0)
plume:SetLifetime(5.35)
plume:SetVelocity(10.0)
plume:SetAcceleration(-0.35)
plume:SetAcceleration(-0.35)
plume:SetCollision(false)
plume:SetVelocityAlign(true)

-- Create explosion dust ring
local vx, vy, vz = self:GetVelocity()
local num_projectiles = 16
local num_projectiles = 16
local horizontal_angle = (2*math.pi) / num_projectiles
local angleInitial = RandomFloat( 0, horizontal_angle )
local angleInitial = RandomFloat( 0, horizontal_angle )
local xVec, zVec
local offsetMultiple = 30.0
local px, pz

for i = 0, (num_projectiles -1) do
for i = 0, (num_projectiles -1) do
xVec = (math.sin(angleInitial + (i*horizontal_angle)))
zVec = (math.cos(angleInitial + (i*horizontal_angle)))
px = (offsetMultiple*xVec)
pz = (offsetMultiple*zVec)

local proj = self:CreateProjectile(SIFInainoStrategicMissileEffect03, px, 1, pz, xVec, 0, zVec)
proj:SetLifetime(12.0)
proj:SetVelocity(10.0)
proj:SetAcceleration(-0.35)
proj:SetAcceleration(-0.35)
end
end,
CreateGroundFingers = function(self)

CreateGroundFingers = function(self)
-- Outward rushing fingers that spawn the upward fingers
local num_projectiles = 5
local num_projectiles = 5
local horizontal_angle = (2*math.pi) / num_projectiles
local xVec, zVec
local px, pz
for i = 0, (num_projectiles -1) do
xVec = math.sin(i*horizontal_angle)
zVec = math.cos(i*horizontal_angle)
local xVec, zVec
local px, pz

for i = 0, (num_projectiles -1) do
xVec = math.sin(i*horizontal_angle)
zVec = math.cos(i*horizontal_angle)
px = 1 * xVec
pz = 1 * zVec

local proj = self:CreateProjectile(SIFInainoStrategicMissileEffect02, px, 2.0, pz, xVec, 0.0, zVec)
proj:SetVelocity(15)
end
proj:SetVelocity(15)
end
end,

CreateInitialFingers = function(self)
WaitSeconds(1.75)
-- Upward rising fingers that join to form explosion
local num_projectiles = 5
local num_projectiles = 5
local horizontal_angle = (2*math.pi) / num_projectiles
local xVec, zVec
local px, pz
for i = 0, (num_projectiles -1) do
xVec = math.sin(i*horizontal_angle)
zVec = math.cos(i*horizontal_angle)
local xVec, zVec
local px, pz

for i = 0, (num_projectiles -1) do
xVec = math.sin(i*horizontal_angle)
zVec = math.cos(i*horizontal_angle)
px = 25.0 * xVec
pz = 25.0 * zVec

local proj = self:CreateProjectile(SIFInainoStrategicMissileEffect01, px, 2.0, pz, -xVec, 2.0, -zVec)
proj:SetVelocity(20)
proj:SetBallisticAcceleration(-5.0)
end
proj:SetBallisticAcceleration(-5.0)
end
end,
}
TypeClass = InainoEffectController01
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ProjectileBlueprint {
CollideSurface = false,
DestroyOnWater = false,
InitialSpeed = 0,
Lifetime = 100,
Lifetime = 100,
RotationalVelocity = 0,
RotationalVelocityRange = 0,
UseGravity = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ local NullShell = import('/lua/sim/defaultprojectiles.lua').NullShell
local EffectTemplate = import('/lua/EffectTemplates.lua')
local RandomFloat = import('/lua/utilities.lua').GetRandomFloat

local SIFExperimentalStrategicMissileEffect02 = '/effects/Entities/SIFExperimentalStrategicMissileEffect02/SIFExperimentalStrategicMissileEffect02_proj.bp'
local SIFExperimentalStrategicMissileEffect04 = '/effects/Entities/SIFExperimentalStrategicMissileEffect04/SIFExperimentalStrategicMissileEffect04_proj.bp'
local SIFExperimentalStrategicMissileEffect02 = '/effects/Entities/SIFExperimentalStrategicMissileEffect02/SIFExperimentalStrategicMissileEffect02_proj.bp'
local SIFExperimentalStrategicMissileEffect04 = '/effects/Entities/SIFExperimentalStrategicMissileEffect04/SIFExperimentalStrategicMissileEffect04_proj.bp'
local SIFExperimentalStrategicMissileEffect05 = '/effects/Entities/SIFExperimentalStrategicMissileEffect05/SIFExperimentalStrategicMissileEffect05_proj.bp'
local SIFExperimentalStrategicMissileEffect06 = '/effects/Entities/SIFExperimentalStrategicMissileEffect06/SIFExperimentalStrategicMissileEffect06_proj.bp'

SeraphimNukeEffectController01 = Class(NullShell) {
-- Create inner explosion plasma
SeraphimNukeEffectController01 = Class(NullShell) {
-- Create inner explosion plasma
CreateEffectInnerPlasma = function(self)
local vx, vy, vz = self:GetVelocity()
local num_projectiles = 12
Expand All @@ -24,21 +24,21 @@ SeraphimNukeEffectController01 = Class(NullShell) {
local offsetMultiple = 10.0
local px, pz

WaitSeconds( 3.5 )
for i = 0, (num_projectiles -1) do
WaitSeconds( 3.5 )
for i = 0, (num_projectiles -1) do
xVec = (math.sin(angleInitial + (i*horizontal_angle)))
zVec = (math.cos(angleInitial + (i*horizontal_angle)))
px = (offsetMultiple*xVec)
pz = (offsetMultiple*zVec)

local proj = self:CreateProjectile(SIFExperimentalStrategicMissileEffect05, px, -10, pz, xVec, 0, zVec)
proj:SetLifetime(5.0)
proj:SetVelocity(7.0)
proj:SetAcceleration(-0.35)
end
end,
-- Create random wavy electricity lines
end,

-- Create random wavy electricity lines
CreateEffectElectricity = function(self)
local vx, vy, vz = self:GetVelocity()
local num_projectiles = 7
Expand All @@ -48,26 +48,26 @@ SeraphimNukeEffectController01 = Class(NullShell) {
local offsetMultiple = 0.0
local px, pz

WaitSeconds( 3.5 )
for i = 0, (num_projectiles -1) do
WaitSeconds( 3.5 )
for i = 0, (num_projectiles -1) do
xVec = (math.sin(angleInitial + (i*horizontal_angle)))
zVec = (math.cos(angleInitial + (i*horizontal_angle)))
px = (offsetMultiple*xVec)
pz = (offsetMultiple*zVec)

local proj = self:CreateProjectile( SIFExperimentalStrategicMissileEffect06, px, -8, pz, xVec, 0, zVec )
proj:SetLifetime(3.0)
proj:SetVelocity(RandomFloat( 11, 20 ))
proj:SetAcceleration(-0.35)
end
end,
end,

EffectThread = function(self)
self:ForkThread(self.CreateEffectInnerPlasma)
self:ForkThread(self.CreateEffectElectricity)
local army = self:GetArmy()
local position = self:GetPosition()

-- Knockdown force rings
DamageRing(self, position, 0.1, 45, 1, 'Force', true)
WaitSeconds(0.1)
Expand All @@ -77,27 +77,27 @@ SeraphimNukeEffectController01 = Class(NullShell) {
CreateLightParticle(self, -1, army, 140, 10, 'glow_02', 'ramp_blue_22')
WaitSeconds(0.3)
CreateLightParticle(self, -1, army, 80, 36, 'glow_02', 'ramp_blue_16')
-- Create explosion effects

-- Create explosion effects
for k, v in EffectTemplate.SIFExperimentalStrategicMissileHit01 do
emit = CreateEmitterAtEntity(self,army,v)
end
end

WaitSeconds(3.0)
CreateLightParticle(self, -1, army, 160, 6, 'glow_02', 'ramp_blue_16')
WaitSeconds(0.1)
CreateLightParticle(self, -1, army, 60, 60, 'glow', 'ramp_blue_22')

-- Create detonate effects
for k, v in EffectTemplate.SIFExperimentalStrategicMissileDetonate01 do
emit = CreateEmitterAtEntity(self,army,v)
end

-- Create ground decals
local orientation = RandomFloat(0,2*math.pi)
CreateDecal(position, orientation, 'Scorch_012_albedo', '', 'Albedo', 300, 300, 1200, 0, army)
CreateDecal(position, orientation, 'Crater01_normals', '', 'Normals', 150, 150, 1200, 0, army)
CreateDecal(position, orientation, 'Crater01_normals', '', 'Normals', 150, 150, 1200, 0, army)

-- Create explosion dust ring
local vx, vy, vz = self:GetVelocity()
local num_projectiles = 24
Expand All @@ -107,44 +107,44 @@ SeraphimNukeEffectController01 = Class(NullShell) {
local offsetMultiple = 60.0
local px, pz

for i = 0, (num_projectiles -1) do
for i = 0, (num_projectiles -1) do
xVec = (math.sin(angleInitial + (i*horizontal_angle)))
zVec = (math.cos(angleInitial + (i*horizontal_angle)))
px = (offsetMultiple*xVec)
pz = (offsetMultiple*zVec)

local proj = self:CreateProjectile( SIFExperimentalStrategicMissileEffect02, px, -12, pz, xVec, 0, zVec )
proj:SetLifetime(12.0)
proj:SetVelocity(10.0)
proj:SetAcceleration(-0.35)
end

-- Create upward moving plasma plume
local plume = self:CreateProjectile('/effects/entities/SIFExperimentalStrategicMissileEffect03/SIFExperimentalStrategicMissileEffect03_proj.bp', 0, 3, 0, 0, 1, 0)
plume:SetLifetime(6.0)
plume:SetVelocity(20.0)
plume:SetAcceleration(-0.35)
plume:SetCollision(false)
plume:SetVelocityAlign(true)

WaitSeconds(1.0)

-- Create fireball plumes to accentuate the explosive detonation
local num_projectiles = 15
local horizontal_angle = (2*math.pi) / num_projectiles
local angleInitial = RandomFloat(0, horizontal_angle)
local xVec, yVec, zVec
local angleVariation = 0.5
local px, py, pz

for i = 0, (num_projectiles -1) do
xVec = math.sin(angleInitial + (i*horizontal_angle) + RandomFloat(-angleVariation, angleVariation))
xVec = math.sin(angleInitial + (i*horizontal_angle) + RandomFloat(-angleVariation, angleVariation))
yVec = RandomFloat(0.3, 1.5) + 1.2
zVec = math.cos(angleInitial + (i*horizontal_angle) + RandomFloat(-angleVariation, angleVariation))
zVec = math.cos(angleInitial + (i*horizontal_angle) + RandomFloat(-angleVariation, angleVariation))
px = RandomFloat(7.5, 14.0) * xVec
py = RandomFloat(7.5, 14.0) * yVec
pz = RandomFloat(7.5, 14.0) * zVec

local proj = self:CreateProjectile(SIFExperimentalStrategicMissileEffect04, px, py, pz, xVec, yVec, zVec)
proj:SetVelocity(RandomFloat(10, 30))
proj:SetBallisticAcceleration(-9.8)
Expand Down
Loading

0 comments on commit a416588

Please sign in to comment.